/* ============================================================
   wb-tools — базовые стили и компоненты прототипа
   Требует tokens.css. Чистый CSS, без фреймворков.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Скроллбары — тонкие, в тон */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { line-height: var(--leading-tight); font-weight: 600; }

.font-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* Доступность: видимый фокус только с клавиатуры */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--surface); color: var(--accent); padding: 8px 14px;
  border-radius: var(--r-sm); box-shadow: var(--shadow-md);
}
.skip-link:focus { left: 8px; }

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

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 var(--text-md)/1 var(--font-ui);
  padding: 10px 16px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; user-select: none;
  white-space: nowrap; text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }

.btn-danger { background: transparent; color: var(--err); border-color: transparent; }
.btn-danger:hover { background: var(--err-soft); color: var(--err); }

.btn-sm { padding: 6px 11px; font-size: var(--text-sm); border-radius: var(--r-sm); }
.btn-lg { padding: 13px 22px; font-size: var(--text-lg); border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* иконка-кнопка (топбар) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-md);
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  position: relative; transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--err); border: 2px solid var(--surface);
}

/* спиннер загрузки в кнопке */
.spinner {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { pointer-events: none; opacity: .8; }

/* ============ Поля ввода ============ */
.field { margin-bottom: var(--sp-4); }
.field label:not(.check):not(.switch) {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); margin-bottom: 6px;
}
.field label .opt { font-weight: 400; color: var(--ink-3); font-size: var(--text-xs); }

.input, .select {
  width: 100%; font: 400 var(--text-md)/1.4 var(--font-ui);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 10px 13px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder { color: var(--ink-3); }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: var(--focus-ring); outline: none; }
.input:disabled { background: var(--bg-sunken); color: var(--ink-3); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--err); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 25%, transparent); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2379857F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px; cursor: pointer;
}

.hint { font-size: var(--text-xs); color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.hint a { font-size: inherit; }
.field-error { display: none; font-size: var(--text-xs); color: var(--err); margin-top: 6px; }
.field.has-error .field-error { display: block; }
.field.has-error .input { border-color: var(--err); }

/* input с кнопкой внутри (показать пароль, копировать) */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 42px; }
.input-affix {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--r-sm);
  color: var(--ink-3); cursor: pointer; transition: color var(--t-fast), background var(--t-fast);
}
.input-affix:hover { color: var(--ink); background: var(--bg-sunken); }
.input-affix svg { width: 16px; height: 16px; }

/* чекбоксы */
.check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: var(--text-md); color: var(--ink); padding: 6px 0;
}
.check input {
  appearance: none; flex: none; width: 18px; height: 18px; margin-top: 2px;
  border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface);
  cursor: pointer; transition: all var(--t-fast); position: relative;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check input:disabled { opacity: .5; cursor: not-allowed; }
.check input:disabled + span { opacity: .6; }
.check .check-hint { display: block; font-size: var(--text-xs); color: var(--ink-3); margin-top: 1px; }

/* переключатель (switch) */
.switch { position: relative; display: inline-flex; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { appearance: none; position: absolute; inset: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: var(--r-full);
  background: var(--line-strong); transition: background var(--t-med); pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform var(--t-med);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus-ring); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .5; }

/* сегмент-контрол (Нет / Чтение / Полный) */
.segmented {
  display: inline-flex; background: var(--bg-sunken);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 2px; gap: 2px;
}
.segmented button {
  font: 500 var(--text-xs)/1 var(--font-ui); color: var(--ink-3);
  background: transparent; border: none; border-radius: calc(var(--r-md) - 3px);
  padding: 6px 11px; cursor: pointer; transition: all var(--t-fast);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}
.segmented button[aria-pressed="true"].seg-accent { color: var(--accent-strong); }

/* ============ Бейджи и статусы ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 var(--text-xs)/1 var(--font-ui);
  padding: 4px 9px; border-radius: var(--r-full); white-space: nowrap;
}
.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-info  { background: var(--info-soft);  color: var(--info); }
.badge-muted { background: var(--bg-sunken);  color: var(--ink-3); }
.badge-accent{ background: var(--accent-soft);color: var(--accent-strong); }

.badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* плашки маркетплейсов */
.mp {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 var(--text-xs)/1 var(--font-ui);
  padding: 4px 9px; border-radius: var(--r-sm);
}
.mp-wb   { background: var(--wb-soft);   color: var(--wb); }
.mp-ozon { background: var(--ozon-soft); color: var(--ozon); }
.mp-ym   { background: var(--ym-soft);   color: var(--warn); }
.mp-dot  { width: 7px; height: 7px; border-radius: 2px; background: currentColor; }

/* квадратный знак маркетплейса */
.mp-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--font-ui); color: #fff; letter-spacing: -.02em;
}
.mp-mark-wb { background: linear-gradient(135deg, #CB11AB, #8F0FA8); }
.mp-mark-ozon { background: linear-gradient(135deg, #0069FF, #0047C2); }
.mp-mark-ym { background: linear-gradient(135deg, #FFD43B, #F0B500); color: var(--on-ym); }

/* аватар */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-strong);
  font: 600 12.5px/1 var(--font-ui); letter-spacing: .02em;
}

/* ============ Карточки ============ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--sp-6); }
.card-hover { transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-med); }
.card-hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ============ Таблицы ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.tbl th {
  text-align: left; font: 600 var(--text-xs)/1.3 var(--font-ui);
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover { background: var(--surface-2); }

/* ============ Выпадающее меню ============ */
.menu-anchor { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: var(--z-dropdown);
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu.menu-left { right: auto; left: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font: 400 var(--text-md)/1 var(--font-ui); color: var(--ink); text-align: left;
  background: none; border: none; border-radius: var(--r-sm);
  padding: 9px 10px; cursor: pointer; transition: background var(--t-fast);
  text-decoration: none;
}
.menu-item:hover { background: var(--bg-sunken); text-decoration: none; color: var(--ink); }
.menu-item svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.menu-item.danger { color: var(--err); }
.menu-item.danger svg { color: var(--err); }
.menu-item.danger:hover { background: var(--err-soft); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-label { font-size: var(--text-xs); color: var(--ink-3); padding: 8px 10px 4px; }

/* ============ Модальное окно ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(15,20,18,.5); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh var(--sp-4) var(--sp-4); overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity var(--t-med);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.98); transition: transform var(--t-med);
}
.modal-overlay.open .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6) 0;
}
.modal-head h3 { font-size: var(--text-xl); }
.modal-body { padding: var(--sp-5) var(--sp-6); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  padding: 0 var(--sp-6) var(--sp-6);
}

/* ============ Тосты ============ */
.toast-stack {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 12px 16px; font-size: var(--text-md); min-width: 260px; max-width: 380px;
  animation: toast-in .3s var(--ease);
}
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all .25s var(--ease); }

/* ============ Каркас портала: sidebar + topbar ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px; flex: none; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; z-index: 20;
  transition: width var(--t-med);
}
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--sp-2) var(--sp-3) var(--sp-4); }
.nav-section { margin-top: var(--sp-5); }
.nav-section:first-child { margin-top: var(--sp-2); }
.nav-title {
  font: 600 11px/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 10px 8px; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  font: 500 var(--text-md)/1 var(--font-ui); color: var(--ink-2);
  padding: 9px 10px; border-radius: var(--r-md); margin-bottom: 2px;
  cursor: pointer; text-decoration: none; position: relative;
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap; overflow: hidden;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--bg-sunken); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.nav-item .nav-badge { margin-left: auto; }
.sidebar-foot { border-top: 1px solid var(--line); padding: var(--sp-3); }

/* collapsed sidebar */
.app.nav-collapsed .sidebar { width: 68px; }
.app.nav-collapsed .nav-title,
.app.nav-collapsed .nav-item span,
.app.nav-collapsed .nav-item .nav-badge,
.app.nav-collapsed .sidebar-head .logo-word,
.app.nav-collapsed .side-user .side-user-text { display: none; }
.app.nav-collapsed .nav-item { justify-content: center; padding: 10px; }
.app.nav-collapsed .side-user { justify-content: center; }

.side-user { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-md); }
.side-user-text { min-width: 0; }
.side-user-text .name { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text .org { font-size: var(--text-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 12px var(--sp-8);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-spacer { flex: 1; }

.content { padding: var(--sp-8); max-width: 1240px; width: 100%; margin: 0 auto; }

/* селектор бренда в топбаре */
.brand-select {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 var(--text-md)/1 var(--font-ui); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: var(--r-md); cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.brand-select:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.brand-select .chev { width: 14px; height: 14px; color: var(--ink-3); }

/* ============ Логотип ============ */
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-word { font: 600 17px/1 var(--font-display); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.logo-word em { font-style: normal; color: var(--accent); }

/* ============ Шапка страницы ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.page-title { font: 500 var(--text-3xl)/1.15 var(--font-display); letter-spacing: -.015em; }
.page-sub { color: var(--ink-2); margin-top: 6px; max-width: 60ch; }

/* ============ Степпер (онбординг) ============ */
.stepper { display: flex; align-items: flex-start; gap: 0; margin-bottom: var(--sp-8); }
.step { display: flex; align-items: center; flex: 1; min-width: 0; }
.step-pin {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--font-ui);
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-3);
  transition: all var(--t-med);
}
.step-text { margin-left: 10px; min-width: 0; }
.step-text .t { font: 500 var(--text-sm)/1.2 var(--font-ui); color: var(--ink-3); white-space: nowrap; transition: color var(--t-med); }
.step-text .d { font-size: var(--text-xs); color: var(--ink-3); display: none; }
.step-line { flex: 1; height: 1.5px; background: var(--line-strong); margin: 0 14px; min-width: 18px; transition: background var(--t-med); }
.step.current .step-pin { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.current .step-text .t { color: var(--ink); }
.step.done .step-pin { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.done .step-text .t { color: var(--ink-2); }
.step.done + .step .step-line, .step.done .step-line { background: var(--accent); }

/* ============ Скелетоны и пустые состояния ============ */
.skeleton {
  position: relative; overflow: hidden; background: var(--bg-sunken);
  border-radius: var(--r-sm); color: transparent !important; pointer-events: none;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--sp-12) var(--sp-6); color: var(--ink-3);
}
.empty svg { width: 40px; height: 40px; margin-bottom: var(--sp-3); opacity: .55; }
.empty .e-title { font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.empty .e-text { font-size: var(--text-sm); max-width: 40ch; }

/* ============ Появление при загрузке ============ */
.reveal { opacity: 0; transform: translateY(10px); animation: reveal .55s var(--ease) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
.reveal[data-delay="1"] { animation-delay: .06s; }
.reveal[data-delay="2"] { animation-delay: .12s; }
.reveal[data-delay="3"] { animation-delay: .18s; }
.reveal[data-delay="4"] { animation-delay: .24s; }
.reveal[data-delay="5"] { animation-delay: .3s; }
.reveal[data-delay="6"] { animation-delay: .36s; }

/* ============ Адаптив ============ */
@media (max-width: 1024px) {
  .content { padding: var(--sp-6); }
  .topbar { padding: 10px var(--sp-6); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform var(--t-med); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-collapsed .sidebar { width: 256px; }
  .app.nav-collapsed .nav-title, .app.nav-collapsed .nav-item span,
  .app.nav-collapsed .sidebar-head .logo-word, .app.nav-collapsed .side-user .side-user-text { display: block; }
  .app.nav-collapsed .nav-item { justify-content: flex-start; }
  .burger { display: inline-flex !important; }
  .nav-scrim {
    position: fixed; inset: 0; z-index: 19; background: rgba(15,20,18,.4);
    opacity: 0; pointer-events: none; transition: opacity var(--t-med);
  }
  .app.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
}
.burger { display: none; }
