/*
 * C Board — дизайн-система «C — море».
 *
 * Буква C — это море (sea): незамкнутое кольцо, внутри которого стоит вода.
 * Прогресс цели — уровень воды с живой волной; просрочки — коралл, ожидания —
 * песок, готово — водоросль. Боковое меню — ночное море с волнами внизу.
 * Анимации — мягкие, как прибой; при prefers-reduced-motion выключаются.
 *
 * Шрифты: Rubik — заголовки и цифры (скруглённый, «морской»), Golos Text — текст.
 * Сначала телефон: нижняя панель вкладок, на широком экране — боковое меню.
 */

:root {
  --bg: #eaf2f5;
  --surface: #ffffff;
  --surface-2: #f3f8fa;
  --surface-3: #e2edf2;
  --ink: #0a2233;
  --ink-2: #456072;
  --ink-3: #8aa1b0;
  --line: #d6e4ea;
  --line-2: #bfd3dd;
  --accent: #0a7bc2;
  --accent-soft: #dceffd;
  --accent-ink: #ffffff;
  --sea: #11a5a0;
  --deep: #062236;
  --deep-2: #0b3a56;
  --fire: #f0524f;
  --fire-soft: #fde6e4;
  --wait: #e3a23b;
  --wait-soft: #fbf0db;
  --block: #6c5ce7;
  --block-soft: #ebe8ff;
  --ok: #1fa774;
  --ok-soft: #dcf5ea;
  --info: #0a7bc2;
  --shadow: 0 1px 2px rgba(10, 34, 51, .04), 0 6px 20px rgba(10, 60, 90, .06);
  --shadow-lg: 0 14px 44px rgba(6, 34, 54, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Rubik", "Golos Text", system-ui, sans-serif;
  --tabbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #04131f;
    --surface: #0a1f2e;
    --surface-2: #0d2636;
    --surface-3: #123245;
    --ink: #e6f1f6;
    --ink-2: #9db6c4;
    --ink-3: #5f7d8e;
    --line: #16384c;
    --line-2: #21495f;
    --accent: #3fb2ff;
    --accent-soft: #0e3550;
    --accent-ink: #04131f;
    --sea: #2fd1c5;
    --deep: #020c14;
    --deep-2: #072235;
    --fire: #ff6f6a;
    --fire-soft: #3a1618;
    --wait: #ffc061;
    --wait-soft: #35270f;
    --block: #9d8cff;
    --block-soft: #241f4a;
    --ok: #3ddc97;
    --ok-soft: #0f3326;
    --info: #3fb2ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p { margin: 0 0 .75em; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
small, .muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-family: var(--font-head); font-weight: 800; font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
[hidden] { display: none !important; }

/* ——— Каркас ——— */

.shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px;
  display: none; flex-direction: column; gap: 4px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-mark-ring { stroke: var(--accent); }
.brand-mark-dot { fill: var(--fire); }

.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 500;
}
.nav-link svg { width: 19px; height: 19px; flex: none; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--fire); }
.nav-section { margin: 16px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 10px; padding-left: 10px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--ink-3); font-weight: 500; position: relative; }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--accent); }
.tab-dot { position: absolute; top: 9px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--fire); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.main { padding: 16px 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; }

.topbar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.topbar .brand { padding: 0; font-size: 16px; }
.topbar .brand svg { width: 26px; height: 26px; }
.topbar-spacer { flex: 1; }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .tabbar, .topbar { display: none; }
  .main { margin-left: 232px; padding: 28px 36px 60px; }
}

/* ——— Заголовок страницы ——— */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 20px; }
.page-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.page-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head .lead { color: var(--ink-2); margin: 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ——— Кнопки ——— */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--fire); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 9px; border-radius: 8px; font-size: 12px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
button[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.button_to { display: inline; }

/* ——— Карточки и сетки ——— */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-head .count { font-family: var(--font-head); font-weight: 800; color: var(--ink-3); }
.card-body { padding: 0 18px 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.grid-main { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}

.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { flex: 1; }
.section-title:first-child { margin-top: 0; }

/* ——— Метки, аватары, чипы ——— */

.avatar {
  --c: var(--accent);
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font: 700 11px/1 var(--font-head); letter-spacing: .02em;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--c);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent);
}
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-sm { width: 22px; height: 22px; font-size: 9px; }
.avatar-empty { --c: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.plain::before { display: none; }
.chip-todo { color: var(--ink-2); }
.chip-in_progress { background: var(--accent-soft); color: var(--accent); }
.chip-waiting, .chip-wait { background: var(--wait-soft); color: color-mix(in srgb, var(--wait) 80%, var(--ink)); }
.chip-done, .chip-ok, .chip-on_track, .chip-achieved { background: var(--ok-soft); color: var(--ok); }
.chip-cancelled, .chip-dropped { color: var(--ink-3); }
.chip-fire, .chip-off_track, .chip-overdue { background: var(--fire-soft); color: var(--fire); }
.chip-at_risk { background: var(--wait-soft); color: color-mix(in srgb, var(--wait) 80%, var(--ink)); }
.chip-blocked { background: var(--block-soft); color: var(--block); }
.chip-no_plan { color: var(--ink-3); }

.tag {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }

.due { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.due svg { width: 13px; height: 13px; }
.due.overdue { color: var(--fire); }
.due.soon { color: color-mix(in srgb, var(--wait) 85%, var(--ink)); }

.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pill-count.fire { background: var(--fire); color: #fff; }

/* ——— Кольцо «C» с водой ——— */

.ring { position: relative; display: inline-grid; place-items: center; flex: none; --tone: var(--accent); }
.ring.ok { --tone: var(--ok); }
.ring.risk { --tone: var(--wait); }
.ring.fire { --tone: var(--fire); }
.ring svg { display: block; overflow: visible; }
.ring-sea { fill: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.ring-track { stroke: var(--tone); opacity: .9; }
.ring-water { transform: translateY(var(--level)); animation: tide-in 1.4s var(--ease) both; }
.ring-wave { fill: var(--accent); opacity: .85; }
.ring-wave-back { fill: var(--sea); opacity: .45; }
.ring-swell { animation: swell 3.2s linear infinite; }
.ring-swell-back { animation-duration: 5.4s; animation-direction: reverse; }
.ring-label { position: absolute; font: 700 13px/1 var(--font-head); letter-spacing: -.02em; color: var(--ink); text-shadow: 0 0 6px var(--surface), 0 0 2px var(--surface); }
.ring-lg .ring-label { font-size: 30px; }
.ring-lg .ring-label small { font-size: 14px; color: var(--ink-2); font-weight: 600; }

@keyframes swell { to { transform: translateX(-100px); } }
@keyframes tide-in { from { transform: translateY(96px); } }

.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.ok > span { background: var(--ok); }
.bar.risk > span { background: var(--wait); }
.bar.fire > span { background: var(--fire); }

/* ——— Списки задач ——— */

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line);
  position: relative;
}
.row:first-child { border-top: 0; }
.card > .list > .row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; line-height: 1.35; display: block; overflow-wrap: anywhere; }
.row-title a::after { content: ""; position: absolute; inset: 0; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 5px; font-size: 12px; color: var(--ink-2); }
.row-note { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.row-note::before { content: "↳ "; color: var(--ink-3); }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; position: relative; z-index: 1; }
.row .chip, .row .avatar, .row form, .row .btn { position: relative; z-index: 1; }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.row.critical { box-shadow: inset 3px 0 0 var(--fire); }

.dot-status {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 2px solid var(--line-2); background: transparent; display: grid; place-items: center; color: transparent;
  position: relative; z-index: 1; cursor: pointer; padding: 0;
}
.dot-status svg { width: 12px; height: 12px; }
.dot-status.in_progress { border-color: var(--accent); background: conic-gradient(var(--accent) 0 50%, transparent 50% 100%); }
.dot-status.waiting { border-color: var(--wait); border-style: dashed; }
.dot-status.done { border-color: var(--ok); background: var(--ok); color: #fff; }
.dot-status.cancelled { border-color: var(--ink-3); background: var(--surface-3); }
.dot-status.blocked { border-color: var(--block); }
button.dot-status:hover { border-color: var(--ok); color: var(--ok); }

/* ——— Пульт ——— */

.hero {
  display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-bottom: 22px;
}
@media (min-width: 900px) { .hero { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: block; }
.stat-value { font: 800 32px/1 var(--font-head); letter-spacing: -.03em; }
.stat-label { margin-top: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat.fire { background: var(--fire); border-color: var(--fire); color: #fff; }
.stat.fire .stat-label { color: rgba(255, 255, 255, .85); }
.stat.wait .stat-value { color: color-mix(in srgb, var(--wait) 85%, var(--ink)); }
.stat.block .stat-value { color: var(--block); }
.stat.calm .stat-value { color: var(--ok); }
a.stat:hover { color: inherit; border-color: var(--line-2); }
a.stat.fire:hover { color: #fff; }

.people { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .people { grid-template-columns: repeat(4, 1fr); } }
.person { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.person-head { display: flex; gap: 10px; align-items: center; }
.person-name { font-weight: 700; line-height: 1.2; }
.load { display: flex; gap: 3px; height: 8px; }
.load span { flex: 1; border-radius: 2px; background: var(--surface-3); }
.load span.on { background: var(--accent); }
.load span.over { background: var(--fire); }
.person-nums { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.person-nums b { font: 800 16px/1 var(--font-head); color: var(--ink); display: block; margin-bottom: 2px; }
.person-nums .fire b { color: var(--fire); }
.person-nums .wait b { color: color-mix(in srgb, var(--wait) 85%, var(--ink)); }

.project-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.project-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, var(--accent)); }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; }
.project-goals { display: flex; flex-direction: column; gap: 8px; }
.project-goal { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.project-goal .bar { grid-column: 1 / -1; }
.project-foot { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.project-foot .fire { color: var(--fire); font-weight: 700; }
.project-foot .wait { color: color-mix(in srgb, var(--wait) 85%, var(--ink)); font-weight: 700; }

.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line); position: relative; }
.alert-row:first-child { border-top: 0; }
.alert-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.alert-icon svg { width: 16px; height: 16px; }
.alert-icon.fire { background: var(--fire-soft); color: var(--fire); }
.alert-icon.wait { background: var(--wait-soft); color: var(--wait); }
.alert-icon.block { background: var(--block-soft); color: var(--block); }
.alert-icon.stale { background: var(--surface-3); color: var(--ink-2); }
.alert-row:hover { background: var(--surface-2); }

/* ——— Цель ——— */

.goal-hero { display: grid; gap: 18px; grid-template-columns: auto 1fr; align-items: center; padding: 20px; }
.goal-facts { display: grid; gap: 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .goal-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact-label { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.fact-value { font: 800 18px/1.3 var(--font-head); margin-top: 3px; }
.fact-value small { font: 500 12px/1 var(--font); color: var(--ink-2); }
@media (max-width: 600px) { .goal-hero { grid-template-columns: 1fr; justify-items: start; } }

.goal-card { padding: 16px 18px; display: flex; gap: 14px; align-items: center; position: relative; }
.goal-card h3 a::after { content: ""; position: absolute; inset: 0; }
.goal-card-main { flex: 1; min-width: 0; }

.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a svg { width: 15px; height: 15px; }
.tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.path { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.path li { position: relative; padding: 0 0 18px 34px; counter-increment: step; }
.path li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--fire); color: #fff; font: 800 11px/22px var(--font-head); text-align: center; }
.path li::after { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line-2); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.path li.done::before { background: var(--ok); }

/* Дерево */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 18px; padding-left: 16px; border-left: 1px dashed var(--line-2); }
.tree-node { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; position: relative; }
.tree-node:hover { background: var(--surface-2); }
.tree-goal { font-family: var(--font-head); font-weight: 800; font-size: 16px; align-items: center; }
.tree-blockers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tree-blockers .chip { height: 22px; font-size: 11px; }

/* Граф */
.graph-wrap { overflow: auto; border-radius: var(--radius); background:
  radial-gradient(circle, var(--line) 1px, transparent 1.2px) 0 0 / 22px 22px, var(--surface-2);
  border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.graph { display: block; }
.graph .edge { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.graph .edge.critical { stroke: var(--fire); stroke-width: 2.4; }
.graph .edge.wait { stroke: var(--wait); stroke-dasharray: 5 4; }
.graph .edge.done { stroke-dasharray: 2 4; opacity: .7; }
.graph .node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.graph .node.critical rect { stroke: var(--fire); stroke-width: 2; }
.graph .node.done rect { fill: var(--ok-soft); stroke: transparent; }
.graph .node.blocked rect { stroke: var(--block); stroke-dasharray: 4 3; }
.graph .node.critical.blocked rect { stroke: var(--fire); }
.graph .node.wait rect { fill: var(--wait-soft); stroke: var(--wait); stroke-dasharray: 5 4; }
.graph .node.external rect { fill: var(--surface-3); }
.graph .node.goal rect { fill: var(--ink); stroke: var(--ink); }
.graph .node.goal text { fill: var(--bg); }
.graph .node text { font: 600 12px var(--font); fill: var(--ink); }
.graph .node .meta { font: 500 11px var(--font); fill: var(--ink-2); }
.graph .node.goal .meta { fill: var(--ink-3); }
.graph .node:hover rect { stroke: var(--accent); }
.graph .arrow { fill: var(--line-2); }
.graph .arrow-critical { fill: var(--fire); }
.graph-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.graph-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--line-2); vertical-align: middle; margin-right: 6px; }
.graph-legend i.critical { border-color: var(--fire); }
.graph-legend i.wait { border-top-style: dashed; border-color: var(--wait); }

/* Таймлайн */
.timeline-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timeline { position: relative; min-width: 100%; }
.tl-head { display: flex; position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); height: 34px; }
.tl-label-col { position: sticky; left: 0; z-index: 3; width: 210px; flex: none; background: var(--surface); border-right: 1px solid var(--line); }
.tl-scale { position: relative; flex: none; }
.tl-tick { position: absolute; top: 0; bottom: 0; font-size: 11px; color: var(--ink-3); padding: 9px 0 0 6px; border-left: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
.tl-row { display: flex; height: 44px; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-row .tl-label-col { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; font-weight: 600; min-width: 0; }
.tl-row .tl-label-col span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-lane { position: relative; flex: none; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); }
.tl-bar { position: absolute; top: 10px; height: 24px; border-radius: 7px; background: var(--accent-soft); border: 1.5px solid var(--accent); display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; min-width: 10px; }
.tl-bar.projected { border-style: dashed; background: transparent; }
.tl-bar.critical { border-color: var(--fire); background: var(--fire-soft); color: var(--fire); }
.tl-bar.critical.projected { background: transparent; }
.tl-bar.done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.tl-bar.waiting { border-color: var(--wait); background: var(--wait-soft); color: color-mix(in srgb, var(--wait) 80%, var(--ink)); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 1; }
.tl-today::before { content: "сегодня"; position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--accent); background: var(--surface); padding: 0 3px; border-radius: 3px; }
.tl-deadline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--fire); z-index: 1; }
.tl-deadline::before { content: "срок"; position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--fire); background: var(--surface); padding: 0 3px; border-radius: 3px; }

/* ——— Формы ——— */

.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid .wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=url], input[type=search], input[type=password], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 15px/1.4 var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select[multiple] { height: auto; min-height: 120px; padding: 6px; background-image: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.field_with_errors { display: contents; }
.errors { padding: 12px 16px; border-radius: 12px; background: var(--fire-soft); color: var(--fire); font-size: 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { flex: 1; min-width: 0; }

.quick-add { display: flex; gap: 8px; padding: 12px; }
.quick-add input { flex: 1; }

/* Сегменты статуса */
.segments { display: flex; flex-wrap: wrap; gap: 6px; }
.segments button, .segments a { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; }
.segments .on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters select { width: auto; height: 36px; font-size: 14px; }
.filter-link { height: 34px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.filter-link.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-link:hover { color: var(--ink); }
.filter-link.on:hover { color: var(--bg); }

/* ——— Задача ——— */

.note-box { padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); display: grid; gap: 10px; }
.note-box .note-current { font: 700 17px/1.35 var(--font-head); color: var(--ink); }
.note-box .note-when { font-size: 12px; color: var(--ink-2); }
.wait-card { padding: 12px 14px; border-radius: 12px; background: var(--wait-soft); display: flex; gap: 10px; align-items: flex-start; }
.wait-card .grow { flex: 1; min-width: 0; }
.wait-days { font: 800 20px/1 var(--font-head); color: color-mix(in srgb, var(--wait) 85%, var(--ink)); text-align: center; min-width: 40px; }
.wait-days small { display: block; font: 600 10px/1.2 var(--font); color: var(--ink-2); }

.timeline-feed { list-style: none; margin: 0; padding: 0; }
.timeline-feed li { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.timeline-feed li:first-child { border-top: 0; }
.timeline-feed .who { color: var(--ink); font-weight: 600; }
.timeline-feed .when { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.timeline-feed .body { color: var(--ink); }
.timeline-feed .comment { background: var(--surface-2); padding: 8px 10px; border-radius: 10px; margin-top: 4px; color: var(--ink); white-space: pre-wrap; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; align-items: center; }
.kv dt { color: var(--ink-3); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; }

/* ——— Отчёт / режим собрания ——— */

.report-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: baseline; margin-bottom: 22px; }
.report-section { margin-top: 26px; }
.report-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.report-section > h2 .pill-count { font-size: 13px; }
.big-number { font: 800 44px/1 var(--font-head); letter-spacing: -.04em; }

/* ——— Сообщения ——— */

.flash { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: 14px; padding: 11px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: flash-in .25s ease, flash-out .4s ease 4s forwards; max-width: calc(100% - 32px); }
.flash.alert { background: var(--fire); color: #fff; }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes flash-out { to { opacity: 0; transform: translate(-50%, -8px); visibility: hidden; } }

.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--ink-3); }
.empty.calm { color: var(--ok); }

.callout { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.callout.ai { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); color: var(--ink); }
.callout.warn { background: var(--wait-soft); border-color: transparent; color: var(--ink); }

/* Меню-«шторка» на details */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font: 500 14px var(--font); color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--ink); }

.disclosure > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); font-size: 14px; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open] > summary { margin-bottom: 12px; }

.code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
pre.code { display: block; padding: 12px 14px; white-space: pre-wrap; }

/* ——— Вход ——— */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 600px at 80% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 32px 28px; }
.auth-logo { width: 64px; height: 64px; margin-bottom: 18px; }
.auth h1 { font-size: 30px; }
.auth .lead { color: var(--ink-2); margin: 8px 0 26px; }
.telegram-slot { min-height: 44px; display: flex; justify-content: center; margin-bottom: 10px; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ——— Печать отчёта ——— */

@media print {
  .sidebar, .tabbar, .topbar, .actions, .no-print { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

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

/* ——— Телефон: ничего не вылезает за край ——— */
.grid > *, .stack > *, .row-main, .goal-card-main { min-width: 0; }
@media (max-width: 899px) {
  .hide-mobile { display: none !important; }
}
@media (max-width: 600px) {
  .wait-card { flex-wrap: wrap; }
  .wait-card > .actions { width: 100%; padding-left: 50px; }
  .alert-row .row-side { flex-direction: row; }
  .page-head h1 { font-size: 23px; }
  .card-head, .row, .alert-row { padding-left: 14px; padding-right: 14px; }
}

/* ═══════════ Море ═══════════ */

h1 { font-weight: 700; letter-spacing: -.025em; }
h2, h3 { font-weight: 600; }
.num, .stat-value, .fact-value, .big-number, .wait-days, .person-nums b { font-family: var(--font-head); font-weight: 700; }

/* Логотип: кольцо и вода */
.logo-mark { display: block; }
.logo-ring { stroke: var(--sea); }
.logo-wave { fill: var(--accent); }
.logo-wave-back { fill: var(--sea); opacity: .55; }
.logo-mark.is-animated .logo-wave { animation: swell 3s linear infinite; }
.logo-mark.is-animated .logo-wave-back { animation: swell 5s linear infinite reverse; }

/* Боковое меню — ночное море в любой теме */
.sidebar {
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
  border-right: 0; color: #cfe3ee; overflow: hidden;
}
.sidebar .brand { color: #fff; }
.sidebar .logo-ring { stroke: #4fe0d3; }
.sidebar .logo-wave { fill: #49b6ff; }
.sidebar .nav-link { color: #a9c6d6; position: relative; z-index: 1; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .nav-link.active { background: rgba(79, 224, 211, .14); color: #fff; box-shadow: inset 3px 0 0 #4fe0d3; }
.sidebar .nav-count { color: #ff8a85; }
.sidebar .nav-section { color: #5f8aa1; }
.sidebar-foot { position: relative; z-index: 1; color: #cfe3ee; }
.sidebar-foot .muted { color: #cfe3ee; }
.sidebar-foot .btn-ghost { color: #a9c6d6; }
.sidebar-foot .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; }

.waves, .waves::before, .waves::after {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  background-repeat: repeat-x; background-size: 240px 100%; content: "";
}
.waves {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C30 18 90 18 120 30 S210 42 240 30 V60 H0Z' fill='%2349b6ff' fill-opacity='.10'/%3E%3C/svg%3E");
  animation: waves 14s linear infinite;
}
.waves::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M0 38 C40 26 80 26 120 38 S200 50 240 38 V60 H0Z' fill='%234fe0d3' fill-opacity='.10'/%3E%3C/svg%3E");
  animation: waves 9s linear infinite reverse;
}
.waves::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath d='M0 46 C30 38 90 38 120 46 S210 54 240 46 V60 H0Z' fill='%23ffffff' fill-opacity='.07'/%3E%3C/svg%3E");
  animation: waves 6s linear infinite;
}
@keyframes waves { to { background-position-x: 240px; } }

/* Шапка пульта — море с прибоем */
.sea-hero {
  position: relative; overflow: hidden; border-radius: 24px; margin-bottom: 18px;
  padding: 24px 22px 64px; color: #fff;
  background:
    radial-gradient(600px 240px at 85% -20%, rgba(79, 224, 211, .35), transparent 70%),
    linear-gradient(160deg, #0a7bc2 0%, #075a92 45%, var(--deep) 100%);
  box-shadow: var(--shadow-lg);
}
.sea-hero.storm {
  background:
    radial-gradient(600px 240px at 85% -20%, rgba(255, 111, 106, .35), transparent 70%),
    linear-gradient(160deg, #1d4f78 0%, #123a5c 45%, var(--deep) 100%);
}
.sea-hero .eyebrow { color: rgba(255, 255, 255, .7); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.sea-hero h1 { color: #fff; font-size: 30px; margin-top: 4px; }
.sea-hero .lead { color: rgba(255, 255, 255, .82); margin: 6px 0 0; }
.sea-hero .actions { margin-top: 16px; position: relative; z-index: 1; }
.sea-hero .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }
.sea-hero .btn:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.sea-hero .btn-primary { background: #fff; color: #075a92; border-color: #fff; }
.sea-hero .btn-primary:hover { background: #e6f5ff; color: #075a92; }
.sea-hero .waves { height: 70px; }
.sea-hero.storm .waves { animation-duration: 6s; }
.sea-hero.storm .waves::before { animation-duration: 4s; }
.sea-hero.storm .waves::after { animation-duration: 3s; }
@media (min-width: 900px) { .sea-hero { padding: 30px 32px 74px; } .sea-hero h1 { font-size: 36px; } }

/* Плитки-числа */
.stat { transition: transform .25s var(--ease), box-shadow .25s var(--ease); position: relative; overflow: hidden; }
a.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat.fire { background: linear-gradient(150deg, #ff7a6e, var(--fire)); border-color: transparent; }
.stat-value { font-size: 34px; }

/* Карточки и кнопки — мягче */
.card { transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; }
.project-card:hover, .goal-card:hover, .person:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn { transition: background .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s; }
.btn-primary { background: linear-gradient(160deg, #1690dc, var(--accent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { transform: translateY(-1px); }
.nav-link, .tab, .filter-link, .tabs a { transition: background .2s, color .2s, box-shadow .2s; }

/* Прогресс-полоса — вода набегает слева */
.bar > span { background: linear-gradient(90deg, var(--sea), var(--accent)); transform-origin: left; animation: bar-fill 1.1s var(--ease) both; }
.bar.ok > span { background: linear-gradient(90deg, #4fd6a3, var(--ok)); }
@keyframes bar-fill { from { transform: scaleX(0); } }
.load span.on { background: linear-gradient(180deg, var(--sea), var(--accent)); }
.load span { transform-origin: bottom; animation: bar-rise .6s var(--ease) both; }
.load span:nth-child(n) { animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes bar-rise { from { transform: scaleY(.2); opacity: 0; } }

/* Появление — как набегающая волна */
.reveal > * { animation: rise .55s var(--ease) both; }
.reveal > *:nth-child(2) { animation-delay: .05s; }
.reveal > *:nth-child(3) { animation-delay: .1s; }
.reveal > *:nth-child(4) { animation-delay: .15s; }
.reveal > *:nth-child(5) { animation-delay: .2s; }
.reveal > *:nth-child(6) { animation-delay: .25s; }
.reveal > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.list > .row, .list > .alert-row, .list > li { animation: rise .4s var(--ease) both; }
.row { transition: background .2s; }
.dot-status { transition: transform .2s var(--ease), border-color .2s, background .2s; }
button.dot-status:hover { transform: scale(1.15); }

/* Переходы между страницами */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* Пусто и штиль */
.empty.calm { color: var(--ok); }
.empty.calm::after { content: ""; display: block; width: 120px; height: 10px; margin: 10px auto 0; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M0 5 C15 0 15 0 30 5 S45 10 60 5 S75 0 90 5 S105 10 120 5' fill='none' stroke='%231fa774' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center; }

/* Граф — морская карта: изобаты и течение по фарватеру */
.graph-wrap {
  background:
    radial-gradient(circle at 20% 30%, transparent 0 60px, color-mix(in srgb, var(--accent) 7%, transparent) 61px 62px, transparent 63px 110px, color-mix(in srgb, var(--accent) 6%, transparent) 111px 112px, transparent 113px),
    radial-gradient(circle at 80% 75%, transparent 0 80px, color-mix(in srgb, var(--sea) 7%, transparent) 81px 82px, transparent 83px 140px, color-mix(in srgb, var(--sea) 6%, transparent) 141px 142px, transparent 143px),
    radial-gradient(circle, var(--line) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--surface-2);
}
.graph .edge.critical { stroke-dasharray: 10 7; animation: current 1s linear infinite; }
.graph .edge.wait { animation: current 2s linear infinite; }
@keyframes current { to { stroke-dashoffset: -17; } }
.graph .node rect { transition: stroke .2s, filter .2s; }
.graph .node:hover rect { filter: drop-shadow(0 4px 10px rgba(10, 60, 90, .18)); }

/* Таймлайн: сегодня — луч маяка */
.tl-today { background: linear-gradient(180deg, var(--sea), var(--accent)); box-shadow: 0 0 12px color-mix(in srgb, var(--sea) 60%, transparent); }
.tl-bar { transition: transform .2s var(--ease), box-shadow .2s; }
.tl-bar:hover { box-shadow: var(--shadow-lg); }

/* Цель: шапка с крупной водой */
.goal-hero { background:
  radial-gradient(400px 200px at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }

/* Вход */
.auth { background:
  radial-gradient(900px 500px at 80% -10%, rgba(79, 224, 211, .25), transparent 60%),
  linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, color-mix(in srgb, var(--accent) 12%, var(--bg)) 100%); position: relative; overflow: hidden; }
.auth .waves { height: 160px; }
.auth .waves { filter: hue-rotate(0deg); }
.auth-card { position: relative; z-index: 1; }
.auth-logo { width: 76px; height: 76px; }

/* Мобильная шапка */
.topbar .logo-mark { width: 30px; height: 30px; }
.brand .logo-mark { width: 34px; height: 34px; }

@media (prefers-reduced-motion: reduce) {
  .waves, .waves::before, .waves::after, .ring-swell, .ring-water, .logo-wave { animation: none !important; }
}

/* Телефон: фильтры — одна строка с прокруткой, а не пол-экрана */
@media (max-width: 700px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filters > * { flex: none; }
  .filters select { width: auto; }
}

/* Страны */
.country-label { margin: 18px 0 10px; font: 600 13px var(--font-head); color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 10px; }
.country-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.section-title + .country-label { margin-top: 0; }
.country-title { margin-top: 30px; }
