@font-face {
  font-family: "CenturyGothic";
  font-style: normal;
  font-weight: 100;
  src: url(/font/centurygothic.ttf);
}
@font-face {
  font-family: "CenturyGothic";
  font-style: bold;
  font-weight: 600;
  src: url(/font/centurygothic_bold.ttf);
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100;
  src: url(font/Montserrat/Montserrat-Thin.ttf);
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300;
  src: url(font/Montserrat/Montserrat-Light.ttf);
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  src: url(font/Montserrat/Montserrat-Regular.ttf);
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  src: url(font/Montserrat/Montserrat-Medium.ttf);
}

@font-face {
  font-family: "Montserrat";
  font-style: bold;
  font-weight: 600;
  src: url(font/Montserrat/Montserrat-SemiBold.ttf);
}
@font-face {
  font-family: "Montserrat";
  font-style: bold;
  font-weight: 700;
  src: url(font/Montserrat/Montserrat-Bold.ttf);
}
@font-face {
  font-family: "Montserrat";
  font-style: bold;
  font-weight: 800;
  src: url(font/Montserrat/Montserrat-ExtraBold.ttf);
}
@font-face {
  font-family: "Montserrat";
  font-style: bold;
  font-weight: 900;
  src: url(font/Montserrat/Montserrat-Black.ttf);
}

* {
  margin: 0px;
  padding: 0px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
}

.d-flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.d-none {
  display: none;
}
.m-auto {
  margin: auto;
}
.ml-0 {
  margin-left: 0px;
}
.mr-0 {
  margin-right: 0px;
}
.mt-0 {
  margin-top: 0px;
}
.mb-0 {
  margin-bottom: 0px;
}
.cursor {
  cursor: pointer;
}
.submit_ {
}
input:focus-visible,
textarea:focus-visible {
  outline: none;
}
.link {
  color: #53469f;
}
.link:hover {
  text-decoration: underline;
}

.h2 {
  font-size: 2em;
  font-weight: 600;
  margin-bottom: 1em;
}
.textarea {
  padding: 10px;
  border: 1px solid #ccc;
  resize: none;
  border-radius: 6px;
}
.textarea:read-only {
  background: #f3f3f3;
}
.textarea::placeholder {
  color: #878787;
}

/* удалить [text] и т.д. */
/* Базовый .input — оставлен в classic-стиле (37px / borderless рамка) чтобы
   не ломать админку и другие формы. Минималистичный вариант (32px / filled)
   применяется только в .task-list (см. ниже). */
.input {
  height: 37px;
  border-radius: 6px;
  border: 1px solid #dadada;
  padding: 9px;
  padding-left: 10px;
  box-sizing: border-box;
}
.input::placeholder {
  color: #878787;
}
.input:read-only {
  background: #f3f3f3;
}
.submit {
  background: #53469f;
  height: 3em;
  width: 10em;
  border: none;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.3em;
  text-decoration: none;
}
.submit:hover {
  background: #202020;
}
.radio {
  height: 20px;
  width: 20px;
}
.checkbox {
  width: 20px;
  height: 20px;
}
/* Базовый .select — classic 37px / borderless. Минималистичный вариант (32px /
   прозрачный) применяется только в .task-list (см. ниже). */
.select {
  height: 37px;
  border-radius: 6px;
  border: 1px solid #dadada;
  padding: 9px;
  padding-left: 10px;
  box-sizing: border-box;
  background: #fff;
}

.act-select {
  color: #000;
  font-weight: 500;
}

.select[readonly] {
  pointer-events: none;
  background: #f3f3f3;
}

.table,
.table * {
  box-sizing: border-box;
}

.table {
  display: table;
  width: max-content;
  box-sizing: border-box;
}
.table .tr {
  display: table-row;
}
.table .tr .th {
  display: table-cell;
  padding: 5px;
  vertical-align: middle;
  font-weight: 600;
  border-right: 1px solid #eff2f7;
  white-space: nowrap;
}
.table .tr .td {
  display: table-cell;
  padding: 5px;
  border-bottom: 1px solid rgba(218, 218, 218, 1);
  border-right: 1px solid #eff2f7;
  overflow: hidden;
  word-break: break-word;
}
.table .tr .td .td-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* удалить [text] и т.д. */

.pg_line {
  text-align: center;
  height: 30px;
  margin-bottom: 50px;
  margin-top: 30px;
}
.pg_line .pg_line_ {
  flex-wrap: wrap;
}
.pg_line .pg_line_ .pg_line_l {
}
.pg_line .pg_line_ .pg_line_r {
}
.pg_line .pg_line_ .pg_line_ll {
}
.pg_line .pg_line_ .pg_line_rr {
}
.pg_line .pg_line_ .pg_ {
  display: flex;
  width: 22px;
  height: 22px;

  justify-content: center;
  align-items: center;
  border-radius: 4px;
  margin-left: 5px;
  margin-right: 5px;
  color: #000;
}
.pg_line .pg_line_ .pg_act {
  background: #eee;
  outline: 1px solid #ccc;
}

body {
  background: #fff;
}

.top {
  height: 50px;
  width: 100%;
  background: #dbdfe3;
}

.top .top-left {
  width: 50px;
}
.top .top-left svg {
  margin: auto;
  width: 25px;
  height: 25px;
}
.top .top-right {
  width: calc(100% - 50px);
}
.top .top-right .help-desc {
  margin-left: 15px;
  display: flex;
  margin-right: 10px;
}
.top .top-right .help-desc .img {
  width: 100%;
}
.top .top-right .new-task {
  margin-left: 20px;
  margin-right: 20px;
  height: 37px;
  width: 173px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #53469f;
  border-radius: 6px;
  font-weight: 500;
}
.top .top-right .new-task:hover {
  background: #fff;
  color: #53469f;
}
.top .top-right .new-task svg {
  width: 30px;
  height: 30px;
}
.top .top-right .new-task .span {
  font-size: 1.2em;
}

.top .top-right .top-text {
  margin-left: 15px;
  font-size: 1em;
  display: flex;
}
.top .top-right .top-text .edit {
  margin-left: 5px;
}
.top .top-right .top-text .img {
  margin-right: 5px;
  width: 20px;
  position: relative;
}
.top .top-right .top-text .span {
  font-weight: 600;
  font-size: 1em;
}
.top .top-right .top-text .top-text-user {
  font-size: 1.2em;
}
.top .top-right .top-text .top-text-status {
  margin-left: 25px;
  font-size: 1.2em;
}

.top .top-right .check-email {
  margin: auto;
  width: 1em;
  height: 1em;
  background: #f00;
  border-radius: 50%;
  margin-right: 0;
}
.top .top-right .check-email-y {
  background: #999;
}

.top .top-right .all_news_crm {
  margin: auto;
  margin-left: 0px;
  width: 110px;
  background: #eee;
  height: 25px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  outline: 1px solid #ccc;

  padding-left: 5px;
  padding-right: 5px;
  display: none;
}

.top .top-right .day-night {
  margin: auto;
  margin-right: 1em;
  margin-left: 1em;
}

.top .top-right .day-night .bi {
  cursor: pointer;
}

/* ── Тема-переключатель: три точки ─────────────────────────── */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: auto 10px;
    padding: 5px 8px;
    border-radius: 20px;
    background: rgba(0,0,0,0.06);
    cursor: pointer;
}
/* Одна точка-цвет */
.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.theme-dot:hover { transform: scale(1.2); }
/* Активная — с белой обводкой */
.theme-dot-active {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}
/* Цвет каждой точки */
.theme-dot-day   { background: #f5c518; } /* солнечный жёлтый */
.theme-dot-night { background: #6c757d; } /* тёмно-серый      */
.theme-dot-blue  { background: #5c7cfa; } /* синий            */

.top .top-right .out {
  background: #b9c2cb;
  height: 50px;
  width: 134px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-decoration: none;
  font-weight: 500;
}
.top .top-right .out .span {
  font-size: 1.2em;
}
.top .top-right .out .img {
  margin-left: 10px;
}

.block .left-menu {
  background-color: #8e9eb3;
  width: 50px;
  min-height: calc(100vh - 50px);
}
.block .left-menu .left-menu- {
  margin-top: 0px;
  margin-bottom: 0px;
  height: 65px;
  border-bottom: 1px solid rgba(129, 145, 166, 1);
  display: flex;
  cursor: pointer;
}
.block .left-menu .left-menu- svg {
  margin: auto;
  width: 32px;
  height: 32px;
  fill: #fff;
}
.block .left-menu .left-menu- svg.bi-max {
  stroke: #fff;
}
.block .left-menu .left-menu-:hover {
  background: #dbdfe3;
}
.block .left-menu .left-menu-:hover svg {
  fill: #4dad33;
}
.block .left-menu .left-menu-:hover svg.bi-max {
  stroke: #4dad33;
}
.block .left-menu .left-menu-act {
  background: #6e7f95;
}
.block .left-menu .left-menu-act svg {
  fill: #ccc;
}
.block .left-menu .left-menu-act svg.bi-max {
  stroke: #ccc;
}
.block .left-menu .left-menu-act:hover {
  background: #6e7f95;
}
.block .left-menu .left-menu-act:hover svg {
  fill: #ccc;
}
.block .left-menu .left-menu-act:hover svg.bi-max {
  stroke: #ccc;
}

/* ── Menu: Toast notification stack ────────────────────────── */
.msg-toast-stack {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 80px);
  overflow: visible;
  pointer-events: none;
}
.msg-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e5ea;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s ease;
  transform: translateX(0);
  opacity: 1;
}
.msg-toast-enter {
  transform: translateX(100%);
  opacity: 0;
}
.msg-toast-exit {
  transform: translateX(100%);
  opacity: 0;
}
.msg-toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.msg-toast-body {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.msg-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-toast-name {
  font-weight: 600;
  font-size: .92em;
  color: #181531;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-toast-time {
  font-size: .78em;
  color: #9ca3af;
  flex-shrink: 0;
}
.msg-toast-text {
  font-size: .85em;
  color: #6b7280;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msg-toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
  padding: 0;
  margin-top: -2px;
}
.msg-toast-close:hover {
  background: #f3f4f6;
  color: #374151;
}
.msg-toast:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.1);
}
.msg-toast-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: .7em;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Menu: Message badge (red dot) ─────────────────────────── */
.menu-msg-wrap {
  position: relative;
}
.menu-msg-badge {
  position: absolute;
  bottom: 8px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #53616e;
  box-sizing: content-box;
  pointer-events: none;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.block .center {
  width: calc(100% - 50px);
}
.block .center .client_line_top {
  margin: 10px;

  border-bottom: 1px solid #4dad33;
}
.block .center .client_line_top .client_line_top_link {
  width: 100px;
  background: #eee;
  margin-right: 3px;
  text-align: center;
  padding: 5px;
  display: flex;
  justify-content: center;
  text-decoration: none;
}
.block .center .client_line_top .client_line_top_link:hover {
  color: #4dad33;
  outline: 1px solid #4dad33;
}
.block .center .client_line_top .client_line_top_link_action {
  background: #4dad33;
  color: #fff;
  outline: 1px solid #4dad33;
}
.block .center .client_line_top .client_line_top_link_action:hover {
  color: #fff;
}

.block .center .center-hleb {
  height: 30px;
  margin: 12px;
  font-size: 13px;
  align-items: center;
}
/* На страницах мессенджеров (Whatsapp / MAX / Telegram) делаем крошки тоньше —
   убираем "белое место" сверху, чтобы окно чата было выше. */
.block .center.center_6 .center-hleb,
.block .center.center_11 .center-hleb,
.block .center.center_12 .center-hleb {
  height: 24px;
  margin: 6px 12px;
}
.block .center.center_6 .center-hleb .link .img,
.block .center.center_11 .center-hleb .link .img,
.block .center.center_12 .center-hleb .link .img {
  padding: 5px 8px;
}
/* И сам контейнер чата подтягиваем — высота на 50px меньше базовой */
.center_6 .wappi .wappi_left,
.center_6 .wappi .wappi_right,
.center_11 .wappi .wappi_left,
.center_11 .wappi .wappi_right,
.center_12 .wappi .wappi_left,
.center_12 .wappi .wappi_right {
  height: calc(100vh - 95px);
}
.block .center .center-hleb .link {
  display: flex;
  align-items: center;
  margin-right: 10px;
  text-decoration: none;
  color: #000;
}
.block .center .center-hleb .link .img {
  padding: 9px 12px;
  border: 1px solid rgba(208, 208, 208, 1);
  border-radius: 7px;
  margin-right: 5px;
}
.block .center .center-hleb .link .img-str {
  margin-right: 10px;
}

.block .center .center-filter-mobyle {
  display: none;
}
.block .center .center-filter {
  min-width: 500px;
  background: #f7f8f9;
  min-height: 80px;
  margin: 10px;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #e6e9ee;
}
.block .center .center-filter .center-filter-top {
  width: calc(100% + 2px);
  min-height: 35px;
  background: #fff;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  margin-left: -1px;
  margin-right: -1px;
  margin-top: -1px;
  margin-bottom: -1px;
  border-bottom: 1px solid #e6e9ee;
}
.block .center .center-filter .center-filter-top .tab {
  min-width: 200px;
  height: 39px;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  border-radius: 5px 5px 0px 0px;
  cursor: pointer;
  font-weight: 500;
  background: #fff;
  color: #878787;
  text-decoration: none;
  padding: 10px;
  box-sizing: border-box;
  border: 2px solid #e6e9ee;
}
.block .center .center-filter .center-filter-top .tab_ {
  background: #e6e9ee;
  color: #000;
}

.block .center .center-filter .center-filter-top .tab_ .span {
  font-weight: 600;
}

.block .center .center-filter .center-filter-top .tab .link {
  white-space: nowrap;
  text-decoration: none;
  width: 120px;
  text-align: left;
}
.block .center .center-filter .center-filter-top .tab .input {
  width: 120px;
}
.block .center .center-filter .center-filter-top .tab .img {
  margin-left: 7px;
}
.block .center .center-filter .center-filter-top .tab .span {
  padding: 9px;
  color: #000;
  font-size: 1em;
}

.block .center .center-filter .center-filter-top .tab-plus {
  width: 40px;
  min-width: auto;
  font-weight: 400;
  font-size: 24px;
}
.block .center .center-filter .center-filter-top .tab-plus .link {
  width: auto;
}
.block .center .center-filter .center-filter-top .tab-plus .link .span {
  font-size: 29px;
  padding: 0;
}

.block .center .center-filter .center-filter-left {
  width: 78%;
  margin: 1%;
  display: flex;
  flex-wrap: wrap;
}
.block .center .center-filter .center-filter-left .center-filter-left-inp {
  min-width: 155px;
  min-height: 20px;
  margin: 3px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.block .center .center-filter .center-filter-left .center-filter-left-inp label {
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-inp-name {
  color: #000;
  display: flex;
  justify-content: space-between;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-inp-name
  .bi {
  color: #999;
  width: 1em;
  height: 1em;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-inp-name
  .bi-close {
  width: 2em;
  height: 2em;
  color: #000;
}

.hints {
  width: 150px;
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  z-index: 1;
}
.hints .hints-close {
  text-align: right;
  margin-bottom: 10px;
}
.block .center .center-filter .center-filter-left .center-filter-left-inp .center-filter-left-inp- {
  display: flex;
  justify-content: space-between;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-inp-
  i {
  margin: auto;
  margin-right: 5px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-inp-
  i
  svg {
  transform: rotate(90deg);
  fill: #000;
}

.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result {
  position: absolute;
  margin-top: 15px;
  background: #fff;
  width: 250px;
  min-height: 115px;
  border: 1px solid #ccc;
  z-index: 1;
  display: none;
  border-radius: 5px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 10px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .close {
  margin: auto;
  margin-right: 10px;
  width: 20px;
  display: flex;
  height: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .close
  .close-icon {
  width: 20px;
  height: 20px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_ {
  display: flex;
  flex-direction: column;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_
  .filter_result__ {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow: auto;
  margin-bottom: 10px;
  margin-top: 10px;
  padding-top: 5px;
  background: #f7f8f9;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_ajax_seach {
  display: flex;
  align-items: center;
  justify-content: center;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_ajax_seach
  input[type="date"] {
  width: 110px;
  font-size: 10px;
  padding: 5px;
  margin-left: 3px;
  margin-right: 3px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .action {
  margin: auto;
  width: 85px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(83, 70, 159, 1);
  border-radius: 5px;
  margin-left: 10px;
}

.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .clear-checkbox {
  margin: auto;
  margin-right: 0;
}

.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  button {
  margin-right: 10px;
  font-size: 15px;
  width: 25px;
  border: 1px solid #000;
  border-radius: 3px;
  background: #eee;
  cursor: pointer;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .action_ {
  border: 1px solid #000;
  border-radius: 3px;
  background: #a0a0a0;
}

.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_ajax_seach
  input[type="text"] {
  width: calc(100% - 15px);
  margin: auto;
  margin-left: 5px;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_
  .filter_result_ajax {
  margin: auto;
  margin-top: 2px;
  margin-left: 10px;
  margin-right: 10px;
  display: flex;
  padding-bottom: 2px;
  margin-bottom: 2px;
  justify-content: space-between;
}

.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_
  .filter_result_ajax
  label {
  width: 100%;
  word-break: break-word;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}
.block
  .center
  .center-filter
  .center-filter-left
  .center-filter-left-inp
  .center-filter-left-result
  .filter_param
  .filter_result_
  .filter_result_ajax
  input[type="checkbox"] {
  height: 18px;
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-left: 5px;
}
.block .center .center-filter .center-filter-right {
  width: calc(17% - 1px);
  margin: 1%;
}
.block .center .center-filter .center-filter-right .center-filter-right-result- {
  text-decoration: underline;
  margin-top: 10px;
  margin-right: 10px;
}
.block .center .center-filter .filter-bott {
  margin: auto;
  margin-left: 15px;
  margin-bottom: 15px;
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  width: 25em;
  height: 3em;
  background: #53469f;
  border-radius: 6px;
  border: 2px solid #53469f;
}
.block .center .center-filter .filter-bott:hover {
  background: #7363ce;
}
.block .center .center-filter .filter-bott .img {
  margin: auto;
  margin-right: 10px;
}
.block .center .center-filter .filter-bott .span {
  margin: auto;
  margin-left: 0px;
}
.block .center .center-filter .filter-bott-clear {
  margin-left: 25px;
  font-size: 13px;
  color: #000;
  font-weight: 500;
  text-decoration: none;
  width: calc(100% - 40px);
}
.block .center .center-filter .filter-bott-clear .img {
  margin-right: 5px;
}
.block .center .center-filter .filter-bott-fu {
  width: 150px;
}
.block .center .center-filter .filter-bott-fu .span {
  margin: auto;
}

.block .center .center-filter .filter-save {
  background: none;
  color: #000;
}

.block .center .center-filter .filter-save:hover {
  background: #fff;
}

.block .center .pagination_change {
  margin: 10px;
  text-align: right;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.block .center .pagination_change .report-file {
}
.block .center .add_ {
  margin-left: 10px;
  margin-right: 10px;

  padding-left: 15px;
  padding-right: 15px;
  padding-bottom: 10px;
  padding-top: 10px;

  font-size: 1em;
  border: 2px solid rgba(83, 70, 159, 1);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  max-width: 205px;
}
.block .center .add_:hover {
  background: #fff;
}
.client_add_ {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 15px;
}
.client_add_ .client_add_link {
  max-width: calc(100% - 300px);
}
.client_add_ .client_add_link .b {
  word-break: break-all;
}
.block .center .result_tb {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
}

.block .center .result {
  margin: 0;       /* убираем отступы — таблица от края до края */
  width: 100%;
  box-sizing: border-box;
}

.block .center .result .result_line {
  background: #f7f8f9;
  color: #000;
}
.block .center .result .result_line div {
  width: auto;
}

.block .center .result .chang-title {
  position: absolute;
  margin-top: -20px;
  margin-left: 5px;
}
.block .center .result .chang-title .img {
  width: 20px;
  cursor: pointer;
}
.block .center .result .chang-title .right {
  transform: rotate(180deg);
  margin-left: 5px;
}

.block .center .result .chang-width {
  position: absolute;
  z-index: 2;
}
.block .center .result .chang-width .bi-arrows-expand-vertical {
  width: 20px;
  height: 27.6px;
}

.block .center .result .result_left {
  width: calc(100% - 281px);
  display: flex;
  flex-direction: column;
  margin: 0;
}

.block .center .result .result_left .result-left-line {
  margin: auto;
  margin-top: 5px;
  margin-bottom: 20px;

  margin-left: 45px;
  margin-right: 15px;
  word-break: break-all;
}
.block .center .result .result_left .result-left-line .line-name {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
}
.block .center .result .result_left .result-left-line .line-name .img,
.block .center .result .result_left .result-left-line .line-name .bi {
  margin-left: 10px;
}
.block .center .result .result_left .result-left-line .task-name {
  font-weight: 700;
  font-size: 1.1em;
}
.block .center .result .result_left .result-left-line .input {
  width: 100%;
}
.block .center .result .result_left .result-left-line .textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
}

.block .center .result .result_left .result-left-line .diff-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 5px;
  background: #e6e9ee;
  padding: 5px;
  border-radius: 0px 10px 0px 10px;
}
.block .center .result .result_left .result-left-line .diff-task .input {
  width: calc(100% - 56px);
  margin-right: 0;
  margin-left: 10px;
}
.block .center .result .result_left .result-left-line .diff-task .bi-trash {
  margin-left: 10px;
  cursor: pointer;
}
.block .center .result .result_left .result-left-line .diff-task .textarea {
  min-height: auto;
  margin-top: 5px;
  max-height: 50px;
}
.block .center .result .result_left .result-left-line .span {
  margin-left: 15px;
  color: #53469f;
  font-weight: 600;
  padding: 3px;
  border: 1px solid #53469f;
  border-radius: 6px;
  background: #fff;
  padding-left: 7px;
  padding-right: 7px;
  cursor: pointer;
}
.block .center .result .result_left .result-left-line .span:hover {
  color: #fff;
  background: #53469f;
}

.block .center .result .sotr-link {
  margin-left: 20px;
  margin-bottom: 20px;
  margin-right: 20px;
}

.block .center .result .sotr-link .link-sotr {
  word-break: break-all;
}

.block .center .result .result_left .menu_task {
  margin-top: 0;
  margin-left: 20px;
  margin-right: 10px;
  margin-bottom: 0;
  background: #fff;
  min-width: 0;
  align-self: stretch;
  box-sizing: border-box;
}
.block .center .result .result_left .menu_task .menu_task_line {
  margin: auto;
  margin-top: 0px;
}
.block .center .result .result_left .menu_task .menu_task_line .menu_task_line_link {
  font-weight: 600;
  margin-left: 0px;
  margin-right: 1px;
  width: 190px;
  text-align: center;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(230, 233, 238, 1);
  border: 1px solid #eee;
  box-sizing: border-box;
  border-bottom: 0;
}
.block .center .result .result_left .menu_task .menu_task_line .menu_task_line_action {
  border-bottom: 1px solid #fff;
  background: #fff;
}
.block .center .result .result_left .menu_task .menu_task_result {
  padding-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

.block .center .result .result_left .menu_task .menu_task_result .add-address {
  padding: 0.5em;
  border: 1px solid #000;
  margin: auto;
  margin-right: 0;
  margin-bottom: 1em;
  color: #000;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}

.block .center .result .result_left .menu_task .menu_task_result_file {
  flex-direction: column;
}
.block .center .result .result_left .menu_task .menu_task_result_file .files_line {
  margin-bottom: 5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
}
.block .center .result .result_left .menu_task .menu_task_result_file .files_line .files_line_name {
  width: 250px;
  margin-right: 15px;
  display: flex;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result_file
  .files_line
  .files_line_name
  input[type="text"] {
  width: 215px;
  height: 26px;
  border: none;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result_file
  .files_line
  .files_line_name
  i {
  width: auto;
  margin: auto;
  margin-right: 0px;
  cursor: pointer;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result_file
  .files_line
  .files_line_name_ {
  margin: auto;
  margin-left: 0px;
  margin-right: 15px;
}
.block .center .result .result_left .menu_task .menu_task_result_file .files_line .files_line_src_ {
  width: 100px;
  display: flex;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result_file
  .files_line
  .files_line_src_
  img {
  margin: auto;
  max-width: 80px;
  border: 1px solid #ccc;
  max-height: 20px;
  margin-right: 20px;
}
.block .center .result .result_left .menu_task .menu_task_result_file .files_line a {
  margin: auto;
  margin-left: 0px;
  margin-right: 0px;
}
.block .center .result .result_left .menu_task .menu_task_result_file .files_line .del_ {
  color: #999;
}

.block .center .result .result_left .menu_task .menu_task_result .file_rez {
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}
.block .center .result .result_left .menu_task .menu_task_result .file_rez label {
  font-weight: 600;
}
.block .center .result .result_left .menu_task .menu_task_result .file_rez p {
  margin-right: 15px;
}
.block .center .result .result_left .menu_task .menu_task_result .list_comment {
  width: 450px;
  background: rgba(243, 243, 243, 1);
  height: 310px;
  overflow: auto;
  margin-right: 15px;
  display: flex;
  flex-direction: column-reverse;
  padding-top: 20px;
  border-radius: 16px;
}
.block .center .result .result_left .menu_task .menu_task_result .list_comment .comment_line {
  margin-bottom: 15px;

  margin-left: 15px;
  margin-right: 15px;
}
.block .center .result .result_left .menu_task .menu_task_result .list_comment .comment_line p {
  color: #999;
  margin-bottom: 3px;
  font-size: 10px;
}
.block .center .result .result_left .menu_task .menu_task_result .list_comment .comment_line span {
  background: #fff;
  padding: 5px;
  width: calc(100% - 10px);
  display: block;

  border-radius: 2px;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result
  .list_comment
  .comment_line
  .file_rez {
  padding-bottom: 0px;
  font-size: 10px;
  margin-bottom: 0px;
  margin-top: 1px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right {
  width: 300px;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result
  .comment_right
  .comment_right_text {
  width: 100%;
  height: 120px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right .client-read {
  margin-top: 10px;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result
  .comment_right
  .client-read
  .label {
  display: flex;
  align-items: center;
}
.block
  .center
  .result
  .result_left
  .menu_task
  .menu_task_result
  .comment_right
  .client-read
  .label
  .checkbox {
  margin-right: 10px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right .add_file_task {
  margin: auto;
  width: 150px;
  margin-top: 15px;
  margin-right: 0px;

  text-align: right;
  margin-bottom: 10px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right .submit {
  margin: auto;
  margin-top: 15px;
  margin-right: 0px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right .del_file {
  background: #eee;
  padding: 3px;
  padding-left: 10px;
  padding-right: 3px;
  margin-bottom: 2px;
  border-radius: 5px;
}
.block .center .result .result_left .menu_task .menu_task_result .comment_right .del_file p {
}

.block .center .result .result_left .menu_task .menu_task_object_result {
  display: flex;
  flex-direction: column;
}
.block .center .result .result_left .menu_task .menu_task_object_result .object_line {
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 25px;
  margin-right: 25px;
}

.block .center .result .result_rigth {
  width: 245px;
  padding: 18px;

  margin-top: -20px;
  background: rgba(230, 233, 238, 1);
  border-radius: 5px;
}
.block .center .result .result_rigth .status_block {
}
.block .center .result .result_rigth .status_block .select {
  width: 100%;
  height: 47px;
  background: rgb(255, 133, 34);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  padding: 0;
}
.block .center .result .result_rigth .status_block .select:hover {
}
.block .center .result .result_rigth .right_line_ {
  border-bottom: 1px solid #ccc;
  margin-top: 1.3em;
}
.block .center .result .result_rigth .right_line {
  margin-top: 1.3em;
}
.block .center .result .result_rigth .right_line .right_line_time {
  justify-content: flex-start;
  align-items: center;
  display: flex;

  margin-top: 5px;
}
.block .center .result .result_rigth .right_line .right_line_time .right_line_time_ {
  width: auto;
  margin-right: 5px;
  color: rgba(83, 70, 159, 1);
  font-weight: 700;
}
.block .center .result .result_rigth .right_line .right_line_time .right_line_time__ {
  width: auto;
  margin-right: 5px;
  margin-left: 10px;
  color: rgba(83, 70, 159, 1);
  font-weight: 700;
}
.block .center .result .result_rigth .right_line .right_line_time .right_line_time___ {
  margin-left: 10px;
}
.block .center .result .result_rigth .right_line ol {
  padding: 25px;
  box-sizing: border-box;
  padding-top: 10px;
  padding-bottom: 10px;
  margin: 0;
  background: #f3f3f3;
}
.block .center .result .result_rigth .right_line span {
  color: #000;
  margin-bottom: 3px;
}
.block .center .result .result_rigth .right_line p {
  margin-bottom: 7px;
  color: rgba(83, 70, 159, 1);
  font-weight: 700;
  margin-top: 4px;
}

.block .center .result .result_rigth .right_line .responsibly {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  color: rgba(83, 70, 159, 1);
  font-weight: 700;
  margin-top: 4px;
}

.block .center .result .result_rigth .right_line .responsibly .img {
  width: 30px;
  margin-right: 5px;
  border-radius: 50%;
  height: 30px;
}

.block .center .result .result_rigth .right_line .none {
  color: rgba(135, 135, 135, 1);
}
.block .center .result .result_rigth .right_line .input {
  margin-top: 7px;
}
.block .center .result .result_rigth .right_line .responsibly_update {
}
.block .center .result .result_left .menu_task .task_history_result {
  flex-direction: column;
}
.block .center .result .result_left .menu_task .task_history_result .line_history {
  margin-bottom: 10px;
}
.block .center .result .result_left .menu_task .task_history_result .title {
  margin-bottom: 10px;
}
.block .center .result .result_left .menu_task .task_history_result .line_history p {
  margin-top: 1px;
}
.block .center .result .result_left .menu_task .task_history_result .line_history span {
  color: #999;
  font-size: 10px;
}
.block .center .result .result_left .menu_task .task_history_result .task_history {
  max-height: 310px;
  overflow: auto;
  outline: 1px solid #eee;
  padding: 10px;
}

/* Не-статус select'ы (Ответственный, Доп. статус) — нейтральный стиль:
   прозрачный фон в покое + лёгкая серая подложка при hover.
   Цветным остаётся только .status-chip (он перекрывает через бо́льшую specificity). */
.block .center .task-list .select,
.block .center .task-list .input {
  max-width: 160px;
  height: 32px;
  padding: 4px 22px 4px 4px;
  border-radius: 8px;
  border: none;
  background-color: transparent;
  color: #374151;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%239ca3af' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px;
  transition: background-color 0.15s;
}
.block .center .task-list .select:hover,
.block .center .task-list .input:hover { background-color: #f3f5f8; }
.block .center .task-list .select:focus,
.block .center .task-list .input:focus {
  outline: none;
  background-color: #f3f5f8;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.4);
}
.block .center .task-list .select .bi-caret-right-fill {
  fill: #000;
  transform: rotate(90deg);
}

/* Старый кружок — оставлен на всякий случай (других мест с этим классом нет). */
.block .center .task-list .type-task-user-color {
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
}

/* Чип «Тип» (P1 #4): прямоугольник с цветным фоном и контрастным текстом.
   Цвет фона — inline-style из настроек типа задачи в админке.
   Текст — рассчитан в PHP через makeReadableTextColor() по YIQ-яркости фона.
   Длинные названия обрезаются ellipsis'ом, полное — в data-full → JS-тултип. */
.type-task-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
}
.type-task-chip--neutral {
    background: #f3f5f8;
    color: #6b7280;
}

/* .tasl_list  */

.tasl_list .center {
  width: 100%;
}
.tasl_list .center .result {
  flex-direction: column;
  width: 100%;
  margin: 0;
}
.tasl_list .center .result .result_left {
  width: 100%;
}
.tasl_list .center .result .result_left .result_left_top {
  display: flex;
}
.tasl_list .center .result .result_rigth {
  width: 100%;
  margin-top: 2em;
  box-sizing: border-box;
  display: flex;
}
.tasl_list .center .result .result_left .result-left-line {
  margin: 1em;
}
.tasl_list .center .result .result_left .menu_task {
  margin: 1em;
}
.tasl_list .center .result .result_left .menu_task .menu_task_result .list_comment {
  margin: 1em;
  padding: 0;
}
.tasl_list .center .result .result_left .menu_task .menu_task_result .comment_right {
  margin-top: 1em;
}
.tasl_list .center .result .result_left .menu_task .menu_task_result .file_rez {
  margin: 1em;
}
.tasl_list .center .result .result_left .menu_task .task_history_result .task_history {
  margin: 1em;
}
.tasl_list .center .result .result_rigth .status_block {
  width: 20em;
}
.tasl_list .center .result .result_rigth .right_line {
  margin: 0;
  margin-left: 1em;
}

/* .wappi */
.wappi {
}
.wappi .wappi_left {
  width: 22.5%;
  height: calc(100vh - 115px);
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  overflow: auto;
  min-width: 290px;
  padding-top: 0;
}
.wappi .wappi_left .wappi-mess-top {
  margin-bottom: 10px;
}
.wappi .wappi_left .wappi-mess-top .wappi-mess-top-list {
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 43px;
  margin-left: -5px;
  padding-left: 10px;
  margin-right: -5px;
  padding-right: 10px;
  text-decoration: none;
}

.wappi-mess-top-list:hover {
  background: #e6e9ee;
}

.wappi .wappi_left .wappi-mess-top .wappi-mess-top-list .span {
  margin-left: 10px;

  font-weight: 600;
  color: #000;
}
.wappi .wappi_left .wappi-mess-top .wappi-mess-top-action {
  background: #e6e9ee;
  border-radius: 5px;
}

.wappi .wappi_left .wappi-mess-top .search .input {
  width: 100%;
}

.wappi .wappi_left .wappi_list_phone {
  margin-bottom: 10px;
  padding: 5px;
  min-height: 50px;
  text-decoration: none;
  color: #000;
  border-radius: 5px;
  border: 1px solid #e6e9ee;
  overflow: hidden;
}
.wappi .wappi_left .no_reed {
  background: #edf2f8;
}
.wappi .wappi_left .wappi_list_phone img,
.wappi .wappi_left .wappi_list_phone svg {
  min-width: 30px;
  max-width: 30px;
  height: 30px;
  margin: auto;
  border-radius: 50%;
  margin-right: 10px;
  margin-left: 5px;
  object-fit: cover;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_phone_name {
  overflow: hidden;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_phone_name .p {
  font-size: 15px;
  margin-bottom: 2px;
  font-weight: 600;
  white-space: nowrap;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_phone_name .last_mess {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  max-height: 2.6em;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_phone_name .last_mess .last_mess_txt {
  height: 16px;
  overflow: hidden;
  font-weight: 600;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_phone_name .last_mess i {
  font-style: normal;
  font-size: 10px;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_user {
  text-align: right;
  width: 15%;
  font-size: 0.8em;
  display: flex;
  flex-direction: column;
}
.wappi .wappi_left .wappi_list_phone .wappi_list_user .curcle {
  background: #ff0000;
  color: #fff;
  border-radius: 50%;
  display: block;
  width: 1em;
  height: 1em;
  margin: auto;
  margin-right: 0;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em;
  font-size: 0.9em;
}
.wappi .wappi_right {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: calc(100vh - 115px);
  padding-top: 0;
  display: flex;
  flex-direction: column;
}

.wappi .wappi_right .wappi_mess .wappi_reply_ {
  padding: 5px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8em;
  width: 100%;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
.wappi .wappi_right .wappi_mess .wappi_reply_ p {
  font-size: 1em;
}
.wappi .wappi_right .wappi_mess .wappi_reply_ span {
  font-size: 1em;
}
/* Превью медиа в цитате ответа: компактный thumbnail, а не картинка/видео
   в натуральную величину. Без этого <img>/<video> внутри .wappi_reply_
   (в шаблоне идут с классом cursor, без ограничения размера) разворачивались
   на всю ширину сообщения. Касается и Telegram, и MAX — контейнер общий. */
.wappi .wappi_right .wappi_mess .wappi_reply_ p img,
.wappi .wappi_right .wappi_mess .wappi_reply_ p video {
  max-width: 140px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.wappi .wappi_right .wappi_mess_title {
  padding: 12px 18px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  width: 100%;
  flex-shrink: 0;
  /* Подложка чтобы заголовок чата не сливался с белым фоном страницы */
  background: #f7f8fb;
  border-bottom: 1px solid #e3e7ed;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  z-index: 2;
}
.wappi .wappi_right .wappi_mess_title .wappi_mess_title_left {
  font-size: 18px;
  font-weight: 600;
  color: #1c2333;
  margin: auto;
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Аватарка чата (img или svg-placeholder bi-people / bi-person) в заголовке */
.wappi .wappi_right .wappi_mess_title .wappi_mess_title_left .chat-header-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.wappi .wappi_right .wappi_mess_title .wappi_mess_title_left > svg.bi-people,
.wappi .wappi_right .wappi_mess_title .wappi_mess_title_left > svg.bi-person {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 7px;
  border-radius: 50%;
  background: #e6e9ee;
  color: #6c7a8c;
  flex-shrink: 0;
  box-sizing: border-box;
}
.wappi .wappi_right .wappi_mess_title .wappi_mess_title_center span {
}

.wappi .wappi_right .wappi_mess_title .info-chat {
  display: flex;
  align-items: center;
}
.wappi .wappi_right .wappi_mess_title .info-chat .info-chat-left {
  display: flex;
}

.wappi .wappi_right .wappi_mess_title .info-chat .info-chat-left .add-mess-in-topic {
  display: flex;
  align-items: center;
}

.wappi .wappi_right .wappi_mess_title .info-chat .info-chat-left .add-mess-in-topic .bi {
  margin-right: 0.5em;
}
.wappi .wappi_right .wappi_mess_title .info-chat .info-chat-left .add-mess-in-topic .span {
  margin-left: 1em;
}
.wappi .wappi_right .wappi_mess_title .info-chat .info-chat-left .add-mess-in-topic .span-a {
  margin-right: 1em;
}

.wappi .wappi_right .wappi_mess_title .wappi-mobyle {
  display: flex;
  align-items: center;
  font-weight: 500;
}
.wappi .wappi_right .wappi_mess_title .wappi-mobyle .bi {
  padding: 9px;
  border: 1px solid rgba(208, 208, 208, 1);
  border-radius: 7px;
  margin-right: 5px;
  background: #dbdfe3;
  display: none;
}
.wappi .wappi_right .wappi_mess_title .wappi-mobyle-right .bi {
  margin-left: 1em;
  display: block;
  cursor: pointer;
}
.wappi .wappi_right .wappi_mess_title .wappi-mobyle-left .bi {
  margin-right: 1em;
}

.wappi .wappi_right .wappi_mess_title .wappi_mess_title_right {
  padding: 8px 20px;
  background: #4dad33;
  color: #fff;
  font-weight: 600;
  margin-left: 25px;
}
.wappi .wappi_right .wappi_mess {
  width: 100%;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
  background: #e8ecf1 url('/img/chat-bg.svg') repeat;
  background-size: 300px 300px;
  flex: 1;
  min-height: 0;
}

.wappi .wappi_right .wappi_mess .wappi_select_chat {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

/* Chat empty state */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  user-select: none;
}
.chat-empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.chat-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #455a64;
  margin: 0;
}
.chat-empty-text {
  font-size: 14px;
  color: #90a4ae;
  margin: 0;
}

.wappi .wappi_right .wappi_mess .wappi_from {
  width: 75%;
  min-height: 40px;
  margin-bottom: 6px;
}
.wappi .wappi_right .wappi_mess .line_wappi_mess {
  width: 175px;
  margin: auto;
  background: #e3e7ff;
  text-align: center;
  margin-bottom: 15px;

  font-weight: 600;
  padding-bottom: 5px;
  margin-top: 30px;
  padding-top: 5px;
  border-radius: 5px;
}
.wappi .wappi_right .wappi_mess .line_wappi_mess_on {
  width: 100%;
  border-radius: 0px;
  background: #fff;
  border-top: 1px solid #eee;

  font-weight: 400;
}
.wappi .wappi_right .wappi_mess .line_wappi_mess_off {
  width: 100%;
  border-radius: 0px;
  background: #fff;
  border-bottom: 1px solid #eee;

  font-weight: 400;
}

/* .wappi .wappi_right .wappi_mess .wappi_from img {
  margin-left: 0px;
  margin-right: 10px;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  height: 50px;
  border-radius: 50%;
} */

.bi-person {
  margin-left: 0px;
  margin-right: 10px;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  height: 50px;
  border-radius: 50%;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ {
  margin-left: 10px;
  max-width: calc(100% - 50px);
  background: #fff;
  padding: 6px 10px;
  border-radius: 4px 16px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .add-reply {
  margin: auto;
  margin-right: 0;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .checkbox {
  margin: auto;
  margin-right: 0;
  margin-left: 1em;
  display: none;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed {
  text-align: right;
  width: 100%;
  flex-wrap: wrap;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 3px solid #fff;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed .name_topic {
  width: 100%;
  margin-right: 10px;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed .user_reed {
  margin: auto;
  margin-right: 10px;
}

.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed span {
  margin: auto;
  margin-right: 10px;
  margin-left: 0px;
}
.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed .reed_rez {
  font-weight: 600;
}
.wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ .reed .reed_rez:hover {
  text-decoration: underline;
}

.wappi .wappi_right .wappi_mess .wappi_to {
  width: 80%;
  margin-bottom: 6px;
  min-height: 40px;
  margin-right: 0px;
  margin-left: auto;
}

.wappi .wappi_right .wappi_mess .wappi_to svg {
  margin-left: 10px;
  margin-right: 0px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.wappi .wappi_right .wappi_mess .wappi_to .wappi_mess_ {
  margin-right: 10px;
  max-width: 400px;
  text-align: left;
  padding: 6px 10px;
  border-radius: 16px 4px 16px 16px;
  outline: none;
  box-sizing: border-box;
  background: #dcf8c6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wappi .wappi_right .wappi_mess .wappi_to .wappi_mess_ .reed {
  text-align: left;
  width: 100%;
  display: block;
}

.wappi .wappi_right .wappi_mess p {
  margin-top: 2px;
  margin-bottom: 0;
  font-size: 0.93em;
  word-wrap: break-word;
  font-weight: 500;
  width: 100%;
}

.wappi .wappi_right .wappi_mess video {
  max-width: 250px;
  max-height: 250px;
}

.wappi .wappi_right .wappi_mess .body_txt::before {
  content: "";
}

.wappi .wappi_right .wappi_mess .body_txt::after {
  content: "";
}

/* .wappi .wappi_right .wappi_mess .wappi_from p img,
.wappi .wappi_right .wappi_mess .wappi_to p img {
  width: auto;
  height: auto;
  border-radius: 0;
  min-width: 35px;
  max-width: 35px;
} */

.wappi .wappi_right .wappi_mess span i {
  font-style: normal;
}

.wappi .wappi_right .wappi_console {
  background: #313131;
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.wappi .wappi_right .wappi_console .textarea {
  width: calc(100% - 100px);
  height: 50px;
  padding-right: 14em;
}
.wappi .wappi_right .wappi_console .submit {
  margin: auto;
  margin-right: 15px;
  max-width: 50px;
  border: 4px solid #53469f;
  background: none;
  border-radius: 6px;
  background-repeat: no-repeat;
  background-position: center;
}
.wappi .wappi_right .wappi_console .wappi_send_img {
  margin: auto;
  box-sizing: border-box;
  margin-left: -13em;
}
.wappi .wappi_right .wappi_console .wappi_send_img label {
  border-style: dashed;
  padding: 9px;
  white-space: nowrap;
  border-radius: 5px;
  font-weight: 300;
}
.wappi .wappi_right .wappi_console .wappi_img_show {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  margin: auto;
  margin-left: -11.5em;
  background: #fff;
  box-sizing: border-box;
  padding-right: 0;
}
.wappi .wappi_right .wappi_console .wappi_img_show .img_rez {
  display: flex;
  align-items: flex-start;
  font-weight: 600;
  width: 9em;
  justify-content: end;
  margin-right: 2px;
}
.wappi .wappi_right .wappi_console .wappi_img_show .clear {
  background: #fff;
  width: 2em;
  box-sizing: border-box;
  text-align: center;
  font-size: 1em;
}
.wappi .wappi_right .wappi_console .add-reply {
  font-weight: 600;
  width: 100%;
  padding: 0.5em;
  background: #fff;
  margin-bottom: 0.5em;
  border-radius: 0.3em;
  border: 1px solid #ccc;
  box-sizing: border-box;
  display: flex;
}
.wappi .wappi_right .wappi_console .add-reply .link {
  margin: auto;
  margin-right: 0;
}

.wappi .wappi-right-company {
  width: 320px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 10px;
  max-height: calc(100vh - 115px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f7f8f9;
}
.wappi .wappi-right-company .wappi-right-company-top {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.wappi .wappi-right-company .wappi-right-company-top .span {
  margin-left: 15px;
  font-size: 16px;
  font-weight: 700;
}

.wappi .wappi-right-company .wappi-right-company-top .to-company {
  margin: auto;
  margin-right: 0;
  color: #000;
  text-decoration: none;
}
.wappi .wappi-right-company .wappi-right-company-top .to-company .img {
  margin-left: 0.5em;
}

.wappi .wappi-right-company .name-wappi {
  display: flex;
  align-items: center;
  margin-bottom: 1em;
}
.wappi .wappi-right-company .name-wappi .b {
  font-size: 1.2em;
}
.wappi .wappi-right-company .name-wappi .img,
.wappi .wappi-right-company .name-wappi .bi {
  min-width: 50px;
  max-width: 50px;
  height: 50px;
  margin-right: 1em;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #000;
}
.wappi .wappi-right-company .name-desc {
}

.wappi .wappi-right-company .add-ws-comp {
  padding: 5px;
  border: 1px solid #000;
  /* margin: auto; */
  margin-left: 0;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
}

.wappi .wappi-right-company .name-desc .wappi-user-desc {
  display: flex;
  margin-top: 1em;
  align-items: center;
}

.wappi .wappi-right-company .name-desc .wappi-user-desc .img-bl {
  margin-right: 1em;
  width: 2em;
  text-align: center;
}

.wappi .wappi-right-company .wappi-chat-list {
  margin-top: 7px;
  padding: 10px;
  box-sizing: border-box;
  background: #edf2f8;
  border-radius: 5px;
}

.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-top {
  display: flex;
  align-items: center;
}
.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-top .img {
  margin-right: 10px;
  width: 10px;
}
.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-top .span {
  margin-left: 10px;
}

.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-action {
  display: flex;
  margin-top: 5px;
}

.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-action .span {
  margin-right: 5px;
  cursor: pointer;
  font-size: 0.8em;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid #000;
}
.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-action .span-none {
  border: none;
}
.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-action .span:hover {
  background: #fff;
}
.wappi .wappi-right-company .wappi-chat-list .wappi-chat-list-action .span-none:hover {
  background: none;
}

.wappi .wappi-right-company .wappi-right-scr {
  overflow: auto;
  max-height: 60%;
  /* margin: auto; */
  margin-bottom: -10px;
  width: 100%;
}

/* .news_result */
/* ── KB Sidebar ─────────────────────────────────────────── */
.block .center .news_result {
}
.block .center .news_result .news_result_left {
  margin-top: 10px;
  margin-left: 10px;
  width: 230px;
  min-width: 230px;
  padding: 16px 12px;
  border-radius: 10px;
  position: relative;
  background: #f8f9fb;
  border: 1px solid #e8eaef;
  align-self: flex-start;
  position: sticky;
  top: 70px;
}

.block .center .news_result .news_result_left .ct-title {
  margin: 0 0 12px 0;
  padding: 0 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #9ca3af;
  border-bottom: 1px solid #e8eaef;
}
.block .center .news_result .news_result_left .ct-title a {
  opacity: .5;
  transition: opacity .15s;
}
.block .center .news_result .news_result_left .ct-title a:hover {
  opacity: 1;
}

.block .center .news_result .news_result_left .news_category_line {
  margin: 0;
  padding: 0;
  display: block;
}

.block .center .news_result .news_result_left .news_category_line .add-new-cat {
  color: #4f46e5;
  font-weight: 600;
  font-size: .88em;
  cursor: pointer;
  padding: 6px 8px;
  text-align: right;
  border-radius: 6px;
  transition: background .12s;
}
.block .center .news_result .news_result_left .news_category_line .add-new-cat:hover {
  text-decoration: none;
  background: #eef2ff;
}

.block .center .news_result .news_result_left .up-cat-rez {
  display: none;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #e8eaef;
  margin-top: 16px;
}
.block .center .news_result .news_result_left .up-cat-rez .input {
  margin-bottom: 5px;
  margin-top: 5px;
  width: 100%;
}
.block .center .news_result .news_result_left .up-cat-rez .select {
  width: 100%;
  margin-bottom: 0;
  margin-top: 5px;
}
.block .center .news_result .news_result_left .up-cat-rez .submit {
  width: 48%;
  margin-top: 10px;
}
.block .center .news_result .news_result_left .up-cat-rez .no-save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48%;
  border: 2px solid #4f46e5;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 14px;
}

/* Sidebar items */
.block .center .news_result .news_result_left .ct_up {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1px;
}
.block .center .news_result .news_result_left .ct_up .img {
  margin-right: 6px;
  width: 12px;
  height: 12px;
  opacity: .45;
  transition: opacity .12s;
}

.block .center .news_result .news_result_left .ct_up a {
  text-decoration: none;
}
.block .center .news_result .news_result_left .ct_up .up-ct {
  display: flex;
  align-items: center;
  margin-left: 6px;
  opacity: .5;
  transition: opacity .15s;
}
.block .center .news_result .news_result_left .ct_up:hover .up-ct {
  opacity: 1;
}
.block .center .news_result .news_result_left .ct_up .up-ct .str {
  display: flex;
  width: 36px;
  align-items: center;
  justify-content: space-around;
}
.block .center .news_result .news_result_left .ct_up .up-ct .img {
  margin-right: 6px;
  margin-left: 4px;
}
.block .center .news_result .news_result_left .ct_up .up-ct .span {
  color: #ccc;
}
.block .center .news_result .news_result_left .ct_up .up-ct .img-up {
  transform: rotate(90deg);
}
.block .center .news_result .news_result_left .ct_up .up-ct .img-dw {
  transform: rotate(-90deg);
}

/* Parent category links */
.block .center .news_result .news_result_left .news_category_line .category_parent_id {
  display: block;
  font-weight: 600;
  font-size: .92em;
  color: #374151;
  padding: 7px 10px;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.block .center .news_result .news_result_left .news_category_line .category_parent_id:hover {
  background: #f0f1f3;
}
.block .center .news_result .news_result_left .news_category_line .category_parent_id .span {
  font-size: .95em;
  display: flex;
  align-items: center;
}

.block .center .news_result .news_result_left .news_category_line i svg {
  fill: #4f46e5;
  margin: auto;
  margin-right: 8px;
  margin-left: 0px;
}

/* Child category links */
.block .center .news_result .news_result_left .news_category_line .add_cat_par {
  margin: 0;
  padding: 6px 10px 6px 28px;
  display: block;
  color: #6b7280;
  font-size: .88em;
  font-weight: 500;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.block .center .news_result .news_result_left .news_category_line .add_cat_par:hover {
  background: #f0f1f3;
  color: #374151;
}
.block .center .news_result .news_result_left .news_category_line .add_cat_par div {
  display: flex;
  align-items: center;
}

/* Article links in sidebar */
.block .center .news_result .news_result_left .add_cat_par_list {
  margin: 0;
  flex-direction: column;
  padding: 2px 0 4px 40px;
  font-size: .82em;
}
.block .center .news_result .news_result_left .add_cat_par_list a {
  margin: 0;
  padding: 4px 8px;
  display: block;
  color: #6b7280;
  border-radius: 4px;
  transition: background .12s, color .12s;
  line-height: 1.4;
}
.block .center .news_result .news_result_left .add_cat_par_list a:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.block .center .news_result .news_result_left .add_cat_start {
  background: #eee;
}

/* Sidebar active states */
.block .center .news_result .news_result_left .news_category_line .category_parent_id.sidebar-active {
  background: #eef2ff;
  color: #4f46e5;
}
.block .center .news_result .news_result_left .news_category_line .category_parent_id.sidebar-active .span {
  color: #4f46e5;
}
.block .center .news_result .news_result_left .news_category_line .add_cat_par.sidebar-active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}

/* ── KB: Edit mode sidebar ────────────────────────────────── */
.news_result_left--edit {
  width: 300px !important;
  min-width: 300px !important;
}
.ct-title-close,
.ct-title-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #9ca3af;
  transition: background .12s, color .12s;
}
.ct-title-close:hover { background: #fee2e2; color: #dc2626; }
.ct-title-edit:hover { background: #eef2ff; color: #4f46e5; }

/* Chevron arrows */
.ct-chevron {
  transition: transform .15s;
  flex-shrink: 0;
  margin-right: 4px;
  color: #9ca3af;
}
.ct-chevron-open {
  transform: rotate(90deg);
}

/* Item structure */
.ct-item {
  margin-bottom: 1px;
}
.ct-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.ct-item-child {
  padding-left: 12px;
}

/* Action buttons */
.ct-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.ct-item-row:hover .ct-actions {
  opacity: 1;
}
.ct-act {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  color: #9ca3af;
  transition: background .1s, color .1s;
}
.ct-act:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.ct-act-del:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Add category button */
.ct-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  color: #4f46e5;
  font-weight: 600;
  font-size: .88em;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background .12s;
}
.ct-add-btn:hover {
  background: #eef2ff;
}

/* Edit form */
.ct-edit-form {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  margin-top: 14px;
  border-top: 1px solid #e8eaef;
}
.ct-edit-label {
  font-size: .82em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.ct-edit-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  font-size: .9em;
  background: #fff;
}
.ct-edit-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  font-size: .9em;
  box-sizing: border-box;
}
.ct-edit-input:focus,
.ct-edit-select:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.ct-edit-buttons {
  display: flex;
  gap: 8px;
}
.ct-edit-save {
  flex: 1;
  padding: 8px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .9em;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
}
.ct-edit-save:hover { background: #4338ca; }
.ct-edit-cancel {
  flex: 1;
  padding: 8px;
  background: #fff;
  color: #374151;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  font-size: .9em;
  cursor: pointer;
  transition: background .12s;
}
.ct-edit-cancel:hover { background: #f3f4f6; }

.block .center .news_result .news_result_right {
  width: calc(100% - 260px);
  margin: auto;
  margin-top: 0px;
  margin-left: 0px;
  padding-bottom: 50px;
  flex-direction: column;
}
.block .center .news_result .news_result_right i {
  color: #999;
  margin: 5px;
}

.block .center .news_result .news_result_right .news__ {
  margin-left: 20px;
  /* width:100% + margin-left:20 раздувало блок на 20px за пределы родителя
     → горизонтальный скролл всей страницы. Вычитаем margin из width. */
  width: calc(100% - 20px);
  margin-top: 10px;
}
.block .center .news_result .news_result_right .news__ .news_category {
  margin-bottom: 10px;

  display: flex;
  align-items: center;
}
.block .center .news_result .news_result_right .news__ .news_category .news_category_form {
  display: flex;
  align-items: center;
}
.block .center .news_result .news_result_right .news__ .news_category .news_category_form .select {
  margin-right: 10px;
}
.block .center .news_result .news_result_right .news__ .news_category .link {
  margin: auto;
  margin-right: 35px;
}
.block .center .news_result .news_result_right .news__ .news_title {
  margin-bottom: 10px;
  font-weight: 600;
}
.block .center .news_result .news_result_right .news__ .news_title input[type="text"] {
  font-size: 18px;
  width: calc(100% - 20px);
  font-weight: 600;
}
.block .center .news_result .news_result_right .news__ .news_result {
  padding-bottom: 50px;
}
.block .center .news_result .news_result_right .news__ .news_result .icon-news {
  display: none;
  margin-top: 10px;
  margin-bottom: 5px;
}
.block .center .news_result .news_result_right .news__ .news_result .icon-news .icon {
  padding: 5px;
  background: #fff;
  margin-right: 10px;
  border: 1px solid #ccc;
  display: flex;
}
.block .center .news_result .news_result_right .news__ .news_result .news_description_result {
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .news_description_result
  .textarea {
  width: calc(100% - 60px);
  min-height: 350px;
  box-sizing: border-box;
  /* Без этого широкий контент статьи (длинные строки/токены, таблицы,
     картинки, code-блоки из CKEditor) раздвигал всю страницу по
     горизонтали. Длинные строки переносим, широкие блоки — скролл
     ВНУТРИ статьи, а не всей страницы. */
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: auto;
}
.block .center .news_result .news_result_right .news__ .news_result .news_description_result .textarea img,
.block .center .news_result .news_result_right .news__ .news_result .news_description_result .textarea table,
.block .center .news_result .news_result_right .news__ .news_result .news_description_result .textarea pre {
  max-width: 100%;
  box-sizing: border-box;
}
.block .center .news_result .news_result_right .news__ .news_result .news_description_result .textarea pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .news_description_result
  .textarea
  img {
  max-width: 100%;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .news_description_result
  .textarea
  svg {
  display: none;
}
.block .center .news_result .news_result_right .news__ .news_result .file_upload {
  margin-top: 15px;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .file_upload_title {
  margin-bottom: 10px;
  font-weight: 600;
}
.block .center .news_result .news_result_right .news__ .news_result .file_upload .files_line {
  margin-bottom: 5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .file_upload_title
  form {
  margin-left: 5px;
}
.block .center .news_result .news_result_right .news__ .news_result .file_upload .files_line .del_ {
  color: #999;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .files_line
  .files_line_name {
  width: 250px;
  margin-right: 15px;
  display: flex;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .files_line
  .files_line_name
  input[type="text"] {
  width: 215px;
  height: 26px;
  border: none;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .files_line
  .files_line_name
  i {
  width: auto;
  margin: auto;
  margin-right: 0px;
  cursor: pointer;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .files_line
  .files_line_name
  span {
  font-weight: 600;
}
.block
  .center
  .news_result
  .news_result_right
  .news__
  .news_result
  .file_upload
  .files_line
  .files_line_name_ {
  margin: auto;
  margin-left: 0px;
  margin-right: 15px;
}
.block .center .news_result .news_result_right .news__ .news_result .file_upload .files_line a {
  margin: auto;
  margin-left: 0px;
  margin-right: 0px;
}

.block .center .news_result .news_result_right .news-list-id {
  box-sizing: border-box;
  margin-bottom: 1.2em;
  margin-left: 1.2em;
  padding: 20px;
  font-size: 1em;
  margin-top: 0;
  border-radius: 5px;
  background: #f7f8f9;
  border: 1px solid #bbb;
  min-width: 350px;
}
.block .center .news_result .news_result_right .news-list-id .news-list-name {
  font-size: 1.4em;
  color: #000;
  text-decoration: none;
  font-weight: 600;
}
.block .center .news_result .news_result_right .news-list-id .news-list-category {
  font-weight: 400;
  margin-bottom: 15px;
  display: flex;
  margin-top: 10px;
}
.block .center .news_result .news_result_right .news-list-id .news-list-category .textarea {
  width: calc(100% - 60px);
  height: auto;
}
.block .center .news_result .news_result_right .news-list-id .ul-first {
  margin-bottom: 10px;
  list-style-type: none;
  cursor: pointer;
}

.block .center .news_result .news_result_right .news-list-id .ul-first .img {
  margin-right: 8px;
}
.block .center .news_result .news_result_right .news-list-id .ul-first a {
  text-decoration: none;
  color: #000;
}

.block .center .news_result .news_result_right .news-list-id .ul-second {
  display: none;
  margin-left: 10px;
  margin-top: 8px;
  list-style-type: none;
}

.block .center .news_result .news_result_right .news-list-id .ul-second li {
  margin-bottom: 5px;
  margin-top: 5px;
}

.block .center .news_result .news_result_right .news-list-id .ul-second li a {
  text-decoration: underline;
}

/* ── KB: Main page category cards ──────────────────────────── */
.block .center .news_result .news_result_right .news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 10px 20px 20px 20px;
  /* Без box-sizing default content-box делает padding "снаружи" — блок
     становится шире родителя на 40px (по 20 с каждой стороны), горизонтальный
     скролл всей страницы. */
  box-sizing: border-box;
}
.block .center .news_result .news_result_right .news-list .news-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.block .center .news_result .news_result_right .news-list .news-card:hover {
  border-color: #c0c4cc;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.news-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-body {
  flex: 1;
  min-width: 0;
}
.news-card-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #181531;
  margin-bottom: 4px;
}
.news-card-descr {
  font-size: .88em;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  display: flex;
  gap: 14px;
  font-size: .8em;
  color: #9ca3af;
}
.news-card-meta span {
  white-space: nowrap;
}

/* ── KB: Category view (parent/child) ─────────────────────── */
.block .center .news_result .news_result_right .news-category-view {
  width: 100%;
  margin-left: 20px;
  margin-top: 10px;
}
.news-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.news-cat-header-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-cat-header-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #181531;
}
.news-cat-header-count {
  font-size: .88em;
  color: #9ca3af;
  margin-top: 2px;
}
.news-cat-descr {
  display: flex;
  margin-bottom: 16px;
}
.news-cat-descr .textarea {
  width: calc(100% - 60px);
  height: auto;
  font-size: .95em;
  color: #6b7280;
}

/* ── KB: Section items (expandable subcategories) ─────────── */
.news-sections-list {
  display: flex;
  flex-direction: column;
}
.news-section-item {
  border-bottom: 1px solid #eef0f3;
}
.news-section-item:last-child {
  border-bottom: none;
}
.news-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s;
}
.news-section-header:hover {
  background: #f3f4f6;
}
.news-section-name {
  font-weight: 500;
  font-size: 1em;
  color: #181531;
  flex: 1;
}
.news-section-count {
  background: #e5e7eb;
  color: #6b7280;
  font-size: .78em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* ── KB: Article link rows ────────────────────────────────── */
.news-article-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 30px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: background .12s, color .12s;
  font-size: .95em;
}
.news-article-link:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.news-article-link svg {
  flex-shrink: 0;
  color: #9ca3af;
}
.news-article-link:hover svg {
  color: #4f46e5;
}

/* ── KB: Article detail page ──────────────────────────────── */
.block .center .news_result .news_result_right .news-article {
  margin-left: 20px;
  /* Дубль .news__: те же margin-left + width. Прежнее width:100% перебивало
     фикс на .news__ (та же specificity, эта правило позже в файле) →
     горизонтальный скролл оставался. Согласовано с .news__: вычитаем margin. */
  width: calc(100% - 20px);
  margin-top: 10px;
}
.news-article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 12px;
  border-bottom: 1px solid #eef0f3;
  margin-bottom: 12px;
}
.news-article-meta {
  display: flex;
  gap: 20px;
  font-size: .88em;
  color: #9ca3af;
  padding: 0;
  border: none;
  margin: 0;
}
.news-article-date,
.news-article-author,
.news-article-views {
  display: flex;
  align-items: center;
  gap: 5px;
}
.news-article-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kb-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #9ca3af;
  transition: background .12s, color .12s;
}
.kb-action-btn:hover {
  background: #f3f4f6;
  color: #4f46e5;
}
.kb-action-btn.kb-bookmarked {
  color: #4f46e5;
  background: #eef2ff;
}

/* ── KB: Breadcrumbs ─────────────────────────────────────── */
.kb-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: .88em;
  flex-wrap: wrap;
}
.kb-bc-item {
  color: #6b7280;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background .12s, color .12s;
}
.kb-bc-item:hover {
  background: #f3f4f6;
  color: #374151;
}
.kb-bc-home svg {
  margin-right: 2px;
}
.kb-bc-current {
  color: #374151;
  font-weight: 500;
  cursor: default;
}
.kb-bc-current:hover {
  background: transparent;
}
.kb-bc-sep {
  color: #d1d5db;
  flex-shrink: 0;
}

/* ── KB: Toolbar (search + buttons) ───────────────────────── */
.kb-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 10px;
  flex-wrap: wrap;
}
.kb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 480px;
}
.kb-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}
.kb-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  font-size: .92em;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  background: #fff;
}
.kb-search-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.kb-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.kb-sr-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.kb-sr-item:last-child { border-bottom: none; }
.kb-sr-item:hover { background: #f9fafb; }
.kb-sr-name {
  font-weight: 600;
  font-size: .95em;
  color: #181531;
  margin-bottom: 2px;
}
.kb-sr-path {
  font-size: .8em;
  color: #9ca3af;
}
.kb-sr-snippet {
  font-size: .82em;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}
.kb-sr-empty {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: .92em;
}

/* ── KB: Toolbar buttons ──────────────────────────────────── */
.kb-toolbar-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.kb-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .88em;
  font-weight: 500;
  color: #374151;
  border: 1px solid #e2e5ea;
  background: #fff;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.kb-toolbar-btn:hover {
  background: #f3f4f6;
  border-color: #c0c4cc;
}
.kb-toolbar-btn-primary {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.kb-toolbar-btn-primary:hover {
  background: #4338ca;
  border-color: #4338ca;
}

/* ── KB: Bookmarks panel ──────────────────────────────────── */
.kb-bookmarks-panel {
  margin: 0 20px 10px;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  overflow: hidden;
}
.kb-bookmarks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-weight: 600;
  font-size: .95em;
  border-bottom: 1px solid #eef0f3;
}
.kb-bookmarks-header span:last-child {
  font-size: 1.3em;
  color: #9ca3af;
  line-height: 1;
}
.kb-bk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.kb-bk-item:last-child { border-bottom: none; }
.kb-bk-item:hover { background: #f9fafb; }
.kb-bk-item svg { flex-shrink: 0; margin-top: 3px; color: #9ca3af; }
.kb-bk-name { font-weight: 500; font-size: .92em; color: #181531; }
.kb-bk-path { font-size: .8em; color: #9ca3af; margin-top: 2px; }
.kb-bk-empty { padding: 20px; text-align: center; color: #9ca3af; }

/* ── KB: Recent articles ──────────────────────────────────── */
.kb-recent {
  margin-top: 10px !important;
  /* width:100% + margin-left:20 → выезд на 20px (та же причина что в .news__
     и .news-article). Вычитаем margin из width. */
  width: calc(100% - 20px) !important;
  margin-left: 20px !important;
}
.kb-recent-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
  font-weight: 600;
  color: #374151;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef0f3;
}
.kb-recent-list {
  display: flex;
  flex-direction: column;
}
.kb-recent-item {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background .12s;
}
.kb-recent-item:hover {
  background: #f3f4f6;
}
.kb-recent-item-name {
  font-weight: 500;
  font-size: .95em;
  color: #181531;
  margin-bottom: 3px;
}
.kb-recent-item-info {
  display: flex;
  gap: 14px;
  font-size: .8em;
  color: #9ca3af;
  align-items: center;
}
.kb-recent-item-info span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── KB: Print styles ──────────────────────────────────────── */
@media print {
  .block .left-menu,
  .news_result_left,
  .kb-breadcrumbs,
  .kb-toolbar,
  .kb-bookmarks-panel,
  .news-article-topbar .news-article-actions,
  .news_category,
  .center-hleb {
    display: none !important;
  }
  .block .center { margin: 0 !important; padding: 0 !important; }
  .news_result_right { width: 100% !important; }
  .news-article { margin: 0 !important; }
  .news-article-topbar { border: none !important; }
}

.ck.ck-editor {
  width: calc(100% - 60px) !important;
  width: 100% !important;
}

.ck-editor__top {
  min-width: calc(100% - 60px) !important;
  min-width: 100% !important;
}

.ck-content ol {
  margin-left: 15px;
}

/* .user_id */

.block .center .user_id {
}

.block .center .user_id .user_id_left {
  width: calc(100% - 281px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.block .center .user_id .user_id_left .user_id_left_inp {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.block .center .user_id .user_id_left .user_id_left_inp label {
  width: 100%;
  margin-bottom: 3px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.block .center .user_id .user_id_left .user_id_left_inp label .bi {
  cursor: pointer;
  margin: auto;
  margin-right: 1em;
}

.block .center .user_id .user_id_left .user_id_left_inp .checkbox {
  margin: 5px;
  margin-left: 0;
}
.block .center .user_id .user_id_left .user_id_left_inp .input {
  width: 225px;
}
.block .center .user_id .user_id_left .user_id_left_inp .img {
  cursor: pointer;
}

.block .center .user_id .user_id_left .user_id_left_title {
  margin-left: 15px;
}
.block .center .user_id .user_id_left .user_id_left_list {
  margin: auto;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img {
  width: 150px;
  max-width: 250px;
  margin-left: 15px;
  margin-top: 10px;
  margin-right: 25px;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img span {
  display: block;
  text-align: center;
  margin-bottom: 2px;
  font-size: 10px;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img label {
  display: flex;
  flex-direction: column;
}

.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img svg {
  width: 100px;
  height: 100px;
  margin: auto;
  padding: 15px;
  border: 1px solid #ccc;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img img {
  max-width: 100px;
  max-height: 100px;
  margin: auto;
  padding: 15px;
  border: 1px solid #ccc;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_img p {
  margin: auto;
  margin-top: 10px;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_1 {
  width: 250px;
  margin-left: 20px;
  margin-top: 0px;
  display: flex;
  flex-direction: column;
  margin-right: 25px;
}
.block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_2 {
  width: 250px;
  margin-left: 0px;
  margin-top: 0px;
  display: flex;
  flex-direction: column;
}
.block .center .user_id .user_id_left .user_id_left_sla {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 15px 20px;
  padding-left: 190px;
  max-width: 690px;
}
.block .center .user_id .user_id_left .user_id_left_comment {
}
.block .center .user_id .user_id_left .user_id_left_comment .textarea {
  margin-left: 20px;
  margin-bottom: 20px;
  margin-right: 20px;
  width: calc(100% - 50px);
  max-width: 690px;
  background: none;
  resize: auto;
  min-height: 150px;
}

.block .center .user_id .user_id_right {
  width: 250px;
  min-height: 100vh;
  border-left: 1px solid #ccc;
  padding: 15px;

  background: #fff;
  margin-top: 0;
  margin-bottom: 0;
}
.block .center .user_id .user_id_right .user_id_right_status {
  width: 100%;
  height: 47px;
  background: #4dad33;
  padding-left: 15px;
  padding-right: 15px;
  color: #fff;

  font-weight: 600;
  margin-bottom: 35px;
}
.block .center .user_id .user_id_right .user_id_right_pass {
  width: 165px;
  margin: auto;
  height: 30px;
  background: #ffffff;
  text-align: center;
  color: #000;
  justify-content: space-around;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid #53469f;
  padding: 5px;
}

/* end .user_id */

/* .setting */

.block .center .setting-top {
  margin: 10px;
  display: flex;
  margin-top: 10px;
}
.block .center .setting-top .link {
  margin-right: 5px;
  margin-left: 5px;
  text-decoration: none;
  font-weight: 600;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 5px 15px;
  text-align: center;
}

.block .center .setting-top .link-action {
  text-align: center;
  background: #53469f;
  color: #fff;
  border-radius: 5px;
}

.block .center .setting .input {
  min-width: 100px;
}

.block .center .setting .table {
  width: 100%;
}
.block .center .setting .table .tr .td {
  vertical-align: middle;
}

.block .center .setting .submit {
  margin-top: 30px;
}

.block .center .setting .setting_step {
  padding: 20px;
  background: rgba(230, 233, 238, 1);
  margin-right: 20px;
  /* flex-item: разрешаем сжиматься ниже content-width, чтобы широкая
     таблица внутри не растягивала карточку за пределы экрана */
  min-width: 0;
  max-width: 100%;
}
.block .center .setting .setting_step .setting_title {
  margin-bottom: 15px;
  font-weight: 700;
}
.block .center .setting .setting_step .step-2 {
  margin-top: 20px;
}
.block .center .setting .setting_step .setting_line {
  margin-bottom: 3px;
  font-size: 13px;
}
.block .center .setting .setting_step .tg_setting_line {
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  padding-top: 10px;
}

.block .center .setting .setting_step .tg_setting_line .tg_setting_line_left {
  width: 160px;
}
.block .center .setting .setting_step .tg_setting_line .tg_setting_line_right {
  width: calc(100% - 160px);
  word-break: break-all;
}
.block .center .setting .setting_step .tg_setting_line .tg_setting_line_right .report-repeat-tg {
  padding-top: 10px;
}
.block
  .center
  .setting
  .setting_step
  .tg_setting_line
  .tg_setting_line_right
  .report-repeat-tg
  .label {
  display: flex;
  align-items: center;
  margin-right: 10px;
}
.block
  .center
  .setting
  .setting_step
  .tg_setting_line
  .tg_setting_line_right
  .report-repeat-tg
  .label
  .checkbox {
  margin-right: 5px;
}
.block
  .center
  .setting
  .setting_step
  .tg_setting_line
  .tg_setting_line_right
  .report-repeat-tg
  .label
  .input {
  margin-left: 5px;
}

.block .center .setting .setting_step .add_ {
  margin-left: 0;
  margin-top: 5px;
}
.block .center .setting .change {
  color: #ccc;
  margin: auto;
  margin-right: 0;
  min-width: 50px;
}
.block .center .setting .setting_step .change .input {
  margin-right: 10px;
  width: 100px;
}
.block .center .setting .setting_step .change span {
  margin-right: 10px;
}
.block .center .setting .setting_step .color-type {
  display: flex;
  align-items: center;
}
.block .center .setting .setting_step .color-type .color-type-task {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 5px;
}

.block .center .setting .setting-telegram {
  width: 33%;
  min-width: 350px;
}

/* end .setting */

.block .center .table {
  display: table;
  /* растягиваем на всю ширину контейнера, но не меньше содержимого */
  width: 100%;
  min-width: max-content;
}
/* Список задач НЕ должен раздвигать страницу по горизонтали:
   чипы статуса/типа и nowrap-описание раньше форсировали min-width:max-content
   → горизонтальный скролл всей страницы. Привязываем таблицу к ширине
   контейнера; ячейки .cell-1line / .task_description-preview сами усекаются. */
.block .center .table.task-list {
  min-width: 0;
}
.block .center .table .tr {
  display: table-row;
}
.block .center .table .tr .th {
  display: table-cell;
  padding: 5px 8px;
  vertical-align: middle;
  border-top: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
}
.block .center .table .tr .td {
  display: table-cell;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(218, 218, 218, 1);
  vertical-align: top;
  word-break: break-word;
}
/* Просроченные задачи (response_time_ истёк, статус ещё 0/2).
   Минималистично: только красная полоса слева, фон не трогаем —
   строки не «кричат», но индикатор очевиден.
   border-left на display:table-row не работает, используем inset box-shadow. */
.block .center .table .pink_color {
  background: transparent;
}
.block .center .table .pink_color .td:first-child {
  box-shadow: inset 4px 0 0 0 #ef4444;
}
.block .center .table .pink_color:hover {
  background: #f0f7ff; /* как обычный hover — никакого «просроченного» оттенка */
}
.block .center .table .tr:hover {
  /* Мягкий синий hover вместо скучного серого — по дизайн-критике P1 #9.
   * Сочетается с pill-вкладками (та же палитра #EFF6FF / #2563EB). */
  background: #f0f7ff;
}
.block .center .table .result_line:hover {
  background: #f7f8f9;
}

.block .center .table .pinline {
  background: #f7f8f9;
}
.block .center .table .pinline:hover {
  background: #f7f8f9;
}

.block .center .table .tr .task_description {
  height: 2.4em;
  overflow: hidden;
  font-size: 1em;
}

.block .center .table .tr .pin {
  color: #999;
  cursor: pointer;
}

.block .center .table .tr .link_ {
  word-break: break-all;
}

.block .center .table .tr .task_name .link {
  max-height: 2.5em;
  overflow: hidden;
  display: block;
  font-size: 1em;
}

/* ===== Стартовая страница (логин / регистрация / сброс пароля) =====
   Современный карточный дизайн в единой палитре с .whp-modal:
   белый фон, скруглённые углы, мягкая тень, кнопка primary,
   inputs с focus-ring как в карточке товара. */
.form_start {
  width: 100%;
  max-width: 420px;
  margin: 80px auto;
  text-align: center;
  min-height: 350px;
  padding: 0 16px;
  box-sizing: border-box;
}
.form_start .form_start_logo {
  margin-bottom: 24px;
}
.form_start .form_start_logo .img {
  max-height: 56px;
}
.form_start .form_start_rez {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  text-align: left;
}
.form_start .form_title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  padding: 24px 28px 4px;
  text-align: center;
}
.form_start .form_action {
  padding: 16px 28px 24px;
}
.form_start .form_action .input {
  width: 100%;
  height: 42px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #111827;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form_start .form_action .input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form_start .form_action .input::placeholder {
  color: #9ca3af;
}
/* Капча: картинка слева + поле кода справа на одной строке */
.form_start .form_captcha {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}
.form_start .form_captcha img {
  height: 42px;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f9fafb;
}
.form_start .form_captcha .input {
  flex: 1;
  margin-bottom: 0;
}
/* Submit-кнопка primary в стиле .wh-btn-primary */
.form_start .submit {
  width: 100%;
  height: 44px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form_start .submit:hover {
  background: #1d4ed8;
}
.form_start .form_action .form_action_submit {
  display: block;
  margin-top: 8px;
}
.form_start .form_footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 14px 0 0;
  font-size: 13px;
}
.form_start .form_footer .link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}
.form_start .form_footer .link:hover {
  color: #2563eb;
  text-decoration: underline;
}
/* Подвал с системными сообщениями (us=un, ws, wc и т.д.) */
.form_start .form_no_action {
  width: 100%;
  background: #f9fafb;
  border-top: 1px solid #eef0f3;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  box-sizing: border-box;
  text-align: center;
}
.form_start .form_no_action .text-reg {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}
.form_start .form_no_action .text {
  background: #fef2f2;
  color: #dc2626;
  padding: 8px 14px;
  border-radius: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.form_start .form_no_action .text.act_ {
  background: #f0fdf4;
  color: #15803d;
}
.form_start .form_no_action .text .link {
  color: inherit;
  text-decoration: underline;
  margin-left: 4px;
}

/* календарь */

.block .center .calendar-m {
  display: none;
}

.block .center .calendar {
}

.block .center .calendar .calendar-scroll {
  margin-bottom: 2em;
  background: #e6e6e6;
}

.block .center .calendar .info {
  text-align: center;
  margin-top: 30px;
}

.calendar .link {
  cursor: pointer;
}

.calendar .calendar-a {
  width: 315px;
  display: flex;
  align-items: center;
}
.calendar .calendar-b {
  width: 93px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.calendar .calendar-c {
  display: flex;
  width: calc(100% - 315px - 93px);
  align-items: normal;
  justify-content: center;
}
.calendar .calendar-top {
  display: flex;
  height: 38px;
  margin-bottom: 10px;
}
.calendar .calendar-top .calendar-a {
  background: rgba(24, 21, 49, 1);
  color: #fff;
  height: auto;
  justify-content: center;
}
.calendar .calendar-top .calendar-b {
  background: rgba(49, 44, 81, 1);
  color: #fff;
}
.calendar .calendar-top .calendar-c {
  justify-content: space-between;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  align-items: center;
  background: #dbdfe3;
}
.calendar .calendar-top .calendar-c .img {
  background: #fff;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  padding: 7px;
  box-sizing: border-box;
  text-align: center;
  border-radius: 5px;
  border: 1px solid;
  border: 1px solid #000;
}
.calendar .calendar-top .calendar-c .img-right {
  transform: rotate(180deg);
}

.calendar .calendar-result {
  display: flex;
  border-top: 1px solid rgba(218, 218, 218, 1);
  position: relative;
}

.calendar .calendar-result .calendar-b {
  font-size: 20px;
  font-weight: 700;
}

.calendar .calendar-result .calendar-b-sotr {
  align-items: baseline;
  margin-top: 24px;
}

.calendar .calendar-result-top {
  border: none;
}

.calendar .calendar-top .calendar-c .date-center {
}
.calendar .calendar-top .calendar-c .date-center .input {
  background: none;
  font-weight: 700;
  height: auto;
  padding: 0.4em;
  font-size: 1em;
  border: 1px solid #ccc;
}

.calendar .calendar-a .user-img {
  min-width: 2.5em;
  max-width: 2.5em;
  height: 2.5em;
  border: 1px solid #000;
  border-radius: 50%;
  margin-right: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  display: flex;
  overflow: hidden;
  text-transform: uppercase;
}

.calendar .calendar-a .user-img .img {
  margin: auto;
  width: 100%;
}

.calendar .calendar-a .sotr {
  background: #ebebeb;
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 0.5em;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.7em;
}
.calendar .calendar-a .sotr .span {
}
.calendar .calendar-a-sotr {
  align-items: baseline;
  margin-top: 5px;
  margin-bottom: 5px;
}

.calendar .calendar-c .day {
  display: flex;
  align-items: center;
  width: calc(100% / 7);
  text-align: center;
  flex-direction: column;
  border-right: 1px solid rgba(218, 218, 218, 1);
  border-left: 1px solid rgba(218, 218, 218, 1);
  margin-left: -1px;
}
.calendar .calendar-result-top .calendar-c .day {
  border-radius: 5px 5px 0 0;
  height: 50px;
}

.calendar .calendar-result-top .calendar-c .day .line {
  height: 51px;
  position: absolute;
  display: none;
}

.calendar .calendar-result-top .calendar-c {
  height: auto;
}
.calendar .calendar-result-top .calendar-a {
  height: auto;
}

.calendar .calendar-result-top .step-calendar {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.calendar .calendar-c .day .date-header {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 5px;
}
.calendar .calendar-c .day .line {
  height: 35px;
  background: rgb(24 21 49);
  width: 5px;
  margin-bottom: -35px;
  position: relative;
  z-index: 1;
  opacity: 0.2;
}

.calendar .calendar-c .task-user {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-sizing: border-box;
  height: 38px;
  overflow: hidden;
  margin-top: 1px;
  margin-bottom: 1px;
}

.calendar .calendar-c .task-user-center {
  border-left: none;
  border-right: none;
  border-radius: 0;
}
.calendar .calendar-c .task-user-none {
  border: none;
  border-radius: 0;
  background: none;
}
.calendar .calendar-c .task-user-stop {
  border-left: 0;
  border-radius: 0 5px 5px 0;
  margin-right: 10px;
  width: calc(100% - 10px);
}
.calendar .calendar-c .task-user-start {
  border-right: 0;
  border-radius: 5px 0 0 5px;
  margin-left: 10px;
  width: calc(100% - 10px);
}
.calendar .calendar-c .task-user-oneday {
  width: calc(100% - 10px);
}

.calendar .calendar-c .task-user .task-calendar {
  position: absolute;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 5px;
  padding-left: 5px;
  border: 1px solid #000;
  cursor: pointer;
  padding-top: 1px;
  padding-bottom: 1px;
  z-index: 2;
}
.calendar .calendar-c .task-user .task-calendar .task-user-top {
  display: flex;
  align-items: center;
}
.calendar .calendar-c .task-user .task-calendar .task-user-top:hover {
  text-decoration: underline;
}
.calendar .calendar-c .task-user .task-calendar .task-user-top .task-id {
  color: #878787;
  font-size: 0.9em;
}
.calendar .calendar-c .task-user .task-calendar .task-user-top .task-graf {
  border: 1px solid #000;
  min-width: 8px;
  max-width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-left: 7px;
  margin-right: 7px;
}
.calendar .calendar-c .task-user .task-calendar .task-name {
  white-space: nowrap;
  margin-right: 1em;
  font-weight: 600;
}
.calendar .calendar-c .task-user .task-calendar .icon-task {
  display: flex;
  align-items: center;
  margin-right: 8px;
}
.calendar .calendar-c .task-user .task-calendar .icon-task .span {
  margin-right: 3px;
}
.calendar .calendar-c .task-user .task-calendar .icon-task .bi {
  margin-top: 1px;
  margin-left: 3px;
}
.calendar .calendar-c .task-user .task-calendar .icon-task .bi-file-earmark {
  margin-left: 0;
}
.calendar .calendar-c .task-user .task-calendar .task-client {
  display: flex;
  align-items: center;
}
.task-client .task-img {
  width: 1em;
  height: 1em;
  border: 1px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6em;
  padding: 0.5em;
  margin-right: 0.5em;
  text-transform: uppercase;
}

.task-client .task-cl-name {
  font-size: 0.8em;
}

.calendar .calendar-c .task-user .task-calendar-show {
  width: fit-content !important;
  padding-right: 10px;
}

.calendar .calendar-c .event {
}
.calendar .calendar-c .day .date-top {
  font-weight: 700;
}

.from-task .calendar-b {
  display: none;
}
.from-task .calendar-top .calendar-c,
.from-task .calendar-c {
  width: calc(100% - 315px);
}
.from-task .calendar-a .sotr {
  margin-right: 1em;
}

/* ═══════════════════════════════════════════════════════════════════
   [G-DESK] Тепловая карта загрузки сотрудников
   ═══════════════════════════════════════════════════════════════════ */

/* Ячейка тепловой карты */
.heatmap-cell {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  transition: opacity 0.15s, transform 0.15s;
  border-radius: 3px;
  margin: 1px;
  box-sizing: border-box;
}
.heatmap-cell:hover { opacity: 0.8; transform: scale(1.05); z-index: 2; }

/* Цвета ячеек по загрузке */
.heat-empty  { background: #f0f1f3; }
.heat-green  { background: #c6efce; color: #006100; }
.heat-yellow { background: #ffeb9c; color: #9c5700; }
.heat-red    { background: #ffc7ce; color: #9c0006; }

/* Счётчик задач в ячейке */
.heat-count {
  font-weight: 700;
  font-size: 1.1em;
}

/* Подсветка текущего дня */
.heatmap-cell.today,
.heatmap-day-list.today {
  border: 2px solid rgba(24, 21, 49, 0.6);
}

/* Развёрнутый список задач при клике на ячейку */
.heatmap-task-list {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 5px;
}
.heatmap-task-header {
  font-weight: 600;
  padding: 5px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid #eee;
}

/* Элемент задачи в списке */
.heatmap-task-item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  gap: 8px;
  border-radius: 4px;
}
.heatmap-task-item:last-child { border-bottom: none; }
.heatmap-task-item:hover { background: #f0f0ff; }

.heatmap-task-id {
  color: #878787;
  font-size: 0.9em;
  min-width: 50px;
}
.heatmap-task-graf {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.heatmap-task-name {
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heatmap-task-status {
  font-size: 0.85em;
  color: #888;
  white-space: nowrap;
}
.heatmap-task-client {
  color: #666;
  font-size: 0.9em;
  margin-left: auto;
  white-space: nowrap;
}

/* Режим «День»: список задач прямо в ячейке */
.heatmap-day-list {
  display: flex;
  flex-direction: column;
  min-height: 50px;
  padding: 5px;
}
.heatmap-day-list .heatmap-task-item {
  font-size: 0.95em;
}
.heatmap-empty-day {
  color: #aaa;
  font-size: 0.9em;
  padding: 10px;
  text-align: center;
}

/* Метка месяца в шапке (при длинных периодах) */
.date-month-label {
  font-size: 0.7em;
  font-weight: 700;
  color: #53469f;
  white-space: nowrap;
}

/* Адаптация шапки для средних периодов (15-90 дней) */
.calendar-dense .calendar-result-top .calendar-c .day .date-header {
  font-size: 0.75em;
  text-align: center;
  margin: 0;
  padding: 2px 0;
  overflow: hidden;
}

/* Адаптация для длинных периодов (90+ дней) */
.calendar-dense-xl .calendar-result-top .calendar-c .day .date-header {
  font-size: 0.65em;
  text-align: center;
  margin: 0;
  padding: 2px 0;
  overflow: hidden;
}
.calendar-dense-xl .heatmap-cell {
  min-height: 28px;
}
.calendar-dense-xl .heat-count {
  font-size: 0.8em;
}

/* ═══════════════════════════════════════════════════════════════════ */

/* .popap */
.popap {
  display: none;
  position: fixed;
  width: 100%;
  background: rgba(18, 18, 18, 0.9);
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 2;
  overflow: overlay;
}

.popap-2 {
  display: none;
  position: fixed;
  width: 100%;
  background: rgba(18, 18, 18, 0.9);
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 1;
  overflow: overlay;
}

.popap .popap_rez {
  width: 720px;
  background: #f1f1f1;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.popap .popap_rez .list-menu-user {
  margin-top: 20px;
  margin-bottom: 30px;
}

.popap .popap_rez .list-menu-user .list-check-menu-user {
  margin-bottom: 7px;
}

.popap .popap_rez .list-menu-user .list-check-menu-user .list-check-menu-user-label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-left: 10px;
}

.popap .popap_rez .list-menu-user .list-check-menu-user .list-check-menu-user-label .checkbox {
  margin-right: 10px;
}

#tg_bot_messege .popap_rez {
  min-height: auto;
}

.popap .popap_rez .popap_result .big_img_result {
  display: flex;
  flex-direction: column;
}

.popap .popap_rez .popap_result .big_img_result #big_img_result_ {
  margin-top: 14px;
}

.popap .popap_rez .popap_result .big_img_result #big_img_result {
  max-width: 100%;
  margin: auto;
  margin-left: 0;
  margin-top: 10px;
  margin-bottom: 15px;
  max-height: 500px;
}

.popap .task_close {
  min-height: auto;
  width: 500px;
}

.popap .task_close .task_close_line_txt {
  margin-top: 15px;
  margin-bottom: 15px;
}

.popap .task_close .task_close_line_txt textarea {
  width: 100%;
  min-height: 100px;
}

.popap .task_close .task_close_line_sub .submit {
  margin-right: 25px;
}

#add_pass_user .popap_rez {
  height: 230px;
  min-height: auto;
  max-width: 450px;
}
#add_pass_user .popap_rez .popap_result_form {
  height: 150px;
  margin-top: 15px;
}
#add_pass_user .popap_rez .popap_result_form #password_1_info {
  color: #f00;
  margin-bottom: 10px;
  height: 17px;
}
#news_category_popap .popap_rez {
  width: 580px;
  min-height: 230px;
}
#news_category_popap .popap_rez .popap_result {
  margin-bottom: 20px;
}
#news_category_popap .popap_rez .news_cat {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  max-height: 250px;
  overflow: auto;
  margin-bottom: 10px;
  outline: 1px solid #ccc;
  padding: 15px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line {
  margin: auto;
  margin-left: 0px;
  margin-top: 0px;
  margin-bottom: 0px;
  display: flex;
  margin-right: 0px;
  padding: 5px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line:hover {
  background: #e6e6e6;
}
#news_category_popap .popap_rez .news_cat .news_cat_line .news_cat_line_left {
  margin: auto;
  margin-left: 0px;
  text-decoration: underline;
}
#news_category_popap .popap_rez .news_cat .news_cat_line i {
  cursor: pointer;
  font-size: 10px;
  margin: auto;
  margin-left: 10px;
  margin-right: 0px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line i svg {
  width: 10px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line_ {
  margin: auto;
  margin-left: 0px;
  margin-top: 0px;
  margin-bottom: 5px;
  display: flex;
  margin-right: 0px;
  height: 15px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line_ .news_cat_line_left {
  margin: auto;
  margin-left: 5px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line_ i {
  cursor: pointer;
  font-size: 10px;
  margin: auto;
  margin-left: 10px;
  margin-right: 0px;
}
#news_category_popap .popap_rez .news_cat .news_cat_line_ i svg {
  width: 10px;
}
#news_category_popap .popap_rez .news_cat_add {
  margin-bottom: 10px;
  height: 35px;
  background: #fff;
}
#news_category_popap .popap_rez .news_cat_add i {
  margin: auto;
}
#news_category_popap .popap_rez .news_cat_add select {
  width: 130px;
  margin: auto;
  height: 22px;
}
#news_category_popap .popap_rez .news_cat_add input[type="text"] {
  margin: auto;
  height: 22px;
  padding-left: 5px;
  width: 200px;
}
#news_category_popap .popap_rez .news_cat_add #news_cat_add_sort {
  width: 50px;
}

#calendar_task .popap_rez {
}

.popap .popap_rez_file {
  width: 300px;
}
.popap .popap_rez_file .popap_rez_file_rez {
  margin: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 15px;
  margin-top: -48px;
}
.popap .popap_rez_file .popap_rez_file_rez .h2 {
  margin-bottom: 15px;
}
.popap .popap_rez_file .popap_rez_file_rez input[type="file"] {
  margin: auto;
  width: 270px;
  background: #ccc;
  padding: 8px;
  margin-top: 0px;
  margin-bottom: 15px;
}

.popap .popap_rez_file .popap_rez_file_rez textarea {
  margin-bottom: 25px;
}
.popap .popap_rez .close {
  margin: auto;
  margin-right: 0px;
  padding: 20px;
  position: relative;
  box-sizing: border-box;
  text-align: right;
  cursor: pointer;
}
.popap .popap_rez .popap_result {
  margin: auto;
  margin-left: 20px;
  margin-right: 20px;
  margin-top: -50px;
  margin-bottom: 20px;
}

.popap .popap_rez .popap_result .add_user_group_list {
  margin-top: 10px;
  margin-bottom: 10px;
}
.popap .popap_rez .popap_result .add_user_group_list .input {
  width: 300px;
}

.popap .popap_rez .popap_result .popap-calendar .task-client {
  margin-top: 10px;
  margin-bottom: 10px;
}
.popap .popap_rez .popap_result .popap-calendar .task-name {
  font-weight: 600;
}
.popap .popap_rez .popap_result .popap-calendar .task-desk {
  padding: 1em;
  box-sizing: border-box;
  border: 1px solid #ccc;
  background: #fff;
  margin-bottom: 1em;
  margin-top: 1em;
  max-height: 30em;
  overflow: auto;
  padding-left: 2em;
}

.setting_column_filter .popap_rez .popap_result .setting_column {
  height: 300px;
  overflow: auto;
  margin-top: 20px;
  margin-bottom: 20px;

  outline: 1px solid #ccc;
  padding: 10px;
  background: #fff;
}

.setting_column_filter .popap_rez .popap_result .task_line_sub {
  justify-content: end;
  align-items: end;
  display: flex;
}

.popap .popap_rez .popap_result .add_user_group_list .add_group_user_result {
  margin-top: 10px;
  margin-bottom: 10px;
  background: #fff;
  padding: 5px;

  overflow: auto;
  height: 250px;
}

.popap .popap_rez .popap_result .add_user_group_list .add_group_user_result .line_add_user_group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  cursor: pointer;
}
.popap
  .popap_rez
  .popap_result
  .add_user_group_list
  .add_group_user_result
  .line_add_user_group:hover {
  background: #eee;
}
.popap
  .popap_rez
  .popap_result
  .add_user_group_list
  .add_group_user_result
  .line_add_user_group-sotr {
  margin-left: 10px;
}
.popap
  .popap_rez
  .popap_result
  .add_user_group_list
  .add_group_user_result
  .line_add_user_group-title {
  background: #eee;
  padding: 5px;
}

.popap .popap_rez .popap_result .group_user_label {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 20px;
}
.popap .popap_rez .popap_result .group_user_label .checkbox {
  margin-right: 10px;
}

.all_group_user {
  width: auto;
  font-size: 13px;
  height: 350px;
  overflow: auto;
  background: #fff;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.all_group_user .group-id-list {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px;
  cursor: pointer;
}

.all_group_user .group-id-list:hover {
  background: #eee;
}

.all_group_user .group-id-list .group-id {
  width: 20px;
}
.all_group_user .group-id-list .group-name {
  margin-left: 15px;
  width: 180px;
}
.all_group_user .group-id-list .group-arr {
  margin-left: 0;
  width: 350px;
  height: 18px;
  overflow: hidden;
}

.popap .popap_rez .popap_result_text {
  margin-top: 25px;
  margin-bottom: 50px;
}
.popap .popap_rez .popap_result_text textarea {
  min-height: 210px;
  width: 100%;
}

.popap .time_for_task {
  width: 350px;
}
.popap .time_for_task .time_for_task_line {
  margin-bottom: 20px;
  margin-top: 10px;
}
.popap .time_for_task .time_for_task_line .input {
  width: 100px;
}

.add_user_group_list_next {
  margin-bottom: 10px;
  margin-top: 10px;
  overflow-y: scroll;
}

/* ws */

.ws-popap .add-user-ws {
  width: 1000px;
}

.ws-popap .popap_rez .ws-data {
  margin-bottom: 15px;
  margin-top: 10px;
  background: #fff;
  padding: 15px;
  box-sizing: border-box;
  overflow: auto;
}

.ws-popap .popap_rez .ws-data .list-user-info {
  margin-bottom: 4px;
}

.ws-popap .popap_rez .ws-data .list-user-info .span {
  font-weight: 600;
}

.ws-popap .popap_rez .ws-data .seach-user-id {
  overflow: auto;
  height: 250px;
}

.ws-popap .popap_rez .ws-data .seach-user {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-top: 3px;
  padding-bottom: 3px;
}

.ws-popap .popap_rez .ws-data .seach-user-title {
  font-weight: 600;
  margin-top: 5px;
  border-bottom: 1px solid #000;
}

.ws-popap .popap_rez .ws-data .seach-user .col {
  width: 130px;
  word-break: break-all;
  padding: 3px;
}

/* .setting_column_filter */
.setting_col_header {
  display: flex;
  align-items: center;
  padding: 5px 5px 8px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
  color: #666;
}
.setting_col_header span:first-child { flex: 1; }
.setting_col_header span:nth-child(2) { width: 65px; text-align: center; }
.setting_col_header span:nth-child(3) { width: 30px; text-align: center; }
.setting_column_filter .popap_rez .popap_result .setting_column .setting_column_line {
  padding: 5px;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}
.setting_column_filter .popap_rez .popap_result .setting_column .setting_column_line:hover {
  background: #eee;
}
.setting_column_line .setting_col_name {
  flex: 1;
}
.setting_column_line .setting_col_width {
  width: 55px !important;
  height: 28px;
  text-align: center;
  padding: 2px 4px;
  flex-shrink: 0;
}
.setting_column_line .checkbox {
  flex-shrink: 0;
}

#add_email .popap_rez {
  min-height: auto;
}
#add_email .popap_rez .popap_result .add_emails {
  margin: auto;
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
#add_email .popap_rez .popap_result .add_emails .select {
  width: 200px;
  margin-bottom: 5px;
}
#add_email .popap_rez .popap_result .add_emails .input {
  width: 200px;
  margin-bottom: 5px;
}

/* Изменяем классическую форму */

#add_mess_wappi .popap_rez {
  max-width: 50em;
}

#add_mess_wappi .popap_rez .select {
  margin-bottom: 1em;
  margin-top: 1em;
}

/*
#add_mess_wappi_new_topic .popap_rez{
    max-width: 500px;
    min-height: 250px;
}

#add_mess_wappi_new_topic .popap_rez .input{
    width: 100%;
}

#add_mess_wappi_new_topic .popap_rez .submit{
    width: 210px;
}

#add_mess_wappi .popap_rez .popap_result_text{
    height: 250px;
    overflow: auto;
    margin-top: 10px;
    outline: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
}
#add_mess_wappi .popap_rez .add_mess_wappi_mess{
    font-size: 10px;
    display: flex;
}
#add_mess_wappi .popap_rez .add_mess_wappi_mess p{
    margin: auto;
    margin-left: 0;
    margin-right: 15px;
}
#add_mess_wappi .popap_rez .add_topic_r{
    margin-top: 10px;
   
    cursor: pointer;
    padding: 5px;
    border: 1px solid #4dad33;
    width: 205px;
    text-align: center;
    
    color: #4dad33;
    background: #fff;
    font-weight: 500;
}
#add_mess_wappi .popap_rez h2{
    margin-top: 20px;
}
#add_mess_wappi .popap_rez .add_topic_r:hover{
    background: #4dad33;
    color: #fff;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line{
    
    margin-bottom: 0px;
    flex-wrap: wrap;
    padding: 10px;
    box-sizing: border-box;
    height: 55px;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line:hover{
    background: #ddd;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line .wappi_topic_line_1{
    width: 100%;
    font-size: 13px;
    margin-bottom: 5px;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line .wappi_topic_line_1 label{
    display: flex;
    font-weight: 600;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line .wappi_topic_line_1 label input[type="radio"]{
    margin-right: 10px;
    height: 16px;
    width: 16px;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line .wappi_topic_line_2{
    width: 375px;
    text-align: left;
    margin-right: 5px;
}
#add_mess_wappi .popap_rez .popap_result_text .wappi_topic_line .wappi_topic_line_3{
    text-align: center;
}
*/

#news_category .popap_rez {
  min-height: 215px;
  width: 440px;
}
#news_category .popap_rez .popap_result {
  height: 180px;
  display: flex;
  flex-direction: column;
}

#add_warehouse .popap_rez,
#add_warehouse_product_category .popap_rez,
#add_warehouse_product_unit .popap_rez,
#add_status .popap_rez,
#add_type_task_user .popap_rez,
#razdel_menu_user .popap_rez {
  min-height: auto;
  max-width: 500px;
}
#add_warehouse .popap_rez .popap_result_warehouse,
#add_warehouse_product_category .popap_rez .popap_result_warehouse,
#add_warehouse_product_unit .popap_rez .popap_result_warehouse {
}

.warehouse-product {
}
.warehouse-product .title {
  margin-bottom: 15px;
}
.warehouse-product .name-product {
  width: 80%;
}
.warehouse-product .warehouse-product-data {
  margin-top: 10px;
}
.warehouse-product .warehouse-product-data .center-block .left-block {
  display: flex;
  flex-direction: column;
  width: 50%;
  align-items: baseline;
}
.warehouse-product .warehouse-product-data .center-block .left-block .select {
  margin-bottom: 5px;
}
.warehouse-product .warehouse-product-data .center-block .right-block {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  width: 50%;
}
.warehouse-product .warehouse-product-data .center-block .right-block .label {
  width: 80px;
  height: 75px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.warehouse-product .param-product {
  display: flex;
  flex-wrap: wrap;
}
.warehouse-product .param-product .input {
  margin-right: 1px;
  margin-bottom: 1px;
}
.warehouse-product .warehouse-product-data .center-block .right-block .label .img {
  max-width: 100%;
  max-height: 100%;
}
.warehouse-product .warehouse-product-data .footer-block {
  margin-bottom: 15px;
  align-items: center;
  margin-top: 10px;
}
.warehouse-product .warehouse-product-data .footer-block .input {
  margin-left: 5px;
  margin-right: 5px;
}

.img-product {
  max-width: 50px;
  max-height: 50px;
}

/*
#add_warehouse_product .popap_rez {
    min-height: auto;
    width: 600px;
}
#add_warehouse_product .popap_rez .popap_result_warehouse_product{
    margin-bottom: 35px;
    margin-top: 20px;
}

#add_warehouse_product .popap_rez .popap_result_warehouse_product .popap_result_warehouse_product_{
    justify-content: flex-start;
    align-items: flex-end;
}

#add_warehouse_product .popap_rez .popap_result_warehouse_product .popap_result_warehouse_product_{
    margin-top: 10px;
}
#add_warehouse_product .popap_rez .popap_result_warehouse_product .popap_result_warehouse_product_ .input{
    width: 105px;
    margin-left: 20px;
}

#add_warehouse_product .popap_rez .popap_result_warehouse_product .popap_result_warehouse_product_ span{
    margin-left: 4;
    font-weight: 500;
    margin-right: 20px;
    margin-bottom: 5px;
}
#add_warehouse_product .popap_rez .popap_result_warehouse_product p{
    
    margin-bottom: 3px;
}
*/

#warehouse_product_up .popap_rez {
  width: 1100px;
}
#warehouse_product_up .popap_rez .warehouse_scroll {
  max-height: 400px;
}
.popap .popap_rez .popap_result_warehouse {
  min-height: 0px;
  margin-bottom: 20px;
  margin-top: 20px;
}
.popap .popap_rez .popap_result_warehouse .popap_result_warehouse_back {
  margin-bottom: 3px;
  display: flex;
  justify-content: flex-start;
  width: 50px;
}
.popap .popap_rez .popap_result_warehouse .popap_result_warehouse_back svg {
  transform: rotate(180deg);
}
.popap .popap_rez .popap_result_warehouse_ {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  outline: 1px solid #999;
  padding: 10px;
}
.popap .popap_rez .popap_result_warehouse_ .input {
  width: 80px;
}
.popap .popap_rez .popap_result_warehouse_ span {
  margin-right: 10px;
  margin-left: 5px;
}
.popap .popap_rez .popap_result_warehouse_ .whouse_from {
  font-weight: bold;
  padding: 10px;
  outline: 1px solid #b5c0cd;
  border-radius: 5px;
}
.popap .popap_rez .popap_result_warehouse_ > div {
  margin-right: 20px;
}
.popap .popap_rez .popap_result_warehouse_ p {
  margin-bottom: 3px;
}
.popap .popap_rez .warehouse_scroll {
  height: 235px;
  overflow: auto;
  margin-top: 20px;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}
.popap .popap_rez .warehouse_scroll table {
  width: 100%;
}
.popap .popap_rez .warehouse_scroll table tr {
  border-bottom: 1px solid #ccc;
}
.popap .popap_rez .warehouse_scroll table tr td,
.popap .popap_rez .warehouse_scroll table tr th {
  padding: 5px;
  border: 1px solid #ccc;
  text-align: left;
  min-width: 50px;
}
.popap .popap_rez .submit_ {
  margin-left: 15px;
}
#all_warehouse_product .popap_rez {
  width: 900px;
}
#warehouse_category_param .popap_rez .warehouse_scroll {
  min-height: 250px;
}
#all_warehouse_product .popap_rez .warehouse_scroll {
  height: 320px;
  margin-bottom: 20px;
  margin-top: 50px;
}

#all_warehouse_product .popap_rez .warehouse_scroll .seach {
  position: absolute;
  margin-top: -50px;
  margin-left: -10px;
  width: 600px;
}

#all_warehouse_product .popap_rez .warehouse_scroll .label {
  display: flex;
  justify-content: center;
  align-items: center;
}
#all_warehouse_product .popap_rez .warehouse_scroll input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  cursor: pointer;
}
#all_warehouse_product .popap_rez .warehouse_scroll input[type="number"] {
  width: 70px;
  margin-left: 10px;
}

.enter-first .popap_rez {
  padding: 2em;
  width: 30em;
  box-sizing: border-box;
}

.enter-first .popap_rez .input {
  margin-top: 1em;
  margin-bottom: 1em;
}

/* .task */
.task {
  min-height: 430px;
  margin-top: 10px;
}
.task .task_line {
  width: 100%;
}
.task .task_line_title {
}
.task .task_line_title .input {
  width: 100%;
  margin-right: 1%;
}
.task .news_category label {
  margin-left: 0px;
  margin-right: 15px;
}
.task .news_category select {
  margin-left: 0px;
  margin-right: 15px;
  width: 150px;
}
.task .news_category span {
  margin-right: 0px;
  font-weight: 500;
}
.task .task_line_group_user {
  padding: 10px;
  background: #e6e9ee;
  box-sizing: border-box;
  border-radius: 5px;
  margin-bottom: 10px;
  margin-top: 5px;
}
.task .task_line_group_user .task_line_group_user_ {
  margin-bottom: 10px;
}
.task .task_line_group_user .task_line_group_user_ .select {
  width: 230px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task .task_line_group_user .task_line_group_user_ .select i svg {
  fill: #000;
  transform: rotate(90deg);
}
.task .task_line_group_user .task_line_group_user_add {
  border: 2px solid #53469f;
  padding: 9px;
  border-radius: 6px;
  padding-left: 12px;
  padding-right: 12px;
}
.task .task_line_type {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.task-after {
  display: flex;
  align-items: center;
  margin-left: 5px;
}

.task-after .checkbox {
  margin-left: 5px;
  margin-right: 5px;
}

.task .task_line_type .task-start {
  background: #e6e9ee;
  padding: 2px;
  box-sizing: border-box;
  padding-left: 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  margin-right: 2px;
  margin-left: 2px;
}

.task .task_line_type .task-start .span {
  width: 50px;
  display: inline-block;
  margin-right: 5px;
}

.task .task_line_type .task-start .input-date {
  margin-right: 2px;
  width: 9em;
}

.task .task_line_type .select {
  width: 224px;
  margin-bottom: 5px;
  margin-left: 1px;
  margin-right: 1px;
}
.task .task_line_txt {
  margin-bottom: 10px;
  margin-top: 0;
}

.task .task_check_line {
  display: flex;
  flex-wrap: wrap;
}
.task .task_check {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
}

.task .task_check .difficult-pr,
.task .task_type_close {
  margin-left: 15px;
}

.task .task_check .label {
  display: flex;
  align-items: center;
  font-size: 13px;
}
.task .task_check .label .checkbox {
  margin-right: 5px;
}
.task .task_check .task_repeat_ .label {
  margin-right: 5px;
  display: flex;
  align-items: center;
  font-size: 0.8em;
}
.task .task_check .task_repeat_ .input {
  margin-left: 10px;
}

.task .task_check_repeat {
  flex-wrap: wrap;
  width: 100%;
}
.task .task_check_repeat .task_repeat_start {
  width: 100%;
}
.task .task_check_repeat .task_repeat_start_left {
  width: 30%;
}
.task .task_check_repeat .task_repeat_start_right {
  width: 70%;
}
.task .task_check_repeat .task_repeat_ {
  padding: 10px;
  background: #e6e9ee;
  margin-top: 5px;
  display: flex;
  align-items: center;
  width: 100%;
}

.task .task_line_txt .textarea {
  width: 100%;
  height: 100px;
  resize: vertical;
}
.task .task_line_file .add_task_file {
  background: #e6e9ee;
  font-size: 13px;
  font-weight: 400;
  border-radius: 5px;
  padding: 10px;
}

.task .task_line_file .del_file {
  margin-bottom: 2px;
  background: #fff;
  padding: 2px;
  padding-left: 10px;
  padding-right: 2px;
}
.task .task_line_sub {
  margin-top: 15px;
}

/* .project */

.project {
  margin-left: 45px;
  margin-right: 15px;
  margin-bottom: 45px;
}

.block .center .project .calendar {
  margin-left: 0;
  width: 100%;
}

.add-task-project {
  display: flex;
  margin-bottom: 1em;
}

.add-task-project .taks-n {
  padding: 0.5em;
  margin-right: 1em;
  background: #dbdfe3;
  border: 2px solid #53469f;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1em;
  cursor: pointer;
}
.add-task-project .taks-n:hover {
  background: #fff;
}

#project-popap .popap_rez .seach-task {
  box-sizing: border-box;
}
#project-popap .popap_rez .seach-task .input {
  width: 600px;
  margin-bottom: 2px;
}
#project-popap .popap_rez .seach-task-list {
  height: 50vh;
  overflow: auto;
  box-sizing: border-box;
  margin-bottom: 20px;
  outline: 1px solid #ccc;
  padding: 10px;
  background: #fff;
}
#project-popap .popap_rez .seach-task-line {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  cursor: pointer;
}
#project-popap .popap_rez .seach-task-line .id {
  width: 75px;
}
#project-popap .popap_rez .seach-task-line .name {
  margin: auto;
  margin-left: 0;
}
#project-popap .popap_rez .seach-task-line:hover {
  background: #eee;
}

/* .client */
.client {
  min-height: auto;
  margin-top: 10px;
}
.client .task_line_type {
  flex-wrap: nowrap;
}

.client .task_line_title {
  display: flex;
  justify-content: space-between;
}
.client .task_line_title #cat_show_el_result {
  margin: auto;
  margin-left: 0;
}
.client .task_line_title .label {
  display: flex;
  align-items: center;
}
.client .task_line_title .label .checkbox {
  margin-right: 10px;
}
.client .task_line_title .select {
  margin-left: 0;
  max-width: 235px;
}

.client .task_line_type .input {
  width: 24%;
  margin-right: 1%;
}
.client .new_client {
  min-height: 40px;
}
.client .new_client .new_client_id {
  margin-right: 15px;
}
.client .new_client .new_client_id .label {
  justify-content: center;
  align-items: center;
  display: flex;
}
.client .new_client .new_client_id .label .radio {
  margin-right: 5px;
}
.client .new_client .new_client_id .select {
  max-width: 170px;
}

/* .object */
.object .task_line_type input[type="text"] {
  width: calc(100% - 220px);
}
.object .task_line_type .task_line_type_inp {
  width: 100% !important;
}
.object .task_line_type {
  justify-content: space-around;
}

.menu-id-task {
  display: none;
}

.news_popap .popap_rez {
  width: 500px;
}
.news_popap .popap_rez .popap_rez_block {
  margin: 20px;
  margin-top: 0;
}
.news_popap .popap_rez .popap_rez_block .submit {
  margin-top: 20px;
}

.popap .add_news {
  width: 500px;
}
.popap .add_news .client {
  min-height: auto;
}

.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.delete-preview-img {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.delete-preview-img:hover {
  background: rgba(255, 0, 0, 0.8);
  transform: scale(1.1);
}

.paperclip-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg>');
  background-repeat: no-repeat;
  margin-left: 5px;
  vertical-align: middle;
}

#show_object .popap_rez {
  min-height: 250px;
  justify-content: center;
}

.object {
  gap: 15px;
}

#unread-msg-counter {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(234, 128, 128);
  font-weight: bold;
  margin-top: 5px;
  align-self: end;
  padding: 2px;
  font-size: 13px;
}

.message-img {
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.message-img:hover {
  opacity: 0.85;
}
.message-video {
  max-width: 250px;
  max-height: 250px;
  border-radius: 8px;
}

/* Современный дизайн сообщений — аватар, имя, время */
.msg-avatar-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-top: 4px;
}
.msg-name-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  user-select: none;
}
.msg-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.msg-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
  width: 100%;
}
.msg-sender {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}
.msg-time {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}
.msg-footer {
  display: flex;
  gap: 10px;
  margin-top: 2px;
  margin-left: auto;
}
.msg-footer .add-reply {
  font-size: 11px;
  color: #0088cc;
  cursor: pointer;
  opacity: 0.6;
}
.msg-footer .add-reply:hover {
  opacity: 1;
  text-decoration: underline;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 1300px) {
  * {
    font-size: 12px;
  }
}

@media (max-width: 1200px) {
  * {
    font-size: 12px;
  }

  .wappi .wappi-right-company {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0px;
    min-height: 100vh;
    padding-top: 10px;
    max-height: 100vh;
    border: 1px solid #dbdfe3;
  }
  .wappi .wappi-right-company .wappi-right-scr {
    margin-bottom: 0;
  }

  .wappi .wappi_right {
    min-width: 68%;
  }
  .wappi .wappi_right .wappi_mess_title .wappi-mobyle-right .bi {
    display: block;
  }

  .block .center .user_id .user_id_right {
    width: auto;
  }

  .block .center .user_id .user_id_left .user_id_left_list {
    flex-wrap: wrap;
  }
  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_1 {
    margin: auto;
    margin-top: 0;
  }
  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_2 {
    margin: auto;
    margin-top: 0;
  }
  .block .center .user_id .user_id_left {
    width: calc(100% - 210px);
  }

  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_img {
    margin-right: auto;
    width: auto;
  }

  .calendar .calendar-a {
    width: 20%;
  }

  .calendar .calendar-b {
    width: 10%;
  }

  .calendar .calendar-c,
  .from-task .calendar-top .calendar-c,
  .from-task .calendar-c {
    width: 80%;
  }
}

@media (max-width: 950px) {
  * {
    font-size: 12px;
  }

  .block .center .center-hleb {
    flex-wrap: wrap;
    height: auto;
  }

  .block .center .center-hleb .link {
    margin-bottom: 10px;
  }

  .block .center .news_result {
    flex-wrap: wrap;
  }

  .block .center .news_result .news_result_left {
    margin-left: 20px;
    display: none;
  }

  .wappi .wappi_left {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0px;
    height: 100vh;
    padding-top: 10px;
    border: 1px solid #dbdfe3;
  }
  .wappi .wappi_right {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
  }
  .wappi .wappi_right .wappi_mess_title .wappi-mobyle-left .bi {
    display: block;
  }

  .block .center .news_result .news_result_right {
    width: 100%;
  }

  .block .center .news_result .news_result_right i {
    margin: 5px;
  }

  .block .center .news_result .news_result_right .news__ {
    margin: 10px;
    width: 100%;
  }
  .block .center .news_result .news_result_right .news-list-id {
    margin: 10px;
  }

  .block .center .news_result .news_result_right .news__ .news_category .news_category_form {
    flex-wrap: wrap;
  }

  .block .center .news_result .news_result_right .news-list .news-list-id {
    width: 100%;
    margin: 0;
    margin-bottom: 5px;
  }

  .block .center .news_result .news_result_right .news__ .news_category {
    display: none;
  }

  .ck.ck-editor {
    width: 100%;
  }

  .top .top-right .top-text {
    display: none;
  }

  .block .center .calendar {
    margin: 10px;
    overflow: auto;
    max-width: calc(100% - 20px);
  }

  .block .center .calendar .calendar-scroll {
    min-width: 1000px;
  }

  .block .center .setting-top .link {
    font-size: 0.8em;
    padding: 5px;
    justify-content: center;
  }
  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_img {
    max-width: none;
    width: 100%;
  }
  .block .center .calendar {
    display: none;
  }

  .block .center .calendar-m {
    display: flex;
    width: 370px;
    flex-direction: column;
  }
  .block .center .calendar-m .mesyac {
    width: 100%;
    background: #dbdfe3;
    height: 36px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 5px;
    padding-right: 5px;
    box-sizing: border-box;
    border-radius: 5px;
  }
  .block .center .calendar-m .mesyac .mesyac-l {
    padding: 9px 12px;
    border: 1px solid rgba(208, 208, 208, 1);
    border-radius: 7px;
    background: #fff;
  }
  .block .center .calendar-m .mesyac .mesyac-r {
    padding: 9px 12px;
    border: 1px solid rgba(208, 208, 208, 1);
    border-radius: 7px;
    background: #fff;
    transform: rotate(180deg);
  }
  .block .center .calendar-m .mesyac .mesyac-itg {
    font-size: 16px;
    font-weight: 500;
  }
  .block .center .calendar-m .calendar-rez {
    background: #e6e9ee;
    padding: 10px;
    padding-top: 5px;
    padding-bottom: 15px;
  }
  .block .center .calendar-m .ned {
    display: flex;
  }
  .block .center .calendar-m .ned .day {
    box-sizing: border-box;
    text-align: center;
    width: 100%;
    height: 37px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 7px;
    margin-left: 5px;
    margin-right: 5px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    flex-direction: column;
  }

  .block .center .calendar-m .ned .start,
  .block .center .calendar-m .ned .stop {
    background: #53469f;
    color: #fff;
  }

  .block .center .calendar-m .ned .day .curcls {
    display: flex;
    height: 5px;
  }

  .block .center .calendar-m .ned .day .curcls .curcle {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-right: -3px;
    position: relative;
  }

  .block .center .calendar-m .ned .day .curcls .red {
    background: #eee;
    border: 1px solid #999;
  }

  .block .center .calendar-m .ned .day .span {
    font-size: 16px;
  }

  .block .center .calendar-m .ned .day .change {
    display: none;
    background: rgba(83, 70, 195, 0.3);
    position: absolute;
    width: 47.8px;
    height: 44px;
  }
}

@media (max-width: 750px) {
  .block .center .user_id .user_id_right {
    display: none;
  }
  .block .center .user_id .user_id_left {
    width: 100%;
  }
  .block .center .user_id .user_id_left .user_id_left_sla {
    padding-left: 20px;
  }
}

@media (max-width: 500px) {
  * {
    font-size: 14px;
  }
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .block .center {
    overflow-x: hidden;
  }

  .task .task_type_close {
    margin-left: 0;
  }

  .block .center .result {
    flex-direction: column;
  }
  .block .center .result .result_left {
    width: 100%;
    min-height: auto;
  }

  .block .center .result .result_left .project {
    margin: 0;
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .block .center .result .result_left .result-left-line {
    margin: 0;
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .block .center .result .result_left .menu_task {
    margin-right: 20px;
  }

  .block .center .result .result_left .menu_task_2 {
    margin: 1px;
    margin-top: 0px;
    height: auto;
    display: none;
  }

  .block .center .result .result_left .menu_task .menu_task_line .menu_task_line_link {
    margin: 0.5px;
    border: 1px solid #eee;
    box-sizing: border-box;
    border-bottom: 0;
    font-weight: 500;
    font-size: 1em;
  }
  .block .center .result .result_left .menu_task .menu_task_result {
    flex-direction: column;
    box-sizing: border-box;
    padding-top: 20px;
  }
  .block .center .result .result_left .menu_task_2 .menu_task_result {
    padding: 20px;
  }
  .block .center .result .result_left .menu_task .menu_task_result .list_comment {
    margin: 0;
    width: 100%;
  }
  .block .center .result .result_left .menu_task .menu_task_result .comment_right {
    width: 100%;
    margin-top: 20px;
  }

  .block .center .result .result_left .menu_task .menu_task_result .th-title {
    display: none;
  }
  /* Карточный стиль для таблиц внутри карточки клиента */
  .block .center .result .menu_task .table {
    table-layout: auto !important;
    display: block !important;
  }
  .block .center .result .menu_task .table .tr {
    display: flex !important;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 8px 0;
    gap: 4px 12px;
  }
  .block .center .result .menu_task .table .tr .td {
    display: block !important;
    width: auto !important;
    border: none;
    padding: 2px 0;
    font-size: 14px;
  }
  .block .center .result .menu_task .table .tr .td:first-child {
    font-weight: 600;
    color: #4a6cf7;
  }
  .block .center .result .menu_task .table .tr .td:nth-child(2) {
    width: 100% !important;
    font-weight: 500;
  }

  .block .center .result .result_rigth {
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
    margin: 0;
    border-radius: 0;
    margin-top: 0.5px;
  }

  .menu-id-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .menu-id-task .menu-id-task-link {
    width: calc(50% - 0.5px);
    text-align: center;
    background: rgb(223, 223, 223);
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .menu-id-task .menu-id-task-link span {
    font-size: 1.2em;
    font-weight: 600;
  }
  .menu-id-task .menu-id-task-link-action {
    background: rgb(230, 233, 238);
  }

  .menu-id-task .menu-id-task-link .img {
    margin-left: 5px;
  }
  .menu-id-task .menu-id-task-link .img_ {
    transform: rotate(180deg);
  }

  .form_start {
    width: 320px;
  }
  .form_start .form_start_rez {
    width: 320px;
  }
  .form_start .form_action .input {
    width: 100%;
  }

  .top {
    height: auto;
  }
  .top .top-right .help-desc {
    margin: auto;
  }

  .top .top-right .new-task {
    width: 45px;
    height: 35px;
  }
  .top .top-right .new-task .bi {
  }
  .top .top-right .new-task .span {
    display: none;
  }
  .top .top-right .top-text {
    display: none;
  }
  .top .top-right .all_news_crm {
    display: none;
  }
  .top .top-right .out {
    width: 50px;
    background: none;
    margin-left: 0;
  }
  .top .top-right .out .span {
    display: none;
  }
  .top .top-right .out .img {
    margin: auto;
  }

  .block .left-menu {
    position: absolute;
    border-right: 1px solid #000;
    z-index: 9;
    display: none;
  }
  .block .left-menu .hide-mobile {
    display: none !important;
  }

  .block .center {
    width: 100% !important;
  }

  .block .center .center-filter-mobyle {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(230, 233, 238, 1);
    height: 37px;
    margin: 10px;
    border-radius: 5px;
    font-size: 13px;
  }
  .block .center .center-filter-mobyle .span {
    margin-left: 5px;
  }

  /* Мобильная панель быстрых фильтров */
  .mob-quick-filters {
    display: flex !important;
  }
  .preset-tabs {
    display: none !important;
  }
  /* Полный chip-bar скрыт по умолчанию, но раскрывается при нажатии «⚙ Ещё»
     (mobileToggleAllFilters() добавляет класс .mob-show) */
  .chip-bar {
    display: none !important;
  }
  .chip-bar.mob-show {
    display: flex !important;
    flex-wrap: wrap;
  }

  .block .center .center-filter {
    min-width: auto;
    flex-direction: column;
    display: none;
  }

  .block .center .center-filter .center-filter-left {
    width: 98%;
    justify-content: space-between;
    padding: 1%;
    box-sizing: border-box;
  }
  .block .center .center-filter .center-filter-left .center-filter-left-inp {
    width: 43%;
    margin: 1%;
    min-width: auto;
  }
  .block .center .center-filter .center-filter-right {
    width: 98%;
    justify-content: space-between;
    padding: 1%;
    box-sizing: border-box;
    border: none;
  }
  .block .center .center-filter .center-filter-right .center-filter-right-result- {
    margin: auto;
  }

  .block .center .center-filter .filter-bott {
    height: 35px;

    margin: auto;
    width: 44%;
    margin-bottom: 15px;
  }
  .block .center .center-filter .filter-bott .img {
    margin-right: 5px;
  }
  .block .center .center-filter .filter-bott-clear {
    margin: auto;
    margin-bottom: 15px;
    margin-top: 10px;
  }

  .block .center .center-filter .filter-bott-line {
    flex-wrap: wrap-reverse;
  }
  .block .center .center-filter .filter-bott-line .span {
    font-size: 11px;
  }

  .block
    .center
    .center-filter
    .center-filter-left
    .center-filter-left-inp
    .center-filter-left-result {
    width: 150px;
  }
  .block
    .center
    .center-filter
    .center-filter-left
    .center-filter-left-inp
    .center-filter-left-result
    .filter_param
    .action {
    margin-left: 5px;
  }
  .block
    .center
    .center-filter
    .center-filter-left
    .center-filter-left-inp
    .center-filter-left-result
    .filter_param
    button {
    margin-right: 5px;
  }

  .block
    .center
    .center-filter
    .center-filter-left
    .center-filter-left-inp
    .center-filter-left-result
    .filter_param
    .filter_result_ajax_seach
    input[type="date"] {
    width: 60px;
    margin-top: 10px;
  }

  .block .center .result .result_rigth .right_line {
    margin-top: 15px;
  }

  .block .center .table {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .block .center .result_tb {
    overflow-x: hidden;
  }
  .block .center .table .tr {
    display: flex;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 1);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #bbb;
    margin: 10px;
  }

  .block .center .table .pink_color {
    background: transparent;
  }

  .block .center .table .tr .td {
    border: none;
    width: 43% !important;
    display: flex;
    flex-direction: column;
    align-items: baseline;
  }

  .block .center .table .tr .task-from-one {
    width: 7% !important;
  }
  .block .center .table .tr .pin {
    width: 8% !important;
  }
  .block .center .table .tr .id {
    width: 30% !important;
  }

  .block .center .table .tr .task_name {
    width: 100% !important;
  }
  .block .center .table .tr .task_name .link {
    font-size: 16px;
    color: rgba(83, 70, 159, 1);
    font-weight: 500;
  }
  .block .center .table .tr .id .link {
    font-size: 16px;
    color: rgba(83, 70, 159, 1);
  }
  .block .center .table .tr .task_description {
    width: 100%;
  }

  .block .center .table .tr .responsibly {
    font-weight: 600;
  }
  .block .center .table .tr .responsibly::before {
    content: "Ответственный:";
    font-weight: 400;
  }
  .block .center .table .tr .user {
    font-weight: 600;
  }
  .block .center .table .tr .user::before {
    content: "Автор:";
    font-weight: 400;
  }
  .block .center .table .tr .to_client {
    font-weight: 600;
  }
  .block .center .table .tr .to_client::before {
    content: "Для клиента:";
    font-weight: 400;
  }
  .block .center .table .tr .task_add {
    font-weight: 600;
  }
  .block .center .table .tr .task_add::before {
    content: "Дата создания:";
    font-weight: 400;
  }
  .block .center .table .tr .task_group_user {
    width: 100%;
    font-weight: 600;
  }
  .block .center .table .tr .task_group_user::before {
    content: "Для пользователей:";
    font-weight: 400;
  }
  .block .center .table .tr .status {
    font-weight: 600;
  }
  .block .center .table .tr .status::before {
    content: "Статус заявки:";
    font-weight: 400;
  }
  .block .center .table .tr .dop_status {
    font-weight: 600;
  }
  .block .center .table .tr .dop_status::before {
    content: "Доп. статус заявки:";
    font-weight: 400;
  }
  .block .center .table .tr .action {
    font-weight: 600;
  }
  .block .center .table .tr .action::before {
    content: "Активность:";
    font-weight: 400;
  }

  .block .center .result {
    flex-direction: column;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  .block .center .result .result_line {
    display: none;
  }

  .block .center .setting_top .setting_step {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .block .center .setting .setting_step {
    padding: 20px;
    overflow: auto;
    margin-bottom: 10px;
    margin-right: 0;
  }

  .block .center .calendar-m {
    max-width: calc(100% - 20px);
    margin: auto;
  }

  .block .center .calendar-res-top {
    margin: 10px;
    font-size: 16px;
  }

  .block .center .calendar-res-id {
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 2px solid #eee;
    border-radius: 5px;
    padding: 7px;
    box-sizing: border-box;
    background: #e6e9ee;
  }

  .block .center .calendar-res-id .calendar-name {
    display: flex;
    align-items: baseline;
  }

  .block .center .calendar-res-id .calendar-name .grey {
    color: #878787;
    font-size: 12px;
    margin-right: 5px;
  }

  .block .center .calendar-res-id .calendar-name .kvadr {
    width: 8px;
    height: 8px;
    border: 1px solid #000;
    margin-right: 8px;
  }

  .block .center .calendar-res-id .calendar-name .name {
    font-weight: 600;

    color: #000;
    max-width: 267px;
  }

  .popap .popap_rez {
    width: calc(100% - 6px);
    max-height: calc(100vh - 6px);
    overflow: auto;
  }

  .popap .popap_rez .close {
    padding-bottom: 0;
    margin-bottom: 0;
    margin-top: 0;
  }
  .popap .popap_rez .popap_result {
    margin-top: -30px;
  }

  .popap .popap_rez .popap_result .h2 {
    width: 70%;
  }

  #add_email .popap_rez .popap_result .add_emails .input {
    width: 100%;
  }

  .task .task_line_type .select {
    width: 48%;
  }
  .task .task_line_type .task-start {
    width: 100%;
    align-items: center;
    justify-content: space-around;
  }
  .task .task_line_type .task-start .span {
    width: auto;
  }

  .task .task_line_group_user .task_line_group_user_add {
    border: 2px solid #53469f;
    padding: 3px;
    border-radius: 6px;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    margin: auto;
    margin-left: 15px;
  }

  .task .task_check .label {
  }

  .task .task_check .label .span {
  }

  .task .task_line_txt {
    margin: 0;
  }

  #add_task .task .task_line_txt {
    margin-bottom: 15px;
  }

  .task .task_check_repeat .task_repeat_start_left {
    width: 100%;
  }
  .task .task_check_repeat .task_repeat_start {
    width: 100%;
    flex-wrap: wrap;
  }
  .task .task_line_file .add_task_file {
    width: 100%;
  }
  .task .task_check_repeat .task_repeat_start_right {
    width: 100%;
  }

  .client_add_ {
    align-items: baseline;
    flex-direction: column;
    margin-top: -47px;
    margin-bottom: 0;
  }

  .block .center_4 .client_add_,
  .block .center_7 .client_add_ {
    margin-top: 0;
    margin-bottom: 0;
  }

  .block .center .add_ {
    margin-bottom: 5px;
  }

  .client {
    margin-top: 15px;
  }
  .client .new_client {
    flex-direction: column;
  }
  .client .new_client .new_client_id {
    margin-bottom: 10px;
    margin-right: 0;
  }
  .client .task_line_title {
    flex-direction: column;
  }
  .task .task_line_title .input {
    margin-bottom: 5px;
  }
  .client .task_line_type {
    flex-direction: column;
  }
  .client .task_line_type .input {
    width: 100%;
    margin-bottom: 5px;
  }
  .client .task_line_title {
    margin-bottom: 0;
    min-height: auto;
    margin-top: 5px;
  }

  .client_add_ .client_add_link {
    max-width: 90%;
  }

  .block .center .setting-top {
    flex-wrap: wrap;
  }
  .block .center .setting .setting_step .table .td {
    width: auto;
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .block .center .setting .change {
  }

  .block
    .center
    .setting
    .setting_step
    .tg_setting_line
    .tg_setting_line_right
    .report-repeat-tg
    .task_repeat_ {
    flex-wrap: wrap;
  }
  .block
    .center
    .setting
    .setting_step
    .tg_setting_line
    .tg_setting_line_right
    .report-repeat-tg
    .label {
    width: 33%;
    margin-bottom: 5px;
    margin-right: 0;
  }
  .block .center .setting .setting_step .table .th-title {
    display: none;
  }
  .block .center .setting .setting_step .table .tr {
    margin: 0;
    margin-bottom: 5px;
  }

  .block .center .setting .setting-telegram {
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .block .center .setting .setting_step .change .input {
    width: 210px;
  }

  .block .center .setting .setting_step .table .tr .set_7_name {
    width: 100%;
    padding-bottom: 0;
    display: block;
  }

  .wappi .wappi_right .wappi_mess .wappi_from .wappi_mess_ {
    max-width: 250px;
  }

  .wappi .wappi_right .wappi_console .textarea {
    width: calc(100% - 60px);
    height: 50px;
  }
  .wappi .wappi_right .wappi_console .submit {
    margin: 0;
  }

  .block .center .calendar {
    margin: 10px;
    overflow: auto;
    max-width: calc(100% - 20px);
  }

  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_1 {
    width: calc(50% - 20px);
  }
  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_text_2 {
    width: calc(50% - 20px);
  }
  .block .center .user_id .user_id_left .user_id_left_inp .input {
    width: 100%;
  }
  .block .center .user_id .user_id_left .user_id_left_list .user_id_left_edit {
    margin: auto;
    margin-left: -25px;
  }
  .block .center .user_id .user_id_left .user_id_left_comment .textarea {
    width: calc(100% - 20px);
    box-sizing: border-box;
    margin: 0;
    margin-left: 10px;
    margin-bottom: 10px;
    resize: auto;
    min-height: 150px;
  }

  .block
    .center
    .result
    .result_left
    .menu_task
    .menu_task_result
    .comment_right
    .comment_right_text {
    height: 60px;
  }

  .block .center .result .result_left .menu_task {
    height: auto;
    margin-bottom: 20px;
    min-height: 560px;
  }

  .object .task_line_type input[type="text"] {
    width: 100%;
  }

  .warehouse-product .name-product {
    width: 100%;
    margin-top: 15px;
  }
  .warehouse-product .warehouse-product-data .footer-block {
    flex-wrap: wrap;
  }
  .warehouse-product .warehouse-product-data .footer-block .input {
    margin-left: 0;
  }
  .warehouse-product .warehouse-product-data .center-block .left-block {
    width: auto;
  }
  .warehouse-product .warehouse-product-data .center-block .right-block {
    width: auto;
    margin: auto;
    margin-right: 0;
    margin-top: 0;
  }
}

/* TODO Вынести в отдельный файл */
/* Стили для прелоадеров */
.wappi-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  margin: auto;
}

.wappi-loader-spinner {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.wappi-loader-bounce {
  width: 12px;
  height: 12px;
  background-color: #25d366;
  border-radius: 50%;
  animation: wappi-bounce 1.4s infinite ease-in-out both;
}

.wappi-loader-bounce:nth-child(1) {
  animation-delay: -0.32s;
}
.wappi-loader-bounce:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes wappi-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.wappi-loader-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

/* Прелоадер сообщений */
.wappi-loader-messages {
  padding: 20px;
}

.wappi-loader-pulse {
  width: 120px;
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 4px;
}

.wappi-loader-messages-content {
  margin-top: 20px;
}

.wappi-loader-message-item {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

.wappi-loader-message-item.reverse {
  flex-direction: row-reverse;
}

.wappi-loader-avatar {
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.5s infinite;
}

.wappi-loader-avatar.large {
  width: 40px;
  height: 40px;
}

.wappi-loader-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wappi-loader-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 6px;
}

.wappi-loader-line.short {
  width: 60%;
}
.wappi-loader-line.medium {
  width: 80%;
}
.wappi-loader-line.long {
  width: 100%;
}

/* Прелоадер контактов */
.wappi-loader-contacts {
  padding: 15px;
}

.wappi-loader-contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wappi-loader-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.wappi-loader-contact-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@keyframes pulse {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.wappi-error {
  padding: 20px;
  text-align: center;
  color: #ff4444;
  font-size: 14px;
}

/* Простая блокировка формы */
#wappi-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#wappi-send-area:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 750px) {
  #wappi_dialogs_container {
    transform: translateX(-100%);
  }

  #wappi-right-company {
    transform: translateX(100%);
  }
}


/* ===== Таблицы внутри карточки клиента ===== */
.block .center .result .menu_task .table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.block .center .result .menu_task .table .tr .th {
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    background: #f8f9fb;
    border-bottom: 2px solid #e8eaf0;
    border-right: none;
    border-top: none;
    white-space: nowrap;
}
.block .center .result .menu_task .table .tr .td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f0f1f5;
    border-right: none;
    vertical-align: middle;
    color: #333;
}
.block .center .result .menu_task .table .tr:hover .td {
    background: #f5f7ff;
}
.block .center .result .menu_task .table .tr .td a {
    color: #4a6cf7;
    text-decoration: none;
    font-weight: 500;
}
.block .center .result .menu_task .table .tr .td a:hover {
    text-decoration: underline;
}

/* ===== Toggle статуса клиента ===== */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 12px;
    user-select: none;
}
.status-toggle__dot {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    position: relative;
    transition: background 0.25s ease;
    flex-shrink: 0;
}
.status-toggle__dot::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    transition: left 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.status-toggle__label {
    font-size: 14px;
    font-weight: 600;
}
/* Активный */
.status-toggle--active {
    background: #edfaf3;
}
.status-toggle--active .status-toggle__dot {
    background: #34c471;
}
.status-toggle--active .status-toggle__dot::after {
    left: 19px;
}
.status-toggle--active .status-toggle__label {
    color: #1e9e55;
}
/* Заблокирован */
.status-toggle--blocked {
    background: #fff0f0;
}
.status-toggle--blocked .status-toggle__dot {
    background: #ccc;
}
.status-toggle--blocked .status-toggle__dot::after {
    left: 3px;
}
.status-toggle--blocked .status-toggle__label {
    color: #999;
}
.status-toggle:hover {
    filter: brightness(0.96);
}

/* ===== Column resizer handle ===== */
.col-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
    user-select: none;
}
.col-resizer::after {
    content: '';
    display: block;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60%;
    background: rgba(0,0,0,0.15);
    border-radius: 1px;
    transition: background 0.15s;
}
.col-resizer:hover::after {
    background: rgba(0,0,0,0.4);
}
/* Ensure table-layout fixed on all resizable client tables */
#tbl_client_objects,
#tbl_client_employees,
#tbl_client_tickets {
    table-layout: fixed;
    width: 100%;
}

/* ===== Invite link box ===== */
.invite-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: #f7f9fc;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    margin-bottom: 14px;
}
.invite-box--inline {
    margin-top: 10px;
    margin-bottom: 0;
}
.invite-box__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a96a8;
}
.invite-box__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.invite-box__link {
    font-size: 12px;
    font-family: monospace;
    color: #3a6fd8;
    background: #eef2fb;
    border-radius: 5px;
    padding: 4px 8px;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}
.invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #d0d7e4;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
}
.invite-btn:hover {
    background: #f0f4ff;
    border-color: #3a6fd8;
    color: #3a6fd8;
}
.invite-btn--email {
    border-color: #c8d8f5;
    color: #3a6fd8;
}
.invite-btn--email:hover {
    background: #3a6fd8;
    color: #fff;
    border-color: #3a6fd8;
}
.invite-box__status {
    font-size: 12px;
    color: #8a96a8;
    white-space: nowrap;
}
.invite-box__status--ok  { color: #34c471; font-weight: 500; }
.invite-box__status--err { color: #e05c5c; font-weight: 500; }

/* ===== Описание задачи в списке + универсальный 1-line clamp ===== */
.task_description {
    color: #666;
    font-size: 12px;
    cursor: pointer;
}

/* Универсальный класс "одна строка с ellipsis" — для ячеек таблицы,
   которые иначе разъезжаются по ширине (описание, имя клиента, адрес).
   Таблица задач — display:table без table-layout:fixed, поэтому процентные
   max-width на дочернем элементе не работают: cell растягивается под контент.
   Решение — ограничить max-width на САМОЙ ячейке td.{колонка}, а child .cell-1line
   делает clamp по родительской ширине. */
.cell-1line {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

/* Колонка "Пользователи / (ред.)" в админке: ограничиваем td, иначе длинный
   список из 10+ имён растягивает столбец и сдвигает остальные за экран.
   Полный список — в data-full → JS-тултип. */
.table_group_user .td.group-users-cell {
    max-width: 200px;
}
/* Таблица должна вписываться в карточку без горизонтальной прокрутки.
   .table глобально использует width:max-content — здесь принудительно
   width:100%. Длинные заголовки колонок переносим в 2 строки. */
.table_group_user {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}
.table_group_user .th {
    white-space: normal;
    line-height: 1.2;
}
.table_group_user .change { white-space: nowrap; }

/* Жёсткие пиксельные лимиты ширины колонок клиента/объекта.
   В CSS-table колонка принимает ширину самой широкой ячейки в столбце —
   поэтому лимит = верхняя планка для всей колонки. Подобраны компактно. */
.block .center .table .tr .td.to_client,
.block .center .table .tr .td.user,
.block .center .table .tr .td.to_company {
    max-width: 130px;
}
.block .center .table .tr .td.object {
    max-width: 170px;
}

/* Описание задачи — узкая версия cell-1line. 600px форсировало
   горизонтальный скролл страницы (см. .table.task-list min-width:0). */
.block .center .table .tr .task_description.task_description-preview {
    display: block;
    height: 1.4em;
    line-height: 1.4em;
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

/* ===== Чипы статусов (P0 #3, filled-вариант) =====
   В стиле pill-вкладок «Все» — фон тоном цвета, текст в тон, без стрелки,
   прямоугольник с border-radius:8px. Маппинг класса → цвет см.
   function.php → statusChipClass(). Базовый селектор специфичный (0,4,0),
   чтобы перебить `.block .center .task-list .select` (0,3,0). */
.block .center .task-list .status-chip,
span.status-chip {
    display: inline-block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 32px;
    max-width: none;
    padding: 4px 14px;
    border-radius: 8px;
    border: none;
    background-image: none !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    overflow: visible;
    white-space: nowrap;
    transition: filter 0.15s;
}
span.status-chip { cursor: default; }

/* Цвета фона и текста по статусу — pastel bg + насыщенный текст */
.block .center .task-list .status-chip.status-chip--open,
span.status-chip.status-chip--open    { background-color: #f5faff; color: #2563eb; }
.block .center .task-list .status-chip.status-chip--hold,
span.status-chip.status-chip--hold    { background-color: #faf5ff; color: #7c3aed; }
.block .center .task-list .status-chip.status-chip--done,
span.status-chip.status-chip--done    { background-color: #f0fdf4; color: #15803d; }
.block .center .task-list .status-chip.status-chip--closed,
span.status-chip.status-chip--closed  { background-color: #f3f4f6; color: #4b5563; }

.block .center .task-list .status-chip:hover { filter: brightness(0.97); }

.status-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.4);
}

/* Замочек в карточке товара (lk/warehouse.php → попап add_warehouse_product).
   По умолчанию заблокирован, клик — разблокировка для редактирования. */
.wh-product-h2-line {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wh-lock-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f5f8;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.wh-lock-toggle:hover {
    background: #e5e7eb;
    color: #2563eb;
}
.wh-lock-toggle[data-locked='0'] {
    background: #eff6ff;
    color: #2563eb;
}
/* locked-правила перенесены в новый блок .whp-modal ниже */

/* ====================================================================
   КАРТОЧКА ТОВАРА — современный одноколоночный modal (whp-*)
   Структура (popap.php):
     .whp-modal
       .whp-header (заголовок + замочек слева, ✕ справа)
       .whp-body (форма)
         .whp-section (Информация: название, склад/категория, ед./кол./цена)
         .whp-section--params (параметры категории — :empty скрывает)
         .whp-section--photos (Фото — горизонтальная полоса миниатюр + кнопка +)
       .whp-footer (Отмена + Сохранить)
   ==================================================================== */

.popap .popap_rez.whp-modal {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

/* Header */
.whp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef0f3;
}
.whp-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}
.whp-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.whp-close:hover { background: #f3f4f6; color: #111827; }

/* Body — обнуляем глобальные .popap_result отступы */
.whp-modal .whp-body {
    margin: 0 !important;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Sections — визуально разделяем блоки тонкой линией */
.whp-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.whp-section + .whp-section {
    padding-top: 18px;
    border-top: 1px solid #f3f4f6;
}
.whp-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Если у категории нет дополнительных параметров — секцию НЕ показываем */
.whp-section--params:has(.param-product:empty) {
    display: none;
}

/* Поля с лейблами над input/select */
.wh-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wh-field-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wh-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.wh-fields-row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Inputs / selects ВНУТРИ карточки — свой минималистичный стиль,
   независимо от глобального classic .input / .select */
.whp-modal .input,
.whp-modal .select {
    height: 38px;
    border-radius: 8px;
    border: 1px solid #d8dde3;
    padding: 6px 12px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    width: 100%;
}
.whp-modal .select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%236b7280' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    cursor: pointer;
}
.whp-modal .input:focus,
.whp-modal .select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.whp-modal .input:disabled,
.whp-modal .select:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Параметры категории — рендер ajax/warehouse.php (.wh-field × N) */
.whp-section--params .param-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Фото — горизонтальная полоса 72×72 миниатюр + кнопка "+" */
.whp-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.whp-photo-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.whp-photo-add:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
/* Миниатюра существующей фотки (создаётся JS — createProductPhotoPreviewElement) */
.whp-photos .image-preview-container {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}
.whp-photos .image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.whp-photos .delete-preview-img {
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    font-size: 12px;
}

/* Footer — кнопки Отмена / Сохранить */
.whp-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
}
.wh-btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wh-btn-primary:hover { background: #1d4ed8; }
.wh-btn-secondary {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.wh-btn-secondary:hover { color: #2563eb; background: #f3f5f8; }

/* В locked-режиме:
   - крестики удаления фоток скрыты,
   - кнопка "+" скрыта (нельзя добавить),
   - существующие фотки остаются видны. */
.warehouse-product.wh-locked .delete-preview-img,
.warehouse-product.wh-locked .whp-photo-add {
    display: none !important;
}

/* JS-tooltip (см. js_start.js), создаётся в <body>, position:fixed —
   обходит overflow:hidden на ячейках таблицы. Тёмная плашка, переносы строк
   сохранены, без задержки браузерного title. */
.cell-tooltip {
    position: fixed;
    z-index: 100000;
    background: rgba(45, 58, 79, 0.96);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    white-space: pre-wrap;
    width: max-content;
    max-width: 480px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
}

/* ===== Склад — итоговая стоимость ===== */
.wh-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 14px;
}
.wh-total-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f4f6fa;
    border: 1px solid #e4e9f0;
    border-radius: 20px;
    font-size: 13px;
}
.wh-total-name {
    color: #8a96a8;
}
.wh-total-val {
    font-weight: 600;
    color: #2d3748;
}
.wh-total-grand {
    background: #eef2ff;
    border-color: #c8d3f5;
}
.wh-total-grand .wh-total-name { color: #3a6fd8; }
.wh-total-grand .wh-total-val  { color: #3a6fd8; }

/* ===== Склад — строка поиска ===== */
.wh-search-bar {
    margin-bottom: 10px;
}
.wh-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.wh-search-input {
    max-width: 280px;
}

/* ===== Склад — индикатор низкого остатка ===== */
.wh-low-stock {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.wh-row-low {
    background: #fffdf0 !important;
}
.wh-row-low:hover {
    background: #fff8d6 !important;
}

/* ===== Склад — кнопки действий ===== */
.wh-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}
.wh-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.wh-btn--move    { border-color: #c8d3f5; color: #3a6fd8; }
.wh-btn--move:hover { background: #3a6fd8; color: #fff; }
.wh-btn--receive { border-color: #b7e4c7; color: #2e7d4f; }
.wh-btn--receive:hover { background: #2e7d4f; color: #fff; }
.wh-btn--writeoff { border-color: #ffd6a5; color: #c07000; }
.wh-btn--writeoff:hover { background: #c07000; color: #fff; }
.wh-btn--del     { border-color: #ffc9c9; color: #c0392b; }
.wh-btn--del:hover { background: #c0392b; color: #fff; }

/* ===== Склад — попап: название товара ===== */
.wh-popap-product-name {
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f4f6fa;
    border-radius: 6px;
}

/* ===== Попапы склада — Приход / Списание ===== */
/* Фиксируем ширину и убираем отрицательный margin-top из .popap_result */
.wh-popap-rez {
    width: 460px;
    max-width: 95vw;
}
.wh-popap-result {
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* Поле: метка сверху, input снизу */
.wh-popap-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wh-popap-field .input {
    width: 100%;
}
.wh-popap-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}
.wh-popap-optional {
    font-weight: 400;
    color: #8a96a8;
    font-size: 12px;
}
/* Название товара внутри попапа */
.wh-popap-product-name {
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    padding: 10px 14px;
    background: #f4f6fa;
    border-radius: 8px;
    border-left: 3px solid #53469f;
    line-height: 1.4;
}

/* ================================================================
   PRESET TABS — fast preset switching
   ================================================================ */

/* Мобильная панель быстрых фильтров — скрыта на десктопе.
   На мобилке — горизонтальная скролл-полоса с pill-кнопками:
   [Мои][Все] | [Открытые][Отложенные][Решённые][Закрытые] | [Ответственный][Поиск][Период][Ещё] */
.mob-quick-filters {
    display: none;
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mob-quick-filters::-webkit-scrollbar { display: none; }

.mob-qf-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.mob-qf-btn:active { background: #f0f1f5; }

/* Активная (нейтральная) кнопка — синий filled */
.mob-qf-active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
.mob-qf-active svg { fill: #fff; }

/* Разделитель между группами */
.mob-qf-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: #e5e7eb;
    margin: 0 2px;
    flex-shrink: 0;
}

/* Бейдж количества активных значений (например «Ответственный (3)») */
.mob-qf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
}
.mob-qf-active .mob-qf-badge {
    background: rgba(255,255,255,0.25);
}

/* Статус-чипы — цвета совпадают с десктопным status-chip */
.mob-qf-status { font-weight: 600; }
.mob-qf-status--open    { background: #f5faff; color: #2563eb; border-color: #c7e0ff; }
.mob-qf-status--hold    { background: #faf5ff; color: #7c3aed; border-color: #ddd6fe; }
.mob-qf-status--done    { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.mob-qf-status--closed  { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }

/* Активный статус-чип — насыщенный фон в тон */
.mob-qf-status--open.mob-qf-active   { background: #2563eb !important; color: #fff !important; border-color: #2563eb !important; }
.mob-qf-status--hold.mob-qf-active   { background: #7c3aed !important; color: #fff !important; border-color: #7c3aed !important; }
.mob-qf-status--done.mob-qf-active   { background: #15803d !important; color: #fff !important; border-color: #15803d !important; }
.mob-qf-status--closed.mob-qf-active { background: #4b5563 !important; color: #fff !important; border-color: #4b5563 !important; }

/* «⚙ Ещё» — отдельный стиль, чтобы выделялась как «расширенные настройки» */
.mob-qf-more {
    background: #f9fafb;
    color: #6b7280;
}

/* Pill-вкладки (вариант A из дизайн-критики P1 #8).
 * Раньше активная вкладка отмечалась тонкой нижней линией (border-bottom),
 * что плохо считывалось на светлом фоне. Теперь — мягкий синий pill-фон
 * + bold + тёмно-синий текст. Палитра: #EFF6FF / #1E40AF / #2563EB.
 */
.preset-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    overflow-x: auto;
    scrollbar-width: none;   /* Firefox */
    -ms-overflow-style: none; /* IE */
    flex-shrink: 0;
}
.preset-tabs::-webkit-scrollbar { display: none; }

.preset-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    color: #5f6368;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    font-weight: 500;
}
.preset-tab:hover {
    color: #1f2937;
    background: #f3f4f6;
}
.preset-tab-active {
    color: #1e40af;
    background: #eff6ff;
    font-weight: 700;
}
.preset-tab-active:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

/* Wrap holding preset name + delete × — pill-фон на родителе если активный */
.preset-tab-wrap {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.15s;
}
.preset-tab-wrap:has(.preset-tab-active) {
    background: #eff6ff;
}
.preset-tab-wrap .preset-tab {
    padding-right: 4px;
    background: transparent;
}
.preset-tab-wrap .preset-tab-active {
    background: transparent; /* pill-фон уже на родителе */
}

/* × delete button inside tab */
.preset-tab-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    color: #bdc1c6;
    margin-right: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.preset-tab-wrap:hover .preset-tab-del { opacity: 1; }
.preset-tab-del:hover {
    color: #d93025;
    background: #fce8e6;
}

/* "+ Сохранить" tab — always at the end, в стиле pill */
.preset-tab-save {
    color: #2563eb;
    border-left: 1px solid #e8e8e8;
    margin-left: 4px;
    padding-left: 14px;
    font-weight: 500;
    background: transparent;
}
.preset-tab-save:hover { background: #eff6ff; color: #1e40af; }

/* Mobile: hide "+ Сохранить" label text if narrow */
@media (max-width: 480px) {
    .preset-tabs { padding: 6px 8px; }
    .preset-tab  { padding: 6px 10px; font-size: 12px; }
}

/* ================================================================
   CHIP FILTER BAR — Google-style filter chips
   ================================================================ */

.chip-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 8px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
}

/* Base chip */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #3c4043;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.chip:hover {
    background: #f1f3f4;
    border-color: #bdc1c6;
}

/* Active chip (filter applied) */
.chip.chip-active {
    background: #e8f0fe;
    border-color: #4285f4;
    color: #1a73e8;
    font-weight: 500;
}
.chip.chip-active:hover { background: #d2e3fc; }

.chip-caret {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 1px;
}

/* Badge showing count of active values */
.chip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #4285f4;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-left: 2px;
}
.chip.chip-active .chip-badge { background: #1a73e8; }

/* Presets and More chips — dashed border */
.chip-presets-btn, .chip-more-btn {
    border-style: dashed;
    color: #5f6368;
}
.chip-presets-btn:hover, .chip-more-btn:hover {
    background: #f1f3f4;
    border-color: #9aa0a6;
}

/* Clear-all link */
.chip-clear-all {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    color: #d93025;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.chip-clear-all:hover {
    background: #fce8e6;
    border-color: #d93025;
}

/* Gear icon */
.chip-settings {
    margin-left: auto;
    padding: 5px 8px;
    font-size: 16px;
    color: #5f6368;
    opacity: 0.65;
    transition: opacity 0.15s;
}
.chip-settings:hover { opacity: 1; }

.chip-no-filters {
    font-size: 13px;
    color: #9aa0a6;
    font-style: italic;
}

/* ── Chip filter dropdown ───────────────────────────────── */
.chip-drop {
    position: fixed;
    z-index: 500;
    min-width: 260px;
    max-width: 340px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow: hidden;
}
.chip-drop-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
.chip-drop-search {
    padding: 10px 12px 6px;
    border-bottom: 1px solid #f1f3f4;
    background: #fff;
}
.chip-drop-search .input {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 6px 10px;
}
/* AJAX response filter items */
.chip-drop-opts .filter_result_ajax {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    gap: 8px;
    transition: background 0.1s;
}
.chip-drop-opts .filter_result_ajax:hover { background: #f1f3f4; }
.chip-drop-opts .filter_result_ajax .checkbox { accent-color: #4285f4; cursor: pointer; margin-left: auto; min-width: 20px; min-height: 20px; width: 20px; height: 20px; flex-shrink: 0; }
.chip-drop-opts .filter_result_ajax { justify-content: space-between; }
/* Hide built-in action row from AJAX response */
.chip-drop-opts .d-flex { display: none !important; }
.chip-drop-opts .filter_result__ { background: none; }
.chip-drop-loading {
    padding: 20px 16px;
    font-size: 13px;
    color: #9aa0a6;
    text-align: center;
}
/* Date range */
.chip-date-range {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chip-date-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #5f6368;
    font-weight: 500;
}
.chip-date-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 7px 10px;
}
/* Dropdown footer */
.chip-drop-footer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #f1f3f4;
    background: #fafafa;
    flex-shrink: 0;
}
.chip-drop-apply {
    padding: 7px 16px;
    background: #4285f4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.chip-drop-apply:hover { background: #3367d6; }
.chip-drop-reset {
    padding: 7px 12px;
    background: none;
    color: #5f6368;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.chip-drop-reset:hover { background: #f1f3f4; }

/* ── Panel dropdown (presets / more) ───────────────────── */
.chip-panel {
    position: fixed;
    z-index: 500;
    min-width: 200px;
    max-width: 300px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    padding: 6px 0;
    max-height: 360px;
    overflow-y: auto;
}
.chip-preset-item {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: #3c4043;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.1s;
}
.chip-preset-item:hover { background: #f1f3f4; }
.chip-preset-item.chip-preset-active {
    color: #1a73e8;
    font-weight: 500;
    background: #e8f0fe;
}
.chip-preset-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 6px;
}
.chip-preset-row .chip-preset-item {
    flex: 1;
    padding-right: 6px;
}
.chip-preset-del {
    padding: 4px 6px;
    color: #9aa0a6;
    font-size: 14px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.chip-preset-del:hover { color: #d93025; background: #fce8e6; }
.chip-preset-empty {
    padding: 10px 16px;
    font-size: 13px;
    color: #9aa0a6;
    font-style: italic;
}
.chip-preset-save {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    border-top: 1px solid #f1f3f4;
    margin-top: 4px;
    transition: background 0.1s;
}
.chip-preset-save:hover { background: #e8f0fe; }

/* "+ Ещё" panel wraps chips */
.chip-more-panel {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    max-width: 380px;
}

/* Mobile */
@media (max-width: 768px) {
    .chip-bar { padding: 8px 10px 6px; gap: 6px; }
    .chip { font-size: 12px; padding: 5px 10px; }
    .chip-drop { max-width: calc(100vw - 16px); min-width: 220px; }
    .chip-panel { max-width: calc(100vw - 16px); }
}

/* ================================================================
   AJAX TABLE — единый стиль для таблиц в ajax-ответах
   (warehouse category params, product history и т.д.)
   ================================================================ */
.ajax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 4px;
}
.ajax-table th {
    padding: 8px 12px;
    background: #f4f6fa;
    color: #5f6368;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.ajax-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #3c4043;
    vertical-align: middle;
}
.ajax-table tr:hover td { background: #f8f9fa; }
.ajax-table tr:last-child td { border-bottom: none; }

/* =====================================================================
   Inline edit (click-to-edit) — заменяет старый паттерн
   "input + отдельный карандаш-кнопка справа в отдельной td".
   Маркап: <div class="inline-edit-wrap" data-state="ready">
              <input class="input inline-edit" data-field data-id data-table>
           </div>
   Состояния (через data-state):
     ready    — readonly, на hover лёгкая подсветка + карандаш справа
     editing  — выделена синей рамкой, фокус, можно печатать
     saving   — пока идёт AJAX
     saved    — зелёная ✓ на 1.2s, потом обратно в ready
   ===================================================================== */
.inline-edit-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.inline-edit-wrap .inline-edit {
    cursor: pointer;
    padding-right: 36px;       /* место под иконку справа */
    border: 1px solid #d8dde3;
    background: #f7f9fc;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    width: 100%;
    box-sizing: border-box;
}
.inline-edit-wrap[data-state="ready"]:hover .inline-edit {
    background: #fff;
    border-color: #c5cdd6;
}

/* =====================================================================
   File preview modal (gdFilePreview)
   Используется для просмотра загруженных файлов клиента/задачи без
   скачивания. Поддерживает: pdf (iframe), image, text, docx (mammoth),
   xlsx (SheetJS) — последние две lazy-load с CDN.
   ===================================================================== */
.gd-fp-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 9500;
    align-items: center; justify-content: center;
}
.gd-fp-modal.open { display: flex; }
.gd-fp-card {
    background: #fff; border-radius: 12px;
    width: min(94vw, 960px); max-height: 92vh;
    display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.gd-fp-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; border-bottom: 1px solid #e5eaf0;
}
.gd-fp-head .name { flex: 1; font-weight: 600; font-size: 14px; word-break: break-all; }
.gd-fp-head .close {
    cursor: pointer; font-size: 28px; color: #999;
    padding: 0 6px; line-height: 1; user-select: none;
}
.gd-fp-head .close:hover { color: #333; }
.gd-fp-body {
    flex: 1; overflow: auto; padding: 20px; min-height: 320px;
    background: #fafbfc;
}
.gd-fp-body iframe { width: 100%; height: 70vh; border: none; background: #fff; }
.gd-fp-body img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.gd-fp-body pre {
    white-space: pre-wrap; word-wrap: break-word;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    background: #fff; padding: 14px; border-radius: 6px; margin: 0;
    font-size: 13px; line-height: 1.5;
}
.gd-fp-body .gd-fp-doc {
    background: #fff; padding: 30px 40px; border-radius: 6px;
    max-width: 800px; margin: 0 auto;
    font-family: "Times New Roman", Georgia, serif; font-size: 14px; line-height: 1.6;
}
.gd-fp-body .gd-fp-doc h1, .gd-fp-body .gd-fp-doc h2, .gd-fp-body .gd-fp-doc h3 { margin-top: 18px; }
.gd-fp-body .gd-fp-doc table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.gd-fp-body .gd-fp-doc table td, .gd-fp-body .gd-fp-doc table th {
    border: 1px solid #ccc; padding: 4px 8px;
}
.gd-fp-foot {
    padding: 12px 20px; border-top: 1px solid #e5eaf0;
    display: flex; gap: 10px; justify-content: flex-end;
}
.gd-fp-foot a, .gd-fp-foot button {
    padding: 8px 18px; border-radius: 6px; font-size: 13px;
    text-decoration: none; cursor: pointer; border: none;
}
.gd-fp-foot .download { background: #4a90d9; color: #fff; }
.gd-fp-foot .download:hover { background: #3a7fc4; }
.gd-fp-foot .close-btn { background: #e5eaf0; color: #222; }
.gd-fp-loading { text-align: center; color: #888; padding: 60px 20px; font-size: 14px; }
.gd-fp-error { background: #fdeceb; color: #c62828; padding: 14px; border-radius: 8px; }
/* xlsx preview — табы листов и таблица */
.gd-fp-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.gd-fp-tab {
    padding: 6px 14px; border-radius: 14px; font-size: 12px; cursor: pointer;
    background: #fff; border: 1px solid #d0d7de;
}
.gd-fp-tab.active { background: #4a90d9; color: #fff; border-color: #4a90d9; }
.gd-fp-sheets { background: #fff; padding: 10px; border-radius: 6px; overflow: auto; }
.gd-fp-table, .gd-fp-sheets table {
    border-collapse: collapse; font-size: 13px; min-width: 100%;
}
.gd-fp-table th, .gd-fp-table td,
.gd-fp-sheets table th, .gd-fp-sheets table td {
    border: 1px solid #e0e6ed; padding: 6px 10px; vertical-align: top;
}
.gd-fp-table th, .gd-fp-sheets table th { background: #f5f7fa; font-weight: 600; }

/* строка файла в карточке клиента/юзера */
.gd-file-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 4px; border-bottom: 1px solid #f0f0f0;
}
.gd-file-row:last-child { border-bottom: none; }
.gd-file-row .icon { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.gd-file-row .name {
    flex: 1; cursor: pointer; color: #222; word-break: break-all;
    font-size: 14px; padding: 4px 6px; border-radius: 4px; transition: background 120ms;
}
.gd-file-row .name:hover { background: #f0f4f8; color: #4a90d9; }
.gd-file-row .actions { display: flex; gap: 6px; flex-shrink: 0; }
.gd-file-row .actions a, .gd-file-row .actions button {
    padding: 5px 12px; font-size: 12px; border-radius: 4px;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    background: #f0f4f8; color: #4a90d9; transition: all 120ms;
}
.gd-file-row .actions a:hover { background: #e0eaf5; }
.gd-file-row .actions .del {
    background: #fff; color: #c62828; border-color: #fadbdb;
}
.gd-file-row .actions .del:hover { background: #fadbdb; }
.inline-edit-wrap[data-state="editing"] .inline-edit {
    cursor: text;
    background: #fff;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}
/* Иконка-индикатор справа от input */
.inline-edit-wrap::after {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    transition: opacity 160ms ease;
    line-height: 1;
}
.inline-edit-wrap[data-state="ready"]::after {
    content: '✎';
    color: #8a96a8;
    opacity: 0;
}
.inline-edit-wrap[data-state="ready"]:hover::after { opacity: 1; }
.inline-edit-wrap[data-state="editing"]::after { content: ''; }
.inline-edit-wrap[data-state="saving"]::after {
    content: '⋯';
    color: #8a96a8;
    opacity: 1;
}
.inline-edit-wrap[data-state="saved"]::after {
    content: '✓';
    color: #28a745;
    opacity: 1;
    animation: ie-saved-fade 1.2s ease forwards;
}
@keyframes ie-saved-fade {
    0%, 60% { opacity: 1; transform: translateY(-50%) scale(1); }
    100%    { opacity: 0; transform: translateY(-50%) scale(0.6); }
}

/* =====================================================================
   Editable value — клик по самому значению вместо отдельного карандаша.
   Применяется к ситуациям, где правка идёт через попап/модалку
   (выбор клиента, объекта, переименование задачи и т.п. в lk/task_id.php).
   На hover — лёгкая подсветка + появляется ✎ в конце строки.
   ===================================================================== */
.editable-value {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: -6px;
    transition: background 150ms ease;
    display: inline-block;
}
.editable-value:hover {
    background: #f0f4f8;
}
.editable-value:hover::after {
    content: ' ✎';
    color: #8a96a8;
    font-size: 12px;
}
.editable-value--empty {
    color: #999;
    font-style: italic;
}
/* Блочная версия — для длинных значений типа описания задачи */
.editable-value.editable-block {
    display: block;
    padding: 8px 12px;
    margin-left: 0;
    margin-top: 6px;
    background: #f7f9fc;
    border: 1px solid transparent;
}
.editable-value.editable-block:hover {
    background: #fff;
    border-color: #c5cdd6;
}

/* =====================================================================
 * P1 #7 — БЫСТРЫЕ ТУЛТИПЫ ДЛЯ ИКОНОК САЙДБАРА
 * Нативный title="..." показывается браузером с задержкой ~1.5с — медленно.
 * Делаем CSS-тултип через ::after с attr(title) — появляется через 0.25с.
 * (Нативный потом тоже появится, но наш визуально первый.)
 * ===================================================================== */

.block .left-menu .left-menu-[title] {
    position: relative; /* для абсолютно позиционированного ::after */
}

.block .left-menu .left-menu-[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    padding: 6px 12px;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
    opacity: 0;
    animation: sidebarTipShow 0.18s ease 0.25s forwards;
}

@keyframes sidebarTipShow {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Колонка "Время" — центрируем содержимое (значения короткие: "1 час 20 мин",
 * "—" — слева смотрится пусто). */
.block .center .table .tr .td.time_for_task {
    text-align: center;
}
.block .center .table .tr .th #th-time_for_task {
    justify-content: center;
}

/* =====================================================================
 * ⋯-МЕНЮ ДЕЙСТВИЙ В КОНЦЕ СТРОКИ ТАБЛИЦЫ ЗАДАЧ
 * Заменяет старую колонку «Удалить». При ховере на ⋯ влево выезжает
 * панель с действиями: «Открыть», «Удалить», «Восстановить».
 * ===================================================================== */

/* Селектор .table .tr .td имеет приоритет над .td.td-row-menu — поэтому
 * перебиваем его той же специфичностью + явно снимаем overflow:hidden,
 * который иначе обрезает выезжающую панель. */
.table .tr .td.td-row-menu,
.td.td-row-menu {
    width: 36px;
    min-width: 36px;
    padding: 0 6px;
    text-align: center;
    overflow: visible !important;
}

/* Обёртка — positioning-context для абсолютно позиционированной панели.
 * Прямо на td (display:table-cell) делать position:relative ненадёжно
 * в разных браузерах, поэтому используем промежуточный inline-block. */
.row-menu-wrap {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.row-menu-trigger {
    display: inline-block;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    user-select: none;
    transition: background 0.15s, color 0.15s;
}
.row-menu-trigger:hover {
    background: #f3f4f6;
    color: #374151;
}

.row-menu-panel {
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
    /* Задержка появления 150мс — чтобы не дёргалось при пролёте мыши.
     * Скрытие моментальное (visibility/opacity без задержки на mouseleave). */
    transition: opacity 0.15s ease 0.15s, visibility 0.15s ease 0.15s;
}
.row-menu-wrap:hover .row-menu-panel,
.row-menu-wrap:focus-within .row-menu-panel,
.td.td-row-menu:hover .row-menu-panel,
.td.td-row-menu:focus-within .row-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0.15s;
}

.row-menu-action {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    color: #1f2937;
    background: transparent;
    transition: background 0.1s ease;
    user-select: none;
}
.row-menu-action:hover {
    background: #f3f4f6;
    text-decoration: none;
}
.row-menu-action-danger { color: #dc2626; }
.row-menu-action-danger:hover { background: #fee2e2; color: #991b1b; }
.row-menu-action-success { color: #065f46; }
.row-menu-action-success:hover { background: #d1fae5; color: #064e3b; }

/* Тёмная тема */
body.night-mode .row-menu-panel,
body.dark-mode .row-menu-panel {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
body.night-mode .row-menu-action,
body.dark-mode .row-menu-action { color: #e5e7eb; }
body.night-mode .row-menu-action:hover,
body.dark-mode .row-menu-action:hover { background: #374151; }
body.night-mode .row-menu-trigger,
body.dark-mode .row-menu-trigger { color: #6b7280; }
body.night-mode .row-menu-trigger:hover,
body.dark-mode .row-menu-trigger:hover { background: #374151; color: #e5e7eb; }

/* ================================================================
   ПАСС НА ЧИТАЕМОСТЬ ТАБЛИЦЫ ЗАДАЧ (2026-06-21)
   Зебра + ровные строки + унятые цвета. Цель — глаз держит строку
   через все колонки, статус-чип «выстреливает» на спокойном фоне.
   Ночные дубли — в style-night.css (иначе светлая зебра ломает dark).
   ================================================================ */

/* 1. Зебра: чётные дата-строки чуть темнее белого. Исключаем шапку
   (.result_line) и закреплённые строки (.pinline — у них свой фон). */
.block .center .table .tr:nth-child(even):not(.result_line):not(.pinline) {
  background: #f8fafc;
}
/* Hover должен перебивать зебру: та же специфичность, но правило ниже
   по файлу → выигрывает. Чуть синее зебры, чтобы наведение читалось. */
.block .center .table .tr:not(.result_line):not(.pinline):hover {
  background: #eef4ff;
}

/* 2. Унять синеву: цвет-ссылка остаётся только на заголовке задачи.
   № — приглушённый серый (это не та инфа, что сканируют глазами),
   Клиент — тёмный текст, синим становится лишь на hover. */
.block .center .table .tr .td.id .link { color: #94a3b8; font-weight: 400; }
.block .center .table .tr .td.to_client .link { color: #334155; }
.block .center .table .tr .td.to_client .link:hover { color: #2563eb; }

/* Просрочено — полоса слева тоньше и мягче (была 4px #ef4444). */
.block .center .table .pink_color .td:first-child {
  box-shadow: inset 3px 0 0 0 #f87171;
}

/* 3. Ровные строки — только десктоп-таблица (>500px). Мобильные
   карточки (@media max-width:500px) не трогаем. Заголовок и превью —
   в одну строку с многоточием, контент по вертикали — по центру. */
@media (min-width: 501px) {
  .block .center .table .tr .td {
    vertical-align: middle;
    height: 42px;
  }
  .block .center .table .tr .td.task_name .link {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    max-height: 1.5em;
    overflow: hidden;
  }
  .block .center .table .tr .task_description {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    height: auto;
    max-height: 1.4em;
    overflow: hidden;
    font-size: 0.85em;
    line-height: 1.35;
    color: #8a93a3;
  }
}

/* 4. Единый размер чипов «Тип» / «Доп. статус» / «Статус».
   Было: Доп.статус — селект во всю ячейку, Тип/Статус — мелкие пилюли
   разной высоты. Стало: один бокс 132×28px, радиус 6px — колонки
   выглядят ровным рядом одинаковых контролов. Размер не зависит от
   темы, поэтому только здесь (в style-night.css дублировать не нужно). */
.block .center .table .tr .td.type_task_user .type-task-chip,
.block .center .table .tr .td.dop_status .dop-status-select,
.block .center .table .tr .td.status .status-chip {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
  vertical-align: middle;
}
/* read-only статус (span) и чип Типа центрируем по вертикали как пилюлю;
   у select'ов текст центрируется нативно, поэтому их не трогаем. */
.block .center .table .tr .td.status span.status-chip,
.block .center .table .tr .td.type_task_user .type-task-chip {
  display: inline-flex;
  align-items: center;
}

