/* OmniCall — оформление интерфейса. Без внешних зависимостей: контур закрытый,
   ни одного обращения к CDN, все шрифты и значки локальные.

   Шрифт. Платформа рассчитана на закрытый контур, поэтому шрифт либо лежит рядом,
   либо берётся системный — загрузок из сети здесь быть не может. Положите файлы в
   web/fonts (см. web/fonts/README.md), и интерфейс подхватит их сам: объявления
   @font-face платформа собирает по тому, что реально встроено, и отдаёт отдельным
   файлом /css/fonts.css. Без файлов работает системный набор, подобранный так, чтобы
   кириллица выглядела прилично на Windows, macOS и Linux. */

:root {
  color-scheme: light;

  /* Нейтральные тона с лёгким холодным подмесом. Чистый серый выглядит мёртвым:
     подмешанная синева делает белый белым, а не сероватым. */
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eceff4;
  --border: #e3e7ee;
  --border-strong: #c9d0db;
  --text: #101828;
  --text-2: #475467;
  --text-3: #79839a;

  /* Фирменный цвет — глубокая зелень, а не салатовый: платформа работает в банке и
     в органе власти, и цвет должен читаться как институциональный. */
  --brand: #0b6b4c;
  --brand-2: #0a5c41;
  --brand-3: #084832;
  --brand-soft: #e6f2ec;
  --brand-line: #bcdcce;

  --side-bg: #0c1a16;
  --side-bg-2: #0a1613;
  --side-text: #9fb3aa;
  --side-active: #ffffff;
  --side-line: rgba(255,255,255,.08);

  --good: #15803d;   --good-soft: #e7f5ec;
  --warn: #9a5b00;   --warn-soft: #fcf2e0;
  --bad: #b42318;    --bad-soft: #fceceb;
  --info: #175cd3;   --info-soft: #e8f0fd;
  --violet: #5925dc; --violet-soft: #efeafc;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;

  /* Тени подкрашены в цвет текста, а не чёрные. Чёрная тень на цветном фоне выглядит
     грязным пятном; подкрашенная — воздухом под карточкой. */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 2px 6px -1px rgba(16,24,40,.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.08), 0 12px 24px -6px rgba(16,24,40,.10);
  --shadow-lg: 0 8px 16px -4px rgba(16,24,40,.10), 0 24px 48px -12px rgba(16,24,40,.22);
  --ring: 0 0 0 3px rgba(11,107,76,.18);

  /* Радиусы по размеру элемента: у кнопки и у окна он не может быть одинаковым —
     от этого интерфейс выглядит собранным из одинаковых кубиков. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Типографическая шкала: целые числа, шаг примерно в 1,15–1,25. Дробные размеры
     вроде 13,5 px — след ручной подгонки, а не системы, и именно они дают ощущение
     «сделано на глаз». */
  --t-11: 11px; --t-12: 12px; --t-13: 13px; --t-14: 14px;
  --t-16: 16px; --t-18: 18px; --t-22: 22px; --t-28: 28px; --t-36: 36px;

  --font: "OmniCall UI", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
          "SF Pro Text", "Helvetica Neue", "PT Sans", "Liberation Sans", system-ui, sans-serif;
  --font-display: "OmniCall UI", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont,
          "SF Pro Display", "Helvetica Neue", "PT Sans", "Liberation Sans", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.32,.72,0,1);
}

/* Тёмная тема — не инверсия светлой, а отдельный набор: фон уводится в холодный
   графит, фирменный цвет светлеет, иначе зелень на тёмном превращается в болото. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f14; --surface: #14181f; --surface-2: #191e26; --surface-3: #222833;
    --border: #262d38; --border-strong: #38414f;
    --text: #eceff4; --text-2: #b3bbc8; --text-3: #848d9d;
    --brand: #2eb083; --brand-2: #4cc79a; --brand-3: #1d8e68; --brand-soft: #112a22; --brand-line: #1e4a3a;
    --side-bg: #0a1310; --side-bg-2: #080f0d; --side-line: rgba(255,255,255,.07);
    --good: #46bd75; --good-soft: #12251a; --warn: #d99a3a; --warn-soft: #2a2112;
    --bad: #ec6a6a; --bad-soft: #2e1818; --info: #6b98f5; --info-soft: #17223a;
    --violet: #9b8bef; --violet-soft: #1f1b36;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.35);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px -1px rgba(0,0,0,.35);
    --shadow-md: 0 4px 8px -2px rgba(0,0,0,.45), 0 12px 24px -6px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 16px -4px rgba(0,0,0,.5), 0 24px 48px -12px rgba(0,0,0,.55);
    --ring: 0 0 0 3px rgba(46,176,131,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f14; --surface: #14181f; --surface-2: #191e26; --surface-3: #222833;
  --border: #262d38; --border-strong: #38414f;
  --text: #eceff4; --text-2: #b3bbc8; --text-3: #848d9d;
  --brand: #2eb083; --brand-2: #4cc79a; --brand-3: #1d8e68; --brand-soft: #112a22; --brand-line: #1e4a3a;
  --side-bg: #0a1310; --side-bg-2: #080f0d; --side-line: rgba(255,255,255,.07);
  --good: #46bd75; --good-soft: #12251a; --warn: #d99a3a; --warn-soft: #2a2112;
  --bad: #ec6a6a; --bad-soft: #2e1818; --info: #6b98f5; --info-soft: #17223a;
  --violet: #9b8bef; --violet-soft: #1f1b36;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.35);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px -1px rgba(0,0,0,.35);
  --shadow-md: 0 4px 8px -2px rgba(0,0,0,.45), 0 12px 24px -6px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 16px -4px rgba(0,0,0,.5), 0 24px 48px -12px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(46,176,131,.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 400 var(--t-14)/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Цифры одинаковой ширины по всему интерфейсу: без этого числа в таблицах и на
     плитках «пляшут» при обновлении, и таблица перестаёт читаться столбиком. */
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Заголовки набираются плотнее обычного текста: на крупном кегле стандартный трекинг
   выглядит рыхлым. */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.2; letter-spacing: -.011em; }
h1 { font-size: var(--t-22); font-weight: 680; letter-spacing: -.018em; }
h2 { font-size: var(--t-16); font-weight: 640; }
h3 { font-size: var(--t-13); font-weight: 640; letter-spacing: -.004em; }
h4 { font-size: var(--t-12); font-weight: 640; }
code, pre, .mono { font-family: var(--mono); font-size: var(--t-12); font-variant-ligatures: none; }
button, input, select, textarea { font: inherit; color: inherit; font-variant-numeric: inherit; }
::selection { background: var(--brand-soft); color: var(--text); }

/* Одна видимая обводка фокуса на весь интерфейс — и только для клавиатуры. */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-xs); }
:focus:not(:focus-visible) { outline: none; }

/* Надзаголовок: мелкие прописные с разрядкой. Тот самый приём, который отличает
   свёрстанный интерфейс от набранного одним кеглем. */
.eyebrow {
  font-size: var(--t-11); font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }

/* Боковое меню. Активный пункт помечается рейкой слева, а не залитой таблеткой:
   залитый прямоугольник перетягивает внимание на себя, рейка показывает место. */
.sidebar {
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-text); display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid rgba(0,0,0,.2);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; color: #fff; }
.brand .brand-name { font-family: var(--font-display); font-weight: 660; font-size: var(--t-16); letter-spacing: -.01em; line-height: 1.15; }
.brand-mark { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand small { display: block; font-weight: 400; font-size: var(--t-11); color: var(--side-text); letter-spacing: 0; margin-top: 2px; line-height: 1.3; }
.nav-group { padding: 8px 10px 2px; }
.nav-title { font-size: var(--t-11); text-transform: uppercase; letter-spacing: .08em; color: #61796e; padding: 8px 12px 6px; font-weight: 600; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--side-text);
  cursor: pointer; font-size: var(--t-13); font-weight: 450;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 18px; border-radius: 0 2px 2px 0; background: var(--brand-2);
  transition: transform .18s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #e8f0ec; text-decoration: none; }
.nav-item.active { background: rgba(255,255,255,.07); color: var(--side-active); font-weight: 550; }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-item.locked { opacity: .55; }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav-item.active svg { opacity: 1; }
.nav-item .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: var(--radius-pill); font-size: var(--t-11); font-weight: 600; padding: 1px 6px; min-width: 19px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 12px 16px 14px; font-size: var(--t-12); border-top: 1px solid var(--side-line); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 58px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .crumbs { font-family: var(--font-display); font-weight: 620; font-size: var(--t-16); letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.content { flex: 1; overflow: auto; padding: 22px; min-height: 0; }
.content.flush { padding: 0; overflow: hidden; display: flex; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-3); font-size: var(--t-13); margin-top: 3px; max-width: 76ch; }
.page-head .spacer { flex: 1; }

/* ---------- примитивы ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.card-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { flex: none; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--text-3); }
.small { font-size: var(--t-12); }
.strong { font-weight: 620; }
.right { margin-left: auto; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sep { height: 1px; background: var(--border); margin: 12px 0; }

/* Кнопки. Первичная получает едва заметный градиент и внутреннюю светлую грань —
   на плоской заливке кнопка выглядит наклейкой, а не элементом управления. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer;
  font-weight: 540; font-size: var(--t-13); white-space: nowrap; color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: background .13s var(--ease), border-color .13s var(--ease), box-shadow .13s var(--ease), transform .06s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(.5px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: var(--brand-3); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-xs);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand-3) 100%); }
.btn.danger { color: var(--bad); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 29px; padding: 0 10px; font-size: var(--t-12); }
.btn.xs { height: 24px; padding: 0 8px; font-size: var(--t-12); gap: 4px; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.xs svg { width: 13px; height: 13px; }
.btn.ai { background: linear-gradient(135deg, #5b3fc4, var(--brand)); border: none; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), var(--shadow-xs); }
.btn.ai:hover { filter: brightness(1.07); }

.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; font-size: var(--t-13);
  transition: border-color .13s var(--ease), box-shadow .13s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: var(--t-12); color: var(--text-2); font-weight: 560; }
.field .hint { font-size: var(--t-11); color: var(--text-3); line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: var(--t-13); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: var(--radius-pill); font-size: var(--t-11); font-weight: 600;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
  letter-spacing: .005em;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge .dot, .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: var(--radius-xs); background: var(--surface-3); font-size: var(--t-12);
  color: var(--text-2); white-space: nowrap;
}

/* Таблица. Последняя строка без разделителя, шапка не липнет к содержимому линией
   в полный контраст, числа выровнены по правому краю и набраны моноширинными
   цифрами — иначе колонка чисел перестаёт быть колонкой. */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-13); }
.table th {
  white-space: nowrap; text-align: left; font-size: var(--t-11); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); font-weight: 600; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table b { font-weight: 600; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  position: relative; padding: 10px 14px; cursor: pointer; color: var(--text-2);
  font-weight: 520; font-size: var(--t-13); white-space: nowrap;
  transition: color .15s var(--ease);
}
.tab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  border-radius: 2px 2px 0 0; background: var(--brand);
  transform: scaleX(0); transition: transform .18s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); font-weight: 600; }
.tab.active::after { transform: scaleX(1); }

.seg { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.seg button {
  border: 0; background: transparent; padding: 0 11px; height: 26px; cursor: pointer;
  font-size: var(--t-12); color: var(--text-2); border-radius: var(--radius-xs);
  transition: background .13s var(--ease), color .13s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-xs); }

/* Пустое состояние — не «нет данных», а объяснение, почему пусто. */
.empty { padding: 44px 24px; text-align: center; color: var(--text-3); font-size: var(--t-13); }
.empty svg { width: 30px; height: 30px; opacity: .4; margin-bottom: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.loading { display: grid; place-items: center; padding: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@keyframes flash { from { background: var(--brand-soft); } to { background: transparent; } }
.flash { animation: flash 1.6s ease-out; }

/* toasts & modal */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 420px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }
.toast .t-title { font-weight: 650; }
.modal-back { position: fixed; inset: 0; background: rgba(10,14,22,.45); display: grid; place-items: center; z-index: 900; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* avatar */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 12.5px; color: #fff; flex: none; position: relative; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar .pres { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface); }
.pres-online { background: #22c55e; } .pres-away { background: #f59e0b; } .pres-busy { background: #ef4444; } .pres-offline { background: #9ca3af; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(62,207,153,.22) 0%, transparent 60%),
    radial-gradient(700px 500px at 85% 100%, rgba(11,107,76,.35) 0%, transparent 55%),
    linear-gradient(160deg, #0d3d2c 0%, #0a2a1f 45%, #06130e 100%); color: #e4f5ec; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero h1 { font-size: 34px; color: #fff; margin: 24px 0 12px; font-weight: 700; letter-spacing: -.3px; }
.login-hero p { color: #b5dccb; font-size: 15.5px; max-width: 520px; }
.hero-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 620px; margin-top: 30px; }
.hero-feat {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius); padding: 13px 15px; font-size: var(--t-12);
  color: #a8ccbb; line-height: 1.5;
}
.hero-feat b { display: block; color: #fff; margin-bottom: 3px; font-size: var(--t-13); font-weight: 600; letter-spacing: -.005em; }
.login-panel { display: grid; place-items: center; padding: 40px 32px; background: var(--surface); overflow-y: auto; }
.login-box { width: min(420px, 100%); }
.role-group + .role-group { margin-top: 18px; }
/* Название организации над списком ролей: на одной установке их несколько, и
   человек должен видеть, куда он входит, до того как нажал. */
.role-org { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; border-bottom: 1px solid var(--border); }
.role-list { display: grid; gap: 6px; margin-top: 8px; }
.role-btn {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; text-align: left;
  transition: border-color .13s var(--ease), background .13s var(--ease), transform .08s var(--ease);
}
.role-btn:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.role-btn:active { transform: translateY(.5px); }
.role-btn .r-title { font-weight: 600; font-size: var(--t-13); }
.role-btn .r-sub { font-size: var(--t-12); color: var(--text-3); margin-top: 1px; }
.role-btn svg { width: 15px; height: 15px; opacity: .4; }
.role-btn:hover svg { opacity: .8; }

/* ---------- workspace (оператор) ---------- */
.ws { display: grid; grid-template-columns: 300px minmax(0,1fr) 310px; width: 100%; height: 100%; min-height: 0; }
.ws-list { border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.ws-list-head { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.ws-items { overflow-y: auto; flex: 1; }
.conv-item { padding: 11px 12px; border-bottom: 1px solid var(--border); cursor: pointer; display: grid; grid-template-columns: 34px 1fr; gap: 10px; position: relative; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--brand-soft); }
.conv-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.conv-item .ci-top { display: flex; align-items: center; gap: 6px; }
.conv-item .ci-name { font-weight: 650; flex: 1; min-width: 0; }
.conv-item .ci-time { font-size: 11.5px; color: var(--text-3); }
.conv-item .ci-text { color: var(--text-2); font-size: 13px; margin: 2px 0 4px; }
.conv-item .ci-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ch-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.ch-icon svg { width: 18px; height: 18px; }
.ch-webchat { background: #1f5fbf; } .ch-api { background: #0e7a55; } .ch-telegram { background: #229ed9; } .ch-whatsapp { background: #25a35a; } .ch-voice { background: #7c3aed; } .ch-email { background: #64748b; } .ch-sms { background: #d97706; } .ch-vk { background: #0077ff; } .ch-viber { background: #7360f2; } .ch-max { background: #4f46e5; } .ch-instagram { background: #c13584; } .ch-custom { background: #475569; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.conn-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.conn-card .conn-top { display: flex; align-items: center; gap: 10px; }
.conn-card .conn-stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.conn-card .conn-err { font-size: 12px; color: var(--bad); background: var(--bad-soft); border-radius: 6px; padding: 6px 8px; overflow-wrap: anywhere; }
.conn-card .conn-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.type-pick button { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: left; }
.type-pick button:hover { border-color: var(--brand); background: var(--surface-3); }
.form-sep { grid-column: 1 / -1; font-weight: 650; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; }

.ws-chat { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat-head { flex-wrap: wrap; row-gap: 6px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; min-height: 60px; }
.chat-head .spacer { flex: 1; }
.ai-strip { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 72%; padding: 9px 12px; border-radius: 12px; box-shadow: var(--shadow); white-space: pre-wrap; word-wrap: break-word; }
.msg .m-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; display: flex; gap: 6px; }
.msg.in { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.out .m-meta { color: rgba(255,255,255,.75); justify-content: flex-end; }
.msg.note { background: #fff7e0; color: #5c4200; align-self: center; border: 1px dashed #e7c46a; max-width: 80%; font-size: 13px; }
:root[data-theme="dark"] .msg.note { background: #2e2610; color: #f1d58a; border-color: #6b5520; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.note { background: #2e2610; color: #f1d58a; border-color: #6b5520; } }
.msg.sys { align-self: center; background: transparent; box-shadow: none; color: var(--text-3); font-size: 12px; padding: 2px; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--text-3); background: var(--surface-3); border-radius: 10px; padding: 2px 10px; margin: 6px 0; }
.quick-row { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.quick-row .btn { flex: none; }
.composer { background: var(--surface); border-top: 1px solid var(--border); padding: 10px 14px; }
.composer .textarea { min-height: 64px; border-radius: 8px; }
.composer.internal .textarea { background: #fffbeb; border-color: #e7c46a; }
:root[data-theme="dark"] .composer.internal .textarea { background: #2a2310; }
.draft { border: 1px solid #c9bdf3; background: linear-gradient(180deg, var(--violet-soft), var(--surface)); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.draft .d-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--violet); font-weight: 650; margin-bottom: 4px; }
.draft .d-text { white-space: pre-wrap; }

.ws-side { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.side-sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.side-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.tl-item .tl-dot { width: 8px; height: 8px; border-radius: 50%; margin: 6px 0 0 4px; background: var(--border-strong); }
.kb-hit { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 12.5px; cursor: pointer; }
.kb-hit:hover { border-color: var(--brand); }
.kb-hit b { display: block; font-size: 13px; margin-bottom: 2px; }

/* ---------- tickets ---------- */
.sla { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sla svg { width: 13px; height: 13px; }
.sla.active { color: var(--good); } .sla.warning { color: var(--warn); } .sla.breached, .sla.missed { color: var(--bad); } .sla.paused { color: var(--text-3); } .sla.met { color: var(--good); } .sla.none { color: var(--text-3); }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.prio i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.prio.low i { background: #94a3b8; } .prio.normal i { background: #3b82f6; } .prio.high i { background: #f59e0b; } .prio.urgent i { background: #ef4444; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 272px; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: var(--surface-3); border-radius: 10px; padding: 8px; min-height: 200px; }
.board-col-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px 10px; font-weight: 650; font-size: 13px; }
.board-col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.tcard:hover { border-color: var(--brand); }
.tcard .tc-num { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.tcard .tc-subj { font-weight: 600; margin: 3px 0 8px; font-size: 13px; }
.tcard .tc-foot { display: flex; align-items: center; gap: 6px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; }
.flow .step { padding: 5px 10px; border-radius: 16px; border: 1px solid var(--border-strong); font-size: 12.5px; cursor: pointer; background: var(--surface); }
.flow .step.current { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }
.flow .step.allowed:hover { border-color: var(--brand); color: var(--brand); }
.flow .step.blocked { opacity: .4; cursor: not-allowed; }
.comment { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.comment.internal { background: #fffbeb; border-color: #ecd48b; }
:root[data-theme="dark"] .comment.internal { background: #2a2310; border-color: #6b5520; }
.checklist label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }

/* ---------- supervisor ---------- */
/* Показатель. Крупное число набирается заголовочным шрифтом с плотным трекингом:
   на кегле 28 обычный межбуквенный просвет выглядит рыхлым. */
.kpi { padding: 15px 16px 16px; }
.kpi .k-label { font-size: var(--t-11); color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.kpi .k-value {
  font-family: var(--font-display); font-size: var(--t-28); font-weight: 680; margin-top: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: -.026em; line-height: 1.05;
}
.kpi .k-sub { font-size: var(--t-12); color: var(--text-3); margin-top: 4px; }

/* Та же плитка, когда значение выводят одним элементом без обёртки. */
.card-body > .kpi:not(.k-value) { padding: 0; }
div.kpi:empty { display: none; }
.meter { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.chart { width: 100%; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 10.5px; }
.chart .bar { fill: var(--series-1); }
.chart .bar:hover, .chart .bar.hl { fill: var(--brand-2); }
.hbar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 0 5px 5px 0; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.tooltip { position: fixed; pointer-events: none; background: var(--text); color: var(--surface); padding: 6px 9px; border-radius: 6px; font-size: 12px; z-index: 1100; box-shadow: var(--shadow-lg); white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 1.6s infinite; }

/* ---------- IVR editor ---------- */
.ivr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; height: calc(100vh - 56px); }
.ivr-canvas { position: relative; overflow: auto; background:
  radial-gradient(circle, var(--border-strong) 1px, transparent 1px) 0 0 / 22px 22px, var(--bg); }
.ivr-toolbar .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
.ivr-toolbar { position: sticky; top: 0; left: 0; z-index: 3; display: flex; gap: 8px; padding: 10px 14px; background: color-mix(in srgb, var(--surface) 88%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); align-items: center; flex-wrap: wrap; }
.ivr-stage-wrap { position: relative; overflow: hidden; }
.ivr-stage { position: relative; transform-origin: 0 0; }
.ivr-edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.ivr-edges path { fill: none; stroke: var(--border-strong); stroke-width: 1.6; }
.ivr-edges path.hl { stroke: var(--brand); stroke-width: 2.6; }
.ivr-edges text { fill: var(--text-2); font-size: 11px; font-weight: 650; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.ivr-node { position: absolute; width: 196px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); cursor: pointer; font-size: 12.5px; }
.ivr-node:hover { border-color: var(--brand); }
.ivr-node.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.ivr-node.path { border-color: var(--brand); border-width: 2px; }
.ivr-node.err { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.ivr-node.warn { border-style: dashed; }
.ivr-node .n-head { white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; font-weight: 650; }
.ivr-node .n-head i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 12px; flex: none; }
.ivr-node .n-id { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.ivr-node .n-body { padding: 7px 10px; color: var(--text-2); }
.ivr-node .n-body .ellipsis { max-width: 100%; }
.ivr-node.entry::after { content: "START"; position: absolute; top: -9px; left: 10px; background: var(--good); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.t-play { background: #0ea5e9; } .t-menu { background: #6d4ae8; } .t-schedule { background: #0d9488; } .t-set_language { background: #64748b; }
.t-listen { background: #0f766e; } .t-assistant { background: #7c3aed; } .t-collect_field { background: #b45309; }
.t-queue { background: #1f5fbf; } .t-callback { background: #d97706; } .t-transfer { background: #9333ea; } .t-voicemail { background: #db2777; } .t-hangup { background: #475569; }
.ivr-panel { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.ivr-panel .p-sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { height: 38px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 16px; font-weight: 650; cursor: pointer; }
.keypad button:hover { background: var(--brand-soft); border-color: var(--brand); }
.sim-step { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.sim-step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.issue { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; cursor: pointer; }
.issue.error { background: var(--bad-soft); color: var(--bad); }
.issue.warning { background: var(--warn-soft); color: var(--warn); }
pre.code { background: #0f172a; color: #dbe4ff; padding: 14px; border-radius: 8px; overflow: auto; max-height: 60vh; line-height: 1.5; margin: 0; }
.opt-row { display: grid; grid-template-columns: 52px 1fr 28px; gap: 6px; margin-bottom: 6px; }

/* ---------- simulator ---------- */
.sim-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; align-items: start; }
.widget-frame { width: 100%; height: 640px; border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); background: #fff; }
.phone { background: #0f172a; color: #e2e8f0; border-radius: 22px; padding: 18px; box-shadow: var(--shadow-lg); }
.phone .screen { background: #111c33; border-radius: 12px; padding: 12px; min-height: 120px; font-size: 13px; margin-bottom: 12px; }
.phone .keypad button { background: #1e293b; color: #fff; border-color: #334155; }
.phone .keypad button:hover { background: #334155; }
.phone .btn { border-color: #334155; background: #1e293b; color: #e2e8f0; }
.phone .btn.call { background: #16a34a; border-color: #16a34a; color: #fff; }
.phone .btn.hang { background: #dc2626; border-color: #dc2626; color: #fff; }
.log { font-family: var(--mono); font-size: 12px; max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.log div { padding: 1px 0; }

@media (max-width: 1280px) {
  .ws { grid-template-columns: 290px minmax(0,1fr); }
  .ws-side { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .ticket-layout, .sim-layout, .ivr-wrap { grid-template-columns: 1fr; }
}

/* банковский профиль: продукты клиента в карточке 360° */
.products { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.products > .muted { flex-basis: 100%; }
/* риск в подсказке оператору: текст длинный, поэтому высота по содержимому */
.chip.warn { height: auto; align-items: flex-start; padding: 4px 8px; line-height: 1.35; text-align: left; background: var(--warn-soft, #fff4e5); color: var(--warn-2, #8a5200); }
.chip.warn svg { flex: none; margin-right: 6px; margin-top: 2px; }
.chip.product { height: auto; min-height: 22px; padding: 2px 8px; background: var(--brand-soft); color: var(--brand-2); border-color: transparent; }

/* ---------- софтфон оператора ---------- */
.softphone { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 300px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sp-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-weight: 600; }
.sp-pill svg { width: 16px; height: 16px; }
.sp-pill.good { border-color: var(--good); color: var(--good); }
.sp-pill.warn { border-color: var(--warn); color: var(--warn); }
.sp-pill.bad { border-color: var(--bad); color: var(--bad); }
.sp-pill.ring { animation: sp-ring 1s ease-in-out infinite; }
@keyframes sp-ring { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.softphone .sp-body { display: none; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg, var(--shadow)); padding: 14px; }
.softphone.open .sp-body { display: block; }
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sp-timer { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; }
.sp-card { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-3); margin-bottom: 10px; }
.sp-name { font-weight: 650; }
.sp-num { color: var(--text-2); font-size: 13px; }
.sp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-actions .btn.active { border-color: var(--warn); color: var(--warn); }
.sp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.sp-pad.hidden { display: none; }
/* прогноз нагрузки: полоски по часам */
.fc-row { display: flex; gap: 2px; align-items: flex-end; }
.fc-cell { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fc-bar { width: 100%; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 4px; }
.fc-cell.short .fc-bar { background: var(--bad); }
.fc-hour { font-size: 9px; color: var(--text-3); }

/* табло в зал */
.wallboard { padding: 8px; }
.wb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wb-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.wb-tile.good { border-color: var(--good); } .wb-tile.warn { border-color: var(--warn); } .wb-tile.bad { border-color: var(--bad); }
.wb-title { color: var(--text-3); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.wb-value { font-size: 44px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.wb-tile.bad .wb-value { color: var(--bad); } .wb-tile.warn .wb-value { color: var(--warn); } .wb-tile.good .wb-value { color: var(--good); }
.wb-queues { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.wb-queue { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 16px; }
.wb-queue.hot { background: var(--bad-soft); }
@media (max-width: 1100px) { .wb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* вложения в переписке */
.att-box { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-img { padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); cursor: pointer; }
.att-img img { display: block; max-width: 220px; max-height: 180px; object-fit: cover; }
.att-file { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; text-align: left; }
.att-file:hover, .att-img:hover { border-color: var(--brand); }
.sp-conf { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.sp-conf-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.sp-conf-row > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-consult { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); }
.sp-hist-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .softphone { left: 12px; right: 12px; width: auto; } .softphone .sp-body { width: 100%; } }

/* значение только для чтения в форме — выглядит как поле, но не редактируется */
.input.static { background: var(--bg-soft, transparent); color: var(--text); display: flex; align-items: center; min-height: 36px; }

/* пункт меню для функции, не входящей в тариф */
.nav-item.locked { opacity: .55; }
.nav-item.locked .lock { margin-left: auto; font-size: 11px; opacity: .8; }


/* ---------- отделка ---------- */

/* Тон крупного числа на плитке. */
.k-value.tone-good { color: var(--good); }
.k-value.tone-warn { color: var(--warn); }
.k-value.tone-bad  { color: var(--bad); }
.k-value.tone-info { color: var(--info); }
/* Плитка без данных: мелко и приглушённо — пустота не должна выглядеть как показатель. */
.k-empty { font-size: var(--t-13); color: var(--text-3); margin-top: 8px; }
/* Название подключения к модели — не число, поэтому кегль меньше, а перенос разрешён. */
.k-conn { font-size: var(--t-13); font-weight: 560; margin-top: 6px; line-height: 1.35; color: var(--text-2); word-break: break-word; }

.meter { height: 5px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--brand); transition: width .4s var(--ease); }

/* Поля ввода и кнопки в одну линию по высоте — мелочь, которую замечают не глядя. */
.row > .btn, .row > .input, .row > .select { flex: none; }

/* Карточка, по которой кликают, должна на это намекать. */
.card.click { cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.card.click:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }

/* Модальное окно: радиус больше, чем у карточки, тень заметнее — окно должно
   читаться как слой над интерфейсом, а не как ещё одна карточка. */
.modal { border-radius: var(--radius-lg); border: 1px solid var(--border); }
.modal-back { background: rgba(9,13,20,.5); backdrop-filter: blur(2px); }
.modal-head h2 { font-size: var(--t-16); }

.toast { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* Аватар: буквы набираются заголовочным шрифтом, иначе инициалы выглядят случайными. */
.avatar { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }

/* Вход. Смысловая часть слева — не «маркетинговый блок», а короткое объяснение,
   что это за система. */
.login-hero h1 { font-family: var(--font-display); letter-spacing: -.022em; }
.login-hero .lh-note { font-size: var(--t-13); color: #9ec7b4; line-height: 1.55; }

/* Печать: интерфейс иногда распечатывают, чтобы приложить к делу. */
@media print {
  .sidebar, .topbar, .toasts, .softphone, .btn { display: none !important; }
  .app { display: block; height: auto; }
  .content { overflow: visible; padding: 0; }
  .card { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
}
