/*
 * HEKCO 2.0 — дизайн-система «Диспетчерская».
 * Единственный файл стилей приложения. Правила:
 *  — цвет, отступ, радиус, шрифт берутся только из переменных --hk-*;
 *  — !important не используется (кроме .hk-sr);
 *  — статусы выводятся только через .hk-status[data-tone].
 */

@font-face { font-family: 'Onest'; src: url('../fonts/onest-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('../fonts/onest-cyrillic-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; src: url('../fonts/onest-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --hk-canvas: #F2F4F7; --hk-surface: #FFFFFF; --hk-surface-2: #F7F8FA; --hk-hover: #F3F5F9;
  --hk-line: #E3E7ED; --hk-line-strong: #CCD3DD;
  --hk-ink: #0E1726; --hk-ink-2: #334052; --hk-muted: #5B6677;
  --hk-accent: #2B54E8; --hk-accent-soft: #EAF0FF; --hk-accent-ink: #1E40C2;
  --hk-violet: #5B34C7; --hk-violet-soft: #EEE8FF;
  --hk-warn: #B93D0B; --hk-warn-soft: #FFF1E6;
  --hk-danger: #C21D1D; --hk-danger-soft: #FDECEC;
  --hk-ok: #0D7350; --hk-ok-soft: #E5F4EE;
  --hk-side: #0C1320; --hk-side-2: #1A2539; --hk-side-active: #1C2944; --hk-side-ink: #C5CEDC; --hk-side-muted: #8390A4;
  --hk-map-land: #E9ECE6;
  --hk-font: 'Onest', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --hk-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --hk-r-xs: 6px; --hk-r-sm: 8px; --hk-r-md: 10px; --hk-r-lg: 14px; --hk-r-xl: 20px;
  --hk-shadow: 0 1px 2px rgba(14,23,38,.05), 0 6px 20px rgba(14,23,38,.06);
  --hk-shadow-pop: 0 24px 64px rgba(8,13,22,.25);
  --hk-overlay: rgba(8,13,22,.48);
  --hk-side-w: 240px; --hk-top-h: 64px; --hk-content: 1320px;
  --hk-ctl: 38px; --hk-ctl-sm: 32px; --hk-row: 48px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --hk-canvas: #090E16; --hk-surface: #101826; --hk-surface-2: #0D1420; --hk-hover: #152033;
  --hk-line: #1E2A3B; --hk-line-strong: #2B394D;
  --hk-ink: #E6EBF3; --hk-ink-2: #B9C3D2; --hk-muted: #8E9AAC;
  --hk-accent: #7393FF; --hk-accent-soft: #16224A; --hk-accent-ink: #AFC2FF;
  --hk-violet: #B49CFF; --hk-violet-soft: #251B45;
  --hk-warn: #FF9F66; --hk-warn-soft: #2D1A0E;
  --hk-danger: #FF7B7B; --hk-danger-soft: #2D1313;
  --hk-ok: #4FD0A0; --hk-ok-soft: #0E2A21;
  --hk-side: #060A10; --hk-side-2: #162033;
  --hk-map-land: #141C29;
  --hk-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
:root[data-density="compact"] { --hk-row: 36px; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--hk-font); font-size: 15px; line-height: 1.5; color: var(--hk-ink); background: var(--hk-canvas); -webkit-font-smoothing: antialiased; }
a { color: var(--hk-accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
.hk-i { flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.hk-mono { font-family: var(--hk-mono); font-variant-numeric: tabular-nums; }
.hk-num { font-variant-numeric: tabular-nums; }
.hk-muted { color: var(--hk-muted); }
.hk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hk-h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.hk-h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.hk-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hk-muted); }
.hk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-spacer { flex: 1; }

/* ---------- Каркас ---------- */
.hk-app { display: flex; min-height: 100vh; }
.hk-side { flex: 0 0 var(--hk-side-w); width: var(--hk-side-w); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 12px 14px; background: var(--hk-side); color: var(--hk-side-ink); }
.hk-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.hk-brand a { font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: .02em; color: #FFFFFF; text-decoration: none; }
.hk-brand span { font-family: var(--hk-mono); font-size: 11px; color: var(--hk-side-muted); }
.hk-org { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: var(--hk-r-md); border: 1px solid #23304A; background: #111A2B; }
.hk-org__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #2B54E8; color: #FFFFFF; font-size: 12px; font-weight: 700; }
.hk-org__name { font-size: 13px; font-weight: 600; color: #FFFFFF; line-height: 1.25; }
.hk-org__sub { font-size: 11px; color: var(--hk-side-muted); }
.hk-nav { display: flex; flex-direction: column; gap: 2px; }
.hk-nav__title { padding: 4px 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hk-side-muted); }
.hk-nav__link { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--hk-r-sm); font-size: 14px; font-weight: 500; color: inherit; text-decoration: none; }
.hk-nav__link:hover { background: var(--hk-side-2); color: #FFFFFF; text-decoration: none; }
.hk-nav__link[aria-current="page"] { background: var(--hk-side-active); color: #FFFFFF; }
.hk-nav__link[aria-current="page"] .hk-i { color: #8FA8FF; }
.hk-nav__count { margin-left: auto; font-family: var(--hk-mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--hk-side-2); color: #AEB9CB; }
.hk-nav__count--hot { background: #2B54E8; color: #FFFFFF; }
.hk-nav__old { margin-left: auto; opacity: .45; }
/* Подменю (Документы → учредительные, приказы, журнал доверенностей) */
.hk-nav__grp { position: relative; display: flex; flex-direction: column; gap: 2px; }
.hk-nav__grp > .hk-nav__link { padding-right: 40px; }
.hk-nav__more { position: absolute; top: 3px; right: 4px; width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--hk-side-muted); cursor: pointer; }
.hk-nav__more:hover { background: var(--hk-side-2); color: #FFFFFF; }
.hk-nav__more:focus-visible { outline: 2px solid #8FA8FF; outline-offset: 1px; }
.hk-nav__more[aria-expanded="true"] .hk-nav__plus, .hk-nav__more[aria-expanded="false"] .hk-nav__minus { display: none; }
.hk-nav__plus, .hk-nav__minus { display: inline-grid; }
.hk-nav__sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 2px 18px; padding-left: 8px; border-left: 1px solid var(--hk-side-2); }
.hk-nav__sub[hidden] { display: none; }
.hk-nav__link--sub { min-height: 30px; font-size: 13px; }
/* Журнал доверенностей */
.hk-poa-new { margin-bottom: 14px; }
.hk-poa-new__sum { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.hk-poa-new__sum::-webkit-details-marker { display: none; }
.hk-poa-new .hk-poa-form { padding: 0 16px 16px; }
.hk-poa td { vertical-align: top; padding: 10px; border-bottom: 1px solid var(--hk-line); }
.hk-poa tr:last-child td { border-bottom: 0; }
.hk-poa--off td { color: var(--hk-muted); }
.hk-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #1C2638; padding-top: 10px; }
.hk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hk-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: var(--hk-top-h); padding: 12px 28px; background: var(--hk-surface); border-bottom: 1px solid var(--hk-line); }
.hk-search { flex: 1 1 320px; min-width: 0; max-width: 580px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); background: var(--hk-surface-2); color: var(--hk-muted); font-size: 14px; text-align: left; cursor: pointer; }
.hk-top > .hk-btn, .hk-top > .hk-menu { flex: none; }
@media (max-width: 600px) { .hk-search .hk-kbd { display: none; } .hk-top { gap: 6px; } .hk-top [data-theme-toggle] { display: none; } }
.hk-search span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-kbd { font-family: var(--hk-mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-xs); background: var(--hk-surface); color: var(--hk-muted); }
.hk-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #DCE5FF; color: #1E40C2; font-size: 12px; font-weight: 700; }
.hk-menu { position: relative; }
.hk-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: var(--hk-r-md); padding: 2px; }
.hk-menu > summary::-webkit-details-marker { display: none; }
.hk-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 260px; padding: 8px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); box-shadow: var(--hk-shadow-pop); }
.hk-menu__panel a, .hk-menu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--hk-r-sm); background: none; color: var(--hk-ink); font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.hk-menu__panel a:hover, .hk-menu__panel button:hover { background: var(--hk-hover); }
.hk-menu__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--hk-line); margin-bottom: 6px; }
.hk-content { width: 100%; max-width: var(--hk-content); padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 16px; }
.hk-content--wide { max-width: none; }
.hk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hk-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--hk-muted); }
.hk-crumbs a { color: var(--hk-muted); }
.hk-burger { display: none; }
@media (max-width: 991.98px) {
  .hk-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; }
  .hk-side[data-open="true"] { transform: none; box-shadow: var(--hk-shadow-pop); }
  .hk-app:has(.hk-side[data-open="true"])::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(8, 13, 24, .45); }
  .hk-burger { display: inline-flex; }
  .hk-top { padding: 10px 16px; }
  .hk-content { padding: 18px 16px 96px; }
  .hk-search .hk-kbd { display: none; }
}

/* ---------- Кнопки ---------- */
.hk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--hk-ctl); padding: 0 14px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line-strong); background: var(--hk-surface); color: var(--hk-ink); font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hk-btn:hover { background: var(--hk-hover); text-decoration: none; }
.hk-btn--primary { border-color: transparent; background: var(--hk-accent); color: #FFFFFF; font-weight: 600; }
.hk-btn--primary:hover { background: var(--hk-accent); filter: brightness(1.08); }
.hk-btn--danger { border-color: transparent; background: var(--hk-danger); color: #FFFFFF; font-weight: 600; }
.hk-btn--ghost { border-color: transparent; background: transparent; }
.hk-btn--text { border-color: transparent; background: transparent; color: var(--hk-accent-ink); font-weight: 600; padding: 0 6px; }
.hk-btn--sm { height: var(--hk-ctl-sm); padding: 0 10px; border-radius: var(--hk-r-sm); font-size: 13px; }
.hk-btn--icon { width: var(--hk-ctl); padding: 0; }
.hk-btn--sm.hk-btn--icon { width: var(--hk-ctl-sm); }
.hk-btn[disabled] { opacity: .5; pointer-events: none; }
@media (pointer: coarse) { .hk-btn { min-height: 44px; } }

/* ---------- Статусы, чипы ---------- */
.hk-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--hk-surface-2); color: var(--hk-ink-2); }
.hk-status[data-tone="ok"] { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-status[data-tone="info"] { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-status[data-tone="violet"] { background: var(--hk-violet-soft); color: var(--hk-violet); }
.hk-status[data-tone="warn"] { background: var(--hk-warn-soft); color: var(--hk-warn); }
.hk-status[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-status--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hk-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink-2); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.hk-chip:hover { text-decoration: none; background: var(--hk-hover); }
.hk-chip[aria-pressed="true"], .hk-chip[aria-current="true"] { background: var(--hk-ink); border-color: var(--hk-ink); color: var(--hk-surface); }
.hk-chip__n { font-family: var(--hk-mono); font-size: 11px; opacity: .75; }
.hk-filter { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 10px; border-radius: var(--hk-r-sm); background: var(--hk-accent-soft); color: var(--hk-accent-ink); font-size: 13px; font-weight: 500; }
.hk-filter a { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: inherit; }
.hk-code { font-family: var(--hk-mono); font-size: 13px; font-weight: 600; color: var(--hk-accent-ink); white-space: nowrap; }
.hk-tag { font-family: var(--hk-mono); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); color: var(--hk-ink-2); }
.hk-legacy-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--hk-muted); }

[hidden] { display: none !important; }

/* ---------- Карточки, вкладки ---------- */
.hk-card { background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); box-shadow: var(--hk-shadow); }
.hk-card--flat { box-shadow: none; }
.hk-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px 12px; }
.hk-card__body { padding: 0 18px 16px; }
.hk-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hk-line); flex-wrap: wrap; }
.hk-tab { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; margin-bottom: -1px; border: 0; background: transparent; color: var(--hk-muted); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.hk-tab:hover { color: var(--hk-ink); text-decoration: none; }
.hk-tab[aria-selected="true"], .hk-tab[aria-current="page"] { color: var(--hk-ink); box-shadow: inset 0 -2px 0 var(--hk-accent); }
.hk-tab__n { font-family: var(--hk-mono); font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--hk-surface-2); color: var(--hk-muted); }
.hk-tab[aria-current="page"] .hk-tab__n, .hk-tab[aria-selected="true"] .hk-tab__n { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-tabs-row { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--hk-line); }
.hk-tabs-row .hk-tabs { border-bottom: 0; flex: 1; min-width: 0; }
.hk-tabs-row .hk-seg { margin-bottom: 6px; flex: none; }
.hk-tabs-row .hk-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.hk-seg a { min-width: 34px; justify-content: center; }
@media (max-width: 720px) { .hk-tabs-row { flex-direction: column; align-items: stretch; } .hk-tabs-row .hk-seg { align-self: flex-start; } .hk-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.hk-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--hk-r-md); background: var(--hk-surface); border: 1px solid var(--hk-line); }
.hk-seg a, .hk-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 0; background: transparent; color: var(--hk-muted); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; }
.hk-seg [aria-current="true"], .hk-seg [aria-pressed="true"] { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }

/* ---------- Таблица ---------- */
.hk-table-wrap { overflow-x: auto; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); }
.hk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hk-table th { position: sticky; top: 0; z-index: 1; padding: 10px; text-align: left; font-size: 12px; font-weight: 600; color: var(--hk-muted); background: var(--hk-surface); border-bottom: 1px solid var(--hk-line); white-space: nowrap; }
.hk-table th a { color: inherit; }
.hk-table td { height: var(--hk-row); padding: 6px 10px; border-bottom: 1px solid var(--hk-line); vertical-align: middle; }
.hk-table tr:last-child td { border-bottom: 0; }
.hk-table th:first-child, .hk-table td:first-child { padding-left: 16px; }
.hk-table th:last-child, .hk-table td:last-child { padding-right: 16px; }
.hk-table tbody tr[data-href] { cursor: pointer; }
.hk-table tbody tr:hover { background: var(--hk-hover); }
.hk-table tbody tr[aria-selected="true"] { background: var(--hk-accent-soft); }
.hk-table__main { font-weight: 500; color: var(--hk-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.hk-table__sub { display: block; font-size: 12px; color: var(--hk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-table__cell-main { max-width: 440px; min-width: 240px; }
.hk-table__cell-main > * { max-width: 440px; }
.hk-bar { display: inline-flex; align-items: center; gap: 8px; }
.hk-bar__track { width: 56px; height: 6px; border-radius: 3px; background: var(--hk-line); overflow: hidden; }
.hk-bar__fill { display: block; height: 100%; border-radius: 3px; background: var(--hk-accent); }
.hk-bar__fill[data-tone="ok"] { background: var(--hk-ok); }
.hk-bar__fill[data-tone="warn"] { background: var(--hk-warn); }
.hk-bar__fill[data-tone="danger"] { background: var(--hk-danger); }
.hk-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--hk-line); font-size: 13px; color: var(--hk-muted); }

/* ---------- Формы ---------- */
.hk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hk-field > label, .hk-field__label { font-size: 13px; font-weight: 600; color: var(--hk-ink); }
.hk-field__req { color: var(--hk-danger); }
.hk-input, .hk-select, .hk-textarea { width: 100%; min-height: 40px; padding: 0 12px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line-strong); background: var(--hk-surface); color: var(--hk-ink); font-size: 14px; }
.hk-textarea { min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.hk-input:focus, .hk-select:focus, .hk-textarea:focus { outline: none; border-color: var(--hk-accent); box-shadow: 0 0 0 3px var(--hk-accent-soft); }
.hk-input[aria-invalid="true"], .hk-select[aria-invalid="true"] { border-color: var(--hk-danger); box-shadow: 0 0 0 3px var(--hk-danger-soft); }
.hk-field__hint { font-size: 12px; color: var(--hk-muted); }
.hk-field__error { font-size: 12px; color: var(--hk-danger); }
.hk-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.hk-form-grid .hk-field--wide { grid-column: 1 / -1; }
.hk-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.hk-switch input { width: 18px; height: 18px; accent-color: var(--hk-accent); }
.hk-form-actions { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px; background: var(--hk-surface); border-top: 1px solid var(--hk-line); border-radius: 0 0 var(--hk-r-lg) var(--hk-r-lg); }
.hk-search-input { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--hk-line); border-radius: 9px; background: var(--hk-surface); color: var(--hk-muted); }
.hk-search-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--hk-ink); }

/* ---------- Сообщения ---------- */
.hk-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--hk-surface-2); color: var(--hk-ink-2); border: 1px solid var(--hk-line); }
.hk-alert[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); border-color: transparent; }
.hk-alert[data-tone="warn"], .hk-alert[data-tone="warning"] { background: var(--hk-warn-soft); color: var(--hk-warn); border-color: transparent; }
.hk-alert[data-tone="ok"], .hk-alert[data-tone="success"] { background: var(--hk-ok-soft); color: var(--hk-ok); border-color: transparent; }
.hk-alert[data-tone="info"] { background: var(--hk-accent-soft); color: var(--hk-accent-ink); border-color: transparent; }
.hk-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border-radius: 12px; background: #0E1726; color: #FFFFFF; box-shadow: 0 12px 32px rgba(8,13,22,.3); font-size: 14px; max-width: calc(100% - 32px); }
.hk-toast[hidden] { display: none; }
.hk-toast button { height: 30px; padding: 0 10px; border-radius: var(--hk-r-sm); border: 0; background: #22304A; color: #FFFFFF; font-size: 13px; font-weight: 600; cursor: pointer; }
.hk-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; color: var(--hk-muted); }
.hk-empty strong { color: var(--hk-ink); font-size: 16px; }
.hk-progress { height: 6px; border-radius: 3px; background: var(--hk-line); overflow: hidden; }
.hk-progress > span { display: block; height: 100%; border-radius: 3px; background: var(--hk-accent); }

/* ---------- Быстрый просмотр ---------- */
.hk-peek { position: fixed; top: var(--hk-top-h); right: 0; bottom: 0; z-index: 45; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--hk-surface); border-left: 1px solid var(--hk-line); box-shadow: -16px 0 48px rgba(8,13,22,.16); }
.hk-peek[hidden] { display: none; }
.hk-peek__head { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 12px; border-bottom: 1px solid var(--hk-line); }
.hk-peek__body { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.hk-peek__foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hk-line); }
.hk-dl { margin: 0; display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 12px; font-size: 14px; }
.hk-dl dt { color: var(--hk-muted); }
.hk-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Командная строка ---------- */
.hk-cmdk { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: var(--hk-overlay); }
.hk-cmdk[hidden] { display: none; }
.hk-cmdk__box { width: 100%; max-width: 680px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: 16px; box-shadow: var(--hk-shadow-pop); overflow: hidden; }
.hk-cmdk__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hk-line); }
.hk-cmdk__input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--hk-ink); }
.hk-cmdk__list { max-height: min(60vh, 520px); overflow: auto; padding: 8px; }
.hk-cmdk__group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hk-muted); }
.hk-cmdk__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--hk-r-md); color: var(--hk-ink); text-decoration: none; cursor: pointer; }
.hk-cmdk__item:hover { text-decoration: none; }
.hk-cmdk__item[aria-selected="true"] { background: var(--hk-accent-soft); }
.hk-cmdk__item small { display: block; color: var(--hk-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-cmdk__text { flex: 1; min-width: 0; }
.hk-cmdk__title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-cmdk__item:hover:not([aria-selected="true"]) { background: var(--hk-hover); }
.hk-cmdk__foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--hk-line); background: var(--hk-surface-2); font-size: 12px; color: var(--hk-muted); }

/* ---------- Мой день ---------- */
.hk-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hk-hello h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.hk-brief { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.hk-brief__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-brief p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--hk-ink-2); text-wrap: pretty; }
.hk-cols { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.hk-cols > .hk-col-main { flex: 2 1 560px; min-width: 0; }
.hk-cols > .hk-col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hk-queue__item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-top: 1px solid var(--hk-line); }
.hk-queue__item:hover { background: var(--hk-hover); }
.hk-queue__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--hk-surface-2); color: var(--hk-ink-2); }
.hk-queue__icon[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-queue__icon[data-tone="warn"] { background: var(--hk-warn-soft); color: var(--hk-warn); }
.hk-queue__icon[data-tone="info"] { background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-queue__icon[data-tone="violet"] { background: var(--hk-violet-soft); color: var(--hk-violet); }
.hk-queue__icon[data-tone="ok"] { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-queue__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hk-queue__kind { font-size: 12px; font-weight: 600; color: var(--hk-muted); }
.hk-queue__title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--hk-ink); }
.hk-queue__sub { font-size: 13px; color: var(--hk-muted); line-height: 1.4; }
.hk-queue__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hk-week button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border-radius: var(--hk-r-md); border: 0; background: transparent; color: var(--hk-ink); cursor: pointer; }
.hk-week button[data-today="true"] { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-week button[aria-pressed="true"] { background: var(--hk-accent); color: #FFFFFF; }
.hk-week__dn { font-size: 11px; font-weight: 500; opacity: .8; }
.hk-week__n { font-family: var(--hk-mono); font-size: 16px; font-weight: 600; }
.hk-week__dots { display: flex; gap: 3px; height: 5px; }
.hk-week__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--hk-accent); }
.hk-week button[aria-pressed="true"] .hk-week__dots i { background: #FFFFFF; }
.hk-agenda__row { display: flex; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--hk-line); font-size: 14px; }
.hk-agenda__row[hidden] { display: none; }
.hk-ring { flex: none; position: relative; width: 64px; height: 64px; border-radius: 50%; }
.hk-ring span { position: absolute; inset: 7px; display: grid; place-items: center; border-radius: 50%; background: var(--hk-surface); font-family: var(--hk-mono); font-size: 15px; font-weight: 600; }
.hk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.hk-kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--hk-surface); border: 1px solid var(--hk-line); color: var(--hk-ink); text-decoration: none; }
.hk-kpi:hover { background: var(--hk-hover); text-decoration: none; }
.hk-kpi__label { display: flex; justify-content: space-between; font-size: 13px; color: var(--hk-muted); }
.hk-kpi__value { font-family: var(--hk-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.hk-kpi__note { font-size: 13px; font-weight: 500; }
.hk-kpi__note[data-tone="ok"] { color: var(--hk-ok); } .hk-kpi__note[data-tone="warn"] { color: var(--hk-warn); } .hk-kpi__note[data-tone="danger"] { color: var(--hk-danger); } .hk-kpi__note[data-tone="neutral"] { color: var(--hk-muted); }

/* ---------- Площадки ---------- */
.hk-split { display: flex; gap: 14px; align-items: flex-start; }
.hk-split > .hk-split__list { flex: 1 1 0; min-width: 0; }
.hk-split[data-mode="split"] .hk-col-opt { display: none; }
.hk-split[data-mode="split"] .hk-table__cell-main, .hk-split[data-mode="split"] .hk-table__cell-main > * { max-width: 320px; }
@media (max-width: 720px) {
  .hk-col-opt { display: none; }
  .hk-table--cards { display: block; }
  .hk-table--cards thead { display: none; }
  .hk-table--cards tbody { display: block; }
  .hk-table--cards tr { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; padding: 12px 16px; border-bottom: 1px solid var(--hk-line); }
  .hk-table--cards td { display: block; height: auto; padding: 0 !important; border: 0; min-width: 0; }
  .hk-table--cards .hk-c-check, .hk-table--cards .hk-col-opt { display: none; }
  .hk-table--cards .hk-c-code { grid-column: 1; grid-row: 1; }
  .hk-table--cards .hk-c-att { grid-column: 2; grid-row: 1; justify-self: end; }
  .hk-table--cards .hk-table__cell-main { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .hk-table--cards .hk-table__cell-main > * { max-width: none; }
  .hk-table--cards .hk-c-q { grid-column: 1 / -1; }
  .hk-table--cards .hk-bar__track { width: 120px; }
  .hk-split[data-mode="split"] .hk-split__map { display: none; }
  form.hk-row[role="search"] > .hk-search-input { flex: 1 1 100% !important; }
  form.hk-row[role="search"] > .hk-select { flex: 1 1 calc(50% - 8px); width: auto !important; max-width: none !important; min-width: 0; }
}
/* Карта рядом со списком: узкая колонка, прилипает к верху экрана и не растягивается по длине списка.
   isolation — чтобы слои карты не перекрывали шапку, меню и быстрый просмотр. */
.hk-split > .hk-split__map { flex: 0 0 clamp(340px, 30vw, 560px); min-width: 0; position: sticky; top: calc(var(--hk-top-h) + 12px); height: calc(100vh - var(--hk-top-h) - 24px); min-height: 420px; max-height: 760px; isolation: isolate; z-index: 0; border-radius: var(--hk-r-lg); overflow: hidden; border: 1px solid var(--hk-line); background: var(--hk-map-land); }
.hk-split[data-mode="map"] > .hk-split__map { flex: 1 1 auto; position: relative; top: auto; height: calc(100vh - 300px); max-height: none; }
/* На узком экране рядом со списком карта не помещается — она открывается кнопкой «Карта» */
@media (max-width: 1100px) { .hk-split[data-mode="split"] > .hk-split__map { display: none; } }
.hk-map { position: absolute; inset: 0; }
.hk-map-note { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--hk-surface); border: 1px solid var(--hk-line); box-shadow: var(--hk-shadow); font-size: 13px; }
.hk-pin { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 6px; border-radius: 12px; background: var(--hk-surface); border: 1px solid var(--hk-line); box-shadow: 0 2px 6px rgba(14,23,38,.2); font-family: var(--hk-mono); font-size: 11px; font-weight: 600; color: var(--hk-ink); white-space: nowrap; transform: translate(-50%, -100%); }
.hk-pin i { width: 8px; height: 8px; border-radius: 50%; background: var(--hk-ok); }
.hk-pin[data-tone="warn"] i { background: var(--hk-warn); } .hk-pin[data-tone="danger"] i { background: var(--hk-danger); }
.hk-pin[data-selected="true"] { background: var(--hk-accent); color: #FFFFFF; border-color: var(--hk-accent); }
.hk-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: var(--hk-r-md); background: #0E1726; color: #FFFFFF; font-size: 13px; }
.hk-bulk[hidden] { display: none; }
.hk-bulk .hk-btn { background: #22304A; border-color: transparent; color: #FFFFFF; }
.hk-check { width: 18px; height: 18px; accent-color: var(--hk-accent); cursor: pointer; }
.hk-site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 2px 16px; }
.hk-fieldv { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 9px; min-width: 0; }
.hk-fieldv span:first-child { font-size: 12px; color: var(--hk-muted); }
.hk-fieldv span:last-child { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.hk-fieldv--empty span:last-child { color: var(--hk-warn); font-weight: 500; }
.hk-check-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.hk-check-dot { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hk-line-strong); color: #FFFFFF; }
.hk-check-dot[data-ok="true"] { background: var(--hk-ok); border-color: var(--hk-ok); }
.hk-check-dot[data-part="true"] { border-color: var(--hk-warn); }
.hk-feed__row { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hk-line); font-size: 13px; }
.hk-feed__row:first-child { border-top: 0; }
.hk-minimap { position: relative; isolation: isolate; z-index: 0; height: 180px; border-radius: var(--hk-r-lg); overflow: hidden; border: 1px solid var(--hk-line); background: var(--hk-map-land); }

/* ---------- Вход ---------- */
.hk-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--hk-surface); }
.hk-login__side { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px; background: var(--hk-side); color: var(--hk-side-ink); }
.hk-login__side h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; color: #FFFFFF; }
.hk-login__side p { margin: 0; font-size: 16px; line-height: 1.55; max-width: 460px; }
.hk-login__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.hk-login__list li { display: flex; gap: 10px; align-items: flex-start; }
.hk-login__list .hk-i { color: #8FA8FF; margin-top: 2px; }
.hk-login__main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.hk-login__form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 860px) { .hk-login { grid-template-columns: 1fr; } .hk-login__side { padding: 28px 20px; } .hk-login__side h1 { font-size: 28px; } .hk-login__list { display: none; } }

/* ---------- Нижнее меню телефона ---------- */
.hk-tabbar { display: none; }
@media (max-width: 991.98px) {
  .hk-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--hk-surface); border-top: 1px solid var(--hk-line); }
  .hk-tabbar a, .hk-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 50px; border: 0; background: none; font-size: 11px; font-weight: 500; color: var(--hk-muted); text-decoration: none; cursor: pointer; }
  .hk-tabbar [aria-current="page"] { color: var(--hk-accent); }
  .hk-peek { top: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none; animation: none; } }
@media print { .hk-side, .hk-top, .hk-peek, .hk-toast, .hk-tabbar { display: none; } body { background: #FFFFFF; } }

/* ---------- Карта в тёмной теме ---------- */
.leaflet-container.hk-map, .leaflet-container.hk-minimap { background: var(--hk-map-land); font-family: var(--hk-font); }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
[data-theme="dark"] .leaflet-bar a { background: var(--hk-surface); color: var(--hk-ink); border-color: var(--hk-line); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(12, 19, 32, .75); color: var(--hk-muted); }
[data-theme="dark"] .leaflet-control-attribution a { color: var(--hk-ink-2); }

/* ---------- Диалог с фоновым обработчиком ---------- */
.hk-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); background: var(--hk-surface); color: var(--hk-ink); box-shadow: var(--hk-shadow-pop); }
.hk-dialog::backdrop { background: rgba(8, 13, 24, .5); }
.hk-dialog__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--hk-line); }
.hk-dialog__head > div { flex: 1; }
.hk-dialog__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hk-warn-soft, #FFF4DB); color: var(--hk-warn); flex: none; }
.hk-dialog__title { margin: 0; font-size: 18px; font-weight: 700; }
.hk-dialog__body { padding: 18px 20px 20px; }
.hk-dialog__lead { margin: 0 0 16px; font-size: 14px; color: var(--hk-ink-2); line-height: 1.5; }
.hk-dialog__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.hk-dialog .hk-alert { margin-top: 14px; }
.hk-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.hk-steps li { position: relative; padding-top: 12px; font-size: 12px; color: var(--hk-muted); text-align: center; }
.hk-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--hk-line); }
.hk-steps li[data-state="done"]::before { background: var(--hk-ok); }
.hk-steps li[data-state="now"] { color: var(--hk-ink); font-weight: 600; }
.hk-steps li[data-state="now"]::before { background: var(--hk-accent); animation: hk-pulse 1.4s ease-in-out infinite; }
.hk-progress { height: 8px; margin-top: 8px; border-radius: 4px; background: var(--hk-line); overflow: hidden; }
.hk-progress > span { display: block; height: 100%; border-radius: 4px; background: var(--hk-accent); transition: width .4s ease; }
.hk-progress[data-tone="ok"] > span { background: var(--hk-ok); }
.hk-progress[data-tone="warn"] > span { background: var(--hk-warn); }
.hk-progress[data-tone="danger"] > span { background: var(--hk-danger); }
.hk-codebox { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 14px; border-radius: var(--hk-r-md); background: var(--hk-warn-soft, #FFF4DB); border: 1px solid color-mix(in srgb, var(--hk-warn) 35%, transparent); }
.hk-codebox__label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.hk-codebox__input { flex: 1; font-family: var(--hk-mono); font-size: 22px; letter-spacing: .3em; text-align: center; min-height: 48px; }
.hk-worker-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; flex: none; }
.hk-worker-pill[aria-busy="true"] .hk-i { animation: hk-spin 1.2s linear infinite; }
.hk-worker-pill[data-tone="warn"] { background: var(--hk-warn); border-color: var(--hk-warn); color: var(--hk-surface); animation: hk-pulse 1.4s ease-in-out infinite; }
.hk-worker-pill[data-tone="ok"] { color: var(--hk-ok); }
.hk-worker-pill[data-tone="danger"] { color: var(--hk-danger); }
@keyframes hk-spin { to { transform: rotate(360deg); } }
@keyframes hk-pulse { 50% { opacity: .55; } }
@media (max-width: 600px) { .hk-worker-pill span { display: none; } .hk-worker-pill { width: 36px; padding: 0; justify-content: center; } .hk-steps li { font-size: 0; } }

/* ---------- Задачи ---------- */
.hk-avatar--sm { width: 26px; height: 26px; font-size: 11px; flex: none; }
[data-theme="dark"] .hk-avatar { background: #22325A; color: #C9D6FF; }
.hk-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 220px; }
.hk-person__name { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-person__role { display: block; font-size: 12px; color: var(--hk-muted); }
.hk-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--hk-muted); }
.hk-dot[data-tone="danger"] { background: var(--hk-danger); }
.hk-dot[data-tone="warn"] { background: var(--hk-warn); }
.hk-tab__n[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-table--tasks tr[data-mine="true"] td:first-child { box-shadow: inset 3px 0 0 var(--hk-accent); }
.hk-btn--risk { color: var(--hk-danger); }
.hk-btn--risk:hover { background: var(--hk-danger-soft); }
.hk-empty__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--hk-ok-soft); color: var(--hk-ok); }

/* Кнопка с вопросом (причина, результат) */
.hk-act { position: relative; display: inline-flex; }
.hk-act > summary { list-style: none; }
.hk-act > summary::-webkit-details-marker { display: none; }
.hk-act__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); box-shadow: var(--hk-shadow-pop); font-size: 13px; font-weight: 600; text-align: left; }
.hk-callout .hk-act__pop { left: 0; right: auto; }

/* Плашка «что сейчас» */
.hk-callout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--hk-r-lg); background: var(--hk-surface); border: 1px solid var(--hk-line); }
.hk-callout--mine { background: var(--hk-accent-soft); border-color: color-mix(in srgb, var(--hk-accent) 35%, transparent); }
.hk-callout__text { font-size: 15px; }

/* Маршрут */
.hk-route { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.hk-route li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 22px 0 0; min-width: 0; }
.hk-route li::before { content: ""; position: absolute; left: 22px; right: -8px; top: 10px; height: 2px; background: var(--hk-line); }
.hk-route li:last-child::before { display: none; }
.hk-route li[data-state="done"]::before { background: var(--hk-ok); }
.hk-route__dot { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hk-line-strong); background: var(--hk-surface); color: #FFFFFF; }
.hk-route li[data-state="done"] .hk-route__dot { background: var(--hk-ok); border-color: var(--hk-ok); }
.hk-route li[data-state="now"] .hk-route__dot { border-color: var(--hk-accent); box-shadow: 0 0 0 4px var(--hk-accent-soft); }
.hk-route li[data-state="now"] .hk-route__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hk-accent); }
.hk-route__label { font-size: 12px; color: var(--hk-muted); }
.hk-route li[data-state="now"] .hk-route__label { color: var(--hk-accent-ink); font-weight: 600; }
.hk-route__name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-route--compact li { padding-top: 20px; }
.hk-route--compact .hk-route__name { font-size: 12px; }
.hk-route--compact .hk-route__dot { width: 18px; height: 18px; }
.hk-route--compact li::before { left: 18px; top: 8px; }

.hk-prose { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }

/* Файлы */
.hk-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); color: var(--hk-ink); text-decoration: none; }
.hk-file + .hk-file { margin-top: 8px; }
a.hk-file:hover { background: var(--hk-hover); text-decoration: none; }
.hk-file__ext { flex: none; display: grid; place-items: center; min-width: 42px; height: 30px; padding: 0 6px; border-radius: 6px; background: var(--hk-accent-soft); color: var(--hk-accent-ink); font-family: var(--hk-mono); font-size: 11px; font-weight: 700; }
.hk-file__name { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.hk-file--static { flex-wrap: wrap; }
.hk-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 1.5px dashed var(--hk-line-strong); border-radius: var(--hk-r-lg); background: var(--hk-surface-2); color: var(--hk-ink-2); text-align: center; cursor: pointer; }
.hk-drop:hover, .hk-drop[data-over="true"], .hk-drop:focus-within { border-color: var(--hk-accent); background: var(--hk-accent-soft); }
.hk-drop__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hk-drop__list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); font-size: 14px; }
.hk-drop__list li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Ход работы */
.hk-comment-form { display: flex; align-items: flex-start; gap: 10px; }
.hk-comment-form textarea { flex: 1; min-height: 44px; }
.hk-timeline { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.hk-timeline__item { display: flex; gap: 10px; }
.hk-timeline__mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #DCE5FF; color: #1E40C2; font-size: 12px; font-weight: 700; }
[data-theme="dark"] .hk-timeline__mark { background: #22325A; color: #C9D6FF; }
.hk-timeline__item--sys .hk-timeline__mark { background: var(--hk-surface-2); color: var(--hk-muted); border: 1px solid var(--hk-line); }
.hk-timeline__meta { font-size: 13px; color: var(--hk-muted); }
.hk-timeline__meta strong { color: var(--hk-ink); font-weight: 600; }
.hk-timeline__text { margin-top: 2px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.hk-timeline__item--sys .hk-timeline__text { color: var(--hk-ink-2); }
.hk-timeline__item:not(.hk-timeline__item--sys) .hk-timeline__text { padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: var(--hk-surface); border: 1px solid var(--hk-line); }

/* Выбор маршрута */
.hk-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.hk-choice__item { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); cursor: pointer; }
.hk-choice__item > span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--hk-muted); }
.hk-choice__item strong { font-size: 14px; color: var(--hk-ink); }
.hk-choice__item input { margin-top: 2px; accent-color: var(--hk-accent); }
.hk-choice__item:has(input:checked) { border-color: var(--hk-accent); background: var(--hk-accent-soft); }
.hk-choice:disabled .hk-choice__item { cursor: default; opacity: .7; }
.hk-chip--xs { height: 26px; padding: 0 9px; font-size: 12px; }

/* Доска */
.hk-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.hk-board__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border-radius: var(--hk-r-lg); background: var(--hk-surface-2); border: 1px solid var(--hk-line); }
.hk-board__head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; font-size: 13px; font-weight: 600; }
.hk-board__list { display: flex; flex-direction: column; gap: 8px; }
.hk-board__empty { padding: 14px; font-size: 13px; color: var(--hk-muted); text-align: center; }
.hk-tcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--hk-r-md); background: var(--hk-surface); border: 1px solid var(--hk-line); cursor: pointer; }
.hk-tcard:hover, .hk-tcard[aria-selected="true"] { border-color: var(--hk-accent); }
.hk-tcard--mine { box-shadow: inset 3px 0 0 var(--hk-accent); }
.hk-tcard__title { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) {
  .hk-route { grid-auto-flow: row; }
  .hk-route li { padding: 0 0 0 32px; min-height: 30px; }
  .hk-route li::before { left: 10px; right: auto; top: 24px; bottom: -8px; width: 2px; height: auto; }
  .hk-table--tasks .hk-c-due { grid-column: 1; }
  .hk-table--tasks .hk-c-act { grid-column: 2; justify-self: end; }
  .hk-comment-form .hk-avatar { display: none; }
  .hk-comment-form { flex-direction: column; align-items: stretch; }
  .hk-board { grid-auto-columns: 85%; }
}

/* ---------- Письма ---------- */
.hk-dir { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.hk-dir[data-dir="incoming"] { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-dir[data-dir="outgoing"] { background: var(--hk-violet-soft); color: var(--hk-violet); }
.hk-table--letters .hk-c-code { white-space: nowrap; }
.hk-table--letters .hk-c-code .hk-dir { padding: 0 5px; margin-right: 4px; }
.hk-seg__opt { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 7px; color: var(--hk-muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.hk-seg input:checked + .hk-seg__opt { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-seg input:focus-visible + .hk-seg__opt { outline: 2px solid var(--hk-accent); outline-offset: 1px; }
.hk-seg input:disabled + .hk-seg__opt { cursor: default; }
.hk-picker { display: flex; flex-direction: column; gap: 8px; }
.hk-picker__list { display: flex; flex-direction: column; max-height: 240px; overflow: auto; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); }
.hk-picker__item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 12px; border-bottom: 1px solid var(--hk-line); cursor: pointer; }
.hk-picker__item:last-child { border-bottom: 0; }
.hk-picker__item:hover { background: var(--hk-hover); }
.hk-picker__item[data-on="true"] { background: var(--hk-accent-soft); }
.hk-picker__item input { accent-color: var(--hk-accent); flex: none; }
.hk-thread { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hk-line); color: var(--hk-ink); text-decoration: none; font-size: 14px; }
.hk-thread:first-child { border-top: 0; }
.hk-thread:hover { text-decoration: none; color: var(--hk-accent-ink); }
@media (max-width: 720px) { .hk-table--letters .hk-c-due { grid-column: 1; } }

.hk-file a { text-decoration: none; }
@media (max-width: 720px), (pointer: coarse) { .hk-keys { display: none; } }
@media (max-width: 720px) { .hk-table--contracts .hk-c-due, .hk-table--cps .hk-c-due { grid-column: 1 / -1; } }
@media (max-width: 720px) { .hk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; } .hk-kpi { padding: 10px 12px; } .hk-kpi__value { font-size: 20px !important; } .hk-kpi .hk-muted { display: none; } }

/* ---------- Энергоучёт ---------- */
.hk-ebars { display: flex; align-items: stretch; gap: 6px; padding: 14px 16px 10px; position: relative; }
.hk-ebar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--hk-muted); text-decoration: none; border-radius: 8px; padding: 4px 0; }
a.hk-ebar:hover { background: var(--hk-hover); text-decoration: none; }
.hk-ebar__v { font: 500 11px/1 var(--hk-mono); min-height: 11px; white-space: nowrap; }
.hk-ebar__col { width: 100%; max-width: 34px; height: 120px; display: flex; align-items: flex-end; }
.hk-ebar__col i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--hk-accent) 32%, transparent); }
.hk-ebar.is-on .hk-ebar__col i { background: var(--hk-accent); }
.hk-ebar.is-on { color: var(--hk-ink); font-weight: 600; }
.hk-ebar.is-empty .hk-ebar__col { border-bottom: 2px dashed var(--hk-line); }
.hk-ebar__m { font-size: 12px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.hk-ebar__m b { font-size: 10px; font-weight: 500; color: var(--hk-muted); }
.hk-ebars__unit { position: absolute; top: 8px; right: 12px; font-size: 11px; color: var(--hk-muted); }
.hk-ebars--mini { padding: 0; gap: 3px; }
.hk-ebars--mini .hk-ebar__col { height: 64px; }
.hk-ebars--mini .hk-ebar__m { font-size: 10px; }
.hk-spark rect { fill: color-mix(in srgb, var(--hk-accent) 30%, transparent); }
.hk-spark rect.is-on { fill: var(--hk-accent); }
.hk-delta { font: 600 13px/1 var(--hk-mono); white-space: nowrap; }
.hk-delta[data-tone="danger"] { color: var(--hk-danger); } .hk-delta[data-tone="warn"] { color: var(--hk-warn); } .hk-delta[data-tone="neutral"] { color: var(--hk-muted); }
.hk-table--mini { font-size: 13px; }
.hk-table--mini th, .hk-table--mini td { height: auto; padding: 6px 8px; }
.hk-table--mini tr.hk-sep td { border-top: 1px solid var(--hk-line); }
.hk-c-err { max-width: 280px; white-space: normal; }
@media (max-width: 720px) {
  .hk-ebars { gap: 2px; padding: 12px 8px 8px; overflow-x: auto; }
  .hk-ebar { min-width: 22px; }
  .hk-ebar__v { display: none; }
  .hk-ebar__col { height: 90px; }
  .hk-table--cards .hk-c-kwh { grid-column: 1; text-align: left !important; }
  .hk-table--cards .hk-c-delta { grid-column: 2; justify-self: end; }
  .hk-c-err { max-width: none; }
}

/* ---------- Форма договора ---------- */
.hk-typecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 8px; }
.hk-typecard { display: flex; cursor: pointer; }
.hk-typecard__in { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); background: var(--hk-surface); transition: border-color .12s, background .12s; }
.hk-typecard__in strong { font-size: 14px; font-weight: 600; }
.hk-typecard__in span { font-size: 12px; color: var(--hk-muted); line-height: 1.35; }
.hk-typecard:hover .hk-typecard__in { background: var(--hk-hover); }
.hk-typecard input:checked + .hk-typecard__in { border-color: var(--hk-accent); background: var(--hk-accent-soft); box-shadow: inset 0 0 0 1px var(--hk-accent); }
.hk-typecard input:focus-visible + .hk-typecard__in { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
.hk-lines { display: flex; flex-direction: column; gap: 8px; }
.hk-line { display: grid; grid-template-columns: 110px minmax(160px, 1.6fr) 110px 120px 140px 140px 140px 36px; gap: 6px; align-items: center; }
.hk-line .hk-select, .hk-line .hk-input { min-height: 36px; font-size: 13px; padding-left: 8px; padding-right: 8px; width: 100%; min-width: 0; }
.hk-form-actions__note { margin-right: auto; align-self: center; font-size: 13px; }
.hk-form-actions__note[data-ok="1"] { color: var(--hk-ok); }
@media (max-width: 1180px) { .hk-line { grid-template-columns: 1fr 1fr 1fr; padding: 10px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); } .hk-line [data-line-del] { justify-self: end; } }
@media (max-width: 720px) { .hk-line { grid-template-columns: 1fr 1fr; } .hk-form-actions__note { flex-basis: 100%; } }
.hk-filepick { position: relative; max-width: 100%; }
.hk-filepick [data-filepick-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.hk-filepick:focus-within { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
@media (max-width: 720px) { .hk-typecards { grid-template-columns: 1fr 1fr; gap: 6px; } .hk-typecard__in { padding: 8px 10px; } .hk-typecard__in span { display: none; } .hk-typecard__in strong { font-size: 13px; } }

/* ---------- Карточка рядом со списком (вместо карты) ---------- */
.hk-split__card { flex: 0 0 clamp(420px, 34vw, 620px); min-width: 0; position: sticky; top: calc(var(--hk-top-h) + 12px); height: calc(100vh - var(--hk-top-h) - 24px); min-height: 420px; display: flex; flex-direction: column; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); overflow: hidden; box-shadow: var(--hk-shadow); }
.hk-split__card[aria-busy="true"] .hk-peek__body { opacity: .55; transition: opacity .1s; }
.hk-split[data-card="open"] > .hk-split__map { display: none; }
.hk-split[data-card="open"] .hk-col-opt { display: none; }
.hk-split[data-card="open"] .hk-table__cell-main, .hk-split[data-card="open"] .hk-table__cell-main > * { max-width: 420px; }
.hk-split tr[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--hk-accent); }
@media (max-width: 1100px) { .hk-split__card { display: none !important; } }
.hk-peek__title { font-size: 18px; line-height: 1.3; }
.hk-peek__map { height: 180px; border-radius: var(--hk-r-md); overflow: hidden; border: 1px solid var(--hk-line); isolation: isolate; background: var(--hk-map-land); }
.hk-peek__nomap { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--hk-r-md); background: var(--hk-warn-soft); color: var(--hk-warn); font-size: 13px; }
.hk-peek__nomap a { margin-left: auto; font-weight: 600; }
.hk-peek__fill { display: flex; flex-direction: column; gap: 8px; }
.hk-peek__body > section { display: flex; flex-direction: column; gap: 14px; }
.hk-peek__body > section[hidden] { display: none; }
.hk-tag[data-tone="warn"] { background: var(--hk-warn-soft); color: var(--hk-warn); border-color: transparent; font-family: inherit; font-weight: 500; }
.hk-peek__fill .hk-tag { font-family: inherit; font-weight: 500; font-size: 12px; }
.hk-ptabs { display: flex; gap: 2px; margin: 8px -16px -12px; padding: 0 12px; border-top: 1px solid var(--hk-line); overflow-x: auto; scrollbar-width: none; }
.hk-ptab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 8px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--hk-muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.hk-ptab:hover { color: var(--hk-ink); }
.hk-ptab[aria-selected="true"] { color: var(--hk-ink); border-bottom-color: var(--hk-accent); }
.hk-prow { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); color: var(--hk-ink); text-decoration: none; }
a.hk-prow:hover { background: var(--hk-hover); text-decoration: none; }
.hk-prow__main { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hk-copy { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.hk-copy:hover { color: var(--hk-accent); }

/* ---------- Поле выбора с поиском ---------- */
.hk-combo { position: relative; display: flex; flex-direction: column; min-width: 0; }
.hk-combo__input { padding-right: 34px; text-overflow: ellipsis; }
.hk-combo__input[aria-expanded="true"] { border-color: var(--hk-accent); }
.hk-combo__clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--hk-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.hk-combo__clear:hover { background: var(--hk-hover); color: var(--hk-ink); }
.hk-combo__list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); box-shadow: var(--hk-shadow); min-width: min(360px, 90vw); }
.hk-combo__list li[role="option"] { padding: 8px 10px; border-radius: 6px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.hk-combo__list li[aria-selected="true"] { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-combo__list li[data-current="true"]::after { content: ' ✓'; color: var(--hk-accent); }
.hk-combo__list li[aria-disabled="true"] { color: var(--hk-muted); cursor: not-allowed; }
.hk-combo__list mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.hk-combo__none { padding: 8px 10px; font-size: 13px; color: var(--hk-muted); }
.hk-combo:focus-within { z-index: 70; }
.hk-combo--up .hk-combo__list { top: auto; bottom: calc(100% + 4px); }

/* ---------- Обращения операторов ---------- */
.hk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hk-chip-radio { display: inline-flex; cursor: pointer; }
.hk-chip-radio span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hk-line); background: var(--hk-surface); font-size: 13px; font-weight: 500; color: var(--hk-ink-2); }
.hk-chip-radio:hover span { background: var(--hk-hover); }
.hk-chip-radio input:checked + span { background: var(--hk-accent-soft); border-color: var(--hk-accent); color: var(--hk-accent-ink); box-shadow: inset 0 0 0 1px var(--hk-accent); }
.hk-chip-radio input:focus-visible + span { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
.hk-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-flag { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line); background: var(--hk-surface); font: inherit; font-size: 14px; color: var(--hk-ink); cursor: pointer; }
.hk-flag:hover { background: var(--hk-hover); }
.hk-flag[aria-pressed="true"] { border-color: var(--hk-ok); background: var(--hk-ok-soft); }

/* ---------- Сотрудники ---------- */
.hk-table--people .hk-person { max-width: none; gap: 10px; }
.hk-avatar--lg { width: 56px; height: 56px; font-size: 19px; flex: none; }
.hk-deadline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, auto); gap: 6px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hk-line); }
.hk-deadline:last-of-type { border-bottom: 0; }
.hk-deadline__label { font-size: 14px; font-weight: 500; }
.hk-deadline__date { font-size: 14px; white-space: nowrap; }
.hk-deadline__state { justify-self: end; }
.hk-dismiss > summary { list-style: none; cursor: pointer; }
.hk-dismiss > summary::-webkit-details-marker { display: none; }
.hk-dismiss[open] > summary { border-radius: var(--hk-r-lg) var(--hk-r-lg) 0 0; }
@media (max-width: 720px) { .hk-deadline { grid-template-columns: 1fr auto; } .hk-deadline__state { grid-column: 1 / -1; justify-self: start; } }
.hk-head > .hk-person { max-width: none; flex: 1 1 auto; }

/* ---------- Судебные дела ---------- */
.hk-jc-stages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 12px 14px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); background: var(--hk-surface); }
.hk-jc-stage { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 0; font-size: 13px; color: var(--hk-muted); white-space: nowrap; }
.hk-jc-stage + .hk-jc-stage::before { content: ""; width: 18px; height: 1.5px; margin-right: 12px; background: var(--hk-line-strong); }
.hk-jc-stage i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--hk-line-strong); background: var(--hk-surface); flex: none; }
.hk-jc-stage[data-state="done"] { color: var(--hk-ink-2); }
.hk-jc-stage[data-state="done"] i { background: var(--hk-ok); border-color: var(--hk-ok); }
.hk-jc-stage[data-state="on"] { color: var(--hk-ink); font-weight: 600; }
.hk-jc-stage[data-state="on"] i { background: var(--hk-accent); border-color: var(--hk-accent); box-shadow: 0 0 0 3px var(--hk-accent-soft); }
.hk-jc-form { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--hk-line); }
.hk-jc-form .hk-filter { align-self: flex-start; }
.hk-filter button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.hk-filter button:hover, .hk-filter a:hover { background: rgba(0, 0, 0, .06); }
.hk-drop--sm { flex-direction: row; justify-content: center; padding: 10px 14px; font-size: 13px; }
.hk-jc-comment { display: flex; flex-direction: column; gap: 6px; padding-left: calc(var(--depth, 0) * 0px); }
.hk-jc-comment .hk-jc-comment { margin-top: 6px; padding-left: 14px; border-left: 2px solid var(--hk-line); }
.hk-jc-comment__text { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; padding-left: 34px; }
.hk-jc-comment > .hk-row:not(:first-child), .hk-jc-comment > [data-reply] { margin-left: 34px; }
.hk-chip__x { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.hk-chip__x:hover { background: var(--hk-hover); }
.hk-library { width: min(680px, calc(100vw - 32px)); }
.hk-library .hk-dialog__head h2 { flex: 1; margin: 0; }
.hk-library[open] { display: flex; flex-direction: column; }
.hk-library .hk-dialog__body { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; padding-bottom: 0; }
.hk-library__list { display: flex; flex-direction: column; gap: 2px; min-height: 120px; max-height: min(52vh, 460px); overflow: auto; margin: 0 -8px; padding: 0 8px; }
.hk-library__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: var(--hk-r-md); cursor: pointer; }
.hk-library__item:hover { background: var(--hk-hover); }
.hk-library__item input { margin-top: 3px; flex: none; }
.hk-library__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.hk-library__body strong { font-weight: 500; overflow-wrap: anywhere; }
.hk-library__body .hk-muted { font-size: 12px; }
.hk-library .hk-dialog__foot { margin: 0; padding: 14px 20px; border-top: 1px solid var(--hk-line); flex-wrap: wrap; }
@media (max-width: 720px) { .hk-jc-stages { overflow-x: auto; flex-wrap: nowrap; } .hk-jc-comment__text, .hk-jc-comment > .hk-row:not(:first-child), .hk-jc-comment > [data-reply] { margin-left: 0; padding-left: 0; } }

/* ---------- Настройки ---------- */
.hk-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hk-set-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); background: var(--hk-surface); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.hk-set-tile:hover { text-decoration: none; border-color: var(--hk-accent); box-shadow: 0 0 0 3px var(--hk-accent-soft); }
.hk-set-tile strong { font-size: 16px; }
.hk-set-tile .hk-muted { font-size: 13px; line-height: 1.45; }
.hk-set-tile__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px; background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-set-tile__n { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--hk-ink-2); }
.hk-set-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: var(--hk-r-md); color: inherit; text-decoration: none; }
.hk-set-link:hover { background: var(--hk-hover); text-decoration: none; }
.hk-set-link > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hk-set-link .hk-muted { font-size: 13px; }
.hk-set-more { border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); padding: 10px 14px; }
.hk-set-more > summary { cursor: pointer; font-size: 14px; font-weight: 500; }
.hk-set-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.hk-set-role { display: flex; cursor: pointer; }
.hk-set-role > span { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 14px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); background: var(--hk-surface); }
.hk-set-role strong { font-size: 14px; }
.hk-set-role .hk-muted { font-size: 12px; line-height: 1.4; }
.hk-set-role:hover > span { background: var(--hk-hover); }
.hk-set-role input:checked + span { border-color: var(--hk-accent); background: var(--hk-accent-soft); box-shadow: inset 0 0 0 1px var(--hk-accent); }
.hk-set-role input:focus-visible + span { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
.hk-set-role input:disabled + span { opacity: .5; cursor: not-allowed; }
.hk-levels { display: flex; flex-direction: column; }
.hk-levels__row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 8px 10px; margin: 0 -10px; border-bottom: 1px solid var(--hk-line); border-radius: var(--hk-r-sm); }
.hk-levels__row:last-child { border-bottom: 0; }
.hk-levels__row[data-own] { background: var(--hk-warn-soft); }
.hk-levels__row[data-off] .hk-levels__name > :first-child, .hk-levels__row[data-off] .hk-levels__name { color: var(--hk-muted); }
.hk-levels__name { display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 500; min-width: 160px; }
.hk-levels__name .hk-muted { font-size: 12px; font-weight: 400; }
.hk-seg--sm { flex-wrap: wrap; }
.hk-seg--sm label { display: inline-flex; }
.hk-seg--sm .hk-seg__opt { height: 28px; padding: 0 10px; font-size: 13px; }
.hk-lvl { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; background: none; }
.hk-lvl[data-l="none"] { width: 10px; height: 2px; border-radius: 1px; background: var(--hk-line-strong); }
.hk-lvl[data-l="view"] { border: 2px solid var(--hk-accent); }
.hk-lvl[data-l="edit"] { border: 2px solid var(--hk-accent); background: conic-gradient(var(--hk-accent) 0 50%, transparent 50% 100%); }
.hk-lvl[data-l="full"] { background: var(--hk-accent); }
.hk-matrix-wrap { overflow-x: auto; min-width: 0; max-width: 100%; }
.hk-matrix th, .hk-matrix td { text-align: center; padding: 10px 8px; position: relative; }
.hk-matrix thead th:not(.hk-matrix__role) { vertical-align: bottom; font-size: 12px; line-height: 1.25; min-width: 74px; white-space: normal; }
.hk-matrix .hk-matrix__role { text-align: left; min-width: 220px; position: sticky; left: 0; background: var(--hk-surface); z-index: 1; font-weight: 400; }
.hk-matrix [data-off] { opacity: .45; }
.hk-matrix tbody tr { cursor: pointer; }
.hk-matrix tbody tr:hover .hk-matrix__role, .hk-matrix tbody tr:hover td { background: var(--hk-hover); }
.hk-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.hk-module { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); cursor: pointer; }
.hk-module input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--hk-accent); flex: none; }
.hk-module > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hk-module .hk-muted { font-size: 12px; }
.hk-module:not([data-off]) { border-color: color-mix(in srgb, var(--hk-ok) 45%, var(--hk-line)); }
.hk-module[data-off] { background: var(--hk-surface-2); }
.hk-module:has(input:disabled) { cursor: default; }
@media (max-width: 720px) { .hk-levels__row { flex-direction: column; align-items: stretch; } .hk-matrix .hk-matrix__role { min-width: 160px; } }

/* ---------- Выездные задачи (АВР) ---------- */
.hk-tabbar a { position: relative; }
.hk-tabbar__n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--hk-danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.hk-btn--lg { height: 46px; padding: 0 18px; font-size: 15px; }
.hk-avr { display: flex; flex-direction: column; gap: 16px; }
.hk-avr-shiftbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); background: var(--hk-warn-soft); color: inherit; text-decoration: none; }
.hk-avr-shiftbar[data-open] { background: var(--hk-ok-soft); }
.hk-avr-shiftbar:hover { text-decoration: none; border-color: var(--hk-line-strong); }
.hk-avr-shiftbar > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hk-avr-shiftbar .hk-muted { font-size: 12px; }
.hk-avr-shiftbar__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--hk-surface); flex: none; }
.hk-avr-buckets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hk-avr-bucket { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--hk-line); border-left: 4px solid var(--b); border-radius: var(--hk-r-md); background: var(--hk-surface); color: inherit; text-decoration: none; }
.hk-avr-bucket:hover { text-decoration: none; background: var(--hk-hover); }
.hk-avr-bucket[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--b); }
.hk-avr-bucket strong { font-size: 22px; line-height: 1.1; }
.hk-avr-bucket span { font-size: 12px; color: var(--hk-muted); }
[data-b="red"] { --b: var(--hk-danger); } [data-b="orange"] { --b: var(--hk-warn); } [data-b="green"] { --b: var(--hk-ok); }
.hk-avr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.hk-avr-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--hk-line); border-left: 4px solid var(--b); border-radius: var(--hk-r-md); background: var(--hk-surface); color: inherit; text-decoration: none; }
.hk-avr-card:hover { text-decoration: none; border-color: var(--hk-line-strong); border-left-color: var(--b); box-shadow: var(--hk-shadow-pop, 0 4px 14px rgba(0,0,0,.06)); }
.hk-avr-card__title { font-size: 15px; line-height: 1.35; }
.hk-avr-steps { display: flex; gap: 0; margin: 0; padding: 12px 14px; list-style: none; border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); background: var(--hk-surface); overflow-x: auto; }
.hk-avr-steps li { display: inline-flex; align-items: center; gap: 7px; padding-right: 12px; font-size: 13px; color: var(--hk-muted); white-space: nowrap; }
.hk-avr-steps li + li::before { content: ""; width: 18px; height: 1.5px; margin-right: 12px; background: var(--hk-line-strong); }
.hk-avr-steps i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--hk-line-strong); flex: none; }
.hk-avr-steps [data-state="done"] { color: var(--hk-ink-2); } .hk-avr-steps [data-state="done"] i { background: var(--hk-ok); border-color: var(--hk-ok); }
.hk-avr-steps [data-state="on"] { color: var(--hk-ink); font-weight: 600; } .hk-avr-steps [data-state="on"] i { background: var(--hk-accent); border-color: var(--hk-accent); box-shadow: 0 0 0 3px var(--hk-accent-soft); }
.hk-avr-action { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--hk-accent); border-radius: var(--hk-r-lg); background: var(--hk-accent-soft); }
.hk-avr-action > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; flex: 1 1 260px; }
.hk-avr-action .hk-muted { font-size: 13px; }
.hk-avr-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.hk-avr-media a, .hk-avr-media video { display: block; aspect-ratio: 4 / 3; border-radius: var(--hk-r-md); overflow: hidden; background: var(--hk-surface-2); border: 1px solid var(--hk-line); }
.hk-avr-media img, .hk-avr-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hk-avr-pick label.hk-btn { cursor: pointer; }
.hk-avr-site { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); font-size: 14px; }
.hk-avr-more > summary { list-style: none; cursor: pointer; }
.hk-avr-more > summary::-webkit-details-marker { display: none; }
.hk-avr-check { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.hk-avr-check li::before { content: "○"; display: inline-block; width: 18px; color: var(--hk-muted); }
.hk-avr-check li[data-ok="1"]::before { content: "✓"; color: var(--hk-ok); font-weight: 700; }
.hk-avr-check li[data-ok="0"] { color: var(--hk-warn); }
.hk-avr-preview { max-width: 220px; max-height: 160px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line); object-fit: cover; }
.hk-avr-asset { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hk-line); font-size: 14px; }
.hk-avr-asset:last-of-type { border-bottom: 0; }
.hk-avr-asset__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--hk-accent-soft); color: var(--hk-accent-ink); flex: none; }
@media (max-width: 720px) {
  .hk-avr-buckets { gap: 6px; } .hk-avr-bucket { padding: 10px; } .hk-avr-bucket strong { font-size: 19px; }
  .hk-avr-list { grid-template-columns: 1fr; }
  .hk-avr-action { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
  .hk-avr-action .hk-btn--lg { width: 100%; justify-content: center; }
  .hk-avr-action form, .hk-avr-action > .hk-row { width: 100%; }
}

/* ---------- Энергоучёт: загрузка и связь с площадками ---------- */
.hk-energy-help { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--hk-r-md); background: var(--hk-surface-2); font-size: 13px; line-height: 1.5; }
.hk-energy-help ul { margin: 0; padding-left: 18px; }
.hk-elinks { display: flex; flex-direction: column; gap: 8px; }
.hk-elink { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: 10px 18px; padding: 12px 14px; border: 1px solid var(--hk-line); border-left: 4px solid var(--hk-warn); border-radius: var(--hk-r-md); background: var(--hk-surface); }
.hk-elink[data-linked] { border-left-color: var(--hk-ok); }
.hk-elink__src { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hk-elink__addr { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.hk-elink__to { display: flex; flex-direction: column; gap: 6px; min-width: 0; justify-content: center; }
@media (max-width: 900px) { .hk-elink { grid-template-columns: 1fr; } }

/* ---------- Мой профиль ---------- */
.hk-profile { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.hk-profile__logins { list-style: none; margin: 0; padding: 4px 16px 10px; display: flex; flex-direction: column; }
.hk-profile__logins li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--hk-line); font-size: 13px; }
.hk-profile__logins li:last-child { border-bottom: 0; }
.hk-profile__logins .hk-status { flex: 0 0 auto; }
@media (max-width: 960px) { .hk-profile { grid-template-columns: 1fr; } }

/* ---------- Журнал действий ---------- */
.hk-log { display: flex; flex-direction: column; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); overflow: hidden; }
.hk-log__day { margin: 0; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--hk-muted); background: var(--hk-surface-2); border-bottom: 1px solid var(--hk-line); position: sticky; top: 0; z-index: 1; }
.hk-log__row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--hk-line); }
.hk-log__row:last-child { border-bottom: 0; }
.hk-log__time { color: var(--hk-muted); font-size: 13px; padding-top: 3px; }
.hk-log__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hk-log__act { font-weight: 600; font-size: 14px; }
.hk-log__msg { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.hk-log__meta { font-size: 12px; color: var(--hk-muted); }
.hk-log__more summary { cursor: pointer; font-size: 12px; color: var(--hk-accent); width: max-content; }
.hk-log__more .hk-dl { margin-top: 8px; font-size: 13px; }

/* ---------- Справочники ---------- */
.hk-dict { display: flex; flex-direction: column; border-top: 1px solid var(--hk-line); }
.hk-dict__row { display: grid; grid-template-columns: minmax(200px, 1fr) 84px auto 110px auto; gap: 10px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--hk-line); }
.hk-dict--fin .hk-dict__row { grid-template-columns: minmax(200px, 1fr) 220px 84px auto 110px auto; }
.hk-dict--docs .hk-dict__row { grid-template-columns: minmax(200px, 1fr) auto 84px auto 110px auto; }
.hk-dict__row:last-child { border-bottom: 0; }
.hk-dict__row.is-off .hk-input:not([type=number]) { color: var(--hk-muted); text-decoration: line-through; }
.hk-dict__row--new { background: var(--hk-surface-2); border-radius: 0 0 var(--hk-r-lg) var(--hk-r-lg); }
.hk-dict__row--new .hk-dict__on { color: var(--hk-muted); }
.hk-dict__flags { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.hk-dict__use { font-size: 12px; white-space: nowrap; }
.hk-dict .hk-input, .hk-dict .hk-select { min-height: 36px; height: 36px; }
@media (max-width: 900px) {
  .hk-dict__row, .hk-dict--fin .hk-dict__row, .hk-dict--docs .hk-dict__row { grid-template-columns: 1fr 84px; }
  .hk-dict__row > .hk-input:first-of-type, .hk-dict__flags, .hk-dict__row .hk-select { grid-column: 1 / -1; }
}

/* ---------- Своё оформление ---------- */
.hk-brand-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; color: #fff; font-weight: 700; font-size: 18px; overflow: hidden; flex: 0 0 auto; }
.hk-brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hk-brand-mark--sm { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
.hk-brand-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--hk-r-md); background: #111A2B; border: 1px solid #23304A; }
.hk-brand-login { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 16px; border: 1px solid var(--hk-line); border-top: 4px solid #2B54E8; border-radius: var(--hk-r-md); }
.hk-brand-login strong { font-size: 18px; }
.hk-org__mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: inherit; }
.hk-org__mark { overflow: hidden; }
.hk-login__brand { display: flex; align-items: center; gap: 12px; }
.hk-login__brand .hk-brand-mark { width: 44px; height: 44px; }

/* ---------- Поддержка ---------- */
.hk-hd-msg { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.hk-hd-msg__head { display: flex; align-items: center; gap: 10px; }
.hk-hd-msg__text { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.hk-hd-msg--staff { border-left: 3px solid var(--hk-accent); }
.hk-hd-msg--internal { background: color-mix(in srgb, var(--hk-violet) 7%, var(--hk-surface)); border-left-color: var(--hk-violet); }

/* ---------- Справка ---------- */
.hk-help { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.hk-help__toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); max-height: calc(100vh - 100px); overflow: auto; }
.hk-help__toc a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--hk-r-sm); color: var(--hk-ink-2); text-decoration: none; font-size: 14px; }
.hk-help__toc a:hover { background: var(--hk-hover); color: var(--hk-ink); }
.hk-help__toc a .hk-tab__n { margin-left: auto; }
.hk-help__body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hk-help__art { scroll-margin-top: 80px; }
.hk-help__lead { margin: 0 0 10px; font-size: 15px; }
.hk-help__steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.hk-help__tips { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.hk-help__tips p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--hk-ink-2); padding: 8px 10px; border-radius: var(--hk-r-sm); background: var(--hk-surface-2); }
.hk-help__tips .hk-i { flex: 0 0 auto; margin-top: 2px; color: var(--hk-accent); }
.hk-help__note { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--hk-line); border-left: 3px solid var(--hk-ok); border-radius: var(--hk-r-md); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hk-help__note header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hk-help__note p { margin: 0; line-height: 1.5; }
.hk-help__note.is-draft { border-left-color: var(--hk-warn); opacity: .85; }
@media (max-width: 900px) { .hk-help { grid-template-columns: 1fr; } .hk-help__toc { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; } .hk-help__toc a { white-space: nowrap; } }

/* ---------- Площадка: размещения ---------- */
.hk-places { display: flex; flex-direction: column; gap: 12px; }
.hk-place { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 80px; }
.hk-place[data-off] { opacity: .75; }
.hk-place__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.hk-place__edit > summary { cursor: pointer; font-size: 13px; color: var(--hk-accent); width: max-content; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.hk-place__forms { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hk-line); }
.hk-opmap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }

/* ---------- Инвентаризация ---------- */
.hk-inv-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hk-inv-steps a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink-2); text-decoration: none; font-size: 14px; }
.hk-inv-steps a[aria-current="step"] { border-color: var(--hk-accent); color: var(--hk-ink); font-weight: 600; box-shadow: 0 0 0 1px var(--hk-accent) inset; }
.hk-inv-steps__n { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hk-surface-2); font-size: 12px; font-weight: 700; }
.hk-inv-steps a[data-done] .hk-inv-steps__n { background: var(--hk-ok); color: #fff; }
.hk-inv-items { display: flex; flex-direction: column; gap: 12px; }
.hk-inv-item { scroll-margin-top: 80px; }
.hk-inv-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-inv-thumb { position: relative; margin: 0; width: 120px; }
.hk-inv-thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--hk-r-sm); border: 1px solid var(--hk-line); display: block; }
.hk-inv-thumb figcaption { font-size: 11px; color: var(--hk-muted); margin-top: 2px; overflow-wrap: anywhere; }
.hk-inv-thumb__x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.hk-inv-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hk-inv-upload .hk-drop { flex: 1 1 240px; }
.hk-inv-upload .hk-input { flex: 1 1 200px; }
.hk-inv-upload .hk-drop__list, .hk-inv-upload .hk-field__error { flex-basis: 100%; }
.hk-inv-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.hk-inv-slot { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); }
.hk-inv-add > summary { list-style: none; }
.hk-inv-next { position: sticky; bottom: 0; }
@media (max-width: 720px) { .hk-inv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Карта без реестра ---------- */
.hk-opmap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; min-height: 0; }
.hk-opmap__map { position: relative; inset: auto; height: calc(100vh - 220px); min-height: 420px; border-radius: var(--hk-r-lg); }
.hk-opmap__side { max-height: calc(100vh - 220px); display: flex; flex-direction: column; overflow: hidden; }
.hk-opmap__list { overflow: auto; flex: 1; }
.hk-opmap__row { display: flex; gap: 8px; width: 100%; padding: 9px 16px; border: 0; border-top: 1px solid var(--hk-line); background: none; color: var(--hk-ink); text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.hk-opmap__row:hover { background: var(--hk-hover); }
.hk-opmap__card { padding: 4px 16px 8px; font-size: 14px; }
@media (max-width: 900px) { .hk-opmap { grid-template-columns: 1fr; } .hk-opmap__map { height: 60vh; } .hk-opmap__side { max-height: none; } }

/* ---------- Служебные страницы: технические работы, «такой страницы нет», ошибки ---------- */
.hk-sys { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(900px 480px at 50% -10%, var(--hk-accent-soft), transparent 70%),
  linear-gradient(var(--hk-canvas), var(--hk-canvas)); color: var(--hk-ink); }
.hk-sys__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1120px, 100% - 32px); margin: 0 auto; padding: 24px 0; }
.hk-sys__logo { font-size: 26px; font-weight: 800; font-style: italic; letter-spacing: .02em; color: var(--hk-ink); text-decoration: none; }
.hk-sys__main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 16px 56px; }
.hk-sys__card { width: min(560px, 100%); padding: 40px 36px 32px; border-radius: 24px; background: var(--hk-surface); border: 1px solid var(--hk-line); box-shadow: var(--hk-shadow); text-align: center; }
.hk-sys__art { position: relative; width: 96px; height: 96px; margin: 0 auto 22px; display: grid; place-items: center; }
.hk-sys__badge { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-sys__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--hk-accent) 35%, transparent); animation: hk-sys-spin 18s linear infinite; }
@keyframes hk-sys-spin { to { transform: rotate(360deg); } }
.hk-sys__eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hk-muted); }
.hk-sys__title { margin: 0; font-size: clamp(24px, 4vw, 30px); line-height: 1.15; letter-spacing: -.02em; }
.hk-sys__lead { margin: 12px auto 0; max-width: 440px; color: var(--hk-ink-2); line-height: 1.55; }
.hk-sys__time { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 14px; text-align: left; }
.hk-sys__time > div { padding: 12px 14px; border-radius: 14px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); display: flex; flex-direction: column; gap: 2px; }
.hk-sys__time span { font-size: 12px; color: var(--hk-muted); }
.hk-sys__time strong { font-size: 16px; }
.hk-sys__bar { height: 8px; border-radius: 4px; }
.hk-sys__bar > span { transition: width .6s ease; }
.hk-sys__left { margin: 12px 0 0; font-size: 14px; color: var(--hk-muted); }
.hk-sys__left strong { color: var(--hk-ink); }
.hk-sys__actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.hk-sys__help { margin: 0; font-size: 14px; color: var(--hk-muted); text-align: center; }
.hk-sys__help a, .hk-sys__back { color: var(--hk-accent-ink); }
.hk-sys__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; }
.hk-sys__back:hover, .hk-sys__help a:hover { text-decoration: underline; }
.hk-sys__404 { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; font-size: 92px; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--hk-ink); }
.hk-sys__zero { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-sys__zero .hk-i { animation: hk-sys-sway 6s ease-in-out infinite; }
@keyframes hk-sys-sway { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(24deg); } }
@media (max-width: 520px) {
  .hk-sys__card { padding: 30px 20px 24px; border-radius: 20px; }
  .hk-sys__time { grid-template-columns: 1fr; }
  .hk-sys__404 { font-size: 68px; } .hk-sys__zero { width: 64px; height: 64px; }
}
/* Внутри портала */
.hk-oops { display: flex; gap: 28px; align-items: center; max-width: 760px; margin: 24px 0; padding: 32px; }
.hk-oops__code { flex: none; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 28px; background: var(--hk-accent-soft); color: var(--hk-accent); font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.hk-oops[data-kind="403"] .hk-oops__code, .hk-oops[data-kind="other"] .hk-oops__code { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-oops[data-kind="stale"] .hk-oops__code { background: var(--hk-warn-soft); color: var(--hk-warn); }
.hk-oops__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hk-oops__body p { margin: 0; color: var(--hk-ink-2); line-height: 1.55; }
@media (max-width: 640px) { .hk-oops { flex-direction: column; align-items: flex-start; padding: 22px; } .hk-oops__code { width: 88px; height: 88px; border-radius: 22px; font-size: 30px; } }
/* Объявление о работах в шапке портала */
.hk-mt-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; background: var(--hk-warn-soft); color: var(--hk-warn); border-bottom: 1px solid color-mix(in srgb, var(--hk-warn) 25%, transparent); }
.hk-mt-banner[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); border-bottom-color: color-mix(in srgb, var(--hk-danger) 25%, transparent); }
.hk-mt-banner a { color: inherit; font-weight: 600; margin-left: auto; white-space: nowrap; }
/* Состояние на странице настроек */
.hk-mt-state { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.hk-mt-state__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-mt-state[data-tone="warn"] .hk-mt-state__icon { background: var(--hk-warn-soft); color: var(--hk-warn); }
.hk-mt-state[data-tone="danger"] .hk-mt-state__icon { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-mt-state__text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hk-mt-state form { flex: none; }
@media (max-width: 640px) { .hk-mt-state { flex-wrap: wrap; } .hk-mt-state form { width: 100%; } .hk-mt-state form .hk-btn { width: 100%; justify-content: center; } }

/* ---------- Оператор связи: настройка и кабинет ---------- */
.hk-op-setup { display: flex; flex-direction: column; gap: 16px; }
.hk-op-link { padding: 16px 20px; border-top: 1px solid var(--hk-line); display: flex; flex-direction: column; gap: 12px; }
.hk-op-link__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hk-op-hero { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hk-op-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.hk-op-action { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--hk-r-lg); border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink); text-decoration: none; box-shadow: var(--hk-shadow); }
.hk-op-action:hover { border-color: var(--hk-accent); text-decoration: none; }
.hk-op-action__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-op-action span { display: flex; flex-direction: column; gap: 2px; }
.hk-op-action small { color: var(--hk-muted); font-size: 13px; }
.hk-op-thread { display: flex; flex-direction: column; gap: 10px; }
.hk-op-msg { padding: 12px 14px; border-radius: 14px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); max-width: 680px; }
.hk-op-msg[data-side="company"] { background: var(--hk-accent-soft); border-color: transparent; }
.hk-op-msg[data-side="system"] { background: transparent; border-style: dashed; color: var(--hk-muted); font-size: 13px; padding: 8px 12px; }
.hk-op-msg__meta { font-size: 12px; color: var(--hk-muted); margin-bottom: 4px; }
.hk-op-msg p { margin: 0; white-space: pre-wrap; }
@media (max-width: 900px) { .hk-detail-grid { grid-template-columns: 1fr !important; } }

/* ---------- ИИ-помощник ---------- */
/* ---------- ИИ-помощник HEKCO: собачка и окно разговора ---------- */
.hk-dog { position: fixed; right: 22px; bottom: 22px; z-index: 47; display: block; width: 84px; height: 84px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hk-dog__ring { position: relative; display: block; width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 10px 28px rgba(37,99,235,.28), 0 0 0 0 rgba(59,130,246,.35); animation: hk-dog-glow 3.2s ease-in-out infinite; }
.hk-dog__img { display: block; width: 84px; height: 84px; border-radius: 50%; transform-origin: 50% 85%; animation: hk-dog-bob 3.2s ease-in-out infinite; }
.hk-dog:hover .hk-dog__img { animation: hk-dog-tilt .9s ease-in-out; }
.hk-dog:focus-visible { outline: none; } .hk-dog:focus-visible .hk-dog__ring { outline: 3px solid var(--hk-accent); outline-offset: 3px; }
.hk-dog__bubble { position: absolute; right: 74px; bottom: 58px; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: var(--hk-surface); color: var(--hk-ink); border: 1px solid var(--hk-line); box-shadow: 0 8px 24px rgba(8,13,22,.14); font-size: 14px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(6px) scale(.96); transform-origin: 100% 100%; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.hk-dog:hover .hk-dog__bubble, .hk-dog.is-hi .hk-dog__bubble, .hk-dog[data-state="critical"] .hk-dog__bubble { opacity: 1; transform: none; }
.hk-ai-open .hk-dog .hk-dog__bubble { opacity: 0; }
.hk-dog__badge { position: absolute; top: 0; right: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--hk-warn); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--hk-surface); }
.hk-dog__badge--crit { background: var(--hk-danger); }
.hk-dog[data-state="critical"] .hk-dog__ring { animation: hk-dog-alarm 1.4s ease-out infinite; }
.hk-dog[data-state="critical"] .hk-dog__bubble { color: var(--hk-danger); border-color: color-mix(in srgb, var(--hk-danger) 40%, var(--hk-line)); }
.hk-dog[data-state="notice"] .hk-dog__img { animation: hk-dog-ring 4s ease-in-out infinite; }
.hk-dog[data-state="think"] .hk-dog__img { animation: hk-dog-think 1.6s ease-in-out infinite; }
.hk-dog[data-state="done"] .hk-dog__img, .hk-ai[data-state="done"] .hk-ai__ava img { animation: hk-dog-hop .6s ease-out 2; }
.hk-ai-open .hk-dog__ring { box-shadow: 0 6px 18px rgba(37,99,235,.22); animation: none; }
@keyframes hk-dog-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes hk-dog-tilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 65% { transform: rotate(6deg); } }
@keyframes hk-dog-think { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-2px); } }
@keyframes hk-dog-hop { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-8px) scale(1.04); } }
@keyframes hk-dog-ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-7deg); } 80% { transform: rotate(7deg); } 86% { transform: rotate(-4deg); } 92% { transform: rotate(3deg); } }
@keyframes hk-dog-glow { 0%, 100% { box-shadow: 0 10px 28px rgba(37,99,235,.26), 0 0 0 0 rgba(59,130,246,.0); } 50% { box-shadow: 0 10px 28px rgba(37,99,235,.34), 0 0 0 8px rgba(59,130,246,.10); } }
@keyframes hk-dog-alarm { 0% { box-shadow: 0 10px 28px rgba(220,38,38,.3), 0 0 0 0 rgba(220,38,38,.5); } 100% { box-shadow: 0 10px 28px rgba(220,38,38,.3), 0 0 0 16px rgba(220,38,38,0); } }

.hk-ai { position: fixed; right: 22px; bottom: 118px; z-index: 46; width: min(400px, calc(100vw - 44px)); height: min(640px, calc(100vh - var(--hk-top-h) - 140px)); min-height: 360px; display: flex; flex-direction: column; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: 20px; box-shadow: 0 24px 64px rgba(8,13,22,.22); overflow: hidden; transform-origin: 100% 100%; animation: hk-ai-in .22s ease-out; }
.hk-ai[hidden] { display: none; }
@keyframes hk-ai-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.hk-ai__head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--hk-accent) 12%, var(--hk-surface)), var(--hk-surface)); border-bottom: 1px solid var(--hk-line); }
.hk-ai__head strong { display: block; font-size: 16px; letter-spacing: .02em; }
.hk-ai__ctx { display: block; font-size: 12px; color: var(--hk-muted); }
.hk-ai__ava { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.hk-ai__ava img { display: block; width: 44px; height: 44px; }
.hk-ai[data-state="think"] .hk-ai__ava img { animation: hk-dog-think 1.6s ease-in-out infinite; }
.hk-ai[data-state="think"] .hk-ai__ctx { color: var(--hk-accent-ink); }
.hk-ai__log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--hk-canvas); }
.hk-ai__hello { display: flex; flex-direction: column; gap: 10px; }
.hk-ai__hello[hidden] { display: none; }
.hk-ai__greet .hk-ai__sub { color: var(--hk-ink-2); font-size: 13px; }
.hk-ai__label { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--hk-muted); text-transform: uppercase; letter-spacing: .04em; }
.hk-ai__alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--hk-ink); font-size: 13px; border: 1px solid transparent; }
.hk-ai__alert span { flex: 1; min-width: 0; } .hk-ai__alert strong { display: block; font-size: 14px; }
.hk-ai__alert[data-tone="danger"] { background: var(--hk-danger-soft); border-color: color-mix(in srgb, var(--hk-danger) 30%, transparent); } .hk-ai__alert[data-tone="danger"] > .hk-i:first-child { color: var(--hk-danger); }
.hk-ai__alert[data-tone="warn"] { background: var(--hk-warn-soft); } .hk-ai__alert[data-tone="warn"] > .hk-i:first-child { color: var(--hk-warn); }
.hk-ai__alert:hover { border-color: var(--hk-line-strong); }
.hk-ai__topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hk-ai__topic { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--hk-line); border-radius: 14px; background: var(--hk-surface); color: var(--hk-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, transform .15s; }
.hk-ai__topic > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-ai__topic:hover { border-color: var(--hk-accent); transform: translateY(-1px); }
.hk-ai__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hk-ai__chip { border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.hk-ai__chip:hover { border-color: var(--hk-accent); color: var(--hk-accent-ink); }
.hk-ai__msg { position: relative; max-width: 92%; padding: 10px 12px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.hk-ai__msg--user { align-self: flex-end; background: var(--hk-accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.hk-ai__msg--assistant { align-self: flex-start; background: var(--hk-surface); border: 1px solid var(--hk-line); border-bottom-left-radius: 4px; }
.hk-ai__msg--assistant p { margin: 0 0 6px; } .hk-ai__msg--assistant p:last-of-type { margin-bottom: 0; }
.hk-ai__msg--assistant ul { margin: 4px 0 6px; padding-left: 18px; } .hk-ai__msg--assistant li { margin: 2px 0; }
.hk-ai__msg--assistant a { color: var(--hk-accent-ink); font-weight: 600; }
.hk-ai__msg--err { background: var(--hk-danger-soft); color: var(--hk-danger); border-color: transparent; }
.hk-ai__time { display: block; margin-top: 4px; font-size: 11px; text-align: right; opacity: .65; }
.hk-ai__dots { display: inline-flex; gap: 4px; padding: 4px 0; } .hk-ai__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--hk-muted); animation: hk-ai-dot 1.2s infinite ease-in-out; }
.hk-ai__dots i:nth-child(2) { animation-delay: .15s; } .hk-ai__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hk-ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.hk-ai__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px 6px; border-top: 1px solid var(--hk-line); background: var(--hk-surface); }
.hk-ai__form textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; padding: 10px 14px; border: 1px solid var(--hk-line-strong); border-radius: 21px; background: var(--hk-surface); color: var(--hk-ink); font: inherit; font-size: 14px; line-height: 1.4; }
.hk-ai__form textarea:focus { outline: 2px solid color-mix(in srgb, var(--hk-accent) 35%, transparent); border-color: var(--hk-accent); }
.hk-ai__form .hk-btn--icon { border-radius: 50%; width: 42px; height: 42px; }
.hk-ai__note { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--hk-muted); background: var(--hk-surface); }
@media (max-width: 991.98px) { .hk-dog { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; } .hk-dog, .hk-dog__ring, .hk-dog__img { width: 68px; height: 68px; } .hk-dog__bubble { right: 60px; bottom: 46px; } .hk-ai { bottom: calc(156px + env(safe-area-inset-bottom)); right: 14px; height: min(620px, calc(100vh - 230px)); } }
@media (max-width: 720px) { .hk-ai { inset: 0; width: 100%; height: 100%; min-height: 0; z-index: 60; border-radius: 0; border: 0; } .hk-ai-open .hk-dog { display: none; } }
@media (prefers-reduced-motion: reduce) { .hk-dog__ring, .hk-dog__img, .hk-ai__ava img, .hk-ai, .hk-ai__dots i { animation: none !important; } .hk-dog__bubble { transition: none; } }
@media print { .hk-dog, .hk-ai { display: none !important; } }

/* ---------- Настройки ИИ-помощника ---------- */
.hk-ai-set { display: flex; align-items: center; gap: 20px; padding: 20px 24px; margin-bottom: 16px; background: linear-gradient(120deg, var(--hk-accent-soft), var(--hk-surface) 60%); }
.hk-ai-set__dog { flex: none; width: 120px; height: auto; }
.hk-ai-set__text { flex: 1; min-width: 0; }
.hk-ai-set__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 720px) { .hk-ai-set { flex-direction: column; align-items: flex-start; } .hk-ai-set__dog { width: 90px; } }
/* Собачка не закрывает кнопки внизу страницы: место под ней и отступ при прокрутке к полю или кнопке */
html.hk-has-dog { scroll-padding-bottom: 120px; }
html.hk-has-dog .hk-content { padding-bottom: 120px; }
@media (max-width: 991.98px) { html.hk-has-dog { scroll-padding-bottom: 170px; } }

/* ---------- Разбор документов ---------- */
.hk-doc-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 28px; padding: 0 10px; margin-left: 6px; border: 1px solid var(--hk-line); border-radius: 999px; background: var(--hk-surface); color: var(--hk-accent-ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.hk-doc-btn:hover { border-color: var(--hk-accent); background: var(--hk-accent-soft); }
@media (max-width: 720px) { .hk-doc-btn span { display: none; } .hk-doc-btn { width: 32px; height: 32px; justify-content: center; padding: 0; } }
.hk-doc { width: min(640px, calc(100vw - 32px)); }
.hk-doc .hk-dialog__body { max-height: calc(100vh - 160px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.hk-doc__mark { background: var(--hk-accent-soft); color: var(--hk-accent-ink); }
.hk-doc__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-doc__note { margin: 0; font-size: 13px; color: var(--hk-warn); }
.hk-doc__sec { border: 1px solid var(--hk-line); border-radius: 14px; padding: 14px 16px; }
.hk-doc__sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.hk-doc__free, .hk-doc__paid { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.hk-doc__free { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-doc__paid { background: var(--hk-violet-soft); color: var(--hk-violet); }
.hk-doc__fields { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.hk-doc__fields dt { color: var(--hk-muted); } .hk-doc__fields dd { margin: 0; overflow-wrap: anywhere; }
.hk-doc__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 13px; }
.hk-doc__links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hk-doc__pick { display: grid; grid-template-columns: auto minmax(120px, auto) 1fr; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hk-line); font-size: 14px; cursor: pointer; }
.hk-doc__pick span { color: var(--hk-muted); }
.hk-doc__ai { background: linear-gradient(135deg, color-mix(in srgb, var(--hk-violet) 6%, var(--hk-surface)), var(--hk-surface)); }
.hk-doc__cost { margin: 0 0 10px; font-size: 13px; color: var(--hk-ink-2); line-height: 1.5; }
.hk-doc__sum { font-size: 14px; line-height: 1.55; }
.hk-doc__sum p { margin: 0 0 6px; } .hk-doc__sum ul { margin: 4px 0 6px; padding-left: 18px; }
.hk-ai-set__limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .hk-ai-set__limits { grid-template-columns: 1fr; } }
.hk-ai__free { display: block; margin-top: 6px !important; padding: 8px 10px; border-radius: 10px; background: var(--hk-ok-soft); color: var(--hk-ink) !important; }
.hk-ai__free .hk-i { vertical-align: -2px; margin-right: 4px; color: var(--hk-ok); }
a.hk-ai__topic { text-decoration: none; }
.hk-ai__topic small { display: block; margin-top: -2px; font-size: 11px; font-weight: 500; color: var(--hk-muted); }

/* ---------- Договоры: документы под договором ---------- */
.hk-segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--hk-surface-alt); border: 1px solid var(--hk-border); }
.hk-segmented > a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; color: var(--hk-text-muted); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.hk-segmented > a:hover { color: var(--hk-text); }
.hk-segmented > a[aria-current="true"] { background: var(--hk-surface); color: var(--hk-text); box-shadow: 0 1px 2px rgba(14, 23, 38, .12); }
.hk-doc-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hk-doc-line--child { padding-left: 34px; position: relative; }
.hk-doc-line--child::before { content: ""; position: absolute; left: 11px; top: -14px; bottom: 50%; width: 11px; border-left: 1px solid var(--hk-border-strong); border-bottom: 1px solid var(--hk-border-strong); border-bottom-left-radius: 6px; }
.hk-doc-date { font-size: 12px; white-space: nowrap; }
.hk-kind { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; background: var(--hk-surface-alt); color: var(--hk-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.hk-kind[data-tone="info"] { background: var(--hk-primary-soft); color: var(--hk-primary); }
.hk-kind[data-tone="violet"] { background: var(--hk-violet-soft, #EEE8FF); color: var(--hk-violet, #5B34C7); }
.hk-kind[data-tone="danger"] { background: var(--hk-danger-soft); color: var(--hk-danger); }
.hk-grp__toggle { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 7px; border: 1px solid var(--hk-border-strong); background: var(--hk-surface-alt); color: var(--hk-text-muted); cursor: pointer; flex: none; }
.hk-grp__toggle:hover { color: var(--hk-text); }
.hk-grp__toggle--none { border: 0; background: transparent; cursor: default; }
.hk-grp__toggle .hk-i { transition: transform .15s ease; }
.hk-grp[data-collapsed] .hk-grp__toggle .hk-i { transform: rotate(-90deg); }
.hk-grp[data-collapsed] .hk-trow--doc { display: none; }
.hk-grp__n { margin-left: 6px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--hk-border); color: var(--hk-text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.hk-trow--doc > td { background: var(--hk-surface-alt); }
.hk-trow--doc .hk-table__main--doc { font-weight: 500; }
.hk-trow--hit > td { box-shadow: inset 2px 0 0 var(--hk-primary); }
.hk-trow--ctx .hk-code, .hk-trow--ctx .hk-table__main { opacity: .72; }
.hk-was { color: var(--hk-text-muted); text-decoration: line-through; font-size: 12px; }
.hk-grp + .hk-grp > tr:first-child > td { border-top: 1px solid var(--hk-border); }
@media (max-width: 860px) {
  .hk-doc-line--child { padding-left: 22px; }
  .hk-doc-line--child::before { left: 4px; }
}

/* ---------- Настройки → Файлы ---------- */
.hk-files-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 900px) { .hk-files-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hk-files-grid { grid-template-columns: 1fr; } }
.hk-files-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 20px; }
.hk-files-set legend { padding: 0; margin-bottom: 4px; }
.hk-files-set .hk-switch { font-variant-numeric: tabular-nums; }

/* ---------- Сверка с ФНС ---------- */
.hk-fns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--hk-r-lg); border: 1px solid var(--hk-line); background: var(--hk-surface); }
.hk-fns__main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.hk-fns[data-tone="ok"] .hk-fns__main > .hk-i { color: var(--hk-ok); }
.hk-fns[data-tone="warn"] { background: var(--hk-warn-soft); border-color: transparent; } .hk-fns[data-tone="warn"] .hk-fns__main > .hk-i { color: var(--hk-warn); }
.hk-fns[data-tone="danger"] { background: var(--hk-danger-soft); border-color: transparent; } .hk-fns[data-tone="danger"] .hk-fns__main > .hk-i, .hk-fns[data-tone="danger"] strong { color: var(--hk-danger); }
.hk-fns__diffs { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; }
.hk-fns__diffs .hk-table { background: var(--hk-surface); border-radius: 10px; }
.hk-dup { margin-top: 8px; font-size: 13px; }
.hk-doc__cmp { display: flex; gap: 8px; flex-wrap: wrap; } .hk-doc__cmp select { flex: 1; min-width: 200px; }
.hk-doc__cmpsum { margin: 12px 0 8px; font-size: 13px; }
.hk-diff { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; font-size: 13px; line-height: 1.5; }
.hk-diff__row { padding: 6px 10px; border-radius: 8px; background: var(--hk-surface-2); }
.hk-diff__row--add { background: var(--hk-ok-soft); } .hk-diff__row--del { background: var(--hk-danger-soft); }
.hk-diff__row--chg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--hk-warn-soft); }
@media (max-width: 720px) { .hk-diff__row--chg { grid-template-columns: 1fr; } }
.hk-diff ins { background: color-mix(in srgb, var(--hk-ok) 25%, transparent); text-decoration: none; border-radius: 3px; }
.hk-diff del { background: color-mix(in srgb, var(--hk-danger) 22%, transparent); border-radius: 3px; }
.hk-diff__skip { padding: 2px 10px; font-size: 12px; color: var(--hk-muted); }
.hk-ai__tips { display: flex; flex-direction: column; gap: 8px; }
.hk-ai__tip { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--hk-surface); border: 1px solid var(--hk-line); font-size: 13px; line-height: 1.45; }
.hk-ai__tip > span { flex: 1; min-width: 0; } .hk-ai__tip > .hk-i { flex: none; margin-top: 2px; color: var(--hk-accent); }
.hk-ai__tip[data-tone="warn"] { background: var(--hk-warn-soft); border-color: transparent; } .hk-ai__tip[data-tone="warn"] > .hk-i { color: var(--hk-warn); }
.hk-ai__tip[data-tone="danger"] { background: var(--hk-danger-soft); border-color: transparent; } .hk-ai__tip[data-tone="danger"] > .hk-i { color: var(--hk-danger); }
.hk-ai__tip--quiet { background: var(--hk-surface-2); }
.hk-ai__tip strong:first-child { display: inline; }
.hk-ai__tip ul { flex-basis: 100%; margin: 2px 0 0; padding-left: 18px; }
.hk-ai__tip li[data-tone="danger"] a { color: var(--hk-danger); font-weight: 600; }
.hk-ai__tipbtns { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.hk-doc__ocr { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--hk-accent-soft); font-size: 13px; line-height: 1.45; }
.hk-blank__pop { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 200px); overflow-y: auto; }
.hk-blank__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .hk-blank__row > div { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) { .hk-blank__pop { position: fixed; left: 16px; right: 16px; top: 80px; width: auto; } }
.hk-blank__pop .hk-input, .hk-blank__pop .hk-textarea { font-weight: 400; }
.hk-prefill { padding-top: 18px; padding-bottom: 4px; }
.hk-prefill + .hk-card__head { padding-top: 14px; }
.hk-prefill__drop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed color-mix(in srgb, var(--hk-accent) 45%, var(--hk-line)); border-radius: 14px; background: var(--hk-accent-soft); cursor: pointer; font-size: 14px; line-height: 1.45; }
.hk-prefill__drop[data-over], .hk-prefill__drop:hover { border-color: var(--hk-accent); }
.hk-prefill__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--hk-surface); color: var(--hk-accent); }
.hk-prefill__out { margin-top: 10px; font-size: 13px; display: block; }
/* Прилипающая полоса кнопок формы: справа место под собачку, чтобы она не закрывала «Сохранить» */
html.hk-has-dog .hk-form-actions { padding-right: 118px; }
@media (max-width: 991.98px) { html.hk-has-dog .hk-form-actions { padding-right: 96px; } }
html.hk-has-dog .hk-avr-action { padding-right: 96px; }

/* ---------- Документы: разделы карточки, реестр, «Добавить документы» ---------- */
.hk-topadd { gap: 6px; }
@media (max-width: 720px) { .hk-topadd span { display: none; } .hk-topadd { width: 40px; padding: 0; justify-content: center; } }
.hk-docs { display: flex; flex-direction: column; gap: 12px; }
.hk-docs-wrap { display: flex; flex-direction: column; gap: 10px; }
.hk-docs-wrap__t { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.hk-docadd { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.hk-docadd__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hk-docadd__big { flex: 1 1 360px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed color-mix(in srgb, var(--hk-accent) 45%, var(--hk-line)); border-radius: 14px; background: var(--hk-accent-soft); color: var(--hk-ink); font-size: 14px; line-height: 1.45; text-decoration: none; }
.hk-docadd__big:hover { border-color: var(--hk-accent); text-decoration: none; }
.hk-docquick { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hk-line); padding-top: 12px; }
.hk-docquick[hidden] { display: none; }
.hk-docquick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.hk-docquick__grid .hk-field:nth-child(1), .hk-docquick__grid .hk-field:nth-child(2) { grid-column: span 2; }
@media (max-width: 520px) { .hk-docquick__grid .hk-field:nth-child(1), .hk-docquick__grid .hk-field:nth-child(2) { grid-column: auto; } }
[data-f][hidden] { display: none !important; }
.hk-docmiss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; border-radius: var(--hk-r-lg); background: var(--hk-warn-soft); font-size: 13px; }
.hk-docmiss__t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--hk-warn); margin-right: 4px; }
.hk-docmiss__i { padding: 3px 9px; border-radius: 999px; background: var(--hk-surface); border: 1px solid var(--hk-line); }
.hk-docmiss__i .hk-muted { font-size: 12px; }
.hk-doclist { display: flex; flex-direction: column; }
.hk-doclist__group { padding: 10px 18px 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--hk-muted); border-top: 1px solid var(--hk-line); }
.hk-doclist__group:first-child { border-top: 0; padding-top: 2px; }
.hk-docrow { display: flex; align-items: flex-start; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--hk-line); }
.hk-card__head + .hk-doclist > .hk-docrow:first-child, .hk-doclist__group + .hk-docrow { border-top: 0; }
.hk-docrow__ext { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); font-family: var(--hk-mono); font-size: 10px; font-weight: 700; color: var(--hk-ink-2); }
.hk-docrow__ext[data-ext="pdf"] { color: var(--hk-danger); background: var(--hk-danger-soft); border-color: transparent; }
.hk-docrow__ext[data-ext="doc"], .hk-docrow__ext[data-ext="docx"], .hk-docrow__ext[data-ext="odt"], .hk-docrow__ext[data-ext="rtf"] { color: var(--hk-accent-ink); background: var(--hk-accent-soft); border-color: transparent; }
.hk-docrow__ext[data-ext="xls"], .hk-docrow__ext[data-ext="xlsx"], .hk-docrow__ext[data-ext="ods"], .hk-docrow__ext[data-ext="csv"] { color: var(--hk-ok); background: var(--hk-ok-soft); border-color: transparent; }
.hk-docrow__ext[data-ext="dwg"], .hk-docrow__ext[data-ext="dxf"] { color: var(--hk-violet); background: var(--hk-violet-soft); border-color: transparent; }
.hk-docrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hk-docrow__title { font-weight: 600; color: var(--hk-ink); overflow-wrap: anywhere; }
.hk-docrow__main .hk-doc-btn { align-self: flex-start; }
.hk-docrow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--hk-muted); }
.hk-docrow__meta .hk-status { font-size: 11px; padding: 2px 7px; }
.hk-docrow__from { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); font-size: 12px; color: var(--hk-ink-2); text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hk-docrow__from:hover { border-color: var(--hk-accent); text-decoration: none; }
.hk-docrow__hist { height: 22px; padding: 0 6px; font-size: 12px; gap: 4px; }
.hk-docrow__note { font-size: 13px; color: var(--hk-ink-2); }
.hk-docrow__hlist { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; margin-top: 4px; border-radius: 10px; background: var(--hk-surface-2); font-size: 13px; }
.hk-docrow__hitem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hk-docrow__side { flex: none; display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) { .hk-docrow { flex-wrap: wrap; padding: 10px 14px; } .hk-docrow__side { width: 100%; padding-left: 52px; justify-content: space-between; } }
.hk-docact__pop { width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow-y: auto; }
.hk-docact__pop hr { border: 0; border-top: 1px solid var(--hk-line); margin: 4px 0; width: 100%; }
@media (max-width: 720px) { .hk-docact__pop { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; } }
.hk-docform { display: flex; flex-direction: column; gap: 8px; }
.hk-docform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--hk-ink-2); }
.hk-docform .hk-input, .hk-docform .hk-select { font-weight: 400; }
.hk-docform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hk-docform__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 400; }
.hk-doclink { display: inline-flex !important; flex-direction: row !important; cursor: pointer; }
.hk-doclink span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--hk-surface-2); border: 1px solid var(--hk-line); font-size: 12px; font-weight: 500; color: var(--hk-ink-2); }
.hk-doclink b { color: var(--hk-muted); font-weight: 600; }
.hk-doclink input:checked + span { text-decoration: line-through; opacity: .6; border-style: dashed; }
.hk-doclink--new span { background: var(--hk-accent-soft); color: var(--hk-accent-ink); border-color: transparent; }
.hk-status[data-tone="neutral"] { background: var(--hk-surface-2); color: var(--hk-ink-2); }
.hk-docfilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }

.hk-inbox { display: flex; flex-direction: column; gap: 14px; }
.hk-inbox__drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; border: 2px dashed color-mix(in srgb, var(--hk-accent) 40%, var(--hk-line)); border-radius: 18px; background: var(--hk-surface); text-align: center; cursor: pointer; }
.hk-inbox__drop:hover, .hk-inbox__drop[data-over] { border-color: var(--hk-accent); background: var(--hk-accent-soft); }
.hk-inbox__drop > .hk-muted { max-width: 680px; font-size: 13px; line-height: 1.5; }
.hk-inbox__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--hk-accent-soft); color: var(--hk-accent); }
.hk-inbox__progress { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hk-inbox__progress[hidden] { display: none; }
.hk-inbox__bar { height: 6px; border-radius: 99px; background: var(--hk-surface-2); overflow: hidden; }
.hk-inbox__bar i { display: block; height: 100%; width: 0; background: var(--hk-accent); border-radius: 99px; transition: width .3s; }
.hk-inbox__skip { display: inline; }
.hk-inbox__skip summary { display: inline; cursor: pointer; color: var(--hk-warn); }
.hk-inbox__review[hidden] { display: none; }
.hk-inbox__tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hk-line); position: sticky; top: 0; z-index: 5; background: var(--hk-surface); border-radius: var(--hk-r-lg) var(--hk-r-lg) 0 0; }
.hk-inbox__bulk { gap: 8px; flex-wrap: wrap; }
.hk-inbox__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--hk-line); position: sticky; bottom: 0; background: var(--hk-surface); border-radius: 0 0 var(--hk-r-lg) var(--hk-r-lg); }
html.hk-has-dog .hk-inbox__foot { padding-right: 118px; }
.hk-inlist { display: flex; flex-direction: column; }
.hk-inrow { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hk-line); }
.hk-inrow:first-child { border-top: 0; }
.hk-inrow[hidden] { display: none; }
.hk-inrow[data-state="need"] { background: color-mix(in srgb, var(--hk-warn-soft) 45%, transparent); }
.hk-inrow[data-state="done"] { opacity: .8; }
.hk-inrow[data-state="skipped"] { opacity: .55; }
.hk-inrow__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hk-inrow__cb { flex: none; width: 18px; height: 18px; }
.hk-inrow__head .hk-docrow__ext { width: 34px; height: 34px; }
.hk-inrow__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hk-inrow__name b { overflow-wrap: anywhere; font-weight: 600; }
.hk-inrow__name small { display: inline-flex; align-items: center; gap: 4px; color: var(--hk-muted); font-size: 12px; overflow-wrap: anywhere; }
.hk-inrow__size { font-size: 12px; white-space: nowrap; }
.hk-inrow__fields { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(200px, 2fr) repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding-left: 72px; }
@media (max-width: 900px) { .hk-inrow__fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-left: 0; } .hk-inrow__f--kind, .hk-inrow__f--title { grid-column: 1 / -1; } }
.hk-inrow__f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--hk-muted); min-width: 0; }
.hk-inrow__f .hk-input, .hk-inrow__f .hk-select { min-height: 34px; height: 34px; font-size: 13px; }
.hk-inrow__f i { font-style: normal; }
.hk-inrow__targets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 72px; font-size: 13px; }
@media (max-width: 900px) { .hk-inrow__targets, .hk-inrow__note, .hk-inrow__done { padding-left: 0 !important; } }
.hk-inrow__hint { font-size: 12px; }
.hk-tchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--hk-accent-soft); color: var(--hk-accent-ink); font-size: 12px; font-weight: 600; max-width: 100%; }
.hk-tchip small { font-weight: 400; opacity: .8; }
.hk-tchip[data-type="counterparty"] { background: var(--hk-violet-soft); color: var(--hk-violet); }
.hk-tchip[data-type="organization"] { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-tchip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }
.hk-tchip button:hover { background: color-mix(in srgb, currentColor 15%, transparent); }
.hk-inrow__note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-left: 72px; font-size: 13px; color: var(--hk-ink-2); }
.hk-inrow__note[data-tone="violet"] { color: var(--hk-violet); }
.hk-inrow__note[data-tone="danger"] { color: var(--hk-danger); }
.hk-inrow__done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 72px; font-size: 13px; color: var(--hk-ok); }
.hk-tpick { position: absolute; z-index: 80; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); box-shadow: var(--hk-shadow-pop); }
.hk-tpick[hidden] { display: none; }
.hk-tpick__list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.hk-tpick__i { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--hk-ink); text-align: left; cursor: pointer; font: inherit; }
.hk-tpick__i:hover, .hk-tpick__i:focus { background: var(--hk-hover); outline: none; }
.hk-tpick__i .hk-i { margin-top: 2px; color: var(--hk-muted); flex: none; }
.hk-tpick__i span { display: flex; flex-direction: column; min-width: 0; }
.hk-tpick__i b { font-weight: 600; font-size: 13px; }
.hk-tpick__i small { color: var(--hk-muted); font-size: 12px; }
.hk-docrow__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hk-docrow__top .hk-doc-btn { margin: 0; }
.hk-inbox__bulk select { max-width: 100%; }
@media (max-width: 640px) {
  .hk-inbox__tools, .hk-inlist .hk-inrow, .hk-inbox__foot { padding-left: 12px; padding-right: 12px; }
  .hk-inbox__bulk > * { flex: 1 1 100%; }
  .hk-inrow__head { flex-wrap: wrap; }
  .hk-inrow__name { flex: 1 1 calc(100% - 80px); }
  .hk-inrow__head .hk-status { margin-left: 28px; }
  .hk-inbox__foot { position: static; }
  html.hk-has-dog .hk-inbox__foot { padding-right: 12px; padding-bottom: 80px; }
  .hk-inbox__drop { padding: 22px 14px; }
}
@media (max-width: 640px) { .hk-inbox__bulk { width: 100%; min-width: 0; } .hk-inbox__bulk > * { min-width: 0; max-width: 100%; } .hk-inbox__tools .hk-chips { min-width: 0; } }

/* ---------- Деньги ---------- */
.hk-money { margin-bottom: 14px; }
.hk-money__kpis { padding: 0 18px; margin: 0; }
.hk-money__pay { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.hk-money__bar { height: 8px; border-radius: 99px; background: var(--hk-surface-2); overflow: hidden; }
.hk-money__bar i { display: block; height: 100%; background: var(--hk-ok); border-radius: 99px; }
.hk-money__src { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--hk-ink-2); }
.hk-money__src li { display: flex; align-items: flex-start; gap: 8px; }
.hk-money__src .hk-i { flex: none; margin-top: 2px; color: var(--hk-muted); }
.hk-terms { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--hk-line); padding-top: 14px; }
.hk-terms[hidden] { display: none; }
.hk-terms__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.hk-terms__found .hk-input, .hk-terms__found .hk-select { border-color: var(--hk-accent); background: var(--hk-accent-soft); }
.hk-terms__found > span::after { content: " · из документа"; color: var(--hk-accent-ink); }
.hk-terms__opt { gap: 8px; font-size: 14px; }
.hk-terms__opt[hidden], .hk-terms__line[hidden] { display: none; }
.hk-terms__line { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--hk-ok-soft); font-size: 14px; }
.hk-tariff { border: 1px solid var(--hk-line); border-radius: var(--hk-r-lg); padding: 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.hk-tariff__grid { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(130px, 1fr)) repeat(5, minmax(100px, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .hk-tariff__grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } .hk-tariff__title { grid-column: 1 / -1; } }
.hk-norms td { vertical-align: middle; }
.hk-norms__in { min-height: 34px; height: 34px; text-align: right; max-width: 150px; margin-left: auto; }
.hk-fintable th[aria-sort="descending"]::after { content: " ↓"; }
.hk-fintable th[aria-sort="ascending"]::after { content: " ↑"; }
.hk-finset { display: flex; flex-direction: column; gap: 14px; }

/* Заявка на доверенность */
.hk-poagrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .hk-poagrid { grid-template-columns: 1fr; } .hk-poasteps { grid-template-columns: repeat(2, 1fr) !important; } }
.hk-poahist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hk-poareq .hk-grid2, .hk-poagrid .hk-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hk-poa-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }

/* Колокольчик уведомлений */
.hk-bell > summary { padding: 0; }
.hk-bell__dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--hk-danger); box-shadow: 0 0 0 2px var(--hk-surface); }
.hk-bell__dot[hidden] { display: none; }
.hk-bell__panel { width: min(380px, calc(100vw - 24px)); padding: 6px; }
.hk-bell__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; border-bottom: 1px solid var(--hk-line); }
.hk-bell__list { display: flex; flex-direction: column; max-height: min(60vh, 460px); overflow-y: auto; padding: 4px 0; }
.hk-menu__panel .hk-bell__item { display: grid; grid-template-columns: 10px 1fr; gap: 2px 8px; align-items: start; padding: 9px 8px; }
.hk-bell__item b { font-weight: 600; font-size: 13px; line-height: 1.35; }
.hk-bell__item span { grid-column: 2; font-size: 13px; color: var(--hk-muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.hk-bell__item i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: transparent; }
.hk-bell__item[data-unread] i { background: var(--hk-danger); }
.hk-bell__item small { grid-column: 2; font-size: 12px; color: var(--hk-muted); }
.hk-menu__panel .hk-bell__more { justify-content: center; font-size: 13px; color: var(--hk-accent-ink); border-top: 1px solid var(--hk-line); border-radius: 0; }
@media (max-width: 640px) { .hk-bell__panel { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; } }
/* Упоминания */
.hk-mention { padding: 0 3px; border-radius: 4px; background: var(--hk-accent-soft); color: var(--hk-accent-ink); font-weight: 600; }
.hk-timeline__item:target { outline: 2px solid var(--hk-accent); outline-offset: 4px; border-radius: 8px; }
.hk-mention-pop { position: absolute; z-index: 60; min-width: 240px; max-width: 320px; max-height: 240px; overflow-y: auto; padding: 4px; background: var(--hk-surface); border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); box-shadow: var(--hk-shadow-pop); }
.hk-mention-pop button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--hk-ink); font-size: 14px; text-align: left; cursor: pointer; }
.hk-mention-pop button[aria-selected="true"], .hk-mention-pop button:hover { background: var(--hk-hover); }

/* Скрытие ИИ-помощника кнопкой в шапке */
html.hk-dog-off .hk-dog, html.hk-dog-off .hk-ai { display: none !important; }
.hk-dogtoggle[aria-pressed="true"] { color: var(--hk-muted, inherit); opacity: .65; position: relative; }
.hk-dogtoggle[aria-pressed="true"]::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; border-top: 2px solid currentColor; transform: rotate(-45deg); }

/* Заправки: фильтры в одну строку */
.hk-fuelfilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 4px 0 14px; }
.hk-fuelfilters .hk-field { flex: 0 1 170px; min-width: 130px; margin: 0; }
.hk-fuelfilters .hk-field label { font-size: 12px; color: var(--hk-muted, inherit); }
@media (max-width: 640px) { .hk-fuelfilters .hk-field { flex: 1 1 calc(50% - 10px); } }

/* Версия портала: номер в шапке и страница «Что нового» */
.hk-brand a.hk-brand__v { font-family: var(--hk-mono); font-size: 11px; font-weight: 600; font-style: normal; letter-spacing: 0; color: var(--hk-side-muted); text-decoration: none; padding: 3px 7px; border-radius: 999px; border: 1px solid transparent; position: relative; }
.hk-brand a.hk-brand__v:hover, .hk-brand a.hk-brand__v:focus-visible { color: #FFFFFF; border-color: rgba(255,255,255,.22); text-decoration: none; }
.hk-brand__v[data-new="1"]::after { content: ""; position: absolute; top: 0; right: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--hk-accent, #2B54E8); box-shadow: 0 0 0 2px var(--hk-side); }
.hk-rel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hk-rel__item { padding: 16px 18px; border: 1px solid var(--hk-line); border-radius: var(--hk-r-md); background: var(--hk-surface); }
.hk-rel__item.is-current { border-color: var(--hk-accent); box-shadow: inset 3px 0 0 var(--hk-accent); }
.hk-rel__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hk-rel__n { font-family: var(--hk-mono); font-size: 13px; font-weight: 600; color: var(--hk-ink); }
.hk-rel__date { font-size: 12px; color: var(--hk-muted); }
.hk-rel__title { margin: 6px 0 8px; font-size: 16px; }
.hk-rel__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--hk-ink-2); font-size: 14px; }

/* «Как заполнять»: кнопка у заголовка формы и подсказки по полям (assets/js/guide.js) */
.hk-guide-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 4px; font-size: 13px; }
.hk-guide-btn { position: relative; color: var(--hk-accent-ink); border-color: var(--hk-accent-soft); background: var(--hk-accent-soft); }
.hk-guide-btn:hover { background: var(--hk-accent-soft); border-color: var(--hk-accent); }
.hk-guide-btn.is-new::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--hk-accent); box-shadow: 0 0 0 2px var(--hk-canvas); }
.hk-coach-hole { position: fixed; z-index: 80; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 2px var(--hk-accent), 0 0 0 9999px rgba(8,13,22,.38); transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease, opacity .2s; }
:root[data-theme="dark"] .hk-coach-hole { box-shadow: 0 0 0 2px var(--hk-accent), 0 0 0 9999px rgba(0,0,0,.55); }
.hk-coach { position: fixed; z-index: 81; width: 340px; max-width: calc(100vw - 24px); padding: 14px 16px 14px; border-radius: var(--hk-r-lg); background: var(--hk-surface); color: var(--hk-ink); border: 1px solid var(--hk-line); box-shadow: var(--hk-shadow-pop); display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; transition: left .3s ease, top .3s ease; }
.hk-coach.is-center { left: 50% !important; top: 30% !important; transform: translateX(-50%); }
.hk-coach.is-dock { left: 12px !important; right: 12px; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
.hk-coach p { margin: 0; }
.hk-coach a { color: var(--hk-accent-ink); }
.hk-coach__top { display: flex; align-items: center; justify-content: space-between; }
.hk-coach__n { font-family: var(--hk-mono); font-size: 12px; color: var(--hk-muted); }
.hk-coach__x { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: var(--hk-r-sm); background: transparent; color: var(--hk-muted); cursor: pointer; }
.hk-coach__x:hover { background: var(--hk-hover); color: var(--hk-ink); }
.hk-coach__bar { height: 4px; border-radius: 2px; background: var(--hk-line); overflow: hidden; }
.hk-coach__bar i { display: block; height: 100%; background: var(--hk-accent); }
.hk-coach__t { margin: 2px 0 0; font-size: 16px; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-coach__src, .hk-coach__auto { padding: 8px 10px; border-radius: var(--hk-r-sm); font-size: 13px; }
.hk-coach__src { background: var(--hk-surface-2); color: var(--hk-ink-2); }
.hk-coach__auto { background: var(--hk-ok-soft); color: var(--hk-ok); }
.hk-coach__nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }

/* Справка: знакомство с порталом и подсказки по формам */
.hk-tourcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--hk-r-lg); background: var(--hk-accent-soft); border: 1px solid var(--hk-accent); }
.hk-tourcard__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--hk-accent); color: #FFFFFF; }
.hk-tourcard__txt strong { display: block; font-size: 17px; color: var(--hk-ink); }
.hk-tourcard__txt > span { color: var(--hk-ink-2); font-size: 14px; }
.hk-tourcard__txt [data-tour-done] { color: var(--hk-ok); font-weight: 600; }
@media (max-width: 640px) { .hk-tourcard { grid-template-columns: auto minmax(0, 1fr); } .hk-tourcard .hk-btn { grid-column: 1 / -1; } }
.hk-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.hk-guides a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--hk-r-md); border: 1px solid var(--hk-line); background: var(--hk-surface); color: var(--hk-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.hk-guides a:hover { border-color: var(--hk-accent); color: var(--hk-accent-ink); }
.hk-guides a svg { color: var(--hk-accent); flex: none; }
.hk-help__guide { margin-top: 12px; }
.hk-gtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.hk-gtable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--hk-muted); padding: 10px 14px; border-bottom: 1px solid var(--hk-line); white-space: nowrap; }
.hk-gtable td { padding: 12px 14px; border-top: 1px solid var(--hk-line); vertical-align: top; line-height: 1.5; }
.hk-gtable tbody tr:first-child td { border-top: 0; }
.hk-gtable td:first-child { font-weight: 600; width: 22%; }
.hk-gtable td:first-child .hk-status { margin-top: 4px; }
.hk-gtable .hk-gauto { display: block; margin-top: 6px; color: var(--hk-ok); font-size: 13px; }
.hk-gtable .hk-gsrc { color: var(--hk-ink-2); }
@media (max-width: 720px) { .hk-gtable thead { display: none; } .hk-gtable tr { display: block; padding: 10px 0; border-top: 1px solid var(--hk-line); } .hk-gtable td { display: block; border: 0; padding: 2px 14px; width: auto !important; } .hk-gtable td:empty { display: none; } }

/* Первый вход: приглашение пройти знакомство */
.hk-welcome { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: var(--hk-overlay); }
.hk-welcome__box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 26px 22px; border-radius: var(--hk-r-xl); background: var(--hk-surface); color: var(--hk-ink); box-shadow: var(--hk-shadow-pop); display: flex; flex-direction: column; gap: 14px; }
.hk-welcome__ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--hk-accent); color: #FFFFFF; }
.hk-welcome h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.hk-welcome p { margin: 0; color: var(--hk-ink-2); font-size: 15px; line-height: 1.55; }
.hk-welcome__list { margin: 0; padding-left: 20px; color: var(--hk-ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.hk-welcome__where { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--hk-r-md); background: var(--hk-surface-2); border: 1px solid var(--hk-line); font-size: 14px; color: var(--hk-ink-2); }
.hk-welcome__where svg { color: var(--hk-accent); flex: none; margin-top: 2px; }
.hk-welcome__where b { color: var(--hk-ink); }
.hk-welcome__act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.hk-welcome__act form { margin: 0; }

/* Задачи: порядковый номер строки */
.hk-table--tasks .hk-c-rn { width: 1%; white-space: nowrap; text-align: right; color: var(--hk-muted); font-family: var(--hk-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .hk-table--cards .hk-c-rn { display: none; } .hk-table--tasks tr[data-mine="true"] { box-shadow: inset 3px 0 0 var(--hk-accent); } }
