/* ═══════════════ Traffic Manager by IK — два стиля × две темы ═══════════════
   Стиль — data-style на <html> (neon | glass), тема — data-theme (light | dark), облегчённый режим — data-lite.
   Превью на странице «Оформление» несут оба атрибута сами: .mock[data-style][data-theme]. */

/* Общие для всех: шрифты, фирменные цвета площадок, звезда избранного */
[data-style] {
  --mp-ozon: #005bff; --mp-ozon-ink: #005bff; --mp-wb: #cb11ab; --mp-wb-ink: #a70b8c;
  --mp-ym: #ffcc00; --mp-ym-ink: #725a00; --star: #f5b301;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-num: var(--font); --head-weight: 700; --head-track: -0.02em;
}
[data-theme="dark"] { --mp-ozon-ink: #7aa8ff; --mp-wb-ink: #f07fdc; --mp-ym-ink: #ffd84d; color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* ── «Неон» ── глубокие панели, яркие акценты, свечение активных элементов */
[data-style="neon"] { --radius: 20px; --radius-sm: 12px; --ctl: 12px; --blur: none;
  --blob1: transparent; --blob2: transparent; --blob3: transparent; }
[data-style="neon"][data-theme="dark"] {
  --bg: #0b0c10; --surface: #1b1e25; --surface-solid: #1b1e25; --surface-2: #242832; --th-bg: #20232b; --seg-on: #343a4a;
  --ink: #f3f5f9; --ink-2: #aab0bd; --ink-3: #8c929f; --line: rgba(255,255,255,.07); --border: rgba(255,255,255,.05);
  --accent: #38b6ff; --accent-ink: #04121c; --accent-soft: rgba(56,182,255,.15);
  --good: #5be37d; --good-soft: rgba(91,227,125,.13); --warn: #ffc24b; --warn-soft: rgba(255,194,75,.13);
  --bad: #ff7a8e; --bad-soft: rgba(255,122,142,.14); --info: #7fd3ff; --info-soft: rgba(127,211,255,.12); --violet: #c79bff; --violet-soft: rgba(199,155,255,.15);
  --c1: #38b6ff; --c2: #ff8a1f; --c3: #a65bff; --c4: #ff4d8d; --c5: #7ed321;
  --shadow: 0 14px 34px -18px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04);
  --nav-bg: #15171d; --nav-ink: #aab0bd; --nav-active-bg: rgba(56,182,255,.14); --nav-active-ink: #38b6ff;
  --day-seg: #ffd27a; --night-seg: #2a3040;
}
[data-style="neon"][data-theme="light"] {
  --bg: #e6e8ee; --surface: #ffffff; --surface-solid: #ffffff; --surface-2: #eef0f4; --th-bg: #f4f5f8; --seg-on: #ffffff;
  --ink: #12141a; --ink-2: #4a505d; --ink-3: #686e7d; --line: rgba(16,20,30,.08); --border: rgba(16,20,30,.05);
  --accent: #0074d1; --accent-ink: #ffffff; --accent-soft: rgba(0,116,209,.1);
  --good: #13853b; --good-soft: #dcf5e4; --warn: #9a5b00; --warn-soft: #fff1d9; --bad: #cc2944; --bad-soft: #fde4e6;
  --info: #1d5fd0; --info-soft: #e2ebff; --violet: #6d32d6; --violet-soft: #efe6ff;
  --c1: #0a8cf0; --c2: #f07800; --c3: #8a3ffc; --c4: #e5326f; --c5: #4fa514;
  --shadow: 0 12px 30px -20px rgba(20,30,60,.35), 0 1px 2px rgba(20,30,60,.06);
  --nav-bg: #ffffff; --nav-ink: #4a505d; --nav-active-bg: rgba(0,116,209,.1); --nav-active-ink: #0074d1;
  --day-seg: #ffd27a; --night-seg: #1c2030;
}

/* ── «Стекло» ── матовые полупрозрачные панели на мягком цветном фоне, кнопки-«таблетки» */
[data-style="glass"] { --radius: 24px; --radius-sm: 14px; --ctl: 999px; --blur: blur(22px) saturate(170%); }
[data-style="glass"][data-theme="light"] {
  --bg: #dcdfe7; --surface: rgba(255,255,255,.58); --surface-solid: #f3f4f8; --surface-2: rgba(30,36,80,.055); --th-bg: #eceef4; --seg-on: #ffffff;
  --ink: #161824; --ink-2: #454a5b; --ink-3: #5d6273; --line: rgba(20,24,40,.09); --border: rgba(255,255,255,.85);
  --accent: #5458e8; --accent-ink: #ffffff; --accent-soft: rgba(84,88,232,.13);
  --good: #0f6e3f; --good-soft: rgba(20,128,74,.12); --warn: #774600; --warn-soft: rgba(224,138,16,.16);
  --bad: #c92c55; --bad-soft: rgba(201,44,85,.12); --info: #3b5bd6; --info-soft: rgba(59,91,214,.12); --violet: #9230bf; --violet-soft: rgba(146,48,191,.12);
  --c1: #5458e8; --c2: #1fa58f; --c3: #d6559a; --c4: #e08a10; --c5: #3fa0e0;
  --shadow: 0 14px 34px -18px rgba(60,70,110,.4), inset 0 1px 0 rgba(255,255,255,.9);
  --nav-bg: rgba(255,255,255,.5); --nav-ink: #454a5b; --nav-active-bg: rgba(84,88,232,.13); --nav-active-ink: #4a4ee0;
  --blob1: rgba(132,128,255,.5); --blob2: rgba(110,220,200,.5); --blob3: rgba(255,160,205,.42);
  --day-seg: #ffffff; --night-seg: #2b2f52;
}
[data-style="glass"][data-theme="dark"] {
  --bg: #0e1019; --surface: rgba(255,255,255,.07); --surface-solid: #1a1d2a; --surface-2: rgba(255,255,255,.06); --th-bg: #1d2030; --seg-on: rgba(255,255,255,.15);
  --ink: #eef0f8; --ink-2: #b3b7c9; --ink-3: #9599ad; --line: rgba(255,255,255,.09); --border: rgba(255,255,255,.13);
  --accent: #9396ff; --accent-ink: #0d0f1a; --accent-soft: rgba(147,150,255,.16);
  --good: #6fe3a1; --good-soft: rgba(111,227,161,.13); --warn: #ffc163; --warn-soft: rgba(255,193,99,.13);
  --bad: #ff8aa5; --bad-soft: rgba(255,138,165,.14); --info: #8fc2ff; --info-soft: rgba(143,194,255,.13); --violet: #dc9cff; --violet-soft: rgba(220,156,255,.15);
  --c1: #9396ff; --c2: #5fe0c8; --c3: #ff8ac4; --c4: #ffc163; --c5: #7fd0ff;
  --shadow: 0 16px 40px -18px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.1);
  --nav-bg: rgba(255,255,255,.06); --nav-ink: #b3b7c9; --nav-active-bg: rgba(147,150,255,.16); --nav-active-ink: #a9abff;
  --blob1: rgba(98,92,255,.4); --blob2: rgba(40,190,170,.28); --blob3: rgba(230,80,160,.24);
  --day-seg: #cfd3ff; --night-seg: #05060c;
}
/* Облегчённые эффекты: без размытия, панели непрозрачные */
[data-lite] { --blur: none; }
[data-lite][data-style="glass"] { --surface: var(--surface-solid); --nav-bg: var(--surface-solid); }

/* ═══════════════ База ═══════════════ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }   /* серый по умолчанию браузера на тёмной теме — 3.6:1 */
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); margin: 0; }
.num, td.n, .kpi .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ═══════════════ Каркас ═══════════════ */
.shell { display: grid; grid-template-columns: 240px 1fr; gap: 16px; min-height: 100vh; padding: 16px; box-sizing: border-box; }
/* мягкие цветные пятна под «Стеклом» — неподвижный слой, при прокрутке не перерисовывается */
.shell::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 6% 0%, var(--blob1), transparent 38%), radial-gradient(circle at 96% 28%, var(--blob2), transparent 36%),
    radial-gradient(circle at 42% 104%, var(--blob3), transparent 40%); }
.nav { background: var(--nav-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 12px;
  display: flex; flex-direction: column; gap: 20px; position: sticky; top: 16px; height: calc(100vh - 32px); box-sizing: border-box;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 4px 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: grid; place-items: center; flex: none; box-shadow: 0 8px 20px -8px var(--accent); }
.brand-mark svg { width: 22px; height: 22px; stroke: var(--accent-ink); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { font-weight: 700; line-height: 1.1; font-family: var(--font-head); }
.brand-text small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11px; font-family: var(--font); }
.nav-links { display: flex; flex-direction: column; gap: 2px; }
.nav-links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--nav-ink); font-weight: 500; }
.nav-links a:hover { background: var(--surface-2); }
.nav-links a.active { background: var(--nav-active-bg); color: var(--nav-active-ink); }
.badge { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.sync-btn { margin-top: auto; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 11px; border-radius: var(--ctl);
  border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-weight: 600; box-shadow: 0 10px 22px -12px var(--accent);
  transition: filter .2s ease, transform .12s ease; }
.sync-btn:hover { filter: brightness(1.08); }
.sync-btn.spinning svg { animation: spin 1s linear infinite; }
/* шкала загрузки с маркетплейсов: под кнопкой «Обновить данные» и у каждого подключения в настройках */
.sync-prog { margin-top: 10px; }
.sync-prog small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }
.sync-track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sync-track i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transform-origin: left;
  transform: scaleX(var(--p, 0)); transition: transform .6s ease; }
.job-prog { min-width: 180px; margin-top: 6px; }
.job-prog small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.main { min-width: 0; padding: 10px 12px 60px; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.topbar h1 { font-size: 28px; margin-right: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters.hidden { display: none; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--ctl); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: calc(var(--ctl) - 3px); cursor: pointer; color: var(--ink-2); font-weight: 600; }
.seg button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.3); }
.period { display: flex; align-items: center; gap: 6px; }
select, input:not([type]), input[type=date], input[type=text], input[type=number], input[type=url], input[type=password], textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 12px; min-height: 36px; }
select, input[type=date] { border-radius: var(--ctl); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, svg.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.demo-banner { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 16px; font-size: 13px; }
.demo-banner a, .linklike { color: inherit; text-decoration: underline; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }

/* ═══════════════ Элементы ═══════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card h2 .sub { font: 500 12px var(--font); color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Итог периода на «Обзоре»: деньги крупно, остальное — вторым ярусом */
.brief { margin-bottom: 16px; padding: 20px 22px; }
.brief-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.brief-period { color: var(--ink-2); font-weight: 600; }
.fresh.err { color: var(--bad); }
.fresh a, .brief .s a, .brief-say a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.brief-main { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 16px 0; align-items: start; }
.promo-brief { grid-template-columns: minmax(0, 1.7fr) repeat(var(--n, 3), minmax(0, 1fr)); }
.brief-kpi { padding-left: 22px; border-left: 1px solid var(--line); margin-left: 22px; }
.brief .l { color: var(--ink-2); font-size: 12.5px; }
.brief .v { font: var(--head-weight) 24px var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: var(--head-track); margin-top: 4px; white-space: nowrap; }
.brief-rev .v { font-size: 42px; line-height: 1.05; }
[data-style="neon"] .brief-rev .v { color: var(--accent); }
.brief .d, .funnel .d { white-space: nowrap; }
.brief .d { font-size: 12.5px; margin-top: 4px; color: var(--ink-3); }
.brief .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.brief-say { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 100ch; }
.brief-say a { color: var(--ink); font-weight: 600; }
.brief .d.up, .funnel .d.up { color: var(--good); } .brief .d.down, .funnel .d.down { color: var(--bad); }
.brief .d.up.inv, .funnel .d.up.inv { color: var(--bad); } .brief .d.down.inv, .funnel .d.down.inv { color: var(--good); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .l { color: var(--ink-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 4px; white-space: nowrap; }
.kpi .v.long { font-size: 17px; padding-top: 4px; }
.kpi .d { font-size: 12px; margin-top: 2px; color: var(--ink-3); }
.kpi .d.up { color: var(--good); } .kpi .d.down { color: var(--bad); }
.kpi .d.up.inv { color: var(--bad); } .kpi .d.down.inv { color: var(--good); }
.kpi.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 14px 30px -16px var(--accent); }
[data-style="neon"] .kpi.accent { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--accent), 0 0 30px -10px var(--accent); }
[data-style="neon"] .kpi.accent .v { color: var(--accent); }
.kpi .s { font-size: 11.5px; line-height: 1.35; margin-top: 3px; color: var(--ink-3); }
.kpi.accent .l, .kpi.accent .d, .kpi.accent .s { color: inherit; opacity: .85; }
[data-style="neon"] .kpi.accent .d.up { color: var(--good); } [data-style="neon"] .kpi.accent .d.down { color: var(--bad); }
.split-tg { margin: -4px -6px -4px auto; width: 24px; height: 24px; flex: none; display: inline-grid; place-items: center;
  padding: 0; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: inherit; cursor: pointer;
  transition: transform .15s; }
.split-tg svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.split-tg:hover { border-color: currentColor; }
.split-tg[aria-expanded="true"] { transform: rotate(180deg); }
.kpi.accent .split-tg { border-color: currentColor; }
.exp-tg { margin: 0 8px 0 0; vertical-align: -6px; }
tr.sub-row td { background: var(--surface-2); font-size: 13px; }
tr.sub-row td.name { padding-left: 40px; }
tr.sub-row td.name > svg.i { width: 14px; height: 14px; vertical-align: -2px; color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--ctl); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; color: var(--ink); min-height: 36px; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
[data-style="glass"] .btn.primary { box-shadow: 0 10px 22px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { border: 0; background: transparent; padding: 4px; cursor: pointer; color: var(--ink-3); border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.star { color: var(--ink-3); } .star.on { color: var(--star); } .star.on svg { fill: var(--star); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill.great { background: var(--good-soft); color: var(--good); } .pill.good { background: var(--info-soft); color: var(--info); }
.pill.weak { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.new { background: var(--accent-soft); color: var(--accent); }
.pill.cancel { background: var(--violet-soft); color: var(--violet); }
.mp { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; letter-spacing: .02em; }
.mp.ozon { background: color-mix(in srgb, var(--mp-ozon) 10%, transparent); color: var(--mp-ozon-ink); }
.mp.wb { background: color-mix(in srgb, var(--mp-wb) 10%, transparent); color: var(--mp-wb-ink); }
.mp.ym { background: color-mix(in srgb, var(--mp-ym) 25%, transparent); color: var(--mp-ym-ink); }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field[hidden], #acc-filter[hidden], .bulk[hidden], [data-only][hidden] { display: none; }
.field label, .field .lbl { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.hint { font-size: 12.5px; color: var(--ink-3); text-wrap: pretty; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
code { font-family: var(--font-num); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ═══════════════ Таблицы ═══════════════ */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
.table-wrap.mid { margin-bottom: 0; }   /* таблица посреди карточки, ниже — ещё текст */
.g2 table.plain td.name { min-width: 120px; }   /* в половине ширины 200px не оставляли места суммам и кнопкам */
.scroll-box { max-height: 360px; overflow-y: auto; }
/* первая колонка остаётся на месте при прокрутке вбок — цифры не теряют подпись строки; фон непрозрачный, иначе сквозь него видно соседние колонки */
table.sticky1 th:first-child, table.sticky1 td:first-child { position: sticky; left: 0; z-index: 1; }
table.sticky1 th:first-child { z-index: 2; }
table.sticky1 td:first-child { background: var(--surface-solid); }
table.sticky1 tbody tr:hover td:first-child, table.sticky1 tr.sub-row td:first-child { background: linear-gradient(var(--surface-2), var(--surface-2)) var(--surface-solid); }
table.t tbody tr[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.t th:first-child, table.t td:first-child { padding-left: 18px; }
table.t th:last-child, table.t td:last-child { padding-right: 18px; }
table.t th { color: var(--ink-2); font-weight: 600; font-size: 12px; background: var(--th-bg); position: sticky; top: 0; cursor: default; user-select: none; }
table.t th.sortable { cursor: pointer; } table.t th.sortable:hover { color: var(--ink); }
table.t th .th-sort { all: unset; cursor: pointer; border-radius: 4px; }
table.t th .th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.t th.sorted::after { content: " ↓"; } table.t th.sorted.asc::after { content: " ↑"; }
table.t td.n, table.t th.n { text-align: right; }
table.t tbody tr { cursor: pointer; } table.t tbody tr:hover td { background: var(--surface-2); }
table.t tfoot td { font-weight: 700; background: var(--surface-2); }
table.t td.name { white-space: normal; min-width: 200px; max-width: 320px; }
table.t th.sel, table.t td.sel { width: 1%; padding-right: 0; cursor: default; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.src-name { font-weight: 600; color: var(--ink); display: block; }
.src-raw { font-size: 12px; color: var(--ink-3); display: block; word-break: break-word; margin-top: 2px; }
.src-raw .mp { font-size: 11px; padding: 0 5px; margin-right: 2px; }
/* в списке источников вторая строка — одна: площадка, кабинет, метка; длинная метка обрезается, полностью — в подсказке */
.src-raw.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; max-width: 280px; }
.src-cell { min-width: 0; }
.acc-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.acc-card { background: var(--surface-2); box-shadow: none; }
.acc-card input[type=password] { background: var(--surface); }
.job { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.err-text { color: var(--bad); }
table.plain tbody tr { cursor: default; }
table.t tbody tr.on td { background: var(--accent-soft); }
/* строка-фильтр (акции на «Промокодах»): щелчок по строке или по кнопке-названию, кнопка — для клавиатуры */
.row-btn { all: unset; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: 4px; }
.row-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tr.pick.on .row-btn { color: var(--accent); }
.field textarea { resize: vertical; }

/* ═══════════════ Графики ═══════════════ */
.chart { width: 100%; height: 240px; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font-num); }
.chart .area { opacity: .12; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { opacity: .9; }
.chart .hover-line { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend button { border: 0; background: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.legend button.off { opacity: .4; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-note { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.chart .dot { stroke: var(--surface-solid, var(--surface)); stroke-width: 2; }
.chart-tip { position: fixed; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: 12px;
  z-index: 50; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel .step { display: grid; grid-template-columns: 110px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
.funnel .bar-bg { background: var(--surface-2); border-radius: 99px; height: 12px; overflow: hidden; }
.funnel .bar-fg { height: 100%; background: var(--accent); border-radius: 99px; }
.funnel .val { text-align: right; font-family: var(--font-num); font-weight: 600; }
.funnel .conv { grid-column: 2 / 4; font-size: 11.5px; color: var(--ink-3); margin-top: -6px; }
.mbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
a.list-item { color: inherit; text-decoration: none; }
.mp-row { flex-wrap: nowrap; align-items: baseline; } .mp-row > span { min-width: 0; } .mp-row > b { white-space: nowrap; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ═══════════════ Модальные окна и уведомления ═══════════════ */
.modal-bg { position: fixed; inset: 0; background: rgba(10,12,18,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: var(--surface-solid); border-radius: var(--radius); max-width: 520px; width: 100%; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); border: 1px solid var(--border);
  max-height: calc(100vh - 32px); overflow: auto; }
.modal h3 { font-size: 18px; margin-bottom: 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 420px; font-size: 13.5px; }
.toast.err { background: var(--bad); color: #fff; }
.toast.has-act { display: flex; align-items: center; gap: 14px; }
.toast-act { margin-left: auto; flex: none; background: none; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); color: inherit; font: inherit; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.toast-act:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.toast-act:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ═══════════════ Календарь ═══════════════
   Кнопка с датой вместо родного поля (.dp-src прячется) и всплывающий календарь .dp: одна дата — .single,
   период в шапке — .range (готовые периоды + два месяца). На узком экране — шторка снизу (.sheet). */
.dp-src { display: none !important; }
.dp-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 12px; border-radius: var(--ctl); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-align: left; white-space: nowrap; width: 100%; transition: border-color .2s ease; }
.dp-btn:hover, .dp-btn[aria-expanded="true"] { border-color: var(--ink-3); }
.dp-btn .i { width: 16px; height: 16px; color: var(--ink-2); }
.dp-btn .dp-empty { color: var(--ink-3); }
.period-btn { width: auto; }
.period-btn b { font-weight: 600; }
.period-btn .pb-dates { color: var(--ink-2); }
.period-btn .i:last-child { margin-left: 2px; }

.dp { position: fixed; z-index: 55; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35); padding: 14px; color: var(--ink); animation: dpIn .16s cubic-bezier(.2,.8,.2,1) both; }
@keyframes dpIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dp.range { display: grid; grid-template-columns: auto auto; gap: 14px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head-t { font: var(--head-weight) 16px var(--font-head); letter-spacing: var(--head-track); }
.dp-nav { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--ink-2); }
.dp-nav:hover { background: var(--surface-2); color: var(--ink); }
.dp-body.two { display: grid; grid-template-columns: repeat(2, auto); gap: 24px; margin-top: -42px; }   /* названия месяцев — в одной строке со стрелками */
.dp-mtitle { font: var(--head-weight) 16px var(--font-head); letter-spacing: var(--head-track); text-align: center; height: 36px; line-height: 36px; margin: 0 40px 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 42px); row-gap: 2px; }
.dp-wd { font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: center; height: 28px; line-height: 28px; }
.dp-wd.we { color: var(--bad); opacity: .8; }
.dp-day { position: relative; height: 40px; border: 0; background: transparent; color: var(--ink); font: 500 14px var(--font-num);
  font-variant-numeric: tabular-nums; cursor: pointer; border-radius: var(--radius-sm); }
.dp-day:hover:not(:disabled) { background: var(--surface-2); }
.dp-day:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.dp-day.today { color: var(--accent); font-weight: 700; }
.dp-day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.dp-day.in { background: var(--accent-soft); border-radius: 0; }
.dp-day.in.preview { background: var(--surface-2); }
.dp-day.start.in { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.dp-day.end.in { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.dp .dp-day.start, .dp .dp-day.end, .dp .dp-day.sel { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.dp.single .dp-day.start:not(.sel), .dp.single .dp-day.end:not(.sel) { background: var(--accent-soft); color: var(--accent); }   /* вторая дата пары — тише выбранной */
.dp-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.dp-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp .dp-type { width: 122px; min-height: 32px; padding: 5px 10px; border-radius: var(--radius-sm); }
.dp .dp-type.bad { border-color: var(--bad); outline-color: var(--bad); }
.dp-tl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dp-sum { flex: 1; min-width: 140px; font-size: 12.5px; color: var(--ink-2); }
.dp-presets { display: flex; flex-direction: column; gap: 2px; padding-right: 14px; border-right: 1px solid var(--line); }
.dp-presets button { white-space: nowrap; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2); font-weight: 500; }
.dp-presets button:hover { background: var(--surface-2); color: var(--ink); }
.dp-presets button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dp-scrim { position: fixed; inset: 0; z-index: 54; background: rgba(10,12,18,.45); display: none; }
.dp-scrim.on { display: block; animation: fade .2s ease both; }
.dp.sheet { left: 0; right: 0; bottom: 0; top: auto; border-radius: var(--radius) var(--radius) 0 0; max-height: 88vh; overflow: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation-name: dpUp; }
@keyframes dpUp { from { transform: translateY(24px); opacity: 0; } }
.dp.sheet .dp-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dp.sheet .dp-day { height: 44px; }
.dp.sheet.range { grid-template-columns: 1fr; }
.dp.sheet .dp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.dp.sheet .dp-presets button { background: var(--surface-2); padding: 7px 12px; }
.dp.sheet .dp-body.two { grid-template-columns: 1fr; margin-top: -42px; }
.dp.sheet .dp-body.two .dp-month:first-child { display: none; }   /* на телефоне — один месяц, правый (с концом периода) */
.dp.sheet .dp-foot .dp-type { flex: 1; width: auto; }
.dp.sheet .dp-tl { flex: 1 1 140px; }
[data-lite] .dp, [data-lite] .dp-scrim { animation: none; }

/* ═══════════════ Страница источника ═══════════════ */
.src-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.src-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* карточка источника: метки под строкой «назад + действия»; название — в заголовке страницы */
.src-meta-head { margin-bottom: 16px; display: grid; gap: 6px; justify-items: start; }
.src-tags { gap: 8px; }
.src-tags .grade-why { margin: 0; }
.src-main { align-items: start; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0,0,0,.25);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.menu[hidden] { display: none; }
.menu [role=menuitem] { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: calc(var(--radius-sm) - 4px);
  background: none; color: var(--ink); font: 600 13px var(--font); text-align: left; cursor: pointer; white-space: nowrap; }
.menu [role=menuitem]:hover, .menu [role=menuitem]:focus-visible { background: var(--surface-2); outline: none; }
.menu [role=menuitem].danger { color: var(--bad); }
.menu [role=menuitem] .i { width: 16px; height: 16px; }
#more .i { width: 14px; height: 14px; margin-left: 2px; }
/* страница кампании: строка «назад» + действия, итог кампании в .brief, остальные метрики — под «Все метрики» */
.camp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: -6px 0 12px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.back-link .i { width: 16px; height: 16px; }
.brief-period .pill { margin-left: 6px; vertical-align: 1px; }
.all-metrics { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.disclose { margin: 4px 0 8px; }
.disclose summary, .all-metrics summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); min-height: 28px; display: flex; align-items: center; gap: 6px; list-style: none; }
.disclose summary::-webkit-details-marker, .all-metrics summary::-webkit-details-marker { display: none; }
.disclose summary::before, .all-metrics summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s ease; margin-right: 2px; }
.disclose[open] summary::before, .all-metrics[open] summary::before { transform: rotate(45deg); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 24px; margin-top: 12px; }
.utm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.utm span { font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; color: var(--ink-2); font-family: var(--font-num); }
.utm span b { color: var(--ink-3); font-weight: 500; margin-right: 4px; }
.rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.rule { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 2px 8px; color: var(--ink-2); font-family: var(--font-num); white-space: normal; }
/* значок 14px, а нажимается область 24×24 (WCAG 2.5.8): отрицательные поля возвращают чипу прежний размер */
.rule .icon-btn { padding: 5px; margin: -5px -9px -5px -3px; } .rule svg.i { width: 14px; height: 14px; }
.grp-sel { display: block; margin-top: 4px; min-height: 26px; padding: 2px 6px; font-size: 12px; max-width: 160px; }
.sug-list { display: flex; flex-direction: column; }
/* генератор UTM-ссылок Ozon */
.btn[hidden], .card[hidden] { display: none; }
.lg { display: flex; flex-direction: column; gap: 16px; }
.lg .row + .row, .lg .row + .field { margin-top: 12px; }
.lg-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: 700 12px var(--font-num); margin-right: 6px; vertical-align: 1px; }
.lg-tag { display: flex; align-items: stretch; min-width: 0; }
.lg-prefix { display: inline-flex; align-items: center; padding: 0 4px 0 12px; background: var(--surface-2); border: 1px solid var(--line);
  border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--ink-2); font: 500 13px var(--font-num); white-space: nowrap; }
.lg-tag input { flex: 1; min-width: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.lg-code { overflow-wrap: anywhere; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lg-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 32px; gap: 4px 10px; align-items: end; padding: 10px 0;
  border-top: 1px solid var(--border); }
.lg-row:first-child { border-top: 0; padding-top: 0; }
.lg-row > .icon-btn { width: 32px; height: 36px; }
.lg-row-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 10px; border-radius: 99px; cursor: pointer;
  border: 1px dashed var(--line); background: transparent; color: var(--ink-3); font: 500 12px var(--font-num); }
.lg-chip.on { border-style: solid; border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.lg-chip svg.i { width: 13px; height: 13px; }
.lg-err { color: var(--bad); background: var(--bad-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.lg-url-cell { display: flex; align-items: center; gap: 6px; }
.lg-url { font: 12px var(--font-num); color: var(--ink-2); max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-links td:nth-child(2) .src-raw { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lg-prods tr[data-sku] { cursor: pointer; }
@media (max-width: 560px) { .lg-url { max-width: 160px; } .lg-links td:nth-child(2) .src-raw { max-width: 140px; } .lg-prefix { max-width: 55%; overflow: hidden; text-overflow: ellipsis; } }
.sug { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.sug input[type=checkbox] { margin-top: 10px; }
.sug input[type=text] { width: 100%; }
.metric-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0; }
.metric-list div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.metric-list dt { font-size: 12px; color: var(--ink-2); } .metric-list dd { margin: 2px 0 0; font-weight: 700; font-family: var(--font-num); font-size: 16px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { flex: 1 1 120px; min-width: 0; }   /* min-width: длинное имя блогера в списке не раздвигает поле за карточку */

/* ═══════════════ Оформление: стиль, тема, расписание ═══════════════ */
.styles-intro { max-width: 720px; margin-bottom: 18px; color: var(--ink-2); }
.look-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.style-card { border: 2px solid var(--line); border-radius: calc(var(--radius) - 4px); overflow: hidden; cursor: pointer; background: var(--surface); text-align: left; padding: 0;
  color: var(--ink); transition: transform .2s ease, border-color .25s ease; }
.style-card:hover { transform: translateY(-2px); }
.style-card.current { border-color: var(--accent); }
.style-card .meta { padding: 12px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.style-card .meta b { font-size: 15px; } .style-card .meta span { font-size: 12.5px; color: var(--ink-2); }
.mock { color: var(--ink); font-family: var(--font); height: 170px; display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 8px; overflow: hidden; font-size: 9px;
  background: radial-gradient(circle at 0% 0%, var(--blob1), transparent 55%), radial-gradient(circle at 100% 70%, var(--blob2), transparent 50%), var(--bg); }
.mock .m-nav, .mock .m-kpi, .mock .m-chart { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * .45); box-shadow: var(--shadow); }
.mock .m-nav { background: var(--nav-bg); padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; }
.mock .m-nav i { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.mock .m-nav i.on { background: var(--nav-active-ink); }
.mock .m-nav .logo { width: 16px; height: 16px; border-radius: 5px; background: var(--accent); margin-bottom: 5px; }
.mock .m-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mock .m-title { font-family: var(--font-head); font-weight: 700; font-size: 13px; }
.mock .m-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mock .m-kpi { padding: 5px 6px; color: var(--ink-2); }
.mock .m-kpi b { display: block; font-size: 11px; color: var(--ink); }
.mock .m-chart { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 8px; }
.mock .m-chart i { flex: 1; border-radius: 3px 3px 2px 2px; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mode-btn { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .25s, background-color .25s, transform .2s; }
.mode-btn:hover { transform: translateY(-1px); }
.mode-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.mode-btn span { font-size: 12px; color: var(--ink-3); }
.sched { transition: opacity .3s ease; }
.sched.dim { opacity: .55; }
.band { position: relative; display: flex; height: 40px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.band > div { transition: flex-basis .45s cubic-bezier(.3,1.1,.5,1); }
.band .now { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.band-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.times { display: flex; gap: 14px; flex-wrap: wrap; }
.times .field { flex: 1 1 140px; }
input[type=time] { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; min-height: 40px; font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.opt { display: flex; align-items: center; gap: 14px; }
.opt > div { margin-right: auto; }
.opt b { display: block; }
/* переключатель «да/нет» — настоящий чекбокс */
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 28px; flex: none; margin: 0; border-radius: 99px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color .25s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .35s cubic-bezier(.16,1,.3,1); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* кнопка темы в шапке: солнце ↔ луна */
.theme-sw { position: relative; width: 70px; height: 36px; flex: none; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; padding: 0; }
.theme-sw .knob { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--seg-on); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(0,0,0,.35); transition: transform .45s cubic-bezier(.16,1,.3,1); }
[data-theme="dark"] .theme-sw .knob { transform: translateX(34px); }
.theme-sw svg.i { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; transition: opacity .3s ease, transform .45s ease; }
[data-theme="dark"] .theme-sw .sun, [data-theme="light"] .theme-sw .moon { opacity: 0; transform: rotate(90deg); }

/* ═══════════════ Анимации ═══════════════
   Двигаются только transform и opacity — их считает видеокарта, страница не перерисовывается.
   Появление — один раз при переходе в раздел (класс .enter на #view снимается через секунду). */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes growY { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
.view { transition: opacity .15s ease; }
.view.leaving { opacity: .45; pointer-events: none; }
.view.enter > *, .view.enter .kpis > .kpi, .view.enter .grid > .card, .view.enter .grid > div > .card {
  animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.view.enter > :nth-child(2), .view.enter .kpis > :nth-child(2), .view.enter .grid > :nth-child(2) { animation-delay: 40ms; }
.view.enter > :nth-child(3), .view.enter .kpis > :nth-child(3) { animation-delay: 80ms; }
.view.enter > :nth-child(4), .view.enter .kpis > :nth-child(4) { animation-delay: 120ms; }
.view.enter > :nth-child(n+5), .view.enter .kpis > :nth-child(n+5) { animation-delay: 160ms; }
.view.enter .chart .line { stroke-dasharray: 1; animation: draw .9s cubic-bezier(.4,0,.2,1) both .1s; }
.view.enter .chart .area { animation: fade .9s ease both .3s; }
.view.enter .chart .bar { transform-box: fill-box; transform-origin: bottom; animation: growY .55s cubic-bezier(.2,.8,.2,1) both .1s; }
.view.enter .funnel .bar-fg { transform-origin: left; animation: grow2 .7s cubic-bezier(.2,.8,.2,1) both .15s; }
@keyframes grow2 { from { transform: scaleX(0); } }
.modal-bg { animation: fade .2s ease both; }
.modal { animation: pop .3s cubic-bezier(.16,1,.3,1) both; }
.toast { animation: toastIn .3s cubic-bezier(.2,.9,.3,1.1) both; transition: opacity .25s ease, transform .25s ease; }
.toast.out { opacity: 0; transform: translateX(24px); }
.btn, .seg button, .nav-links a, .icon-btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, filter .2s ease; }
.btn:active, .sync-btn:active { transform: scale(.97); }
/* бегущие подложки: меню и переключатели-сегменты (положение ставит app.js) */
.nav-links { position: relative; }
.nav-ind, .seg-ind { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; will-change: transform; }
.nav-ind { border-radius: var(--radius-sm); background: var(--nav-active-bg); }
.seg-ind { border-radius: calc(var(--ctl) - 3px); background: var(--seg-on); box-shadow: 0 2px 8px -3px rgba(0,0,0,.3); }
.nav-ind.ready, .seg-ind.ready { transition: transform .42s cubic-bezier(.16,1,.3,1), opacity .2s; }
.nav-ind.shown, .seg-ind.shown { opacity: 1; }
.nav-links a { position: relative; z-index: 1; }
.nav-links.has-ind a.active { background: transparent; }
.seg { position: relative; }
.seg button { position: relative; z-index: 1; }
.seg.has-ind button.on { background: transparent; box-shadow: none; }
[data-style="neon"] .nav-ind::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); }
/* плавная смена темы: класс .theming висит на <html> только на время перехода */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color var(--theme-dur, .6s) ease, color var(--theme-dur, .6s) ease, border-color var(--theme-dur, .6s) ease,
    fill var(--theme-dur, .6s) ease, stroke var(--theme-dur, .6s) ease, box-shadow var(--theme-dur, .6s) ease !important; }
[data-lite] .view.enter *, [data-lite] .modal, [data-lite] .modal-bg, [data-lite] .toast { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════ Отчёт: вкладки и продажи по дням ═══════════════ */
.rtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.rtabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rtabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.days-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.days-bar .seg { max-width: 100%; overflow-x: auto; }
.days-bar .seg button { white-space: nowrap; }
.days-wrap { overflow: auto; max-height: 72vh; margin: 0 -18px -18px; border-top: 1px solid var(--line); }
table.days { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.days th, table.days td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
table.days th { font-family: var(--font); background: var(--th-bg); color: var(--ink-2); font-weight: 600; font-size: 12px; position: sticky; top: 0; z-index: 2; user-select: none; }
table.days th:first-child, table.days td:first-child { position: sticky; left: 0; text-align: left; background: var(--surface-solid); z-index: 1; padding-left: 18px; }
table.days th:first-child { z-index: 3; background: var(--th-bg); }
table.days th:last-child, table.days td:last-child { padding-right: 18px; }
table.days td.c { cursor: pointer; background: color-mix(in srgb, var(--accent) var(--h, 0%), transparent); }
table.days td.c:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
table.days td.zero { color: var(--ink-3); }
table.days tr.we td { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--ink) 4%, transparent); }
table.days tr.we td:first-child { color: var(--bad); }
table.days tr.future td { color: var(--ink-3); }
table.days td.tot, table.days th.tot { font-weight: 700; border-left: 1px solid var(--line); }
table.days th.sub, table.days td.sub { color: var(--ink-2); font-weight: 500; }
table.days th.grp { cursor: pointer; color: var(--ink); }
table.days th.grp::before { content: "▸ "; color: var(--ink-3); }
table.days th.grp.open::before { content: "▾ "; }
table.days th.drag { cursor: grab; }
table.days th.drop { box-shadow: inset 2px 0 0 var(--accent); }
table.days th .mp { font-size: 11px; }
table.days tfoot td { background: var(--th-bg); font-weight: 600; position: sticky; bottom: 0; z-index: 1; }
table.days tfoot tr:first-child td { border-top: 2px solid var(--ink-3); }
table.days tfoot tr + tr td { font-weight: 500; color: var(--ink-2); }
table.days tfoot td:first-child { z-index: 2; background: var(--th-bg); }
table.days .d-up { color: var(--good); } table.days .d-down { color: var(--bad); }
.warn-text { color: var(--warn); }
.drill-list { max-height: 55vh; overflow: auto; }
.drill-list .list-item:not([data-id]) { cursor: default; }

/* ── расходы: партнёрские сети ── */
.filters.period-only #mp-filter, .filters.period-only #acc-filter { display: none; }
.net-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.net { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.net-name { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.net-name:hover { color: var(--accent); }
.net-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.net-nums span { display: block; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.net-nums b { font-size: 15px; white-space: nowrap; }
.net-num-btn { font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.net-num-btn:not(:disabled) b { color: var(--accent); }
.net-num-btn:not(:disabled):hover span { color: var(--accent); }
.net-num-btn:disabled { cursor: default; }
.net .net-tiles { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.net-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--good); }
/* «Расходы»: строка про сети — на сегодня, отдельно от сумм за период */
.exp-net { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.exp-net:hover .btn { border-color: var(--accent); color: var(--accent); }
.exp-net-hot { display: block; margin-top: 2px; color: var(--bad); font-weight: 600; }
td.nowrap { white-space: nowrap; }
.badge.hot { background: var(--bad); color: #fff; }
.net-status { font-size: 12.5px; min-height: 18px; }
/* «проверить до подтверждения»: плитки-фильтры и подсветка срока в строках */
.net-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.net-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; cursor: pointer; padding: 12px 16px;
  border-radius: var(--radius-sm); border: 2px solid transparent; transition: transform .15s, opacity .15s; }
.net-tile:hover:not(:disabled) { transform: translateY(-1px); }
.net-tile:disabled { cursor: default; opacity: .55; }
.net-tile .l { font-size: 12.5px; font-weight: 600; }
.net-tile .v { font-size: 20px; font-weight: 700; white-space: nowrap; }
.net-tile .s { font-size: 11.5px; opacity: .85; }
.net-tile.cancel { background: var(--violet-soft); color: var(--violet); }
.net-tile.bad { background: var(--bad-soft); color: var(--bad); }
.net-tile.warn { background: var(--warn-soft); color: var(--warn); }
.net-tile.on { border-color: currentColor; }
tr.soon3 > td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.soon5 > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.checked > td { color: var(--ink-3); }
.check-menu { position: fixed; right: auto; top: 0; left: 0; z-index: 60; }
.pill-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.pill-btn:hover .pill { box-shadow: 0 0 0 1px currentColor; }
.pill-btn .pill .i { width: 12px; height: 12px; }
.net-run { display: inline-flex; align-items: center; gap: 6px; }
.net-run.on { color: var(--info); } .net-run.on .i { animation: spin 1.2s linear infinite; }
.net-run.err { color: var(--bad); }
table.t td.note { white-space: normal; min-width: 220px; max-width: 360px; font-size: 12px; color: var(--ink-2); }
table.t tr.total td { border-top: 2px solid var(--line); }

/* ═══════════════ Адаптивность ═══════════════ */
/* «Источники»: панель фильтров, итог списка с быстрыми фильтрами */
.src-tools { margin-bottom: 16px; padding: 12px 18px; }
.src-tools #q { min-width: 0; width: 240px; }
.src-sum { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.src-hero .l { color: var(--ink-2); font-size: 12.5px; }
.src-hero .v { font: var(--head-weight) 34px/1.05 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: var(--head-track); margin-top: 4px; white-space: nowrap; }
[data-style="neon"] .src-hero .v { color: var(--accent); }
.src-hero .s { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.src-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.quick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--ctl); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.quick b { font-variant-numeric: tabular-nums; }
.quick:hover:not(:disabled) { border-color: var(--ink-3); }
.quick:disabled { color: var(--ink-3); cursor: default; }
.quick.new b { color: var(--accent); } .quick.bad b { color: var(--bad); } .quick.none b { color: var(--warn); }
.quick:disabled b { color: inherit; }
.quick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.quick.on b { color: inherit; }
.quick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.src-meta { min-height: 34px; align-items: center; }
.src-meta .hint { margin: 0; }
.src-meta .linklike { margin-left: auto; color: var(--ink-2); }
.grade-why { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 1100px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .brief-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brief-rev { grid-column: 1 / -1; }
  .brief-kpi:nth-child(2) { border-left: 0; padding-left: 0; margin-left: 0; }
}
@media (max-width: 860px) {
  .shell { display: block; padding: 8px; }
  .nav { position: sticky; top: 8px; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; z-index: 20; overflow-x: auto; }
  [data-style="neon"] .nav-ind::before { display: none; }
  .nav-links { flex-direction: row; } .nav-links a span { display: none; } .brand-text, .sync-btn span { display: none; }
  .sync-btn { margin: 0 0 0 auto; }
  .sync-prog { position: fixed; top: 0; left: 0; right: 0; margin: 0; z-index: 30; }
  .sync-prog .sync-track { height: 3px; border-radius: 0; background: transparent; }
  .sync-prog small { display: none; }
  .main { padding: 16px 8px 60px; }
  .look-grid { grid-template-columns: 1fr; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .card h2 { flex-wrap: wrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .src-head .row { width: 100%; }
  .funnel .step { grid-template-columns: 90px 1fr 60px; }
  .topbar { gap: 12px; }
  .topbar h1 { order: 0; } .theme-sw { order: 1; } .filters { order: 2; }   /* переключатель темы — рядом с заголовком, а не отдельной строкой */
  .filters .period { width: auto; flex: 1 1 200px; }
  .period-btn { width: 100%; }
  .brief { padding: 16px; }
  .brief .v { font-size: 19px; }
  .brief .brief-rev .v { font-size: 34px; }
  .brief-kpi { padding-left: 12px; margin-left: 12px; }
  .legend-note { margin-left: 0; flex-basis: 100%; }
  .table-wrap { margin: 0 -18px -18px; }
  .table-wrap.mid { margin-bottom: 0; }
  /* список кампаний: строка — карточка (название, даты, заказы ₽ и ДРР крупнее, остальное — мельче) */
  table.camp-list thead { display: none; }
  table.camp-list, table.camp-list tbody { display: block; }
  table.camp-list tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  table.camp-list td { display: block; padding: 0 !important; border: 0; white-space: normal; text-align: left !important; }
  table.camp-list td.name { grid-column: 1 / -1; }
  table.camp-list td.dates { grid-column: 1 / 3; color: var(--ink-2); }
  table.camp-list td.grade { grid-column: 3; grid-row: 2; justify-self: end; }
  table.camp-list td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--ink-3); }
  table.camp-list td.rev { font-weight: 700; }
  table.camp-list tbody tr:hover td { background: transparent; }
  .scroll-box { max-height: none; }   /* на телефоне прокрутка внутри страницы ловит палец — пусть таблица идёт целиком */
  table.sticky1 td.name { min-width: 150px; max-width: 170px; overflow-wrap: anywhere; }
}

@media (max-width: 560px) { .src-tools #q { width: 100%; } .src-hero .v { font-size: 28px; } }

/* раздел «Сайт» (Яндекс Метрика) */
.site-head { margin-bottom: 12px; gap: 10px 12px; }
.site-id { gap: 8px; min-width: 0; }
.site-id > .i { color: var(--ink-3); flex: none; }
.site-id b { overflow-wrap: anywhere; }
.site-id .pill .i { width: 12px; height: 12px; }
.site-tools { gap: 8px; min-width: 0; }
.site-tools select { max-width: 240px; }
.site-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius-sm);
  background: var(--bad-soft); color: var(--ink); font-size: 13px; }
.site-alert > .i { color: var(--bad); flex: none; margin-top: 1px; }
.site-noprev { margin: -6px 0 14px; }
.site-focus-bar { gap: 8px 12px; margin: -4px 0 12px; padding: 8px 8px 8px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 13px; justify-content: space-between; }
.site-focus-bar span { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.site-focus-bar b { color: var(--ink); }
.site-filter { gap: 8px 16px; align-items: center; margin: -2px 0 12px; }
.site-filter #site-q { width: 220px; min-width: 0; }
.site-note { margin: 14px 0 0; }
.goal-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
/* длинная метка не налезает на соседнюю колонку; цель с конверсией — одной ячейкой, конверсия мельче */
table.site-table td.name { overflow-wrap: anywhere; }
table.site-table th.goal { white-space: normal; min-width: 92px; max-width: 150px; }
table.site-table td .cr { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
table.site-table tfoot td .cr { color: var(--ink-2); }
table.site-table tfoot td:first-child { background: linear-gradient(var(--surface-2), var(--surface-2)) var(--surface-solid); }
table.site-table tbody tr { cursor: default; }
table.site-table.focusable tbody tr { cursor: pointer; }
table.site-table tbody tr.on td { background: var(--accent-soft); }
table.site-table tbody tr.on td:first-child { background: linear-gradient(var(--accent-soft), var(--accent-soft)) var(--surface-solid); }
.site-focus { all: unset; cursor: pointer; border-radius: 4px; }
.site-focus:hover { color: var(--accent); }
.site-focus:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#site-by { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#site-by button { white-space: nowrap; }
@media (max-width: 760px) {
  .site-head .site-tools { width: 100%; }
  .site-head .site-tools select { flex: 1 1 auto; max-width: none; }
  .site-filter #site-q { width: 100%; }
  #site-by button { padding: 6px 10px; }
}
.goal-pick label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* Общий сервер: вход, учётные записи и приложения. Те же токены во всех четырёх темах. */
[data-shared-only][hidden], .nav-links a[hidden], .team-session[hidden] { display: none; }
.team-session { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; }
.team-session > a { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.team-session .btn { flex: none; }
.team-intro { margin: 0 0 20px; max-width: 75ch; color: var(--ink-2); }
.team-intro p { margin: 0; }
.team-layout { align-items: start; }
.team-form { display: flex; flex-direction: column; gap: 16px; }
.team-form input, .team-form select { min-width: 0; width: 100%; }
.team-form .hint { margin: 0; }
.team-form .grid { gap: 16px; }
.team-form > .btn { align-self: start; }
.team-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 24px; margin: 20px 0; }
.team-facts dt { color: var(--ink-2); }
.team-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.team-editor { margin-top: 20px; scroll-margin-top: 24px; }
.team-active { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.team-active input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.team-table td { overflow-wrap: anywhere; }
.team-table td:last-child { text-align: right; }
.team-table td:last-child .btn { white-space: nowrap; }
.desktop-choice { display: flex; align-items: start; flex-direction: column; }
.desktop-choice p { color: var(--ink-2); margin: 0 0 20px; }
.desktop-choice .btn { max-width: 100%; white-space: normal; }
.desktop-choice .hint { margin-bottom: 0; }
.server-details { margin-top: 20px; }
.server-details .field .row { align-items: stretch; }
.server-details input { min-width: 0; flex: 1 1 260px; }
.server-details .hint { margin: 16px 0 0; }
.auth-page { min-height: 100vh; }
.auth-main { width: 100%; max-width: 500px; margin: 0 auto; padding: 56px 20px 32px; }
.auth-brand { padding: 0; margin-bottom: 28px; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 28px; line-height: 1.2; margin-bottom: 12px; }
.auth-card > .muted { margin: 0 0 24px; text-wrap: pretty; }
.auth-card form { display: flex; flex-direction: column; gap: 18px; }
.auth-card form[hidden], .auth-card [hidden] { display: none; }
.auth-card input { min-width: 0; width: 100%; min-height: 44px; font-size: 16px; }
.auth-submit { min-height: 44px; justify-content: center; }
.auth-help { margin: 24px 0 0; }
.auth-footer { margin: 24px 0 0; color: var(--ink-2); font-size: 14px; }
.auth-error { color: var(--bad); background: var(--bad-soft); border-radius: var(--radius-sm); padding: 12px; margin: 0 0 18px; overflow-wrap: anywhere; }
.auth-error:focus { outline: 2px solid var(--bad); outline-offset: 2px; }
.auth-error[hidden] { display: none; }
@media (min-width: 861px) {
  .nav-links { min-height: 0; overflow-y: auto; }
}
@media (max-width: 860px) {
  .team-session { padding: 0; }
  .team-session > a { display: none; }
  .team-session .btn { min-height: 44px; }
  .team-editor { scroll-margin-top: 100px; }
}
@media (max-width: 560px) {
  .auth-main { padding: 28px 16px; }
  .auth-card { padding: 22px 18px; }
  .auth-card h1 { font-size: 28px; }
  .team-form input, .team-form select { min-height: 44px; font-size: 16px; }
  .team-form .btn, .team-table .btn, .server-details .btn, .desktop-choice .btn { min-height: 44px; }
  .team-facts { gap: 12px 16px; }
  .server-details .row > .btn { width: 100%; justify-content: center; }
}
