:root {
  --ground: #F2F3F6;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --surface-hover: #ECEEF2;
  --border: #E1E3E9;
  --border-strong: #CBCED6;
  --ink: #16181D;
  --ink-muted: #6B7080;
  --ink-faint: #9498A3;
  --accent: #DD5A0F;
  --accent-ink: #FFFFFF;
  --accent-soft: #FDE7D8;
  --accent-soft-ink: #9A3E0A;
  --success: #1C8955;
  --success-soft: #DFF3E7;
  --danger: #C63A2E;
  --danger-soft: #FBE4E1;
  --blue-soft: #E3EAFB;
  --blue-ink: #3457C9;
  --violet-soft: #EDE7FB;
  --violet-ink: #6A4FC7;
  --rose-soft: #FBE4EA;
  --rose-ink: #B3446E;
  --steel-soft: #E3EEF3;
  --steel-ink: #2E6E85;
  --shadow: 0 1px 2px rgba(20, 21, 26, 0.04), 0 8px 24px -12px rgba(20, 21, 26, 0.12);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --font-ui: "Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* hero-панель входа — намеренно фиксированная тёмная поверхность, не зависит от темы хоста */
  --hero-bg: #131419;
  --hero-bg-2: #1B1C22;
  --hero-ink: #F4F5F7;
  --hero-ink-muted: #8A8D97;
  --hero-accent: #FF7C34;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17181C;
    --surface: #1E2025;
    --surface-2: #25272D;
    --surface-hover: #2B2E35;
    --border: #33363E;
    --border-strong: #454851;
    --ink: #F1F2F4;
    --ink-muted: #9DA1AC;
    --ink-faint: #75798A;
    --accent: #FF7C34;
    --accent-ink: #1A0F06;
    --accent-soft: #3A2415;
    --accent-soft-ink: #FFB27E;
    --success: #3FC879;
    --success-soft: #173626;
    --danger: #FF6E60;
    --danger-soft: #3B211E;
    --blue-soft: #1D2A45;
    --blue-ink: #8DA6F2;
    --violet-soft: #2A2140;
    --violet-ink: #B7A3F2;
    --rose-soft: #3A2130;
    --rose-ink: #F2A7C2;
    --steel-soft: #1B2E36;
    --steel-ink: #7FC2DA;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --ground: #17181C;
  --surface: #1E2025;
  --surface-2: #25272D;
  --surface-hover: #2B2E35;
  --border: #33363E;
  --border-strong: #454851;
  --ink: #F1F2F4;
  --ink-muted: #9DA1AC;
  --ink-faint: #75798A;
  --accent: #FF7C34;
  --accent-ink: #1A0F06;
  --accent-soft: #3A2415;
  --accent-soft-ink: #FFB27E;
  --success: #3FC879;
  --success-soft: #173626;
  --danger: #FF6E60;
  --danger-soft: #3B211E;
  --blue-soft: #1D2A45;
  --blue-ink: #8DA6F2;
  --violet-soft: #2A2140;
  --violet-ink: #B7A3F2;
  --rose-soft: #3A2130;
  --rose-ink: #F2A7C2;
  --steel-soft: #1B2E36;
  --steel-ink: #7FC2DA;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
a { color: inherit; }
::selection { background: var(--accent-soft); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.muted { color: var(--ink-muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 4px; }
.eyebrow.light { color: var(--hero-ink-muted); }

/* ---------- Кнопки и мелкие элементы ---------- */

.primary-button, .secondary-button, .light-button, .yandex-button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.primary-button:hover, .secondary-button:hover, .light-button:hover, .yandex-button:hover { transform: translateY(-1px); }
.primary-button { color: var(--accent-ink); background: var(--accent); }
.primary-button.compact { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.secondary-button { border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.secondary-button:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.secondary-button.danger { color: var(--danger); border-color: var(--danger-soft); }
.secondary-button.success { color: var(--success); border-color: var(--success-soft); }
.light-button { color: var(--ink); background: var(--surface); }
.text-button { border: 0; padding: 4px; color: var(--ink-muted); background: transparent; font-weight: 700; font-size: 12.5px; }
.text-button:hover { color: var(--ink); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: 16px; color: var(--ink-muted); }
.icon-button:hover { background: var(--surface-hover); color: var(--ink); }

.avatar {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--accent-soft-ink); background: var(--accent-soft);
  font-size: 12.5px; font-weight: 700;
}
.avatar.small { width: 32px; height: 32px; font-size: 11px; }
.avatar.large { width: 58px; height: 58px; font-size: 18px; }
.avatar.xl { width: 78px; height: 78px; font-size: 24px; }

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup strong { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
/* Подпись под названием прячем в шапке: она удваивала её высоту.
   На экране входа логотип крупный, там подпись остаётся. */
.brand-lockup small { display: block; color: var(--ink-faint); font-size: 11px; }
.topbar .brand-lockup small { display: none; }
.brand-symbol {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  color: var(--accent-ink); background: var(--accent);
  font-size: 14px; font-weight: 800;
}
.brand-lockup-large .brand-symbol { width: 40px; height: 40px; border-radius: var(--radius-md); font-size: 18px; }
.brand-lockup-large strong { font-size: 17px; }

.prototype-badge, .access-count, .count-badge {
  display: inline-flex; align-items: center; width: max-content; min-height: 26px;
  border-radius: 999px; padding: 0 10px;
  color: var(--ink-muted); background: var(--surface-2);
  font-size: 11px; font-weight: 700;
}

.status-pill, .pill {
  display: inline-flex; align-items: center; justify-content: center; width: max-content; min-height: 22px;
  border-radius: 999px; padding: 2px 9px;
  color: var(--ink-muted); background: var(--surface-2);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.status-pill.done, .pill.success { color: var(--success); background: var(--success-soft); }
.status-pill.warning { color: var(--accent-soft-ink); background: var(--accent-soft); }
.status-pill.new { color: var(--blue-ink); background: var(--blue-soft); }
.pill.danger { color: var(--danger); background: var(--danger-soft); }
.pill.neutral { color: var(--ink-muted); background: var(--surface-2); }

/* ---------- Вход ---------- */

.login-page { min-height: 100vh; display: flex; background: var(--ground); }
.hero-panel {
  width: min(38%, 480px); flex: none;
  background: radial-gradient(120% 90% at 100% 0%, var(--hero-bg-2) 0%, transparent 55%), var(--hero-bg);
  color: var(--hero-ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 40px;
}
.hero-word { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: .01em; line-height: 1.16; text-transform: uppercase; }
.hero-word .accent { color: var(--hero-accent); }
.hero-rule { width: 40px; height: 3px; border-radius: 2px; background: var(--hero-accent); margin: 22px 0 0; }
.hero-foot { font-size: 12.5px; color: var(--hero-ink-muted); max-width: 30ch; }
.login-principles { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.login-principles > div { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; }
.login-principles > div > span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-sm);
  color: var(--hero-accent); font-size: 11px; font-weight: 800;
}
.login-principles strong, .login-principles small { display: block; }
.login-principles strong { color: var(--hero-ink); font-size: 12.5px; }
.login-principles small { margin-top: 2px; color: var(--hero-ink-muted); font-size: 11px; }

.flow-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.flow-card { width: 100%; max-width: 460px; }
.login-card { width: 100%; padding: 34px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.login-card h2 { font-size: 21px; font-weight: 700; margin: 14px 0 6px; letter-spacing: -.01em; }
.login-card > .muted { font-size: 13.5px; margin-bottom: 22px; }
.login-form { display: grid; gap: 14px; }
.login-form .field { display: grid; gap: 6px; }
.login-form .field > span { color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.login-form input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
.login-form input:focus { border-color: var(--accent); outline: none; }
.login-error {
  margin: 0; padding: 9px 11px; border-radius: var(--radius-md);
  color: var(--danger); background: var(--danger-soft); font-size: 12.5px;
}
.login-submit { width: 100%; margin-top: 4px; }
.boot-screen { display: grid; min-height: 100vh; place-items: center; color: var(--ink-faint); background: var(--ground); font-size: 13.5px; }
.password-value {
  margin: 16px 0; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 20px; letter-spacing: .04em; text-align: center; user-select: all;
}

/* Панель чат-бота — отдельный сервис, показанный внутри рабочей области портала.
   Высоту даёт раскладка экрана (.portal-shell--frame), а не вычитание пикселей
   шапки: панель внутри сама распоряжается своей высотой, и лишний хвост здесь
   означал бы вторую полосу прокрутки поверх её собственной. */
.bot-frame {
  display: block; width: 100%; flex: 1; min-height: 420px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
}

.auth-btn, .yandex-button {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  color: var(--surface); background: var(--ink);
}
.auth-btn:hover, .yandex-button:hover { opacity: .92; }
.yandex-button span, .auth-btn .ya { display: grid; width: 22px; height: 22px; border-radius: var(--radius-sm); place-items: center; color: var(--hero-accent); font-weight: 800; background: transparent; }
.fineprint, .privacy-note { margin-top: 14px; color: var(--ink-faint); font-size: 11.5px; line-height: 1.5; }

.denied-page { display: grid; min-height: 100vh; padding: 30px; place-items: center; background: var(--ground); }
.denied-card { width: min(100%, 480px); padding: 42px; border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; background: var(--surface); box-shadow: var(--shadow); }
.denied-icon { display: grid; width: 60px; height: 60px; margin: 0 auto 20px; border-radius: var(--radius-lg); place-items: center; color: var(--danger); background: var(--danger-soft); font-size: 28px; }
.denied-card h1 { margin-bottom: 12px; font-size: 21px; }
.denied-card > p:not(.eyebrow) { color: var(--ink-muted); font-size: 13.5px; }
.denied-help { margin: 22px 0; border-radius: var(--radius-md); padding: 14px; text-align: left; background: var(--surface-2); }
.denied-help strong, .denied-help span { display: block; font-size: 12.5px; }
.denied-help span { margin-top: 4px; color: var(--ink-muted); }

/* ---------- Топбар и навигация ---------- */

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 3px 24px; display: flex; align-items: center; gap: 16px; }
.topbar-brand { display: flex; }
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 26px; height: 26px; border-radius: var(--radius-md); border: 1px solid transparent;
  background: transparent; display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--ink); }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.profile-chip { display: flex; align-items: center; gap: 8px; padding: 1px 8px 1px 4px; border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink); }
.profile-chip:hover { background: var(--surface-hover); }
.topbar .avatar { width: 24px; height: 24px; font-size: 10.5px; }
/* Должность под именем — вторая строка, из-за неё шапка была вдвое выше.
   Роль и так видна в «Личном деле» и в панели администратора. */
.topbar .profile-chip .who .role { display: none; }
.profile-chip .who { text-align: left; }
.profile-chip .who .name { font-size: 12px; font-weight: 600; line-height: 1.15; }
.profile-chip .who .role { font-size: 10.5px; color: var(--ink-muted); line-height: 1.15; }
.chev { color: var(--ink-faint); flex: none; }

.navbar { background: var(--surface); border-bottom: 1px solid var(--border); }
/* Никакого overflow: контейнер с overflow-x обрезает и вертикаль тоже,
   и выпадающие меню под ним становятся невидимыми. На узком экране
   пункты переносятся на вторую строку — прокрутка тут не нужна. */
.navbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-btn {
  display: flex; align-items: center; gap: 5px; padding: 4px 11px;
  background: none; border: none; font-size: 12.5px; color: var(--ink-muted);
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav-btn:hover { color: var(--ink); }
.nav-item.active .nav-btn { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.nav-btn .chev { width: 11px; height: 11px; }

.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 20;
}
.dropdown.right { left: auto; right: 0; }
.nav-item.open .dropdown { display: block; }
.dropdown a, .dropdown .drop-row { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-size: 13px; }
.dropdown a:hover, .dropdown .drop-row:hover { background: var(--surface-2); }
.dropdown .drop-title { font-size: 13px; font-weight: 600; }
.dropdown .drop-desc { font-size: 11.5px; color: var(--ink-muted); }
.dropdown .drop-sep { height: 1px; background: var(--border); margin: 5px 2px; }
.dropdown .drop-simple { font-size: 13px; padding: 8px 10px; }
.notif-item { padding: 9px 10px; border-radius: var(--radius-sm); }
.notif-item:hover { background: var(--surface-2); }
.notif-item .t { font-size: 12.5px; font-weight: 600; }
.notif-item .d { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }

.page-content { max-width: 1280px; margin: 0 auto; padding: 22px 24px 60px; width: 100%; }
.content-stack { display: grid; gap: 20px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 380px; border-radius: var(--radius-md); padding: 13px 16px; color: var(--accent-ink); background: var(--ink); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Панели, заголовки, сетки ---------- */

.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-description { margin: -6px 0 16px; color: var(--ink-muted); font-size: 12.5px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { font-size: 18px; font-weight: 700; }
.two-column-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 16px; }

/* ---------- Главная сотрудника / герои разделов ---------- */

.welcome-hero, .admin-welcome, .knowledge-hero, .marketplace-head, .profile-hero, .security-banner {
  position: relative; display: flex; overflow: hidden; min-height: 200px; align-items: center; justify-content: space-between;
  gap: 26px; border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px);
  color: var(--hero-ink);
  background: radial-gradient(120% 90% at 100% 0%, var(--hero-bg-2) 0%, transparent 55%), var(--hero-bg);
  box-shadow: var(--shadow);
}
.welcome-hero > *, .admin-welcome > *, .knowledge-hero > *, .marketplace-head > *, .profile-hero > *, .security-banner > * { position: relative; z-index: 1; }
.welcome-hero h2, .admin-welcome h2, .knowledge-hero h2, .marketplace-head h2, .security-banner h2 { max-width: 700px; margin-bottom: 10px; font-size: 21px; font-weight: 700; }
.welcome-hero p:not(.eyebrow), .admin-welcome p:not(.eyebrow), .knowledge-hero p:not(.eyebrow), .marketplace-head p:not(.eyebrow), .security-banner p:not(.eyebrow) { max-width: 640px; color: var(--hero-ink-muted); font-size: 13.5px; }
.welcome-hero .light-button, .admin-welcome .light-button { margin-top: 18px; }
.hero-access-card { display: grid; min-width: 170px; border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-md); padding: 20px; background: rgba(255,255,255,.06); }
.hero-access-card strong { font-size: 2rem; color: var(--hero-ink); }
.hero-access-card small { max-width: 150px; color: var(--hero-ink-muted); font-size: 12px; }

.h1 { font-size: 22px; font-weight: 700; margin: 0 0 20px; letter-spacing: -.01em; }
.row { display: grid; gap: 16px; }
.row.top { grid-template-columns: 1.1fr 1.4fr; margin-bottom: 16px; }
.row.grid7, .module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) {
  .row.top { grid-template-columns: 1fr; }
}

.module-icon { display: grid; width: 36px; height: 36px; border-radius: var(--radius-sm); place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-muted); }
.module-icon.mint { color: var(--success); background: var(--success-soft); }
.module-icon.blue { color: var(--blue-ink); background: var(--blue-soft); }
.module-icon.orange { color: var(--accent-soft-ink); background: var(--accent-soft); }
.module-icon.violet { color: var(--violet-ink); background: var(--violet-soft); }
.module-icon.rose { color: var(--rose-ink); background: var(--rose-soft); }
.module-icon.slate { color: var(--ink-muted); background: var(--surface-2); }
.module-icon.steel { color: var(--steel-ink); background: var(--steel-soft); }
.module-icon.mini { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.soon-pill { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-faint); background: var(--surface-2); padding: 2px 7px; border-radius: 999px; }

/* Карточки главной страницы сотрудника — по макету дизайна */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 14px; font-weight: 700; }
.card-link { font-size: 12.5px; color: var(--ink-muted); text-decoration: none; display: flex; align-items: center; gap: 3px; background: none; border: none; cursor: pointer; }
.card-link:hover { color: var(--ink); }

.progress-top { display: flex; align-items: center; gap: 16px; }
.ring { width: 64px; height: 64px; flex: none; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), var(--surface-2) 0); display: flex; align-items: center; justify-content: center; position: relative; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-meta .big { font-size: 13.5px; font-weight: 600; }
.progress-meta .sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }

.lesson-bar { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.lb-track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.lb-fill { height: 100%; background: var(--accent); border-radius: 3px; display: block; }
.lb-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-muted); }

.task { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; border-radius: 5px; flex: none; border: 1.5px solid var(--border-strong); }
.task.done .task-check { background: var(--success); border-color: var(--success); display: flex; align-items: center; justify-content: center; }
.task-text { flex: 1; font-size: 13px; }
.task.done .task-text { color: var(--ink-faint); text-decoration: line-through; }
.task-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-muted); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.task-count.urgent { background: var(--accent-soft); color: var(--accent-soft-ink); }

.announce { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-left: 3px solid var(--accent); margin-bottom: 16px; }
.announce .a-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.announce .a-text { font-size: 13.5px; margin-top: 2px; }
.announce .a-text b { font-weight: 600; }
.announce-cta { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); padding: 7px 13px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.announce-cta:hover { background: var(--surface-hover); }

.mod-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .12s ease; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); text-align: left; }
.mod-card:hover { border-color: var(--border-strong); }
.mod-card.stub { cursor: not-allowed; border-style: dashed; box-shadow: none; }
.mod-card.stub:hover { border-color: var(--border); }
.mod-top { display: flex; align-items: flex-start; justify-content: space-between; }
.mod-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.mod-card.highlight .mod-icon { background: var(--accent-soft); color: var(--accent-soft-ink); }
.mod-title { font-size: 13.5px; font-weight: 700; }
.mod-desc { font-size: 12px; color: var(--ink-muted); line-height: 1.4; min-height: 32px; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.mod-open { font-size: 12px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 3px; }
.mod-card.stub .mod-open { color: var(--ink-faint); }
.spark { display: block; }

/* ---------- База знаний и экзамен ---------- */

.knowledge-stat { display: grid; min-width: 180px; border-left: 1px solid rgba(255,255,255,.15); padding-left: 26px; }
.knowledge-stat strong { font-size: 2.4rem; color: var(--hero-ink); }
.knowledge-stat small { max-width: 160px; color: var(--hero-ink-muted); font-size: 12px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter { min-height: 34px; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--ink-muted); }
.filter.active { color: var(--accent-ink); border-color: var(--ink); background: var(--ink); }
.content-search { display: flex; min-height: 36px; align-items: center; gap: 8px; margin-left: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 12px; color: var(--ink-faint); background: var(--surface); }
.content-search.full { width: 100%; margin: 0; }
.content-search input { width: 200px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.content-search.full input { width: 100%; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lesson-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.lesson-cover { display: flex; height: 110px; align-items: end; justify-content: space-between; padding: 16px; color: var(--hero-ink); background: linear-gradient(135deg, var(--hero-bg), var(--hero-bg-2)); }
.lesson-cover.cover-2 { background: linear-gradient(135deg, #1B2E28, #234036); }
.lesson-cover.cover-3 { background: linear-gradient(135deg, #241B33, #362548); }
.lesson-cover span { font-size: 1.9rem; font-weight: 800; opacity: .5; }
.lesson-cover small { border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.14); font-size: 10.5px; }
.lesson-body { display: grid; min-height: 170px; align-content: start; padding: 16px; }
.lesson-body h3 { margin: 13px 0 6px; font-size: 13.5px; font-weight: 700; }
.lesson-body p { color: var(--ink-muted); font-size: 12px; }
.lesson-body .secondary-button { align-self: end; margin-top: 14px; }

.exam-layout { max-width: 1000px; }
.exam-intro { display: flex; justify-content: space-between; gap: 24px; }
.exam-intro > div:first-child { max-width: 620px; }
.exam-intro p:not(.eyebrow) { margin-top: 10px; color: var(--ink-muted); font-size: 13px; }
.exam-meta { display: flex; align-items: center; gap: 10px; }
.exam-meta span { display: grid; min-width: 78px; border-radius: var(--radius-md); padding: 12px; text-align: center; background: var(--surface-2); }
.exam-meta small { color: var(--ink-muted); font-size: 10.5px; }
.exam-meta strong { font-size: 1.1rem; }
.question { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.question:first-child { padding-top: 0; border-top: 0; }
.question-number { display: grid; width: 38px; height: 38px; border-radius: var(--radius-md); place-items: center; color: var(--accent-soft-ink); background: var(--accent-soft); font-size: 11.5px; font-weight: 800; }
.question h3 { font-size: 13.5px; font-weight: 700; }
.answer-list { display: grid; gap: 7px; margin-top: 12px; }
.answer-list label { display: flex; min-height: 40px; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 9px 12px; cursor: pointer; font-size: 13px; }
.answer-list label.selected { border-color: var(--accent); background: var(--accent-soft); }
.answer-list input { accent-color: var(--accent); }
.question-panel > .primary-button { margin: 8px 0 0 58px; }
.attempt-history .history-row { display: grid; grid-template-columns: 1fr 70px 200px; align-items: center; min-height: 44px; border-top: 1px solid var(--border); font-size: 12.5px; }
.attempt-history .history-row small { color: var(--ink-muted); }
.exam-result { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 24px; border: 1px solid var(--danger-soft); border-radius: var(--radius-lg); padding: 30px; background: var(--danger-soft); }
.exam-result.passed { border-color: var(--success-soft); background: var(--success-soft); }
.result-score { display: grid; width: 144px; height: 144px; border: 12px solid rgba(198,58,46,.14); border-radius: 50%; place-items: center; text-align: center; }
.exam-result.passed .result-score { border-color: rgba(28,137,85,.16); }
.result-score strong { display: block; font-size: 2rem; }
.result-score span { max-width: 110px; font-size: 11.5px; font-weight: 700; }
.exam-result p { margin: 10px 0 16px; color: var(--ink); font-size: 13px; }

/* ---------- Чат, маркетплейсы, аналитика, профиль ---------- */

.chat-layout { display: grid; min-height: calc(100vh - 220px); grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
.chat-list { padding: 0; overflow: hidden; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px; }
.chat-list > .content-search { width: calc(100% - 30px); margin: 0 15px 12px; }
.chat-list > button { display: grid; width: 100%; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; border: 0; border-top: 1px solid var(--border); padding: 12px 16px; text-align: left; background: var(--surface); }
.chat-list > button.active { background: var(--accent-soft); }
.chat-list > button strong, .chat-list > button small { display: block; }
.chat-list > button small { overflow: hidden; max-width: 170px; margin-top: 2px; color: var(--ink-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.chat-list time { align-self: start; color: var(--ink-faint); font-size: 10.5px; }
.conversation { display: grid; grid-template-rows: auto 1fr auto; padding: 0; overflow: hidden; }
.conversation > header { display: flex; min-height: 66px; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); padding: 13px 20px; }
.conversation > header strong, .conversation > header small { display: block; }
.conversation > header small { margin-top: 2px; color: var(--ink-muted); font-size: 11.5px; }
.online { margin-left: auto; color: var(--success); font-size: 11.5px; font-weight: 700; }
.messages { display: flex; overflow: auto; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface-2); }
.message { width: min(75%, 480px); }
.message small { color: var(--ink-faint); font-size: 10.5px; }
.message p { margin-top: 3px; border-radius: 13px 13px 13px 3px; padding: 11px 13px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; }
.message.outgoing { align-self: end; text-align: right; }
.message.outgoing p { color: var(--accent-ink); border-radius: 13px 13px 3px 13px; text-align: left; background: var(--accent); }
.suggestion { width: min(85%, 560px); align-self: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 12px; background: var(--surface-2); }
.suggestion span { color: var(--ink-muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
.suggestion p { margin: 6px 0 8px; font-size: 12.5px; }
.suggestion button { border: 0; padding: 0; color: var(--accent-soft-ink); background: transparent; font-weight: 700; }
.message-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; border-top: 1px solid var(--border); padding: 13px; }
.message-form textarea { min-height: 44px; max-height: 110px; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; background: var(--surface); color: var(--ink); }

.marketplace-health { display: flex; min-width: 230px; align-items: center; gap: 11px; border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-md); padding: 13px; background: rgba(255,255,255,.06); }
.marketplace-health > span { width: 9px; height: 9px; border-radius: 50%; background: var(--hero-accent); box-shadow: 0 0 0 5px rgba(255,124,52,.16); }
.marketplace-health strong, .marketplace-health small { display: block; }
.marketplace-health strong { color: var(--hero-ink); }
.marketplace-health small { margin-top: 2px; color: var(--hero-ink-muted); font-size: 11px; }
.operation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.operation-card { display: flex; flex-direction: column; gap: 4px; min-height: 170px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: left; background: var(--surface); transition: border-color .12s ease, box-shadow .12s ease; }
.operation-card:hover { box-shadow: var(--shadow); }
.operation-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.operation-number { color: var(--ink-faint); font-size: 11px; font-weight: 800; }
.operation-card strong { margin-top: auto; font-size: 13.5px; font-weight: 700; }
.operation-card small { color: var(--ink-muted); font-size: 12px; }
.operation-card i { margin-top: 12px; color: var(--accent-soft-ink); font-size: 12px; font-style: normal; font-weight: 700; }
.op-result { margin: 4px 0 8px; color: var(--ink-muted); font-size: 12px; }
.operation-card > .secondary-button { align-self: flex-start; }
.key-warning { border-left: 3px solid var(--accent); }
.key-warning strong { display: block; font-size: 13.5px; }
.key-warning p { margin: 5px 0 12px; color: var(--ink-muted); font-size: 12.5px; }
.empty-state { display: grid; min-height: 200px; place-items: center; align-content: center; text-align: center; }
.empty-state strong { font-size: 15px; }
.empty-state p { margin-top: 6px; color: var(--ink-muted); font-size: 13px; }
.table-head, .table-row { display: grid; min-width: 640px; align-items: center; gap: 14px; padding: 11px 6px; }
.table-head { color: var(--ink-faint); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-row { border-top: 1px solid var(--border); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 120px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; background: var(--surface); box-shadow: var(--shadow); }
.metric-card > small { color: var(--ink-muted); font-size: 12px; }
.metric-card > strong { display: block; margin: 10px 0 3px; font-size: 1.5rem; letter-spacing: -.02em; }
.metric-card > p { color: var(--success); font-size: 11.5px; font-weight: 700; }
.metric-mark { position: absolute; top: 0; left: 0; width: 100%; height: 3px; }
.metric-mark.mint { background: var(--success); }
.metric-mark.blue { background: var(--blue-ink); }
.metric-mark.orange { background: var(--accent); }
.metric-mark.violet { background: var(--violet-ink); }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; }
.bar-chart { display: flex; height: 250px; align-items: end; justify-content: space-around; gap: 10px; border-bottom: 1px solid var(--border); padding: 24px 8px 0; }
.bar-chart > div { display: grid; width: 10%; height: 100%; grid-template-rows: 1fr 22px; align-items: end; text-align: center; }
.bar-chart > div > span { position: relative; display: block; min-height: 10px; border-radius: 6px 6px 2px 2px; background: var(--accent); }
.bar-chart i { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); color: var(--ink); font-size: 10.5px; font-style: normal; font-weight: 700; }
.bar-chart small { align-self: end; color: var(--ink-muted); font-size: 11px; }
.economy-panel { display: grid; align-content: start; }
.donut { display: grid; width: 160px; height: 160px; margin: 24px auto; border-radius: 50%; place-items: center; background: conic-gradient(var(--success) 0 54%, var(--blue-ink) 54% 73%, var(--accent) 73% 89%, var(--violet-ink) 89%); }
.donut > div { display: grid; width: 104px; height: 104px; border-radius: 50%; place-items: center; align-content: center; background: var(--surface); }
.donut strong { font-size: 1.4rem; }
.donut small { color: var(--ink-muted); font-size: 11px; }
.legend { display: grid; gap: 8px; }
.legend span { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 12px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.legend i.mint { background: var(--success); } .legend i.blue { background: var(--blue-ink); } .legend i.orange { background: var(--accent); } .legend i.violet { background: var(--violet-ink); }
.legend strong { color: var(--ink); }

.profile-hero { min-height: 160px; justify-content: flex-start; gap: 20px; }
.profile-hero h2 { margin-bottom: 5px; }
.profile-hero .profile-status { margin-left: auto; border-radius: 999px; padding: 7px 12px; color: var(--hero-ink); background: rgba(255,255,255,.1); font-size: 11.5px; font-weight: 700; }
.profile-grid { display: grid; grid-template-columns: 1.1fr 1fr .75fr; gap: 16px; }
.details-list { margin: 0; }
.details-list > div { display: grid; grid-template-columns: 160px 1fr; gap: 14px; border-top: 1px solid var(--border); padding: 13px 0; font-size: 12.5px; }
.details-list dt { color: var(--ink-muted); }
.details-list dd { margin: 0; font-weight: 700; }
.achievement { display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--border); padding: 12px 0; }
.achievement > span { display: grid; width: 34px; height: 34px; border-radius: var(--radius-md); place-items: center; color: var(--success); background: var(--success-soft); font-weight: 800; }
.achievement strong, .achievement small { display: block; }
.achievement small { margin-top: 2px; color: var(--ink-muted); font-size: 11.5px; }
.salary-panel > strong { display: block; margin: 18px 0 6px; font-size: 1.1rem; }
.salary-panel > p:not(.eyebrow) { margin-bottom: 20px; color: var(--ink-muted); font-size: 12.5px; }

/* ---------- Администратор ---------- */

.admin-summary { display: grid; min-width: 360px; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-md); padding: 15px; background: rgba(255,255,255,.06); }
.admin-summary > div { display: grid; min-height: 68px; align-content: center; border-left: 1px solid rgba(255,255,255,.11); padding: 0 13px; text-align: center; }
.admin-summary > div:first-child { border-left: 0; }
.admin-summary strong { font-size: 1.5rem; color: var(--hero-ink); }
.admin-summary small { color: var(--hero-ink-muted); font-size: 11px; }
.admin-columns { grid-template-columns: 1fr 1fr; }
.attention-list, .activity-list { display: grid; }
.attention-list > button { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; border: 0; border-top: 1px solid var(--border); padding: 11px 0; text-align: left; background: transparent; }
.attention-list > button:first-child { border-top: 0; }
.attention-list strong, .attention-list small { display: block; font-size: 12.5px; }
.attention-list small { margin-top: 2px; color: var(--ink-muted); }
.attention-list i { color: var(--accent-soft-ink); font-style: normal; }
.activity-list > p { position: relative; display: grid; border-top: 1px solid var(--border); padding: 11px 0 11px 18px; }
.activity-list > p:first-child { border-top: 0; }
.activity-list strong, .activity-list small { display: block; font-size: 12.5px; }
.activity-list small { margin-top: 2px; color: var(--ink-muted); }
.activity-dot { position: absolute; top: 17px; left: 0; width: 7px; height: 7px; border-radius: 50%; }
.activity-dot.mint { background: var(--success); } .activity-dot.blue { background: var(--blue-ink); } .activity-dot.orange { background: var(--accent); }

.employee-admin-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; gap: 16px; }
.employee-list-panel { position: sticky; top: 96px; padding: 0; overflow: hidden; }
.employee-list-title { display: flex; align-items: center; justify-content: space-between; padding: 18px; }
.employee-list-panel > .content-search { width: calc(100% - 28px); margin: 0 14px 12px; }
.employee-list { max-height: calc(100vh - 260px); overflow: auto; }
.employee-list > button { display: grid; width: 100%; grid-template-columns: 32px 1fr 8px; align-items: center; gap: 9px; border: 0; border-top: 1px solid var(--border); padding: 12px 16px; text-align: left; background: var(--surface); }
.employee-list > button.active { background: var(--accent-soft); }
.employee-list strong, .employee-list small { display: block; }
.employee-list strong { font-size: 12.5px; }
.employee-list small { margin-top: 1px; color: var(--ink-muted); font-size: 11.5px; }
.employee-status { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.employee-status.blocked { background: var(--danger); }
.empty-copy { padding: 22px; color: var(--ink-muted); font-size: 13px; }
.employee-detail { display: grid; min-width: 0; gap: 16px; }
.employee-detail-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.employee-detail-header h2 { margin: 8px 0 4px; font-size: 19px; font-weight: 700; }
.employee-detail-header p { color: var(--ink-muted); font-size: 13px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switch-list { display: grid; }
.switch-row { display: grid; grid-template-columns: auto 1fr 42px; align-items: center; gap: 11px; min-height: 58px; border-top: 1px solid var(--border); }
.switch-row:first-child { border-top: 0; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 12.5px; }
.switch-row small { margin-top: 2px; color: var(--ink-muted); font-size: 11px; }
.shop-access-group { margin-bottom: 4px; }
.shop-access-title { font-size: 11.5px; font-weight: 700; color: var(--ink-muted); padding: 14px 0 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.shop-access-group:first-child .shop-access-title { border-top: 0; margin-top: 0; padding-top: 0; }
.switch { position: relative; width: 40px; height: 22px; border: 0; border-radius: 999px; background: var(--border-strong); }
.switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .12s ease; display: block; }
.switch.on { background: var(--accent); }
.switch.on i { left: 21px; }
.employee-learning-strip { display: grid; grid-template-columns: 1fr 80px minmax(200px, 1fr) auto; align-items: center; gap: 18px; }
.employee-learning-strip > div > p:not(.eyebrow) { margin-top: 5px; color: var(--ink-muted); font-size: 12.5px; }
.employee-learning-strip textarea { min-height: 62px; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; background: var(--surface); color: var(--ink); }
.score-ring { display: flex; width: 62px; height: 62px; align-items: baseline; justify-content: center; border: 7px solid var(--surface-2); border-radius: 50%; padding-top: 13px; }
.score-ring.passed { border-color: var(--success-soft); }
.score-ring strong { font-size: 1.15rem; } .score-ring small { font-size: 11px; }

.training-table .table-head, .training-table .table-row { grid-template-columns: minmax(190px, 1.25fr) .7fr .6fr .9fr 100px; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell strong, .person-cell small { display: block; }
.person-cell strong { font-size: 12.5px; }
.person-cell small { margin-top: 1px; color: var(--ink-muted); font-size: 11.5px; }
.security-banner { min-height: 190px; }
.shield { display: grid; width: 100px; height: 112px; border: 2px solid rgba(255,255,255,.2); border-radius: 50px 50px 40px 40px; place-items: center; color: var(--hero-accent); background: rgba(255,255,255,.06); font-size: 2rem; }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.setting-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.setting-icon { display: grid; width: 42px; height: 42px; border-radius: var(--radius-md); place-items: center; color: var(--blue-ink); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.setting-card p { margin-top: 4px; color: var(--ink-muted); font-size: 12px; }
.security-log .table-head, .security-log .table-row { grid-template-columns: 1.35fr 1fr .75fr .65fr; }

.production-placeholder { position: relative; display: grid; overflow: hidden; min-height: calc(100vh - 220px); border-radius: var(--radius-lg); place-items: center; color: var(--hero-ink); background: var(--hero-bg); }
.blueprint-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 42px 42px; }
.placeholder-content { position: relative; z-index: 1; width: min(820px, 90%); text-align: center; }
.placeholder-index { display: grid; width: 60px; height: 60px; margin: 0 auto 20px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-md); place-items: center; color: var(--hero-accent); font-weight: 800; }
.placeholder-content h2 { margin-bottom: 16px; font-size: 22px; }
.placeholder-content > p:not(.eyebrow) { color: var(--hero-ink-muted); font-size: 13.5px; }
.future-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 26px 0; }
.future-flow span { border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 7px 10px; background: rgba(255,255,255,.04); font-size: 12.5px; }
.future-flow i { color: var(--hero-accent); font-style: normal; }
.placeholder-status { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 12px; color: var(--hero-ink-muted); background: rgba(255,255,255,.05); font-size: 11.5px; }
.placeholder-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--hero-accent); }

/* ---------- Модальное окно ---------- */

.modal-backdrop { position: fixed; z-index: 200; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(20,21,26,.55); backdrop-filter: blur(6px); }
.modal { width: min(100%, 540px); max-height: 92vh; overflow: auto; border-radius: var(--radius-lg); padding: 26px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.modal-head > button { width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); color: var(--ink-muted); background: var(--surface-2); font-size: 1.2rem; }
.modal > .muted { margin: 15px 0 18px; font-size: 13px; }
.modal form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal form > label { display: grid; gap: 5px; color: var(--ink-muted); font-size: 12px; font-weight: 700; }
.modal input, .modal select { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); color: var(--ink); }

.drop-row--active { background: var(--accent-soft); }
.drop-row--active .drop-title { color: var(--accent-soft-ink); }

/* ---------- Задачи / планировщик ---------- */

.task-check { border: 1.5px solid var(--border-strong); background: transparent; padding: 0; cursor: pointer; }
.task-check:hover { border-color: var(--accent); }
.task-link { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.task-link:hover { color: var(--accent-soft-ink); }
.task-row-wide { padding: 12px 4px; }
.task-row-wide .task-link { display: grid; gap: 2px; }
.task-row-wide .task-link strong { font-size: 13px; font-weight: 600; }
.task-row-wide .task-link small { color: var(--ink-muted); font-size: 11.5px; }
.task-row-wide.done .task-link strong { color: var(--ink-faint); text-decoration: line-through; }

/* ---------- Чат-бот: очередь разборов и карточка кейса ---------- */

.pill-row { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 15px 10px; }
.pill {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted);
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.pill:hover { border-color: var(--border-strong); color: var(--ink); }
.pill.act { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* Полоса состояния бота: тумблер «включён» и режим разбора */
.bot-strip { margin: 0 15px 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.bot-strip.off { border-color: var(--danger-soft); background: var(--danger-soft); }
.bot-strip .pill-row { padding: 8px 0 0; }
.bot-strip-line { display: flex; align-items: center; gap: 8px; }
.bot-strip-line strong { font-size: 13px; flex: 1; }
.bot-strip small { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 11.5px; line-height: 1.4; }
.bot-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: block; }
.bot-dot.наблюдение { background: var(--blue-ink); box-shadow: 0 0 0 3px var(--blue-soft); }
.bot-dot.подготовка { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bot-dot.автоответ { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.bot-dot.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.case-list { overflow-y: auto; max-height: calc(100vh - 420px); }
.case-row {
  display: grid; gap: 4px; width: 100%; text-align: left;
  border: 0; border-top: 1px solid var(--border); border-left: 3px solid transparent;
  padding: 11px 16px; background: var(--surface); cursor: pointer;
}
.case-row:hover { background: var(--surface-hover); }
.case-row.active { border-left-color: var(--accent); background: var(--accent-soft); }
.case-row-top { display: flex; align-items: center; gap: 7px; }
.case-row-top b { font-size: 11.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-row-text { font-size: 12px; color: var(--ink-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; }
.case-when { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.case-when.urgent { color: var(--danger); font-weight: 700; }

.level-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; flex: none; white-space: nowrap; }
.level-badge.AUTO { color: var(--success); background: var(--success-soft); }
.level-badge.DRAFT { color: var(--ink-muted); background: var(--surface-2); }
.level-badge.ESCALATE { color: var(--danger); background: var(--danger-soft); font-weight: 800; }

.case-head { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.case-head b { font-size: 13px; }
.case-meta { margin-left: auto; font-size: 11px; }
.case-banner { margin: 12px 20px 0; padding: 11px 13px; border-radius: var(--radius-md); background: var(--accent-soft); font-size: 12.5px; }
.case-banner b { display: block; color: var(--accent-soft-ink); }
.case-banner span { display: block; margin-top: 3px; }

.case-reason { margin: 12px 20px 0; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); font-size: 12.5px; }
.case-reason summary { cursor: pointer; }
.case-reason-body { display: grid; gap: 5px; margin-top: 8px; justify-items: start; }

.case-composer { display: grid; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.case-composer textarea {
  width: 100%; resize: vertical; padding: 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); font-family: inherit;
}
.model-fix { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2); }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.composer-row .muted { font-size: 11.5px; }
.snippets .secondary-button { min-height: 30px; padding: 0 10px; font-size: 11.5px; }
.bot-original { max-height: 200px; overflow: auto; margin: 6px 0 0; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12px; white-space: pre-wrap; }
.composer-note { font-size: 11px; line-height: 1.45; }

/* ---------- Чат-бот: вкладки панели ---------- */

.bot-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.bot-tab {
  border: 0; background: none; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink-muted); font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -5px;
}
.bot-tab:hover { color: var(--ink); }
.bot-tab.act { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; margin-left: 3px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 10px; font-weight: 800;
}
.bot-control { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bot-mode-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.bot-mode-btn:hover { background: var(--surface-hover); }
.bot-mode-btn:disabled { opacity: .55; cursor: not-allowed; }
.bot-balance { color: var(--ink-muted); font-size: 12px; }

/* Правки: два столбца «бот предлагал» / «человек отправил» */
.edit-item { padding: 14px 0; border-top: 1px solid var(--border); }
.edit-item:first-of-type { border-top: 0; }
.edit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.edit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.edit-cols .muted { font-size: 11.5px; margin-bottom: 4px; }
@media (max-width: 900px) { .edit-cols { grid-template-columns: 1fr; } }

/* Обучение бота: карточки файлов базы знаний */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kb-card { display: flex; flex-direction: column; gap: 10px; }
.kb-card-head { display: flex; align-items: flex-start; gap: 10px; }
.kb-card-head > div { flex: 1; min-width: 0; }
.kb-card-head h3 { font-size: 14px; font-weight: 700; }
.kb-file { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 11px; word-break: break-all; }
.kb-about { font-size: 12.5px; }
.kb-sample { border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 12px; background: var(--surface-2); }
.kb-sample-label { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.kb-sample p { font-size: 12.5px; line-height: 1.5; }
.kb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; font-size: 11.5px; }

/* Путь от промаха до правила */
.kb-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.kb-flow i { align-self: center; color: var(--accent); font-style: normal; font-weight: 700; }
.kb-step { flex: 1 1 180px; display: grid; gap: 3px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.kb-step > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
.kb-step b { font-size: 12.5px; }
.kb-step small { color: var(--ink-muted); font-size: 11.5px; line-height: 1.4; }

.costs-table .table-head, .costs-table .table-row { grid-template-columns: 1.4fr .6fr .6fr; min-width: 380px; }
.stats-table .table-head, .stats-table .table-row { grid-template-columns: 1.4fr .6fr .6fr .6fr .8fr .6fr .8fr .7fr; min-width: 760px; }
.botlog-table .table-head, .botlog-table .table-row { grid-template-columns: 1fr .9fr 1fr 1.8fr; }
.stats-table, .botlog-table { overflow-x: auto; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }

.op-scenarios { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.op-scenarios li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.op-scenarios li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.op-scenarios strong { margin-top: 0; font-size: 12.5px; }
.op-scenarios small { color: var(--ink-muted); font-size: 11.5px; }
.op-scenarios .secondary-button { flex-shrink: 0; }
.op-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.scenario-number { color: var(--ink-faint); font-weight: 800; font-size: 11px; margin-right: 2px; }

/* Журнал запусков */
.run-log-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.run-log-head h3 { margin: 2px 0 4px; }
.run-log-head p.muted { margin: 0; font-size: 12.5px; }
.run-log-head a.secondary-button { text-decoration: none; }
.run-filters { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.run-filter { display: flex; flex-direction: column; gap: 4px; }
.run-filter small { color: var(--ink-faint); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.run-filter select, .run-filter input { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; padding: 7px 9px; }
.runs-table .table-head, .runs-table .table-row { grid-template-columns: 130px 1.3fr .7fr .9fr 2.2fr 90px; min-width: 860px; }
.runs-table .table-row.run-failed { background: var(--danger-soft); }
.text-button.danger { color: var(--danger); }
.run-errors { border-top: 1px solid var(--border); padding: 8px 6px; font-size: 12.5px; color: var(--ink-muted); }
.run-errors p { margin: 0 0 4px; }
.run-errors strong { color: var(--ink); font-size: 12.5px; }

/* Сводка по датам внутри портала */
.run-summary-scroll { overflow-x: auto; }
.run-summary-grid { border-collapse: collapse; font-size: 12.5px; }
.run-summary-grid th, .run-summary-grid td { border: 1px solid var(--border); padding: 6px 10px; text-align: right; white-space: nowrap; }
.run-summary-grid thead th { background: var(--surface-2); color: var(--ink-muted); font-weight: 800; text-align: center; }
.run-summary-grid tbody th { background: var(--surface-2); text-align: left; font-weight: 700; }
.run-summary-grid td { font-variant-numeric: tabular-nums; }
.run-summary-grid .total { background: var(--surface-2); font-weight: 800; }
.run-summary-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--ink-muted); font-size: 11.5px; }
.run-summary-legend b { color: var(--ink); }
/* Отчёт «Количество доставленных»: та же сетка, плюс строка с ошибкой магазина */
.delivered-grid td.danger { color: var(--danger); text-align: left; white-space: normal; }
/* Юнит-экономика: та же сетка; текстовые столбцы влево, минус — красным,
   расшифровка начислений переносится, строка «Итого» — как шапка */
/* Колонка раскладки — grid, и её ячейка не ужимается меньше содержимого:
   широкая таблица растягивала всю страницу вместе с шапкой и кнопками
   (15.09.2026). min-width: 0 оставляет прокрутку внутри .run-summary-scroll. */
.content-stack > .run-summary, .content-stack > .account-fees { min-width: 0; }
.unit-grid td.text, .cost-grid td.text { text-align: left; }
/* Таблица юнит-экономики: столбцы уже, страница под неё шире (просил Дмитрий 15.09.2026) */
.page-content:has(.unit-grid) { max-width: 1720px; }
.unit-grid th, .unit-grid td { padding: 4px 7px; font-size: 12px; }
.unit-grid thead th { font-size: 11.5px; line-height: 1.2; white-space: normal; min-width: 70px; }
.unit-grid tbody th { font-size: 11.5px; }
.unit-grid td.neg { color: var(--danger); }
.unit-grid td.missing { color: var(--danger); font-style: italic; text-align: center; }
.unit-grid td.details { text-align: left; white-space: normal; min-width: 220px; max-width: 340px; font-size: 11px; line-height: 1.25; color: var(--ink-muted); }
.unit-grid tbody tr.total-row th, .unit-grid tbody tr.total-row td { background: var(--surface-2); font-weight: 800; border-top: 2px solid var(--border-strong, var(--border)); }
.unit-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-fees .panel-heading strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.account-fees .panel-heading strong.neg, .account-grid td.neg { color: var(--danger); }
.account-grid { margin-top: 10px; }
.account-grid th:first-child { text-align: left; }
.account-spread { margin-top: 12px; }
/* Верхний ползунок широкой таблицы (юнит-экономика) */
.scroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 4px; }
.scroll-top > div { height: 1px; }
.unit-grid thead th small.share { display: block; font-weight: 600; color: var(--ink-faint); }
.unit-grid td small.share { display: block; font-weight: 600; font-size: 10.5px; color: var(--ink-muted); }
/* Стрелки «в начало / в конец» — таблица юнит-экономики на сотни строк */
.page-jump { position: fixed; right: 18px; bottom: 26px; display: flex; flex-direction: column; gap: 6px; z-index: 20; }
.page-jump button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; box-shadow: var(--shadow); }
.page-jump button:hover { background: var(--surface-2); }
.account-spread summary { cursor: pointer; color: var(--ink-muted); font-size: 12.5px; }
.cost-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.cost-form .cost-paste { flex: 1 1 320px; }
.cost-form .cost-paste textarea { width: 100%; box-sizing: border-box; }
.key-json { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; padding: 8px 10px; resize: vertical; }
.key-warning { border-left: 3px solid var(--accent); }
.key-warning strong { display: block; font-size: 13.5px; }
.key-warning p { margin: 5px 0 12px; color: var(--ink-muted); font-size: 12.5px; }
.empty-state { display: grid; min-height: 200px; place-items: center; align-content: center; text-align: center; }
.empty-state strong { font-size: 15px; }
.empty-state p { margin-top: 6px; color: var(--ink-muted); font-size: 13px; }
.table-head, .table-row { display: grid; min-width: 640px; align-items: center; gap: 14px; padding: 11px 6px; }
.table-head { color: var(--ink-faint); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-row { border-top: 1px solid var(--border); font-size: 13px; }

/* ---------- Очередь разборов: новый макет ---------- */

.queue-state { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; font-size: 12px; }
.queue-state .secondary-button { margin-left: auto; min-height: 28px; padding: 0 10px; font-size: 11.5px; }
.queue-filters { display: grid; gap: 6px; padding: 0 16px 12px; }
.queue-filters .input { min-height: 34px; font-size: 12.5px; }

/* Карточка в очереди: уровень и время сверху, текст клиента, снизу магазин и захват */
.case-row { display: grid; gap: 6px; padding: 12px 16px; }
.case-row-top { display: flex; align-items: center; gap: 8px; }
.case-row-top .case-when { margin-left: auto; }
.case-row-text {
  font-size: 12.5px; color: var(--ink); line-height: 1.45;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-clamp: 3;
}
.case-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.case-row-bottom .held { white-space: nowrap; }

/* Карточка кейса */
.case-ozon { margin-left: auto; }
.case-head b { font-size: 13.5px; }

.rewrite { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 10px 12px; background: var(--surface-2); }
.rewrite summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.rewrite textarea { margin-top: 8px; }

.composer-row.actions { gap: 8px; }
.push-right { margin-left: auto; }
.secondary-button.quiet { color: var(--ink-muted); }
.remove-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.remove-row .input { flex: 1 1 220px; }

/* Что было раньше */
.case-past { margin: 0 20px 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.case-past summary { cursor: pointer; font-size: 12.5px; font-weight: 700; }
.past-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.past-item:first-of-type { border-top: 0; }
.past-customer { margin-top: 4px; font-size: 12px; }
.past-answer { margin-top: 3px; font-size: 12.5px; }
.past-label { margin-top: 12px; font-size: 11.5px; }
.past-table { margin-top: 6px; display: grid; gap: 4px; }
.past-row { display: grid; grid-template-columns: 60px auto 1fr auto; align-items: center; gap: 8px; font-size: 12px; }

/* ---------- Возвраты, рекламации, отчёты, новости ---------- */

.returns-table .table-head, .returns-table .table-row { grid-template-columns: 100px 1.2fr 1fr 1.4fr 1fr 110px; }
/* Возвраты из Ozon: у полного списка, главной и блока отмен разное число колонок. */
.returns-table.wide .table-head, .returns-table.wide .table-row { grid-template-columns: 130px 80px 1fr 1.6fr 1.6fr 130px 130px; }
.returns-table.compact .table-head, .returns-table.compact .table-row { grid-template-columns: 130px 80px 1fr 1.8fr 130px; }
.returns-table.pending .table-head, .returns-table.pending .table-row { grid-template-columns: 150px 1fr 2fr 150px; }
.returns-table.pickup .table-head, .returns-table.pickup .table-row { grid-template-columns: 140px 120px 1.2fr 1.6fr 130px; }
/* --- Панель заказов ------------------------------------------------------ */
/* Четыре площадки в строку. На узком экране переносятся сами, не сжимаясь
   в нечитаемую полоску. */
.oc-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 12px; }
.oc-card { border: 1px solid #e6e8ec; border-radius: 10px; padding: 12px 14px 10px; background: #fff; }
.oc-card.оff { background: #fafbfc; }
.oc-card-head strong { font-size: 13px; font-weight: 650; color: #1f2530; }

/* Сводка за сегодня: число крупно, деньги рядом — их сравнивают между
   магазинами, а не читают по одному. */
.oc-today { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.oc-today-orders { font-size: 26px; font-weight: 680; line-height: 1; color: #1f2530; }
.oc-today-sub { font-size: 12px; color: #8a9099; }
.oc-today-money { margin-left: auto; font-size: 14px; font-weight: 650; color: #1f2530;
                  font-variant-numeric: tabular-nums; }

.oc-empty { margin: 14px 0 18px; font-size: 13px; line-height: 1.5; }
.oc-why { font-size: 12px; color: #9aa0a8; }

.oc-month { margin: 3px 0 0; font-size: 11.5px; color: #8a9099; }
.oc-month b { font-weight: 650; color: #52585f; font-variant-numeric: tabular-nums; }

/* Ось — сплошная волосяная линия на тон от фона. Пунктир читался бы как
   «прогноз» или «порог», хотя это просто разметка. */
.oc-chart { display: block; width: 100%; height: auto; }
.oc-axis { stroke: #dfe3e8; stroke-width: 1; }
/* Подписи носят цвет текста, а не цвет столбика: цвет — это про метки. */
.oc-tick { fill: #9aa0a8; font-size: 9px; }
.oc-band { cursor: default; }
.oc-band:hover rect { fill: rgba(15, 23, 42, 0.05); }

.oc-chart-wrap { position: relative; margin: 6px 0 4px; }
.oc-tip {
  position: absolute; pointer-events: none; z-index: 3;
  background: #1f2530; color: #fff; border-radius: 6px;
  padding: 6px 9px; font-size: 11.5px; line-height: 1.45;
  white-space: pre-line; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
}
.oc-tip[hidden] { display: none; }

.oc-cancels { margin: 4px 0 0; font-size: 12px; color: #52585f; }
.oc-cancels b { font-weight: 680; color: #1f2530; }

.oc-head-right { display: flex; align-items: center; gap: 14px; }
.oc-when { font-size: 12px; }

/* Переключатель площадок на экране возвратов. Подчёркивание вместо заливки:
   это навигация, а не действие, и спорить с кнопками ей незачем. */
.rt-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0 4px;
           border-bottom: 1px solid #e6e8ec; }
.rt-tab { appearance: none; background: none; border: 0; cursor: pointer;
          font: inherit; font-size: 13.5px; color: #6b7280; padding: 8px 12px;
          border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rt-tab:hover { color: #1f2530; }
.rt-tab.active { color: #1f2530; font-weight: 600; border-bottom-color: #d4522a; }
.rt-count { display: inline-block; margin-left: 5px; font-size: 11.5px; color: #9aa0a8;
            font-variant-numeric: tabular-nums; }
.rt-tab.active .rt-count { color: #6b7280; }
.rt-hint { margin: 8px 0 0; font-size: 13px; }

/* Номер заказа ведёт в кабинет Ozon. Стрелка говорит, что уйдём на другой сайт. */
.ozon-link { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.ozon-link:hover { color: var(--accent, #d4522a); }
/* Названия товаров длинные — обрезаем, полное видно в подсказке. */
.returns-table.wide .table-row span, .returns-table.compact .table-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claims-table .table-head, .claims-table .table-row { grid-template-columns: 100px 1fr 1.4fr 100px 1.4fr 110px; }
.returns-table .status-pill, .claims-table .status-pill { border: 0; cursor: pointer; font-family: inherit; }
.claim-form { margin-bottom: 14px; }
.claim-form .primary-button, .claim-form .secondary-button { margin-right: 8px; }

.report-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.report-card h3 { font-size: 13.5px; font-weight: 700; }
.report-url { font-size: 11.5px; word-break: break-all; }
.report-row { grid-template-columns: 1fr auto; }
.report-row small { word-break: break-all; }

.news-item { display: grid; gap: 8px; }
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.news-item h3 { font-size: 15px; font-weight: 700; }

.field { display: grid; gap: 5px; color: var(--ink-muted); font-size: 12px; font-weight: 700; margin: 0 0 12px; }
.input { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); color: var(--ink); font-size: 13px; }
.input:focus { outline: none; border-color: var(--accent); }
.modal-note { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; border-radius: var(--radius-md); padding: 12px; background: var(--blue-soft); }
.modal-note > span { display: grid; width: 26px; height: 26px; border-radius: var(--radius-sm); place-items: center; color: var(--blue-ink); background: var(--surface); font-weight: 800; }
.modal-note strong, .modal-note small { display: block; font-size: 12px; }
.modal-note small { color: var(--ink-muted); }
.modal-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; margin-top: 4px; }

svg { display: block; }

/* ---------- Адаптивность ---------- */

@media (max-width: 1180px) {
  .row.grid7, .module-grid, .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .operation-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .salary-panel { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .employee-learning-strip { grid-template-columns: 1fr 70px; }
  .employee-learning-strip textarea { grid-column: 1 / -1; }
  .employee-learning-strip > button { grid-column: 1 / -1; justify-self: start; }
  .admin-welcome { align-items: flex-start; flex-direction: column; }
  .admin-summary { min-width: 0; width: 100%; }
}

@media (max-width: 900px) {
  .login-page { flex-direction: column; }
  .hero-panel { width: auto; padding: 30px 24px; }
  .flow-panel { padding: 32px 20px 48px; }
  .two-column-grid, .analytics-grid, .detail-grid, .admin-columns { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { max-height: 320px; }
  .conversation { min-height: 560px; }
  .employee-admin-layout { grid-template-columns: 1fr; }
  .employee-list-panel { position: static; }
  .employee-list { max-height: 340px; }
  .security-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .salary-panel { grid-column: auto; }
}

@media (max-width: 620px) {
  body { font-size: 13.5px; }
  .page-content { padding: 18px 14px 45px; }
  .row.grid7, .module-grid, .lesson-grid, .operation-grid, .metric-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filter-row { align-items: stretch; }
  .content-search { width: 100%; margin-left: 0; }
  .content-search input { width: 100%; }
  .exam-intro { flex-direction: column; }
  .exam-meta { width: 100%; }
  .exam-meta span { min-width: 0; flex: 1; }
  .question { grid-template-columns: 1fr; }
  .question-panel > .primary-button { margin-left: 0; }
  .attempt-history .history-row { grid-template-columns: 1fr auto; }
  .attempt-history .history-row small { grid-column: 1 / -1; }
  .exam-result { grid-template-columns: 1fr; text-align: center; }
  .result-score { margin: 0 auto; }
  .message-form { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-summary > div { border-top: 1px solid rgba(255,255,255,.11); border-left: 0; }
  .admin-summary > div:first-child { border-top: 0; }
  .employee-detail-header { align-items: flex-start; }
  .detail-actions { width: 100%; margin-left: 0; }
  .employee-learning-strip { grid-template-columns: 1fr; }
  .employee-learning-strip textarea, .employee-learning-strip > button { grid-column: auto; }
  .modal form { grid-template-columns: 1fr; }
  .modal-note, .modal-actions { grid-column: auto; }
  .future-flow i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Ключи маркетплейсов в настройках */
.key-list { display: grid; gap: 10px; }
.key-row {
  display: grid; grid-template-columns: minmax(180px, 1.4fr) auto minmax(160px, 1.6fr) auto;
  align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
}
.key-name strong { display: block; font-size: 13px; }
.key-name small { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 11px; }
.key-row input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13px;
}
.key-row input:focus { border-color: var(--accent); outline: none; }
@media (max-width: 900px) {
  .key-row { grid-template-columns: 1fr auto; }
  .key-row input, .key-row button { grid-column: 1 / -1; }
}


/* ---------- Заголовки экранов ---------- */
/* Пришли на смену тёмным блокам-шапкам: те занимали до трети экрана ради
   лозунга, а рабочей площади не оставалось. Заголовок остался, подложка ушла. */

.page-title {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--ink);
}
.page-title:focus { outline: none; }
.page-subtitle { margin: -12px 0 0; color: var(--ink-muted); font-size: 13px; }

/* Экран чат-бота: кроме панели на нём ничего нет, поэтому она занимает всё
   окно под шапкой. Внешней прокрутки здесь быть не должно — переписка
   прокручивается внутри панели. */
.content-stack--tight { display: flex; flex-direction: column; gap: 0; }
.portal-shell--frame { height: 100vh; }
.portal-shell--frame .page { flex: 1; min-height: 0; display: flex; }
.portal-shell--frame .page-content { flex: 1; min-height: 0; display: flex; padding-bottom: 10px; }
.portal-shell--frame .page-content > .content-stack { flex: 1; min-width: 0; }



/* Счётчики с главной администратора. Были белым по тёмному, теперь на светлом. */
.summary-strip .admin-summary {
  min-width: 0; border-color: var(--border); background: var(--surface);
  box-shadow: var(--shadow);
}
.summary-strip .admin-summary strong { color: var(--ink); }
.summary-strip .admin-summary small { color: var(--ink-muted); }

/* Заголовок экрана и индикатор готовности — одной строкой. */
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Магазин прямо в карточке: экран показывает несколько магазинов подряд,
   и при прокрутке без подписи непонятно, к какому она относится. */
.operation-shop {
  display: block; margin-bottom: 2px;
  color: var(--ink-faint); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}

/* «Скоро добавим» — то, что задумано, но ещё не работает. Одной строкой
   вместо карточек с мёртвой кнопкой «Запустить»: карточка обещает действие,
   которого нет, и место занимает как рабочая. */
.soon-block { display: flex; align-items: center; gap: 12px; }
.soon-block p { margin: 0; }
.soon-block .muted { font-size: 13px; line-height: 1.5; }

/* Заголовок ряда карточек: «Смена статусов», «Ответы на отзывы». */
.group-title { margin: 4px 0 -4px; font-size: 14px; font-weight: 700; color: var(--ink-muted);
               letter-spacing: .02em; }
/* Разделитель между разделами и площадками в одном ряду кнопок. */
.filter-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex: none; }

/* Итог прогона автоматизации: человек нажал кнопку и ждёт ответа. */
.run-summary { margin: 12px 0; font-size: 15px; line-height: 1.5; }
.run-errors { margin-bottom: 14px; }
.run-errors summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: 13px; }
.run-errors ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }

/* Правка текста рассылки. Моноширинный шрифт — чтобы отступы и переносы,
   которые уйдут клиенту, были видны ровно так, как их набрали. */
.modal-wide { width: min(100%, 720px); }
.message-edit {
  width: 100%; margin-top: 10px; padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface); color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px;
  line-height: 1.55; resize: vertical; white-space: pre-wrap;
}
.message-edit:focus { border-color: var(--accent); outline: none; }
.char-count { margin: 6px 0 0; color: var(--ink-muted); font-size: 12px; }
.char-count.over { color: var(--danger); font-weight: 600; }

/* Вопрос про повторную отправку: этим заказам сообщение уже уходило. */
.repeat-ask { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border-strong);
              border-radius: var(--radius-md); background: var(--surface-2); }
.repeat-ask p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.repeat-ask summary { cursor: pointer; font-size: 12.5px; color: var(--ink-muted); }
