@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Шрифт Onest (Google Fonts, лицензия OFL) — лежит в web/fonts, хорошо читается по-русски */
/* Клуб «Сотворчество» — стиль в духе HeroUI: светло-серый фон, белые карточки без рамок, мягкие тени, скруглённые «таблетки».
   Цвета — только переменными; тёмная тема и цветовые схемы переопределяют переменные ниже. */
:root {
  --bg: #F4F4F5; --surface: #FFFFFF; --surface-2: #F4F4F5; --surface-3: #E4E4E7; --line: #EEEEF0; --line-2: #D4D4D8;
  --ink: #11181C; --ink-2: #52525B; --ink-3: #A1A1AA;
  --accent: #006FEE; --accent-ink: #FFFFFF; --accent-soft: #E6F1FE; --accent-line: #99C7FB;
  --ok: #12A150; --ok-soft: #E8FAF0; --warn: #C4841D; --warn-soft: #FEFCE8; --bad: #F31260; --bad-soft: #FEE7EF;
  --c2: #7828C8; --c3: #17C964; --c4: #F5A524;
  --hero-a: #004493; --hero-b: #006FEE; --hero-c: #66AAF9;
  --shadow: 0 0 5px 0 rgba(0,0,0,.02), 0 2px 10px 0 rgba(0,0,0,.06), 0 0 1px 0 rgba(0,0,0,.3);
  --shadow-lg: 0 0 15px 0 rgba(0,0,0,.03), 0 2px 30px 0 rgba(0,0,0,.08), 0 0 1px 0 rgba(0,0,0,.3);
  --r: 16px; --r-sm: 12px;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #18181B; --surface-2: #27272A; --surface-3: #3F3F46; --line: #27272A; --line-2: #3F3F46;
  --ink: #ECEDEE; --ink-2: #A1A1AA; --ink-3: #71717A;
  --accent: #338EF7; --accent-ink: #FFFFFF; --accent-soft: #001731; --accent-line: #005BC4;
  --ok: #45D483; --ok-soft: #052814; --warn: #F7B750; --warn-soft: #312107; --bad: #F54180; --bad-soft: #310413;
  --c2: #9353D3; --c3: #45D483; --c4: #F7B750;
  --hero-a: #002E62; --hero-b: #005BC4; --hero-c: #338EF7;
  --shadow: 0 0 5px 0 rgba(0,0,0,.05), 0 2px 10px 0 rgba(0,0,0,.2), inset 0 0 1px 0 rgba(255,255,255,.15);
  --shadow-lg: 0 0 15px 0 rgba(0,0,0,.06), 0 2px 30px 0 rgba(0,0,0,.22), inset 0 0 1px 0 rgba(255,255,255,.15);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 650; } h2 { font-size: 17px; font-weight: 600; } h3 { font-size: 14.5px; font-weight: 600; }
small, .muted { color: var(--ink-3); } .ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* оболочка: меню слева на фоне страницы (без рамки), снизу — на телефоне */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand .mark { width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(from 200deg, var(--hero-c), var(--accent), #A78BFA, var(--hero-c)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; box-shadow: var(--shadow); }
.brand b { display: block; font-size: 14.5px; font-weight: 600; } .brand small { display: block; font-size: 12px; }
.navgroup { font-size: 12px; color: var(--ink-3); padding: 14px 10px 6px; font-weight: 500; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--surface-3); color: var(--ink); }
:root[data-theme="dark"] .nav a.on, :root[data-theme="dark"] .nav a:hover { background: var(--surface-2); }
.nav .badge { margin-left: auto; }
.nav svg, .tabbar svg { width: 18px; height: 18px; flex: none; }
.side .me { margin-top: auto; padding: 12px 8px 4px; display: flex; align-items: center; gap: 10px; }
.side .me .who { min-width: 0; flex: 1; } .side .me .who b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; padding: 22px 28px 48px; max-width: 1320px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; min-height: 40px; }
.head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13.5px; }
.topbar, .tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .topbar .brand { padding: 0; } .topbar .sp { flex: 1; }
  .main { padding: 12px 14px 96px; }
  .tabbar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 6px; overflow-x: auto; }
  .tabbar a { flex: 1 0 60px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font-size: 11px; color: var(--ink-3); border-radius: 14px; white-space: nowrap; }
  .tabbar a.on { color: var(--accent); background: var(--accent-soft); } .tabbar a:hover { text-decoration: none; }
  h1 { font-size: 21px; }
}

/* карточки, сетки */
.card { background: var(--surface); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 16px; }
.card h2 { margin-bottom: 12px; } .card .cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; } .card .cap h2 { margin: 0; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .g21 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .g4 { gap: 10px; } .card { padding: 16px; } }
/* плитка-показатель (KPI): подпись, крупная цифра, метка роста */
.tile { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.tile small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.tile b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; line-height: 1.15; }
.tile em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
a.tile { color: inherit; display: block; transition: transform .15s, box-shadow .15s; } a.tile:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; line-height: 1.6; }
.chip svg { width: 12px; height: 12px; } .chip.up { background: var(--ok-soft); color: var(--ok); } .chip.down { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 640px) { .tile { padding: 14px; } .tile b { font-size: 21px; } }

/* главная карточка баланса (кабинет партнёра) */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--hero-c) 0%, var(--hero-b) 45%, var(--hero-a) 100%); box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; inset: auto -80px -140px auto; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.2), transparent); pointer-events: none; }
.hero .lbl { font-size: 13px; opacity: .85; } .hero .big { font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 18px; }
.hero .row { display: flex; gap: 28px; flex-wrap: wrap; } .hero .row div small { display: block; color: rgba(255,255,255,.75); font-size: 12.5px; } .hero .row div b { font-size: 18px; }
.hero .hint { margin-top: 14px; font-size: 13px; opacity: .85; }
@media (max-width: 640px) { .hero { padding: 20px; } .hero .big { font-size: 32px; } .hero .row { gap: 18px; } }

/* ссылка: адрес и кнопки «Открыть» / «Скопировать» */
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 6px 6px 6px 14px; flex-wrap: wrap; }
.linkbox code { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.linkbox .btns { flex-wrap: nowrap; }

/* кнопки, поля (как в HeroUI: «плоские» серые и синяя главная) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 16px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink); font: 500 14px/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, transform .08s, opacity .15s; }
.btn:hover { background: var(--surface-3); text-decoration: none; } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent); } .btn.primary:hover { opacity: .9; }
.btn.ok { background: var(--ok-soft); color: var(--ok); } .btn.ok:hover { background: color-mix(in srgb, var(--ok) 20%, var(--surface)); }
.btn.danger { background: var(--bad-soft); color: var(--bad); } .btn.danger:hover { background: color-mix(in srgb, var(--bad) 18%, var(--surface)); }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 10px; } .btn.wide { width: 100%; }
.btn.icon { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label.f { display: block; margin-bottom: 14px; } label.f > span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; } label.f > small { display: block; margin-top: 5px; font-size: 12.5px; }
input, select, textarea { width: 100%; font: 14px/1.4 var(--font); color: var(--ink); background: var(--surface-2); border: 2px solid transparent; border-radius: 12px; padding: 9px 12px; min-height: 40px; transition: background .15s, border-color .15s; }
input:hover, select:hover, textarea:hover { background: var(--surface-3); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--accent); }
input[disabled], select[disabled], textarea[disabled] { opacity: .65; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } @media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
:root[data-theme="dark"] .seg { background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: 500 13.5px var(--font); padding: 6px 13px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
:root[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.search { max-width: 280px; background: var(--surface); box-shadow: var(--shadow); }
/* переключатель */
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* вкладки сверху раздела */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs a:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs svg { width: 16px; height: 16px; }

/* таблицы (как в HeroUI): шапка на сером, строки на белом, плотные; на телефоне — карточки */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.card > .tbl, .card > .tblwrap { width: calc(100% + 40px); margin: 0 -20px -18px; }
.card > .cap + .tbl, .card > h2 + .tbl { margin-top: 2px; }
.tbl th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); padding: 9px 10px; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.35; }
.card > .tbl th:first-child, .card > .tbl td:first-child { padding-left: 20px; } .card > .tbl th:last-child, .card > .tbl td:last-child { padding-right: 20px; }
.card > .tbl tr:last-child td:first-child { border-bottom-left-radius: var(--r); } .card > .tbl tr:last-child td:last-child { border-bottom-right-radius: var(--r); }
.tbl tr:last-child td { border-bottom: 0; } .tbl td.r, .tbl th.r { text-align: right; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
.tbl tr.test td { opacity: .62; }
.tbl td b { font-weight: 600; } .tbl td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.tbl .who { display: flex; align-items: center; gap: 10px; min-width: 0; } .tbl .who > span:last-child { min-width: 0; }
.tbl .btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
@media (max-width: 720px) {
  .card > .tbl { width: 100%; margin: 0; } .card > .tbl td:first-child, .card > .tbl td:last-child { padding-left: 0; padding-right: 0; }
  .tbl thead { display: none; } .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); } .tbl tr:last-child { border-bottom: 0; }
  .tbl td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-l); color: var(--ink-3); font-size: 12.5px; text-align: left; flex: none; }
  .tbl td:first-child { text-align: left; display: block; } .tbl td:first-child::before { display: none; } .tbl td.r { text-align: right; } .tbl td:last-child:empty { display: none; }
}
/* значки внутри текста — размером с текст */
svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* аватары: мягкий градиентный круг, цвет постоянный для человека */
.ava { width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 12px; font-weight: 650; letter-spacing: .02em;
  color: #fff; background: radial-gradient(circle at 30% 25%, hsl(calc(var(--h) + 40) 90% 80%), hsl(var(--h) 70% 55%) 70%); text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.ava.lg { width: 44px; height: 44px; font-size: 15px; }

/* список / плитки */
.viewsw { display: inline-flex; } .viewsw button { display: inline-flex; align-items: center; gap: 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.tl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: box-shadow .15s, transform .15s; }
.tl.click { cursor: pointer; } .tl.click:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.tl .top { display: flex; align-items: center; gap: 10px; min-width: 0; } .tl .top > div { min-width: 0; flex: 1; } .tl .top b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tl .top small { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tl .nums div { background: var(--surface-2); border-radius: 10px; padding: 6px 8px; min-width: 0; } .tl .nums small { display: block; font-size: 11px; color: var(--ink-3); } .tl .nums b { font-size: 14px; white-space: nowrap; }
.tl .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.tl .cover { margin: -14px -16px 0; height: 78px; border-radius: var(--r) var(--r) 0 0; background: radial-gradient(120% 160% at 0% 0%, var(--hero-c), var(--hero-b) 50%, var(--hero-a)); position: relative; color: #fff; padding: 12px 16px; display: flex; align-items: flex-end; justify-content: space-between; }
.tl .cover b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; } .tl .cover span { font-size: 12.5px; opacity: .85; }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; gap: 10px; } }

/* графики */
.area { position: relative; } .area svg { display: block; width: 100%; height: auto; overflow: visible; }
.area .grid line { stroke: var(--line); stroke-dasharray: 3 4; } .area text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.area .cur { stroke: var(--line-2); stroke-width: 1; } .area .dot { stroke: var(--surface); stroke-width: 2.5; }
.area .tip { position: absolute; top: 4px; pointer-events: none; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px 11px; font-size: 12.5px; min-width: 150px; z-index: 3; }
.area .tip b { display: block; margin-bottom: 4px; font-weight: 600; } .area .tip span { display: flex; align-items: center; gap: 6px; color: var(--ink-2); } .area .tip i { width: 8px; height: 8px; border-radius: 50%; } .area .tip em { font-style: normal; margin-left: auto; padding-left: 12px; font-weight: 600; color: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); } .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.bigline { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; } .bigline div b { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; } .bigline div small { font-size: 12.5px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; } .meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; } .bars i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--accent-soft); } .bars i.has { background: var(--accent); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 96px; padding-top: 6px; }
.chart i { flex: 1; background: var(--surface-2); border-radius: 5px 5px 2px 2px; min-height: 3px; position: relative; }
.chart i.has { background: var(--accent); } .chart i:hover { opacity: .8; }
.chart-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

/* метки статусов */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); line-height: 1.6; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.acc { background: var(--accent-soft); color: var(--accent); }
.pill .dotc { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }
.plus { color: var(--ok); } .minus { color: var(--bad); }
.bots { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* пустые места, события */
.empty { text-align: center; padding: 34px 16px; color: var(--ink-3); } .empty b { display: block; color: var(--ink-2); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .feed li:last-child { border-bottom: 0; }
.feed .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; } .feed .ic.ok { background: var(--ok-soft); color: var(--ok); } .feed .ic.bad { background: var(--bad-soft); color: var(--bad); } .feed .ic.warn { background: var(--warn-soft); color: var(--warn); }
.feed .ic svg { width: 17px; height: 17px; } .feed .tx { flex: 1; min-width: 0; } .feed .tx b { display: block; font-weight: 600; font-size: 14px; } .feed .tx small { font-size: 12.5px; } .feed .am { font-weight: 600; white-space: nowrap; }

/* окно и всплывающие сообщения */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(4px); animation: fade .15s; }
.modal .box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal .box h2 { margin-bottom: 14px; font-size: 18px; } .modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 640px) { .modal { place-items: end center; padding: 0; } .modal .box { border-radius: 22px 22px 0 0; max-height: 92vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 500; font-size: 14px; box-shadow: var(--shadow-lg); animation: fade .2s; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 860px) { .toast { bottom: 96px; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* вход и открытые страницы */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--hero-c) 25%, transparent), transparent), radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, #A78BFA 18%, transparent), transparent), var(--bg); }
.auth .box { width: 100%; max-width: 420px; } .auth .brand { justify-content: center; padding-bottom: 22px; } .auth .card { padding: 26px; box-shadow: var(--shadow-lg); }
.auth h1 { font-size: 22px; text-align: center; margin-bottom: 6px; } .auth .sub { text-align: center; color: var(--ink-2); margin: 0 0 20px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; margin: 16px 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tgbtn { background: #2AABEE; color: #fff; } .tgbtn:hover { background: #229ED9; }
.bignum { font-size: 46px; font-weight: 700; letter-spacing: .04em; text-align: center; color: var(--accent); margin: 8px 0; }
.err { color: var(--bad); font-size: 14px; margin: 0 0 12px; } .note { background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; } .note.warn { background: var(--warn-soft); } .note.ok { background: var(--ok-soft); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 9px 14px; font-size: 14px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
pre.code { background: var(--surface-2); border-radius: 12px; padding: 12px; font: 13px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; } .steps li { counter-increment: s; position: relative; padding: 0 0 12px 36px; } .steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.btn svg { width: 16px; height: 16px; flex: none; } .btn.sm svg { width: 15px; height: 15px; }
.pill svg { width: 13px; height: 13px; } .muted svg, a svg { width: 14px; height: 14px; vertical-align: -2px; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.linkbox code { background: none; padding: 0; }
/* блок «бот» в карточке человека */
.botrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .botrow:last-child { border-bottom: 0; padding-bottom: 0; } .botrow:first-of-type { padding-top: 0; }
.botrow .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; } .botrow .ic svg { width: 19px; height: 19px; }
.botrow .tx { flex: 1; min-width: 0; } .botrow .tx b { display: block; font-weight: 600; } .botrow .tx small { font-size: 12.5px; }
.ic.tgc { background: #2AABEE; } .ic.mxc { background: linear-gradient(135deg, #3D7BFF, #8B3DFF); }

/* ---- цветовые схемы (как в Парадханте): html[data-palette], выбор хранится в браузере; работают и в светлой, и в тёмной теме ---- */
:root[data-palette="mist"]  { --bg: #EAF1F8; --surface: #FBFDFF; --surface-2: #EEF4FA; --line: #DDE7F1; --line-2: #C4D3E3; --accent: #2F6FA8; --accent-ink: #FBFDFF; --accent-soft: #DDEBF8; --accent-line: #9DC0E2; --hero-a: #1F4E7A; --hero-b: #2F6FA8; --hero-c: #8DB8E0; }
:root[data-palette="blush"] { --bg: #F6ECEC; --surface: #FFFAF9; --surface-2: #F8EEEE; --line: #EDDCDC; --line-2: #DDC3C4; --accent: #A3476A; --accent-ink: #FFFAF9; --accent-soft: #F7E1E8; --accent-line: #E3A9BE; --hero-a: #6E2846; --hero-b: #A3476A; --hero-c: #E3A9BE; }
:root[data-palette="sapph"] { --bg: #DCE6F5; --surface: #F7FAFF; --surface-2: #E7EEF9; --line: #CFDBEE; --line-2: #AFC1DE; --accent: #1A4FD6; --accent-ink: #F7FAFF; --accent-soft: #DCE6FF; --accent-line: #8EAAF0; --hero-a: #10308A; --hero-b: #1A4FD6; --hero-c: #7FA0F2; }
:root[data-palette="night"] { --bg: #E9EBF0; --surface: #F9FAFC; --surface-2: #EEF0F5; --line: #DFE2EA; --line-2: #C8CCD8; --accent: #2F3B5C; --accent-ink: #F9FAFC; --accent-soft: #E2E6F1; --accent-line: #A9B2CB; --hero-a: #1A2238; --hero-b: #2F3B5C; --hero-c: #7C88A8; }
:root[data-palette="snow"]  { --bg: #F4F8FC; --surface: #FFFFFF; --surface-2: #F2F7FB; --line: #E4EDF5; --line-2: #CCDCEA; --accent: #3F86B3; --accent-ink: #FFFFFF; --accent-soft: #E6F2FA; --accent-line: #AFD3EA; --hero-a: #2A6A93; --hero-b: #3F86B3; --hero-c: #9ACBE6; }
:root[data-theme="dark"][data-palette="mist"]  { --bg: #1C222B; --surface: #242B36; --surface-2: #2C3441; --line: #363F4D; --line-2: #47515F; --accent: #9CC8F0; --accent-ink: #132233; --accent-soft: #2B3B4E; --accent-line: #4D6A88; }
:root[data-theme="dark"][data-palette="blush"] { --bg: #261F22; --surface: #30272B; --surface-2: #3A2F34; --line: #45383E; --line-2: #57474E; --accent: #E7A3BB; --accent-ink: #33151F; --accent-soft: #4A2D38; --accent-line: #7C4C5E; }
:root[data-theme="dark"][data-palette="sapph"] { --bg: #0B1430; --surface: #111D40; --surface-2: #18264F; --line: #22315E; --line-2: #304275; --accent: #5B9BFF; --accent-ink: #08112A; --accent-soft: #16306A; --accent-line: #2F5BB8; }
:root[data-theme="dark"][data-palette="night"] { --bg: #1B2030; --surface: #232A3C; --surface-2: #2B3347; --line: #343D53; --line-2: #454F68; --accent: #F3D27A; --accent-ink: #2A2410; --accent-soft: #3A3622; --accent-line: #7D6E3A; }
:root[data-theme="dark"][data-palette="snow"]  { --bg: #131A22; --surface: #1A232D; --surface-2: #212C38; --line: #2C3947; --line-2: #3C4B5B; --accent: #C6E6F7; --accent-ink: #0F1F2A; --accent-soft: #233A4D; --accent-line: #4D7894; }
:root[data-palette="snow"] body { background-image: linear-gradient(180deg, var(--surface), var(--bg) 60%); background-attachment: fixed; }

/* переключатель темы и схем */
.themebox { display: flex; flex-direction: column; gap: 8px; }
.themebox .seg { width: 100%; } .themebox .seg button { flex: 1; padding: 6px 4px; font-size: 12.5px; }
.palrow { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pald { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); cursor: pointer; position: relative; overflow: hidden; background: none; }
.pald::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); }
.pald.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.pald[data-pal=""] { --c1: #F4F4F5; --c2: #006FEE; } .pald[data-pal="mist"] { --c1: #DDEBF8; --c2: #2F6FA8; } .pald[data-pal="blush"] { --c1: #F7E1E8; --c2: #A3476A; }
.pald[data-pal="sapph"] { --c1: #DCE6FF; --c2: #1A4FD6; } .pald[data-pal="night"] { --c1: #E9EBF0; --c2: #2F3B5C; } .pald[data-pal="snow"] { --c1: #FFFFFF; --c2: #AFD3EA; }
.side .themebox { padding: 10px 8px 4px; margin-top: auto; } .side .themebox + .me { margin-top: 0; }
.auth-theme { display: flex; justify-content: center; margin-top: 20px; } .auth-theme .themebox { width: 260px; align-items: center; }

/* ---- согласование тем: в любой схеме и теме — свой «третий» серый, видимые границы блоков и боковой панели ---- */
:root[data-palette] { --surface-3: color-mix(in srgb, var(--surface-2), var(--ink) 8%); }
:root[data-theme="dark"][data-palette] { --surface-3: color-mix(in srgb, var(--surface-2), var(--ink) 12%); }
.card, .tile, .tl, .tabs a.on, .search { border: 1px solid var(--line); }
.tl { border-color: var(--line); }
.side { border-right: 1px solid var(--line); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .tl { border-color: var(--surface-2); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--surface-2); }
:root[data-theme="dark"] .nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
:root[data-theme="dark"] .tabs a.on { background: var(--surface); }
:root[data-theme="dark"] .modal { background: rgba(0,0,0,.6); }
/* текст: чуть плотнее и контрастнее для кириллицы */
body { letter-spacing: 0; }
small, .muted { color: color-mix(in srgb, var(--ink-3), var(--ink) 18%); }
.head p, .tile em { color: color-mix(in srgb, var(--ink-3), var(--ink) 22%); }
/* выбор цвета */
.swatch { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 5px 12px 5px 5px; min-height: 40px; }
.swatch input[type=color] { width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; flex: none; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.swatch em { font-style: normal; font: 13px ui-monospace, Menlo, monospace; color: var(--ink-2); }
/* переключатель темы в карточке профиля и в меню */
.themebox .seg { display: flex; } .themebox .seg button { justify-content: center; }
.palrow { justify-content: flex-start; } .auth-theme .palrow { justify-content: center; }

/* ---- таблицы-листы (как в Парадханте): плотные строки, полосы через строку, тонкие границы столбцов; меню ⋮, перенос, ширина ---- */
.tbl.sheet { font-size: 13px; table-layout: auto; }
.tbl.sheet th, .tbl.sheet td { border-right: 1px solid var(--line); padding-top: 6px; padding-bottom: 6px; }
.tbl.sheet tr > :last-child { border-right: 0; }
.tbl.sheet th { height: 34px; white-space: nowrap; position: sticky; user-select: none; }
.tbl.sheet tbody tr:nth-child(2n) td { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.tbl.sheet tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.tbl.sheet td .who { gap: 8px; } .tbl.sheet .ava { width: 26px; height: 26px; font-size: 10.5px; }
.sh-h { cursor: grab; padding-right: 26px !important; }
.sh-m { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s; }
.sh-h:hover .sh-m, .sh-m:focus-visible { opacity: 1; } .sh-m:hover { background: var(--surface-3); color: var(--ink); }
.sh-r { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.sh-r:hover { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.sh-asc::after, .sh-desc::after { content: "↑"; margin-left: 4px; color: var(--accent); font-size: 11px; } .sh-desc::after { content: "↓"; }
.sh-moving { opacity: .55; } .sh-dl { box-shadow: inset 3px 0 0 var(--accent); } .sh-dr { box-shadow: inset -3px 0 0 var(--accent); }
html.sh-dragging, html.sh-dragging * { cursor: grabbing !important; }
.sh-menu { position: fixed; z-index: 70; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 5px; animation: pop .12s ease-out; }
.sh-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: 13.5px var(--font); padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.sh-menu button:hover { background: var(--surface-2); } .sh-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
@media (max-width: 720px) { .sh-m, .sh-r { display: none; } .tbl.sheet td { border-right: 0; } .tbl.sheet tbody tr:nth-child(2n) td { background: none; } }

/* период сводки */
.period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 16px; }
.period .seg button { padding: 6px 12px; }
.period .dates { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px 6px 3px 10px; color: var(--ink-3); }
.period .dates.on { border-color: var(--accent); color: var(--accent); }
.period .dates input { width: 132px; min-height: 30px; padding: 3px 6px; border-radius: 8px; background: transparent; font-size: 13px; }
.period .dates input:hover { background: var(--surface-2); }
@media (max-width: 640px) { .period .seg { width: 100%; overflow-x: auto; flex-wrap: nowrap; } .period .seg button { white-space: nowrap; } }
.tile b { min-height: 30px; } .tile em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bigline { flex-wrap: nowrap; overflow: hidden; } .bigline > div { min-width: 0; } .bigline small { white-space: nowrap; }
/* широкая таблица прокручивается внутри своей карточки, а не растягивает страницу */
.card:has(> .tbl) { overflow-x: auto; }
.shell > div { min-width: 0; }   /* колонка с содержимым не шире окна */

/* QR-код ссылки-метки */
.qrbox { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px; background: var(--surface-2); border-radius: 14px; }
.qrbox .qr { width: 132px; height: 132px; flex: none; background: #fff; border-radius: 10px; padding: 4px; } .qrbox .qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 520px) { .qrbox { flex-direction: column; align-items: flex-start; } }

/* редактор формы — компактный */
.fe label.f { margin-bottom: 10px; } .fe input:not([type=checkbox]), .fe select { min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
.fe .g3x { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 0 12px; } @media (max-width: 640px) { .fe .g3x { grid-template-columns: 1fr; } }
.fe-fields { background: var(--surface-2); border-radius: 12px; padding: 6px 10px 8px; margin: 2px 0 12px; }
.fe-h, .fe-r { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: center; }
.fe-h { font-size: 12px; color: var(--ink-3); padding: 2px 2px 4px; } .fe-h span:not(:first-child) { text-align: center; }
.fe-r { padding: 3px 0; } .fe-r input[type=checkbox] { justify-self: center; margin: 0; }
.fe-r input:not([type=checkbox]) { background: var(--surface); min-height: 32px !important; padding: 4px 10px !important; }
.chips-ch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chip-ch { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; background: var(--surface-2); font-size: 13px; cursor: pointer; user-select: none; }
.chip-ch input { margin: 0; width: 15px; height: 15px; } .chip-ch:has(input:checked) { background: var(--accent-soft); color: var(--accent); }
/* ссылки-метки */
a.ltitle { font-weight: 600; color: var(--ink); } a.ltitle:hover { color: var(--accent); }
.lshort { display: flex !important; align-items: center; gap: 2px; } .lshort span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lshort .btn.icon { width: 26px; min-height: 26px; flex: none; }
.utmk { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; font-size: 12px; }
.utmkv { margin-bottom: 14px; } .utmkv dt small { color: var(--ink-3); font-size: 11.5px; } .utmkv code { font-size: 12px; }
label.f > span.switch { display: inline-flex; margin: 0; font-size: 13.5px; font-weight: 400; color: var(--ink); }

/* формы для сайта — плитки */
.ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ftile { background: var(--surface); box-shadow: var(--shadow); gap: 12px; } .ftile.off { opacity: .7; }
.ftile .fic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; } .ftile .fic svg { width: 19px; height: 19px; }
.fmeta { display: flex; gap: 5px; flex-wrap: wrap; } .fbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
@media (max-width: 640px) { .ftiles { grid-template-columns: 1fr; } }

/* ---- движение: подсветка переезжает, экраны и карточки мягко появляются, графики прорисовываются ---- */
:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.3, .64, 1); }
.glide { position: relative; isolation: isolate; }
.glide > .glider { position: absolute; left: 0; top: 0; z-index: -1; border-radius: inherit; pointer-events: none; transition: transform .38s var(--spring), width .38s var(--spring), height .3s var(--ease), opacity .2s; will-change: transform, width; }
.seg.glide > .glider { border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
:root[data-theme="dark"] .seg.glide > .glider { background: var(--surface-3); }
.seg.glide > button.on { background: transparent; box-shadow: none; }
.tabs.glide > .glider { border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); box-sizing: border-box; }
.tabs.glide > a.on { background: transparent; box-shadow: none; border-color: transparent; }
#nav.glide > .glider { border-radius: 12px; background: var(--surface-3); }
:root[data-theme="dark"] #nav.glide > .glider { background: var(--surface); box-shadow: var(--shadow); }
#nav.glide > a.on { background: transparent; box-shadow: none; }
#tabbar.glide > .glider { border-radius: 14px; background: var(--accent-soft); }
#tabbar.glide > a.on { background: transparent; }
.nav a, .tabs a, .seg button { transition: color .2s var(--ease), background .2s var(--ease); }
/* экран: старый слегка гаснет, новый поднимается; карточки — по очереди */
#main { transition: opacity .18s var(--ease); }
#main.leaving { opacity: .55; }
#main.enter > * { animation: rise .42s var(--ease) both; }
#main.enter > *:nth-child(2) { animation-delay: .04s; } #main.enter > *:nth-child(3) { animation-delay: .08s; } #main.enter > *:nth-child(4) { animation-delay: .12s; } #main.enter > *:nth-child(5) { animation-delay: .16s; } #main.enter > *:nth-child(n+6) { animation-delay: .2s; }
#main.enter .grid > * { animation: rise .45s var(--ease) both; } #main.enter .grid > *:nth-child(2) { animation-delay: .05s; } #main.enter .grid > *:nth-child(3) { animation-delay: .1s; } #main.enter .grid > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* полоска загрузки сверху (появляется, только если ждать дольше 0,12 с) */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 80; pointer-events: none; transform: scaleX(0); transform-origin: left; opacity: 0; background: linear-gradient(90deg, var(--accent), #A78BFA); }
body.loading .progress { opacity: 1; animation: load 1.4s var(--ease) forwards; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(.85); } }
/* первый вход: заглушка вместо «Загружаем…» */
.skel { display: grid; gap: 14px; } .skel i { display: block; height: 92px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; } .skel i:first-child { height: 40px; width: 40%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* графики */
.area .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s var(--ease) .05s forwards; }
.area .fl { opacity: 0; animation: fadein .7s var(--ease) .25s forwards; }
.area .br { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .55s var(--spring) both; }
.area .dot, .area .cur { transition: cx .12s var(--ease), cy .12s var(--ease), x1 .12s, x2 .12s; }
.area .tip { transition: left .12s var(--ease), opacity .15s; }
@keyframes draw { to { stroke-dashoffset: 0; } } @keyframes fadein { to { opacity: 1; } } @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* окна и сообщения */
.modal.out { animation: fadeout .16s var(--ease) forwards; } .modal.out .box { animation: popout .16s var(--ease) forwards; }
@keyframes fadeout { to { opacity: 0; } } @keyframes popout { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.modal .box { animation: pop .26s var(--spring); }
.toast { animation: toastin .32s var(--spring); } @keyframes toastin { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
/* отклик карточек и строк */
.card, .tile, .tl, .ftile { transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .2s; }
.tbl tbody tr td { transition: background .15s; }
.btn { transition: background .18s var(--ease), transform .12s var(--ease), box-shadow .2s, opacity .15s; }
.btn:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .glide > .glider { transition: none; } }

.seg .cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: 11px; font-weight: 600; margin-left: 2px; }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } @media (max-width: 1250px) { .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 640px) { .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* группы полей в окнах */
.fs { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 4px; margin: 0 0 12px; min-width: 0; }
.fs legend { padding: 0 6px; margin-left: -6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rate { display: grid; grid-template-columns: 1fr 120px 150px; gap: 8px; align-items: center; margin-bottom: 8px; } .rate > span { font-size: 13.5px; font-weight: 500; } .rate small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
@media (max-width: 520px) { .rate { grid-template-columns: 1fr 1fr; } .rate > span { grid-column: span 2; } }
@media (max-width: 720px) { .tbl tr > td.num:first-child { font-size: 12px; color: var(--ink-3); padding-bottom: 0; } }

/* действия в строке таблицы — как ссылки: тихие, при наведении подсвечиваются */
.acts { display: flex; gap: 2px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.lk { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2, var(--ink)); font: 500 12.5px/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: color .15s, background .15s; }
.lk svg { width: 14px; height: 14px; flex: none; opacity: .75; }
.lk:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lk:hover svg { opacity: 1; }
.lk.ok { color: var(--ok); } .lk.ok:hover { background: var(--ok-soft); }
.lk:active { transform: scale(.96); }
.lk:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tl .acts { justify-content: flex-start; flex-wrap: wrap; }
