/* =============================================================================
   ICE Score · слой приложения (издательская тема ЗЗД)
   -----------------------------------------------------------------------------
   Поверх brand.css (шрифты+токены) и theme.css (тёмная+светлая тема, атмосфера).
   Тёмная — по умолчанию; светлая — <html data-theme="light">. Эталон вида —
   prototypes/{app-dark,app-light,login}.html из кита. Палитра/темы — из theme.css.
   ============================================================================= */

:root{
  --radius:14px; --radius-sm:10px; --radius-lg:18px;
  --panel-group:rgba(255,255,255,.03);
  --hair:rgba(209,158,104,.45);
  --nav-hover:rgba(255,255,255,.055);
  --row-hover:rgba(255,255,255,.025);
  --field-focus-bg:#0d1420;
  --gold-ring:rgba(209,158,104,.22);
  --btn-gold-ink:#0a0e17;
  --on-semantic:#0a0e17;
  --seal-op:.42;
  --ok-bg:rgba(92,199,154,.13);  --ok-line:rgba(92,199,154,.28);
  --warn-bg:var(--gold-soft);    --warn-line:rgba(209,158,104,.30);
  --bad-bg:rgba(231,154,139,.12);--bad-line:rgba(231,154,139,.30);
  --neutral-bg:rgba(255,255,255,.05);
  --navy-pill:#123f79;
  --topbar-bg:linear-gradient(135deg,#0b2140,#07182f);
  --ease:var(--zzd-ease, cubic-bezier(.2,.7,.2,1));
  --dep-chip-bg:rgba(255,255,255,.05);
}
:root[data-theme="light"]{
  --panel-group:rgba(6,34,71,.03);
  --hair:rgba(191,138,73,.5);
  --nav-hover:rgba(6,34,71,.05);
  --row-hover:rgba(6,34,71,.02);
  --field-focus-bg:#ffffff;
  --gold-ring:rgba(191,138,73,.2);
  --btn-gold-ink:var(--head);
  --on-semantic:#ffffff;
  --seal-op:.16;
  --ok-bg:rgba(47,143,92,.12);   --ok-line:rgba(47,143,92,.28);
  --warn-line:rgba(191,138,73,.32);
  --bad-bg:rgba(192,72,58,.10);  --bad-line:rgba(192,72,58,.28);
  --neutral-bg:rgba(6,34,71,.05);
  --dep-chip-bg:rgba(6,34,71,.05);
}

/* ------------------------------- База --------------------------------------- */
*{ box-sizing:border-box; }
body{ overflow-x:hidden; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; }
.muted{ color:var(--muted); }

h1,h2,h3,h4{ font-family:var(--zzd-lek); color:var(--head); letter-spacing:-.01em; line-height:1.15; }
h1{ font-weight:800; font-size:clamp(24px,3vw,38px); letter-spacing:-.02em; margin:.2em 0 .1em; }
h2{ font-weight:700; font-size:1.35rem; margin:1rem 0 .5rem; }
h3{ font-weight:700; font-size:1.1rem; margin:.8rem 0 .35rem; }

/* =====================================================================
   РАСКЛАДКА · сайдбар слит с фоном + золотая волосяная линия справа
   ===================================================================== */
.layout{ position:relative; z-index:1; display:flex; min-height:100vh; }
.sidebar{ position:sticky; top:0; height:100vh; flex:0 0 clamp(238px,18vw,280px);
  width:clamp(238px,18vw,280px); background:transparent;
  display:flex; flex-direction:column; padding:22px 16px; }
.sidebar::after{ content:""; position:absolute; top:0; right:0; bottom:0; width:1px;
  background:linear-gradient(180deg,transparent,var(--hair) 34% 66%,transparent); }
.sidebar .brand{ display:block; padding:2px 8px 16px; }
.brand-mark{ display:block; width:100%; max-width:186px; height:auto; filter:var(--logo-filter); }
.brand-mark-mini{ display:none; width:40px; height:auto; margin:0 auto; filter:var(--logo-filter); }
.sidebar .brand small{ display:block; margin-top:11px; font-family:var(--zzd-lek); font-size:12px;
  letter-spacing:.02em; color:var(--dim); line-height:1.5; }
/* Меню показывает ВСЕ пункты без внутреннего скролла (flex-shrink:0);
   свободную высоту отдаёт/забирает эмблема .pseal ниже. */
.nav{ display:flex; flex-direction:column; gap:2px; margin:10px 0 auto; padding:6px;
  background:var(--panel-group); border:1px solid var(--line); border-radius:14px;
  flex:0 0 auto; overflow:visible; }
.nav-item{ position:relative; display:flex; align-items:center; gap:11px; padding:9px 13px;
  border-radius:10px; font-family:var(--zzd-lek); font-weight:600; font-size:15px;
  color:var(--muted); transition:.18s var(--ease); }
.nav-item:hover{ background:var(--nav-hover); color:var(--head); }
.nav-item.active{ color:var(--gold); background:var(--gold-soft); }
.nav-item.active::before{ content:""; position:absolute; left:0; top:8px; bottom:8px; width:3px;
  border-radius:3px; background:var(--gold); }
.ni-ic{ flex:0 0 auto; width:1.35rem; text-align:center; font-size:1rem; opacity:.85; }
.ni-tx{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Эмблема-водяной знак — «уступающий» элемент: на высоких экранах видна целиком,
   на низких сжимается вплоть до нуля, освобождая место меню (заходит на логотип). */
.pseal{ width:min(150px,72%); height:120px; margin:6px auto 12px;
  flex:0 1 auto; min-height:0; overflow:hidden;
  background:var(--emblem) center/contain no-repeat; opacity:var(--seal-op); }
.sidebar-foot{ border-top:1px solid var(--line); padding-top:13px; flex:0 0 auto; }
.sidebar-foot .user-name{ font-family:var(--zzd-lek); font-weight:600; color:var(--head); font-size:15px; padding:0 8px; }
.sidebar-foot .user-role{ font-family:var(--zzd-lek); color:var(--gold); font-size:13px; padding:0 8px 6px; }
.nav-item.small{ font-size:14px; font-weight:500; padding:8px 13px; color:var(--muted); }
.theme-toggle{ display:flex; align-items:center; gap:11px; width:100%; margin:2px 0 4px;
  background:var(--panel-group); border:1px solid var(--line); color:var(--muted);
  font-family:var(--zzd-lek); font-weight:600; font-size:14px; padding:9px 14px;
  border-radius:10px; cursor:pointer; transition:.2s var(--ease); }
.theme-toggle:hover{ color:var(--gold-2); border-color:var(--gold); }
.theme-toggle .tt-ic{ width:1.35rem; text-align:center; }
.nav-collapse{ display:none; }
.theme-fab{ position:fixed; top:20px; right:24px; z-index:6; cursor:pointer; display:flex;
  align-items:center; gap:8px; font-family:var(--zzd-lek); font-weight:600; font-size:14px;
  color:var(--muted); background:var(--card); border:1px solid var(--line-2);
  border-radius:100px; padding:9px 16px; transition:.2s var(--ease); box-shadow:var(--card-shadow); }
.theme-fab:hover{ color:var(--gold-2); border-color:var(--gold); }
.topbar{ display:none; }
.hamburger{ background:transparent; border:1px solid rgba(255,255,255,.28); color:#fff;
  border-radius:8px; font-size:18px; line-height:1; padding:5px 11px; cursor:pointer; }
.brand-mark-sm{ height:26px; width:26px; vertical-align:-8px; border-radius:50%; filter:brightness(0) invert(1); }
.sidebar-backdrop{ display:none; }

/* =====================================================================
   КОНТЕНТ
   ===================================================================== */
.content{ flex:1; min-width:0; max-width:1360px; margin-inline:auto;
  padding:clamp(24px,2.6vw,42px) clamp(20px,3.2vw,52px); }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px;
  flex-wrap:wrap; margin:2px 0 22px; }
.page-head h1{ margin:.1em 0; }
.page-head p{ margin:.15rem 0 0; }
.page-head > div{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.page-head > div:first-child{ flex-direction:column; align-items:flex-start; gap:.1rem; }
.page-foot{ text-align:center; color:var(--dim); font-family:var(--zzd-lek); font-size:12.5px; padding:2.4rem 0 .6rem; }

/* =====================================================================
   КНОПКИ
   ===================================================================== */
.btn{ display:inline-flex; align-items:center; gap:.5rem; font-family:var(--zzd-lek); font-weight:600;
  font-size:14.5px; line-height:1.2; border-radius:11px; padding:11px 18px;
  border:1px solid var(--line-2); background:var(--panel-group); color:var(--ink);
  cursor:pointer; text-decoration:none; transition:.18s var(--ease); }
.btn:hover{ border-color:var(--gold); color:var(--gold-2); }
.btn-primary{ background:var(--gold-2); border-color:transparent; color:var(--btn-gold-ink);
  box-shadow:0 12px 26px -14px rgba(209,158,104,.7); }
.btn-primary:hover{ filter:brightness(1.06); color:var(--btn-gold-ink); border-color:transparent; }
.btn-success{ background:var(--ok); border-color:transparent; color:var(--on-semantic); }
.btn-danger{ background:var(--bad); border-color:transparent; color:var(--on-semantic); }
.btn-success:hover, .btn-danger:hover{ filter:brightness(1.06); color:var(--on-semantic); border-color:transparent; }
.btn-ghost{ background:transparent; }
.btn-sm{ padding:7px 13px; font-size:13px; border-radius:9px; }

/* =====================================================================
   FLASH · полоса слева на карточке
   ===================================================================== */
.flash{ background:var(--card); border:1px solid var(--line); border-left-width:4px;
  border-radius:var(--radius-sm); padding:.7rem 1rem; margin:.7rem 0; box-shadow:var(--card-shadow); }
.flash-ok{ border-left-color:var(--ok); }
.flash-error{ border-left-color:var(--bad); color:var(--bad); }
.flash b{ color:var(--head); }

/* =====================================================================
   ПОЛЯ · утоплены, золотой фокус
   ===================================================================== */
input[type=text], input:not([type]), input[type=date], input[type=number],
input[type=password], textarea, select{
  background:var(--field); border:1px solid var(--line-2); border-radius:var(--radius-sm);
  color:var(--head); font-family:var(--zzd-lek); font-size:15px; padding:11px 13px; transition:.16s var(--ease); }
textarea{ line-height:1.5; width:100%; }
input::placeholder, textarea::placeholder{ color:var(--dim); }
input:focus, textarea:focus, select:focus{ outline:none; border-color:var(--gold);
  box-shadow:0 0 0 3px var(--gold-ring); background:var(--field-focus-bg); }
select{ cursor:pointer; }

/* =====================================================================
   КАРТОЧКИ · приподняты, золотая полоска сверху
   ===================================================================== */
.card, .hyp-form fieldset, .decision-box, .login-card{
  position:relative; overflow:hidden; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:22px 24px; margin:1rem 0; box-shadow:var(--card-shadow); }
.card::before, .hyp-form fieldset::before, .decision-box::before, .login-card::before{
  content:""; position:absolute; left:0; right:0; top:0; height:2px;
  background:linear-gradient(90deg, var(--gold), rgba(209,158,104,0) 58%); }
.card h3{ margin-top:0; }
.hyp-form legend{ font-family:var(--zzd-lek); font-weight:700; font-size:1.05rem; color:var(--head);
  padding:0 .5rem; letter-spacing:-.01em; }
.card-table{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius-lg);
  box-shadow:var(--card-shadow); overflow:hidden; margin:1rem 0; }

/* =====================================================================
   ТАБЛИЦЫ
   ===================================================================== */
table.grid{ width:100%; border-collapse:collapse; }
table.grid thead th{ font-family:var(--zzd-lek); font-weight:600; text-transform:uppercase;
  letter-spacing:.1em; font-size:11.5px; color:var(--dim); text-align:left;
  padding:13px 14px; border-bottom:1px solid var(--line); }
table.grid td{ padding:13px 14px; border-bottom:1px solid var(--line); font-size:15px;
  color:var(--ink); vertical-align:top; }
table.grid tbody tr:last-child td{ border-bottom:none; }
table.grid tbody tr:hover td{ background:var(--row-hover); }
.row-actions a{ font-family:var(--zzd-lek); font-weight:700; color:var(--gold-2); font-size:1.05rem; }
.row-actions a:hover{ color:var(--gold); }
table.kv{ border-collapse:collapse; width:100%; }
table.kv th{ text-align:left; width:190px; vertical-align:top; padding:.4rem .6rem;
  font-family:var(--zzd-lek); font-weight:600; color:var(--muted); font-size:.9rem; }
table.kv td{ padding:.4rem .6rem; border-bottom:1px solid var(--line); color:var(--ink); }
table.kv tr:last-child td, table.kv tr:last-child th{ border-bottom:none; }
.kv-tight th{ width:62%; } .kv-tight th, .kv-tight td{ padding:.3rem .5rem; font-size:.88rem; }

/* =====================================================================
   БЕЙДЖИ / СТАТУСЫ
   ===================================================================== */
.badge{ display:inline-block; font-family:var(--zzd-lek); font-weight:600; font-size:12px;
  padding:5px 12px; border-radius:100px; letter-spacing:.01em; white-space:nowrap;
  background:var(--neutral-bg); color:var(--muted); border:1px solid var(--line); }
.st-worked{ background:var(--ok-bg); color:var(--ok); border-color:var(--ok-line); }
.st-failed{ background:var(--bad-bg); color:var(--bad); border-color:var(--bad-line); }
.st-testing{ background:var(--warn-bg); color:var(--warn); border-color:var(--warn-line); }
.st-backlog{ background:var(--neutral-bg); color:var(--dim); border-color:var(--line); }

/* цветной селект статуса (быстрая смена в списке) */
.status-quick{ margin:0; }
.st-select{ font-family:var(--zzd-lek); font-weight:600; font-size:.82rem; padding:6px 10px;
  border-radius:100px; cursor:pointer; }
.st-select.st-worked{ background:var(--ok-bg); color:var(--ok); border-color:var(--ok-line); }
.st-select.st-failed{ background:var(--bad-bg); color:var(--bad); border-color:var(--bad-line); }
.st-select.st-testing{ background:var(--warn-bg); color:var(--warn); border-color:var(--warn-line); }
.st-select.st-backlog{ background:var(--neutral-bg); color:var(--muted); border-color:var(--line-2); }

/* =====================================================================
   ПЛИТКИ-СЧЁТЧИКИ
   ===================================================================== */
.stat-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:.8rem; margin:.3rem 0 1.2rem; }
.stat-tile{ position:relative; overflow:hidden; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--card-shadow); padding:.8rem 1rem; }
.stat-num{ font-family:var(--zzd-lek); font-size:1.7rem; font-weight:800; color:var(--gold-2); line-height:1.1; letter-spacing:-.02em; }
.stat-lbl{ font-family:var(--zzd-lek); font-size:.8rem; color:var(--muted); font-weight:600; margin-top:2px; }
.st-tile-worked{ border-left:4px solid var(--ok); }
.st-tile-failed{ border-left:4px solid var(--bad); }
.st-tile-testing{ border-left:4px solid var(--warn); }
.st-tile-backlog{ border-left:4px solid var(--line-2); }
.metric-tiles .stat-num{ font-size:1.4rem; }

/* =====================================================================
   ТАБЛИЦА ГИПОТЕЗ
   ===================================================================== */
.hyp-grid .col-rank{ width:2.4rem; text-align:center; font-family:var(--zzd-lek); font-weight:700; color:var(--dim); }
.hyp-grid .hyp-title{ font-family:var(--zzd-lek); font-weight:600; color:var(--head); font-size:1rem; }
.hyp-grid .hyp-title:hover{ color:var(--gold-2); }
.cat-chip{ display:inline-block; font-family:var(--zzd-lek); font-size:.72rem; font-weight:600;
  background:var(--gold-soft); color:var(--gold); border-radius:100px; padding:.1rem .6rem;
  margin-left:.4rem; vertical-align:middle; }
.chip-row{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.35rem; }
.dep-chip, .dir-chip, .resp-chip{ font-family:var(--zzd-lek); font-size:.72rem; font-weight:600;
  border-radius:100px; padding:.1rem .55rem; border:1px solid var(--line); }
.dep-chip{ background:var(--dep-chip-bg); color:var(--ink); }
.dir-chip{ background:var(--gold-soft); color:var(--gold); border-color:var(--warn-line); }
.resp-chip{ background:var(--dep-chip-bg); color:var(--muted); }
/* чип-ссылка на задачу в Битрикс24 прямо из списка гипотез */
.bx-chip{ font-family:var(--zzd-lek); font-size:.72rem; font-weight:600; border-radius:100px;
  padding:.1rem .55rem; border:1px solid var(--line); background:var(--dep-chip-bg);
  color:var(--gold-2); text-decoration:none; white-space:nowrap; }
a.bx-chip:hover{ border-color:var(--gold); color:var(--gold); }
.hyp-desc{ color:var(--muted); font-size:.82rem; margin-top:.3rem; max-width:42ch; line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.col-metric{ max-width:15rem; }
.mt-name{ font-size:.88rem; color:var(--ink); }
.mt-vals{ font-family:var(--zzd-lek); font-size:.82rem; color:var(--muted); margin-top:.15rem; }
.mt-vals b{ color:var(--head); }
.col-term{ white-space:nowrap; font-family:var(--zzd-lek); font-size:.85rem; color:var(--ink); }
.col-ice{ text-align:center; width:4.8rem; }
.ice-mini{ font-family:var(--zzd-lek); font-size:.72rem; color:var(--dim); margin-top:.25rem; }
.warn-mini{ font-family:var(--zzd-lek); font-size:.7rem; font-weight:600; color:var(--warn); margin-top:.25rem; white-space:nowrap; }
.warn-mini.stale{ color:var(--bad); }

/* ICE-бейдж (приоритет) */
.ice-badge{ display:inline-block; min-width:2.2rem; text-align:center; font-family:var(--zzd-lek);
  font-weight:800; font-size:.95rem; border-radius:100px; padding:.14rem .55rem;
  border:1px solid var(--line); background:var(--neutral-bg); color:var(--muted); }
.ice-high{ background:var(--ok-bg); color:var(--ok); border-color:var(--ok-line); }
.ice-mid{ background:var(--warn-bg); color:var(--warn); border-color:var(--warn-line); }
.ice-low{ background:var(--bad-bg); color:var(--bad); border-color:var(--bad-line); }
.ice-none{ background:var(--neutral-bg); color:var(--dim); border-color:var(--line); }

/* предупреждение над карточкой */
.warn-box{ background:var(--card); border:1px solid var(--line); border-left:4px solid var(--warn);
  border-radius:var(--radius-sm); padding:.7rem 1rem; margin:0 0 1.1rem; font-size:.9rem; color:var(--ink);
  display:flex; flex-direction:column; gap:.3rem; box-shadow:var(--card-shadow); }
.warn-box b{ color:var(--head); }

/* =====================================================================
   КАРТОЧКА ГИПОТЕЗЫ · две колонки, ICE-панель, битрикс
   ===================================================================== */
.cols{ display:grid; grid-template-columns:1fr 330px; gap:1.1rem; align-items:start; }
.col-side .card, .col-side form{ margin-top:0; margin-bottom:1rem; }
.ice-card{ text-align:center; }
.ice-big{ font-family:var(--zzd-lek); font-size:2.6rem; font-weight:800; letter-spacing:-.02em;
  border-radius:var(--radius); padding:.35rem; margin:.2rem 0 .7rem; background:var(--neutral-bg); color:var(--muted); }
.ice-big.ice-high{ background:var(--ok-bg); color:var(--ok); }
.ice-big.ice-mid{ background:var(--warn-bg); color:var(--warn); }
.ice-big.ice-low{ background:var(--bad-bg); color:var(--bad); }
.ice-big.ice-none{ background:var(--neutral-bg); color:var(--dim); }
.ice-card table.kv th{ width:auto; text-align:left; }
.ice-card table.kv td{ text-align:right; color:var(--head); }
.bitrix-card label.full{ display:block; font-family:var(--zzd-lek); font-size:.85rem; font-weight:600;
  color:var(--muted); margin-bottom:.3rem; }
/* combobox с поиском */
/* Карточка/fieldset с комбобоксом не должна обрезать выпадающий список (у .card и
   .hyp-form fieldset стоит overflow:hidden ради золотой полоски сверху — из-за неё
   список сотрудников был виден на одну строку). Полоску скругляем, чтобы не торчала. */
.allow-dropdown{ overflow:visible !important; }
.allow-dropdown::before{ border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
.combo{ position:relative; margin-bottom:.6rem; }
.combo-input{ width:100%; }
.combo-list{ list-style:none; margin:.25rem 0 0; padding:.25rem; max-height:240px; overflow:auto;
  border:1px solid var(--line-2); border-radius:var(--radius-sm); background:var(--card);
  position:absolute; z-index:30; width:100%; box-shadow:var(--card-shadow); }
.combo-list li{ padding:.5rem .6rem; cursor:pointer; font-family:var(--zzd-lek); font-size:.88rem;
  color:var(--ink); border-radius:8px; }
.combo-list li:hover{ background:var(--nav-hover); color:var(--head); }
.bx-map{ margin-top:.7rem; }
.bx-map summary{ cursor:pointer; font-family:var(--zzd-lek); font-size:.82rem; color:var(--gold-2); font-weight:600; }
.bx-map table{ margin-top:.4rem; }
.bx-map th{ width:42%; }

/* =====================================================================
   ФОРМА ГИПОТЕЗЫ
   ===================================================================== */
.hyp-form fieldset{ padding:22px 24px; }
.hyp-form .row{ display:flex; flex-wrap:wrap; gap:1rem 1.2rem; margin-bottom:.4rem; }
.hyp-form label{ display:flex; flex-direction:column; gap:.3rem; font-family:var(--zzd-lek);
  font-size:12.5px; letter-spacing:.02em; color:var(--muted); font-weight:600; margin-bottom:.7rem; }
.hyp-form label b{ color:var(--head); font-weight:600; }
.hyp-form label.full{ display:block; }
.hyp-form label.full > input, .hyp-form label.full > textarea{ width:100%; }
.hyp-form .col2{ flex:1 1 240px; }
.hyp-form .col-narrow{ flex:0 1 200px; }
.hyp-form input, .hyp-form textarea, .hyp-form select{ font-weight:400; }
.form-actions{ display:flex; gap:.8rem; margin:1.2rem 0 .3rem; flex-wrap:wrap; }

/* ICE-слайдеры */
.score-hint{ margin:0 0 .9rem; }
.score-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; }
.score-axis{ background:var(--field); border:1px solid var(--line); border-radius:var(--radius-sm); padding:.8rem .9rem; }
.score-axis-head{ display:flex; justify-content:space-between; align-items:baseline; }
.score-axis-head b{ font-family:var(--zzd-lek); color:var(--head); }
.score-val{ font-family:var(--zzd-lek); font-size:1.4rem; font-weight:800; color:var(--gold-2); }
.score-axis-desc{ font-size:.78rem; margin:.15rem 0 .55rem; color:var(--muted); }
.score-range{ width:100%; accent-color:var(--gold); }
.ice-result{ margin-top:1.1rem; font-family:var(--zzd-lek); font-weight:600; color:var(--head);
  display:flex; align-items:center; gap:.5rem; }
.ice-result .ice-badge{ font-size:1.2rem; min-width:3rem; }

/* =====================================================================
   СПРИНТ / ЦЕЛЬ (если используется)
   ===================================================================== */
.goal-card, .golden-card{ text-align:left; }
.goal-label{ font-family:var(--zzd-lek); font-size:.8rem; text-transform:uppercase; letter-spacing:.1em;
  color:var(--gold); font-weight:600; }
.goal-text{ font-family:var(--zzd-lek); font-size:1.3rem; font-weight:700; color:var(--head); margin:.3rem 0 1.1rem; }
.progress-head{ display:flex; justify-content:space-between; font-size:.85rem; color:var(--muted); margin-bottom:.35rem; }
.progress-head b{ color:var(--head); font-size:1rem; font-family:var(--zzd-lek); }
.progress-bar{ height:16px; background:var(--field); border:1px solid var(--line); border-radius:100px; overflow:hidden; }
.progress-fill{ height:100%; background:linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius:100px; transition:width .4s; }
.golden-card h3{ color:var(--gold-2); }

/* =====================================================================
   ДАШБОРД · светофор
   ===================================================================== */
.year-nav{ display:flex; align-items:center; gap:.5rem; }
.year-cur{ font-family:var(--zzd-lek); font-weight:800; font-size:1.1rem; color:var(--head); }
.legend{ display:flex; flex-wrap:wrap; gap:.4rem 1rem; margin:.3rem 0 1rem; font-family:var(--zzd-lek);
  font-size:.8rem; color:var(--muted); }
.legend-item{ display:inline-flex; align-items:center; gap:.35rem; }
.legend-item i{ width:14px; height:14px; border-radius:4px; display:inline-block; }
.dash-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.dash-scroll table.dash-grid{ min-width:820px; }
.dash-grid th, .dash-grid td{ text-align:center; padding:.5rem .4rem; border:1px solid var(--line); }
.dash-grid thead th{ text-transform:none; letter-spacing:0; }
.dash-grid .dash-metric{ text-align:left; white-space:nowrap; font-family:var(--zzd-lek); font-weight:600;
  color:var(--head); background:var(--panel-group); position:sticky; left:0; }
.dash-unit{ color:var(--dim); font-weight:400; font-size:.75rem; margin-left:.3rem; }
.dash-mo{ font-family:var(--zzd-lek); font-size:.74rem; color:var(--dim); }
.dash-cell{ font-family:var(--zzd-lek); font-size:.8rem; }
.cell-fact{ font-weight:800; }
.cell-plan{ color:var(--muted); font-size:.72rem; }
.dash-year{ font-family:var(--zzd-lek); font-weight:800; background:var(--panel-group); }
.dash-hint{ font-size:.8rem; margin:.4rem 0 1rem; }
.dash-edit{ display:flex; flex-wrap:wrap; gap:.8rem; align-items:flex-end; }
.dash-edit label{ display:flex; flex-direction:column; font-family:var(--zzd-lek); font-size:.8rem;
  font-weight:600; color:var(--muted); gap:.3rem; }

/* =====================================================================
   ФИЛЬТРЫ / АДМИНКА СПРАВОЧНИКОВ / ПРОЧЕЕ
   ===================================================================== */
.filters{ display:flex; flex-wrap:wrap; gap:.5rem; margin:.2rem 0 1rem; align-items:center; }
.filters select{ font-size:.9rem; padding:8px 12px; }
.cols-3{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1rem; align-items:start; }
.dict-list{ list-style:none; margin:.4rem 0; padding:0; }
.dict-list li{ display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; padding:.4rem 0; border-bottom:1px dashed var(--line); }
.dict-list li:last-child{ border-bottom:none; }
.dict-list li.off{ opacity:.5; }
.dict-list .inline-form{ margin:0; }
.dict-list .inline-form input[type=text]{ width:11rem; }
.add-form{ margin-top:.6rem !important; }
.inline-form{ display:inline-flex; gap:.35rem; align-items:center; margin:.15rem .3rem .15rem 0; }
.inline-form input{ padding:.4rem .5rem; font-size:.82rem; }
.empty-box{ background:var(--card); border:1px dashed var(--line-2); border-radius:var(--radius-lg);
  padding:2.2rem; text-align:center; color:var(--muted); box-shadow:var(--card-shadow); }
.empty-box .btn{ margin-top:.6rem; }

/* =====================================================================
   ЭКРАН ВХОДА · hero (атмосфера — из theme.css)
   ===================================================================== */
.login-page .content{ max-width:none; padding:0; }
.login-page .flash{ width:min(400px,94vw); margin:20px auto 0; }
.login-wrap{ min-height:100vh; display:grid; place-items:center; padding:40px 20px; }
.login-card{ width:min(400px,94vw); padding:clamp(30px,4vw,42px) clamp(26px,4vw,38px); margin:0; }
.login-card .login-logo{ font-family:var(--zzd-lek); font-weight:800; font-size:1.7rem; text-align:center;
  color:var(--head); margin-bottom:.2rem; }
.login-card .login-logo .zzd{ color:var(--gold); }
.login-card .login-sub{ text-align:center; color:var(--muted); font-size:14px; margin-bottom:1.4rem; line-height:1.5; }
.login-card label{ display:block; margin-bottom:1rem; font-family:var(--zzd-lek); font-weight:600;
  font-size:12.5px; letter-spacing:.02em; color:var(--muted); }
.login-card input{ width:100%; margin-top:.4rem; font-size:16px; padding:13px 15px; }
.login-card .btn{ width:100%; justify-content:center; font-size:16px; padding:14px; margin-top:6px; }
.hint{ text-align:center; color:var(--dim); font-family:var(--zzd-lek); font-size:13px; margin-top:14px; }
.login-page .page-foot{ position:fixed; left:0; right:0; bottom:14px; padding:0; }

/* =====================================================================
   ПЕЧАТЬ
   ===================================================================== */
@media print{
  .no-print, .topbar, .page-foot, .zzd-atmo, .theme-fab{ display:none !important; }
  body{ background:#fff; color:#111; }
  .layout{ zoom:1 !important; width:auto !important; }
  .card, .card-table, .hyp-form fieldset{ border:1px solid #999; box-shadow:none; }
  .card::before, .hyp-form fieldset::before{ display:none; }
}

/* =====================================================================
   АДАПТИВ
   ===================================================================== */
@media (min-width:900px){
  .layout{ zoom:1.1; width:calc(100% / 1.1); }
  .login-page .layout{ zoom:1; width:auto; }
  .login-page .login-card{ transform:scale(1.1); }
  .sidebar{ height:calc(100vh / 1.1); transition:width .28s var(--ease), flex-basis .28s var(--ease); }
  .nav-collapse{ position:absolute; top:12px; right:12px; z-index:3; display:grid; place-items:center;
    width:26px; height:26px; background:var(--panel-group); border:1px solid var(--line);
    color:var(--muted); border-radius:8px; cursor:pointer; font-size:17px; line-height:1;
    transition:background .2s, transform .35s var(--ease); }
  .nav-collapse:hover{ background:var(--nav-hover); color:var(--head); }
  html.nav-collapsed .sidebar{ width:76px; flex:0 0 76px; min-width:0; overflow:hidden; padding-left:.5rem; padding-right:.5rem; }
  html.nav-collapsed .nav-collapse{ top:10px; left:50%; right:auto; transform:translateX(-50%) rotate(180deg); }
  html.nav-collapsed .brand{ text-align:center; padding:2.4rem 0 .7rem; }
  html.nav-collapsed .brand-mark{ display:none; }
  html.nav-collapsed .brand-mark-mini{ display:block; }
  html.nav-collapsed .brand small,
  html.nav-collapsed .ni-tx,
  html.nav-collapsed .pseal,
  html.nav-collapsed .theme-toggle .tt-tx,
  html.nav-collapsed .sidebar-foot .user-name,
  html.nav-collapsed .sidebar-foot .user-role{ display:none; }
  html.nav-collapsed .nav{ margin-top:.8rem; padding:6px 4px; }
  html.nav-collapsed .nav-item{ justify-content:center; gap:0; padding:11px 0; }
  html.nav-collapsed .nav-item.small{ padding:9px 0; }
  html.nav-collapsed .theme-toggle{ justify-content:center; gap:0; }
}
/* Низкие экраны (ноутбуки): жёстко гарантируем сайдбар без скролла — убираем
   подпись под логотипом и водяной знак, отдаём высоту меню (меню заходит на логотип). */
@media (min-width:900px) and (max-height:900px){
  .sidebar .brand{ padding-bottom:8px; }
  .sidebar .brand small{ display:none; }
  .pseal{ display:none; }
}
@media (min-width:900px) and (max-height:760px){
  .sidebar .brand-mark{ max-width:150px; }
  .nav-item{ padding:7px 13px; }
  .theme-toggle{ padding:7px 13px; }
}

@media (max-width:980px){ .cols{ grid-template-columns:1fr; } }
@media (max-width:899px){
  .layout{ display:block; }
  .topbar{ display:flex; align-items:center; gap:.8rem; position:sticky; top:0; z-index:30;
    background:var(--topbar-bg); color:#fff; padding:.55rem .9rem; border-bottom:1px solid var(--hair); }
  .topbar .brand{ color:#fff; font-family:var(--zzd-lek); font-weight:700; font-size:1.15rem; }
  .sidebar{ position:fixed; top:0; left:0; height:100vh; width:264px; z-index:40; padding:20px 16px;
    background:var(--bg); transform:translateX(-100%); transition:transform .25s var(--ease); box-shadow:2px 0 40px rgba(0,0,0,.5); overflow-y:auto; }
  .sidebar::after{ display:none; }
  body.nav-open .sidebar{ transform:none; }
  body.nav-open .sidebar-backdrop{ display:block; position:fixed; inset:0; z-index:35; background:rgba(0,0,0,.55); }
  .content{ padding:1.2rem 1rem; max-width:none; }
  .card-table{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .card-table table.hyp-grid{ min-width:700px; }
}
@media (max-width:600px){
  h1{ font-size:1.45rem; }
  .hyp-form .col2, .hyp-form .col-narrow{ flex:1 1 100%; }
  input[type=text], input:not([type]), input[type=date], input[type=number],
  input[type=password], textarea, select{ font-size:16px; }
  .form-actions{ flex-wrap:wrap; }
  .form-actions .btn{ flex:1 1 auto; justify-content:center; }
  .page-head{ gap:.5rem; }
}
