/* ============================================================
   SHKARBAN — Design System v2
   «Сияние» × Linear/Vercel
   Тёмная тема по умолчанию · фиолетовый акцент · хейрлайны ·
   крупная типографика · максимум воздуха · ноль декора.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;

  /* ---------- Поверхности ---------- */
  --bg:           #08080C;
  --bg-elev-1:    #0E0E15;
  --bg-elev-2:    #14141D;
  --bg-elev-3:    #1B1B27;

  --hairline:     rgba(255,255,255,0.06);
  --hairline-2:   rgba(255,255,255,0.10);
  --hairline-3:   rgba(255,255,255,0.16);

  /* ---------- Текст ---------- */
  --text:         #F4F4F8;
  --text-2:       rgba(244,244,248,0.70);
  --text-3:       rgba(244,244,248,0.50);
  --text-4:       rgba(244,244,248,0.34);
  --text-on-brand:#FFFFFF;

  /* ---------- Акцент (один) ---------- */
  --accent:       #A78BFA;          /* лавандовый-фиолет — премиум-тон */
  --accent-2:     #8B5CF6;
  --accent-3:     #6D5BF1;
  --accent-soft:  rgba(167,139,250,0.12);
  --accent-line:  rgba(167,139,250,0.28);
  --accent-glow:  radial-gradient(ellipse 800px 500px at 50% -10%,
                    rgba(139,92,246,0.18) 0%,
                    rgba(139,92,246,0.04) 40%,
                    transparent 70%);

  /* ---------- Семантика ---------- */
  --ok:           #34D399;
  --warn:         #FBBF24;
  --err:          #F87171;
  --info:         #60A5FA;
  --ok-soft:      rgba(52,211,153,0.10);
  --warn-soft:    rgba(251,191,36,0.10);
  --err-soft:     rgba(248,113,113,0.10);

  /* ---------- Типографика ---------- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 13px;
  --fs-md:   14px;
  --fs-lg:   16px;
  --fs-xl:   20px;
  --fs-2xl:  28px;
  --fs-3xl:  40px;
  --fs-4xl:  56px;
  --fs-display: 96px;

  /* ---------- Ритм ---------- */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;

  /* ---------- Размеры лейаута ---------- */
  --sb-w: 232px;
  --topbar-h: 56px;
  --max-w: 1320px;

  /* ---------- Анимация ---------- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 100ms;
  --t-base: 180ms;
}

/* ============== LIGHT — переключатель ============== */
[data-theme="light"] {
  color-scheme: light;
  --bg:           #FAFAFB;
  --bg-elev-1:    #FFFFFF;
  --bg-elev-2:    #F5F5F8;
  --bg-elev-3:    #EDEDF0;
  --hairline:     rgba(15,15,25,0.06);
  --hairline-2:   rgba(15,15,25,0.10);
  --hairline-3:   rgba(15,15,25,0.16);
  --text:         #0E0E14;
  --text-2:       rgba(14,14,20,0.70);
  --text-3:       rgba(14,14,20,0.50);
  --text-4:       rgba(14,14,20,0.34);
  --accent:       #6D5BF1;
  --accent-2:     #5B47E0;
  --accent-3:     #4A37C9;
  --accent-soft:  rgba(109,91,241,0.08);
  --accent-line:  rgba(109,91,241,0.20);
  --accent-glow:  rgba(109,91,241,0.20);
}
[data-theme="light"] body::before {
  background: radial-gradient(ellipse 1000px 600px at 50% -10%,
    rgba(109,91,241,0.06) 0%, rgba(109,91,241,0.01) 40%, transparent 70%);
}
[data-theme="light"] .topbar {
  background: rgba(250,250,251,0.78);
}
[data-theme="light"] .sidebar { background: var(--bg-elev-1); }
[data-theme="light"] .btn--primary { background: #0E0E14; color: white; }
[data-theme="light"] .btn--primary:hover:not(:disabled) { background: var(--accent); color: white; }
[data-theme="light"] .btn--accent { color: white; }
[data-theme="light"] .btn--accent:hover { color: white; }

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.005em;
  min-height: 100vh;
  position: relative;
}
body::before {
  /* мягкая аура «Сияния» поверх всего тёмного фона */
  content: '';
  position: fixed; inset: 0;
  background: var(--accent-glow);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--text); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.15; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0; }

::selection { background: var(--accent); color: white; }

/* Scrollbar (тонкие, ненавязчивые) */
* { scrollbar-width: thin; scrollbar-color: var(--hairline-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--hairline-2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--hairline-3); background-clip: padding-box; border: 2px solid transparent; }
*::-webkit-scrollbar-corner { background: transparent; }

/* Smooth scroll */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   PAGE-LOAD анимация (мягкое появление контента)
   ============================================================ */
@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes page-in-stagger {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.page > .page__head { animation: page-in 280ms var(--ease) both; }
.page > * + * { animation: page-in-stagger 380ms var(--ease) both; animation-delay: 60ms; }
.page > * + * + * { animation-delay: 110ms; }
.page > * + * + * + * { animation-delay: 150ms; }
.page > * + * + * + * + * { animation-delay: 180ms; }
@media (prefers-reduced-motion: reduce) {
  .page > *, .page > *::before { animation: none !important; }
}

/* ============================================================
   ГЛОБАЛЬНОЕ ПРАВИЛО ДЛЯ SVG-ИКОНОК
   Любая svg внутри кнопки/чипса/линка — outline-стиль с currentColor.
   Это перебивает дефолтный fill:black у браузера.
   ============================================================ */
button svg, .btn svg, a svg, .chip svg, .card__title svg,
.icon-btn svg, .topbar svg, .crumbs svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg path, .btn svg path, a svg path, .chip svg path,
button svg line, .btn svg line, a svg line, .chip svg line,
button svg circle, .btn svg circle, a svg circle, .chip svg circle,
button svg rect, .btn svg rect, a svg rect, .chip svg rect,
button svg polyline, .btn svg polyline, a svg polyline, .chip svg polyline,
button svg polygon, .btn svg polygon, a svg polygon, .chip svg polygon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Исключение: явно с заполнением (через class fill-current) */
.svg-fill, .svg-fill * { fill: currentColor !important; stroke: none !important; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sb-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  background: var(--bg-elev-1);          /* чуть светлее main → визуальная глубина */
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Brand */
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--hairline);
}
.sidebar__brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 12px;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 6px 18px rgba(167,139,250,0.30);
  position: relative;
  flex-shrink: 0;
}
.sidebar__brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.sidebar__brand-name {
  font-size: var(--fs-md); font-weight: 600;
  letter-spacing: -0.01em; color: var(--text);
}
.sidebar__brand-sub {
  font-size: 11px; color: var(--text-4);
  letter-spacing: 0.04em; margin-top: 2px;
}

/* Nav */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 12px 10px;
  display: flex; flex-direction: column;
  scrollbar-gutter: stable;
}
.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--hairline-2); }

.sidebar__group { display: flex; flex-direction: column; margin-top: 14px; }
.sidebar__group:first-child { margin-top: 0; }
.sidebar__group-label {
  padding: 8px 10px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-4);
  font-weight: 600;
}

.sidebar__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  position: relative;
  letter-spacing: -0.005em;
  --icon-color: var(--text-3);
}
.sidebar__item:hover {
  color: var(--text);
  background: var(--bg-elev-2);
  --icon-color: var(--text);
}
.sidebar__item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  --icon-color: var(--accent);
}
.sidebar__item.is-active::before {
  content: '';
  position: absolute;
  left: -10px; top: 7px; bottom: 7px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(167,139,250,0.40);
}

/* Иконки сайдбара — explicit на всех потомках, чтобы перебить дефолтный fill:black */
.sidebar__icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--icon-color);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color var(--t-fast) var(--ease);
}
.sidebar__icon path,
.sidebar__icon line,
.sidebar__icon circle,
.sidebar__icon rect,
.sidebar__icon polyline,
.sidebar__icon polygon,
.sidebar__icon ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* User-actions — те же правила */
.sidebar__user-actions svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar__user-actions svg path,
.sidebar__user-actions svg line,
.sidebar__user-actions svg polyline,
.sidebar__user-actions svg rect,
.sidebar__user-actions svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* User block */
.sidebar__user {
  border-top: 1px solid var(--hairline);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid; place-items: center;
  color: white; font-size: var(--fs-sm); font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__user-name {
  font-size: var(--fs-base); font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar__user-role { font-size: 11px; color: var(--text-4); margin-top: 1px; }
.sidebar__user-actions { display: flex; gap: 2px; flex-shrink: 0; }
.sidebar__user-actions a {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: all var(--t-fast) var(--ease);
}
.sidebar__user-actions a:hover { color: var(--text); background: var(--bg-elev-3); }
.sidebar__user-actions svg { width: 14px; height: 14px; stroke-width: 1.75; }

/* ---------- Main column ---------- */
.app__main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--hairline);
  padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(8,8,12,0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}
[data-theme="light"] .topbar { background: rgba(250,250,251,0.78); }

.topbar__title { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.topbar__crumbs { font-size: var(--fs-xs); color: var(--text-4); margin-bottom: 2px; }
.topbar__crumbs a { color: var(--text-4); }
.topbar__crumbs a:hover { color: var(--text-2); }
.topbar h1 { font-size: var(--fs-md); font-weight: 600; }

.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

/* Cmd+K search trigger */
.topbar__search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  color: var(--text-3);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  font-family: inherit;
  min-width: 220px;
}
.topbar__search:hover {
  background: var(--bg-elev-3);
  border-color: var(--hairline-3);
  color: var(--text-2);
}
.topbar__search svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar__search-text { flex: 1; text-align: left; }
.topbar__search-kbd {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 2px 5px;
  background: var(--bg-elev-3);
  border: 1px solid var(--hairline-2);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
}

/* Кнопка-иконка в топбаре */
.topbar__icon-btn {
  position: relative;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-3);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
}
.topbar__icon-btn:hover {
  background: var(--bg-elev-2);
  color: var(--text);
  border-color: var(--hairline-2);
}
.topbar__icon-btn svg { width: 15px; height: 15px; }
.topbar__icon-btn-dot {
  position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.page {
  padding: 32px 28px 64px;
  max-width: var(--max-w);
  width: 100%;
}

.page__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.page__title { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.page__sub { color: var(--text-3); font-size: var(--fs-md); margin-top: 6px; max-width: 640px; }

/* ============================================================
   CARD — минималистичная: только хейрлайн, без тени
   ============================================================ */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: border-color var(--t-fast) var(--ease);
}
.card--hoverable:hover { border-color: var(--hairline-2); }
.card--lg { padding: 32px; }
.card--flush { padding: 0; overflow: hidden; }
.card--accent {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--bg-elev-1);
}
.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card__eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-4);
  font-weight: 500;
}
.card__title { font-size: var(--fs-lg); font-weight: 600; margin-top: 4px; }

/* ============================================================
   KPI — крупная цифра «как в финтехе»
   ============================================================ */
.kpi {
  display: flex; flex-direction: column; gap: 10px;
}
.kpi__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-4);
  font-weight: 500;
}
.kpi__value {
  font-size: var(--fs-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi__sub { font-size: var(--fs-sm); color: var(--text-3); }

/* Display KPI — гигантская цифра уровня Robinhood/Stripe */
.kpi-display {
  display: flex; flex-direction: column; gap: 14px;
}
.kpi-display__label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-weight: 500;
}
.kpi-display__label-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.kpi-display__value {
  font-size: clamp(60px, 9vw, var(--fs-display));
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: flex; align-items: baseline; gap: 14px;
}
.kpi-display__suffix {
  font-size: 0.32em;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: -0.01em;
}
.kpi-display__sub {
  font-size: var(--fs-md);
  color: var(--text-3);
}
.kpi-display__sub b { color: var(--text); font-weight: 600; }

/* ============================================================
   STATS GRID — KPI-сетка с иконками
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.stats__item {
  background: var(--bg-elev-1);
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: background var(--t-fast) var(--ease);
}
.stats__item:hover { background: var(--bg-elev-2); }
.stats__item-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.stats__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg-elev-2);
  color: var(--text-3);
  border: 1px solid var(--hairline);
  flex-shrink: 0;
}
.stats__icon svg { width: 16px; height: 16px; }
.stats__icon--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.stats__icon--ok { background: rgba(52,211,153,0.10); color: var(--ok); border-color: rgba(52,211,153,0.20); }
.stats__icon--warn { background: rgba(251,191,36,0.10); color: var(--warn); border-color: rgba(251,191,36,0.20); }
.stats__icon--err { background: rgba(248,113,113,0.10); color: var(--err); border-color: rgba(248,113,113,0.20); }
.stats__icon--info { background: rgba(96,165,250,0.10); color: var(--info); border-color: rgba(96,165,250,0.20); }

.stats__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  font-weight: 500;
}
.stats__value {
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stats__value-suffix {
  font-size: 0.55em; color: var(--text-4); font-weight: 500; margin-left: 4px;
}
.stats__delta {
  font-size: var(--fs-xs);
  color: var(--text-3);
  display: inline-flex; align-items: center; gap: 4px;
}
.stats__delta--up { color: var(--ok); }
.stats__delta--down { color: var(--err); }
.stats__delta svg { width: 11px; height: 11px; stroke-width: 2.4; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.005em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent);
}
.btn svg { width: 14px; height: 14px; }
.btn:active:not(:disabled) { transform: scale(0.98); }

.btn--primary {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.btn--primary:hover:not(:disabled) { background: var(--accent); color: white; }

.btn--accent {
  background: var(--accent);
  color: #1A1230;                      /* тёмный текст на лавандовом — премиум */
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(167,139,250,0.30);
}
.btn--accent:hover:not(:disabled) { background: var(--accent-2); color: #1A1230; box-shadow: 0 0 0 1px var(--accent-2), 0 10px 30px rgba(139,92,246,0.45); }

.btn--secondary {
  background: var(--bg-elev-2);
  color: var(--text);
  border-color: var(--hairline-2);
}
.btn--secondary:hover:not(:disabled) { background: var(--bg-elev-3); border-color: var(--hairline-3); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover:not(:disabled) { background: var(--bg-elev-2); color: var(--text); }

.btn--danger {
  background: var(--err);
  color: white;
  font-weight: 600;
}
.btn--danger:hover:not(:disabled) { background: #DC2626; color: white; }

.btn--lg { padding: 12px 20px; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn--xl { padding: 16px 24px; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn--sm { padding: 6px 10px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 32px; height: 32px; }

/* ============================================================
   CHIPS / BADGES
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.chip svg { width: 12px; height: 12px; opacity: 0.8; }
.chip--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.chip--ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(52,211,153,0.20); }
.chip--warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251,191,36,0.20); }
.chip--err { background: var(--err-soft); color: var(--err); border-color: rgba(248,113,113,0.20); }

.badge { /* alias для chip */
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--bg-elev-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0;
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--err { background: var(--err-soft); color: var(--err); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot--ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot--warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot--err { background: var(--err); box-shadow: 0 0 8px var(--err); }
.dot--accent { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot--off { background: var(--text-4); }

.mp-badge {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: var(--r-xs);
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: white;
  text-transform: uppercase;
}
.mp-badge.ozon   { background: #0088CC; }
.mp-badge.wb     { background: #CB11AB; }
.mp-badge.yandex { background: #FFCC00; color: #222; }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.field__hint { font-size: var(--fs-xs); color: var(--text-4); }

.input, .select, .textarea {
  font-family: inherit;
  font-size: var(--fs-md);
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  width: 100%;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--hairline-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--bg-elev-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select {
  appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23808095' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
}
.filters .field { min-width: 160px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  background: var(--bg-elev-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table th, .table td {
  /* Антон 2026-05-15/17: ещё плотнее, фото 32–36px размер не трогаем.
     Высота строки теперь = (32–36 фото) + 2×4 padding = 40–44px. */
  padding: 4px 10px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.table th {
  background: transparent;
  color: var(--text-4);
  font-weight: 500;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 7px; padding-bottom: 7px;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t-fast) var(--ease); }
.table tbody tr:hover td { background: var(--bg-elev-2); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--text-3); }

.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-4);
  font-size: var(--fs-sm);
}
.empty__icon {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
  color: var(--text-3);
}
.empty__icon svg { width: 20px; height: 20px; }
.empty__title { color: var(--text-2); font-size: var(--fs-base); font-weight: 500; margin-bottom: 6px; }
.empty__sub { color: var(--text-4); font-size: var(--fs-xs); max-width: 320px; margin: 0 auto 14px; line-height: 1.6; }
.empty__cta { margin-top: 8px; }

/* ============================================================
   PAGER
   ============================================================ */
.pager { display: flex; gap: 2px; justify-content: center; margin-top: 20px; }
.pager a, .pager span {
  min-width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 9px;
  border-radius: var(--r-md);
  color: var(--text-3);
  font-size: var(--fs-sm); font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.pager a:hover { color: var(--text); background: var(--bg-elev-2); }
.pager .current { background: var(--text); color: var(--bg); }
.pager .disabled { opacity: 0.3; pointer-events: none; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-2);
  background: var(--bg-elev-1);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 20px;
}
.alert b { color: var(--text); font-weight: 600; }
.alert code {
  font-family: var(--font-mono); font-size: 0.92em;
  background: var(--bg-elev-3); padding: 1px 5px; border-radius: var(--r-xs);
  color: var(--text);
}
.alert--ok { background: var(--ok-soft); border-color: rgba(52,211,153,0.20); color: var(--ok); }
.alert--ok b { color: var(--ok); }
.alert--warn { background: var(--warn-soft); border-color: rgba(251,191,36,0.20); color: var(--warn); }
.alert--err { background: var(--err-soft); border-color: rgba(248,113,113,0.20); color: var(--err); }
.alert--accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.alert--accent b { color: var(--accent); }

.hint { /* alias для совместимости */
  display: flex; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 20px;
}
.hint b { color: var(--text); font-weight: 600; }
.hint code {
  font-family: var(--font-mono); font-size: 0.92em;
  background: var(--bg-elev-3); padding: 1px 5px; border-radius: var(--r-xs);
  color: var(--text);
}

.msg {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.err { background: var(--err-soft); color: var(--err); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade var(--t-base) var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-xl);
  padding: 28px;
  width: 460px; max-width: 100%;
  animation: pop var(--t-base) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-card h3 { margin: 0 0 16px; font-size: var(--fs-lg); }
.modal-card label { display: block; font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; margin: 14px 0 6px; }
.modal-card input, .modal-card select {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--hairline-2); border-radius: var(--r-md);
  font-size: var(--fs-md); font-family: inherit;
  background: var(--bg-elev-2); color: var(--text);
}
.modal-card input:focus, .modal-card select:focus {
  outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal-card .actions { margin-top: 22px; display: flex; gap: 8px; justify-content: flex-end; }

/* ============================================================
   SEARCHABLE COMBOBOX
   ============================================================ */
.ssel { position: relative; display: block; }
.ssel-input {
  width: 100%; padding: 8px 32px 8px 12px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-family: inherit;
  background: var(--bg-elev-2);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease);
}
.ssel-input:hover { border-color: var(--hairline-3); }
.ssel-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--bg-elev-1); }
.ssel.with-new .ssel-input { padding-right: 84px; }
.ssel-dd {
  /* Антон 2026-05-20: position: fixed чтобы dropdown не обрезался
     родительскими .card (overflow: hidden) и не зажимался stacking
     context'ом. Координаты пересчитываются JS при показе/скролле. */
  position: fixed; top: 0; left: 0; width: 240px;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  max-height: 280px; overflow-y: auto;
  z-index: 10000; display: none;
  padding: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.40);
}
.ssel-dd .opt {
  padding: 7px 10px; cursor: pointer;
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
  color: var(--text-2);
}
.ssel-dd .opt.hl, .ssel-dd .opt:hover { background: var(--accent-soft); color: var(--accent); }
.ssel-dd .empty { padding: 10px; color: var(--text-4); font-style: italic; font-size: var(--fs-sm); text-align: left; }
.ssel-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--text-4);
  cursor: pointer; background: transparent; border: none;
  border-radius: var(--r-sm);
  font-size: 16px;
}
.ssel-clear:hover { color: var(--text); background: var(--bg-elev-3); }
.ssel-new {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  font-size: var(--fs-xs); font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  cursor: pointer;
  line-height: 1.4;
}
.ssel-new:hover { color: white; background: var(--accent); border-color: var(--accent); }

/* ============================================================
   PROGRESS BAR (для hero приёмки/комплектовки и для строк)
   ============================================================ */
.progress {
  position: relative;
  height: 4px;
  background: var(--hairline);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(167,139,250,0.45);
  transition: width var(--t-base) var(--ease);
}
.progress--lg { height: 6px; }
.progress--xs { height: 2px; }
.progress--muted .progress__fill { background: var(--text-3); box-shadow: none; }
.progress--ok .progress__fill { background: var(--ok); box-shadow: 0 0 10px rgba(52,211,153,0.45); }

/* ============================================================
   QTY STEPPER (− input +) — для приёмки и комплектовки
   ============================================================ */
.stepper {
  display: inline-flex; align-items: stretch;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  overflow: hidden;
  height: 36px;
}
.stepper__btn {
  width: 36px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 18px; font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  font-family: inherit;
  line-height: 1;
}
.stepper__btn:hover:not(:disabled) { background: var(--bg-elev-3); color: var(--text); }
.stepper__btn:disabled { color: var(--text-4); cursor: not-allowed; }
.stepper__input {
  width: 64px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  padding: 0;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: none; background: var(--bg-elev-1); }
.stepper--lg { height: 44px; }
.stepper--lg .stepper__btn { width: 44px; font-size: 20px; }
.stepper--lg .stepper__input { width: 80px; font-size: var(--fs-lg); }

/* ============================================================
   MODE TABS (segmented control)
   ============================================================ */
.tabs {
  display: inline-flex;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.tabs__btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: var(--fs-base);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  letter-spacing: -0.005em;
}
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active {
  background: var(--bg-elev-1);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.30), 0 0 0 1px var(--hairline-2);
}

/* Антон 2026-06-09: унификация верхней шапки сотрудника. Шапка
   должна выглядеть одинаково на всех 7 страницах ЛК (Упаковка,
   Комплектовка, Размещение, Приёмка и пересчёт, Расценки и др.) —
   иначе меню «пляшет» при переходах. */
.emp__l { display: flex; align-items: center; gap: 18px; }
.emp__r { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   KBD — подсказка клавиши
   ============================================================ */
kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--bg-elev-3);
  border: 1px solid var(--hairline-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
}

/* ============================================================
   TOAST stack (фиксированный, снизу-по центру)
   ============================================================ */
.toasts {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.32), 0 0 0 1px var(--hairline);
  animation: toast-in 220ms var(--ease);
  max-width: 480px;
}
.toast--ok { border-color: rgba(52,211,153,0.30); }
.toast--ok::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.toast--err { border-color: rgba(248,113,113,0.30); }
.toast--err::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--err); box-shadow: 0 0 8px var(--err); }
.toast--accent { border-color: var(--accent-line); }
.toast--accent::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   EXPECTED LIST ROW (SKU + mini-progress + received/expected)
   ============================================================ */
.exp-list { display: flex; flex-direction: column; }
.exp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t-fast) var(--ease);
}
.exp-row:last-child { border-bottom: none; }
.exp-row:hover { background: var(--bg-elev-2); }
.exp-row.is-done { opacity: 0.55; }
.exp-row.is-active { background: var(--accent-soft); }
.exp-row__l { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.exp-row__name {
  display: flex; align-items: baseline; gap: 8px;
  font-size: var(--fs-base);
  color: var(--text);
  font-weight: 500;
}
.exp-row__sku {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-4);
}
.exp-row__progress { width: 100%; max-width: 240px; }
.exp-row__r {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.exp-row__r b { color: var(--text); font-weight: 600; }

/* ============================================================
   TOOLTIP (через data-tip атрибут)
   Использование: <button data-tip="Подсказка">…</button>
   ============================================================ */
[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  background: var(--bg-elev-3);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 100ms var(--ease), transform 100ms var(--ease);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.32);
  letter-spacing: -0.005em;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 200ms;
}
[data-tip-pos="bottom"]::after {
  top: calc(100% + 6px);
  bottom: auto;
}

/* ============================================================
   ROW HOVER — стрелка-индикатор справа на наведённой строке
   ============================================================ */
.table tbody tr.is-clickable td:last-child::after,
.shp-row.is-clickable::after,
.exp-row.is-clickable::after {
  content: '→';
  display: inline-block;
  color: var(--text-4);
  margin-left: 8px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--t-fast) var(--ease);
}
.table tbody tr.is-clickable:hover td:last-child::after,
.shp-row.is-clickable:hover::after,
.exp-row.is-clickable:hover::after {
  opacity: 1;
  color: var(--accent);
  transform: translateX(0);
}

/* ============================================================
   BACKWARD-COMPAT — старые шаблоны без новых классов
   ============================================================ */

/* Plain <table> на странице — стилизуем как .table */
.page table:not(.table), main table:not(.table) {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
  background: var(--bg-elev-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin: 8px 0 16px;
}
.page table:not(.table) th, main table:not(.table) th,
.page table:not(.table) td, main table:not(.table) td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top;
}
.page table:not(.table) th, main table:not(.table) th {
  background: transparent; color: var(--text-4);
  font-weight: 500; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.page table:not(.table) tbody tr:hover td, main table:not(.table) tbody tr:hover td { background: var(--bg-elev-2); }
.page table:not(.table) tr:last-child td, main table:not(.table) tr:last-child td { border-bottom: none; }
.page table:not(.table) td.num, .page table:not(.table) th.num,
main table:not(.table) td.num, main table:not(.table) th.num { text-align: right; font-variant-numeric: tabular-nums; }
.page table:not(.table) .muted, main table:not(.table) .muted { color: var(--text-3); }
.page table:not(.table) td code, main table:not(.table) td code {
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  background: transparent; padding: 0;
}

/* Старая .btn (без --modifier) — выглядит как secondary */
.btn:not([class*="btn--"]) {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--hairline-2);
  padding: 8px 14px;
  border-radius: var(--r-md);
}
.btn:not([class*="btn--"]):hover:not(:disabled) {
  background: var(--bg-elev-3);
  border-color: var(--hairline-3);
}

/* Старые модификаторы как точечные классы */
.btn.small {
  padding: 6px 10px;
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
}
.btn.secondary {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn.secondary:hover:not(:disabled) {
  background: var(--bg-elev-2);
  color: var(--text);
  border-color: transparent;
}
.btn.ok {
  background: var(--accent);
  color: #1A1230;
  border: none;
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(167,139,250,0.30);
}
.btn.ok:hover:not(:disabled) {
  background: var(--accent-2);
  color: #1A1230;
}

/* Старые формы со «структурой label > input» внутри .filters */
.filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-sm); color: var(--text-2); font-weight: 500;
  min-width: 140px;
}
.filters label input:not([type=checkbox]):not([type=radio]),
.filters label select,
.filters label textarea {
  padding: 8px 12px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-md);
  transition: all var(--t-fast) var(--ease);
}
.filters label input:focus, .filters label select:focus, .filters label textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filters label input[type=file] {
  background: var(--bg-elev-2);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

/* Старые `code` — моно-шрифт */
.page code, main code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--text);
  background: transparent;
  padding: 0;
}

/* Старая .stat (manager_dashboard и т.д.) */
.stat {
  display: inline-flex; flex-direction: column; gap: 4px;
  margin-right: 32px;
}
.stat .v {
  font-size: var(--fs-2xl); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat .l {
  font-size: var(--fs-xs); color: var(--text-4);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}

/* h1 / h2 / h3 в старых шаблонах */
.page h1:not(.page__title) { font-size: var(--fs-2xl); margin-bottom: 16px; }
.page h2 { font-size: var(--fs-lg); margin-bottom: 12px; }
.page h3 { font-size: var(--fs-md); margin-bottom: 10px; }

/* .muted */
.muted { color: var(--text-3); }

/* Inline input.scan-input — заменим на наш стиль */
.scan-input {
  padding: 10px 14px;
  font-size: var(--fs-md);
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
}
.scan-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.col-span-full { grid-column: 1 / -1; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-muted { color: var(--text-3); }
.text-faint { color: var(--text-4); }
.text-accent { color: var(--accent); }
.text-ok { color: var(--ok); }
.text-err { color: var(--err); }
.text-warn { color: var(--warn); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sb-w: 64px; }
  .sidebar__brand-name, .sidebar__group-label, .sidebar__user-info, .sidebar__user-actions { display: none; }
  .sidebar__brand { justify-content: center; padding: 14px 0; }
  .sidebar__item { justify-content: center; padding: 9px; font-size: 0; }
  .sidebar__item.is-active::after { display: none; }
  .sidebar__user { justify-content: center; padding: 12px 0; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; transform: translateX(-100%); width: 232px; z-index: 100; }
  .sidebar.is-open { transform: none; }
  .topbar { padding: 0 16px; }
  .page { padding: 20px 16px 40px; }
  .page__title { font-size: var(--fs-2xl); }
}
