/* AI1 — «Система»: тёмный фиолетовый интерфейс в духе игрового HUD.
   Шрифты: Tektur (заголовки, крупные числа), Golos Text (текст). SIL OFL, лежат в fonts/.
   Производительность: без размытия фона и бесконечных анимаций — свечение нарисовано градиентами один раз. */

@font-face { font-family: "Golos"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Golos"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/golos-text-cyrillic-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Golos"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/golos-text-latin-wght-normal.woff2) format("woff2-variations"); 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; }
@font-face { font-family: "Golos"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/golos-text-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Tektur"; font-style: normal; font-display: swap; font-weight: 400 900; font-stretch: 75% 100%;
  src: url(fonts/tektur-cyrillic-standard-normal.woff2) format("woff2-variations"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Tektur"; font-style: normal; font-display: swap; font-weight: 400 900; font-stretch: 75% 100%;
  src: url(fonts/tektur-latin-standard-normal.woff2) format("woff2-variations"); 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; }

:root {
  color-scheme: dark;
  --bg: #0b0a14;
  --panel: #161226;
  --panel-hi: #1c1731;
  --panel-2: #221c3c;
  --hover: #2a2349;
  --line: rgba(167, 139, 250, 0.13);
  --line-2: rgba(167, 139, 250, 0.28);
  --text: #eeebfa;
  --muted: #a39dc4;
  --faint: #6f6994;
  --a1: #c4b5fd;
  --a2: #8b5cf6;
  --a3: #d946ef;
  --a-ink: #0f0820;
  --gain: #34d399;
  --loss: #fb7185;
  --warn: #fbbf24;
  --grad: linear-gradient(135deg, var(--a1) 0%, var(--a2) 42%, var(--a3) 100%);
  --soft: color-mix(in srgb, var(--a2) 16%, transparent);
  --soft-2: color-mix(in srgb, var(--a2) 26%, transparent);
  --glow: 0 10px 30px -12px color-mix(in srgb, var(--a2) 85%, transparent);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: "Golos", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Tektur", "Golos", system-ui, sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --rail: 248px;
  --pad: 16px;
  --nav: 70px;
  --safe-top: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-skin="cyan"] { --a1: #a5f3fc; --a2: #06b6d4; --a3: #6366f1; }
:root[data-skin="crimson"] { --a1: #fecdd3; --a2: #f43f5e; --a3: #f59e0b; }
:root[data-skin="emerald"] { --a1: #a7f3d0; --a2: #10b981; --a3: #06b6d4; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* страница никогда не шире экрана: иначе Android растягивает окно и нижнее меню уезжает вбок */
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  overflow-wrap: break-word;
}
/* свечение фона — один неподвижный слой, рисуется один раз */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 8% -8%, color-mix(in srgb, var(--a2) 22%, transparent), transparent 70%),
    radial-gradient(50vmax 40vmax at 105% 105%, color-mix(in srgb, var(--a3) 14%, transparent), transparent 70%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: none; width: 20px; height: 20px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; border-radius: 8px; }

/* ---------- каркас ---------- */

.rail { display: none; }
.main { min-width: 0; padding: calc(var(--safe-top) + 14px) var(--pad) calc(var(--nav) + var(--safe-bottom) + 30px); max-width: 1500px; }

.nav {
  position: fixed; left: 10px; right: 10px; bottom: calc(8px + var(--safe-bottom)); z-index: 30;
  height: var(--nav); border-radius: 22px; padding: 0 6px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  background: linear-gradient(180deg, #1d1736, #130f22);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--faint); padding: 6px 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a svg { width: 22px; height: 22px; }
.nav a.on { color: var(--text); }
.nav a.on svg { color: var(--a1); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a2) 70%, transparent)); }
.nav .fab {
  justify-self: center; width: 58px; height: 58px; margin-top: -26px;
  display: grid; place-items: center; color: var(--a-ink);
  background: var(--grad); box-shadow: var(--glow), 0 0 0 5px var(--bg);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}
.nav .fab svg { width: 26px; height: 26px; stroke-width: 2.2; }

@media (min-width: 1000px) {
  :root { --pad: 32px; }
  .app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .nav { display: none; }
  .main { padding: 26px var(--pad) 48px; }
  .rail {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 22px 14px 16px;
    background: linear-gradient(180deg, rgba(28, 23, 49, 0.92), rgba(16, 13, 30, 0.92));
    border-right: 1px solid var(--line);
  }
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.brand .logo {
  width: 40px; height: 44px; display: grid; place-items: center; background: var(--grad); color: var(--a-ink);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 800 13px var(--display); letter-spacing: 0.02em;
}
.brand b { display: block; font: 700 20px/1 var(--display); font-stretch: 90%; letter-spacing: 0.04em; }
.brand small { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
.rail .record { margin: 0 0 16px; }
.rail nav { display: flex; flex-direction: column; gap: 3px; }
.rail nav a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 7px; border-radius: 14px;
  color: var(--muted); font-weight: 500; position: relative;
}
.rail nav a .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); }
.rail nav a .tile svg { width: 18px; height: 18px; }
.rail nav a:hover { background: var(--hover); color: var(--text); }
.rail nav a.on { color: var(--text); background: linear-gradient(90deg, var(--soft-2), transparent); }
.rail nav a.on .tile { background: var(--grad); color: var(--a-ink); box-shadow: var(--glow); }
.rail nav a .badge { margin-left: auto; }
.rail .grow { flex: 1; }
.rail .status { font-size: 12px; color: var(--faint); padding: 12px 10px 0; border-top: 1px solid var(--line); line-height: 1.55; }
.rail .status b { color: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gain); margin-right: 6px; box-shadow: 0 0 8px var(--gain); vertical-align: 1px; }
.dot.bad { background: var(--loss); box-shadow: 0 0 8px var(--loss); }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--soft-2); color: var(--a1); font-size: 11px; font-weight: 700;
}
.badge.hot { background: var(--loss); color: #fff; }

/* ---------- шапка страницы ---------- */

.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 18px; }
.head .title { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.head h1 { margin: 0; font: 650 26px/1.1 var(--display); font-stretch: 88%; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.head .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--muted); flex: none; }
.back:hover { color: var(--text); }
@media (min-width: 1000px) { .head h1 { font-size: 32px; } }
@media (max-width: 599px) { .head .tools.month-row { width: 100%; } .head .tools.month-row .month { flex: 1; justify-content: space-between; } }

.month { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.month button { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); }
.month button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.month button:disabled { opacity: 0.3; cursor: default; }
.month span { font-weight: 600; font-size: 14px; padding: 0 8px; min-width: 112px; text-align: center; white-space: nowrap; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 13px; font-weight: 600; font-size: 14.5px; white-space: nowrap;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  transition: background 0.15s, transform 0.08s, border-color 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--hover); border-color: var(--line-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--grad); color: var(--a-ink); border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--loss); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 36px; }
.btn.block { width: 100%; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.wrap .chip { max-width: 100%; height: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; flex: none;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { background: var(--soft-2); border-color: color-mix(in srgb, var(--a2) 60%, transparent); color: var(--text); }
.chip .n { color: var(--faint); font-size: 12px; }
.chip.on .n { color: var(--a1); }
.chip svg { width: 16px; height: 16px; }
.chip .hexm { width: 18px; height: 20px; font-size: 8px; }

.seg { display: flex; gap: 3px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; height: 34px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--soft-2); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 45%, transparent); }

.bar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.bar-row > .grow { flex: 1 1 220px; min-width: 0; }

/* ---------- панели ---------- */

.card {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card.pad { padding: 18px; }
/* уголки «окна системы» — четыре градиента, без лишних элементов */
.hud {
  --c: color-mix(in srgb, var(--a1) 80%, transparent);
  background:
    linear-gradient(var(--c), var(--c)) left 10px top 10px / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) left 10px top 10px / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right 10px top 10px / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) right 10px top 10px / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) left 10px bottom 10px / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) left 10px bottom 10px / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right 10px bottom 10px / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) right 10px bottom 10px / 2px 14px no-repeat,
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--a2) 20%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
  border-color: var(--line-2);
}
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 4px 10px; }
.sec:first-child { margin-top: 0; }
.sec h2 { margin: 0; font: 600 17px/1.2 var(--display); font-stretch: 92%; letter-spacing: 0.01em; }
.sec small { color: var(--faint); font-size: 12.5px; }
.sec a, .sec button.link { color: var(--a1); font-size: 13.5px; font-weight: 500; }

.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .dash > *, .phead > *, .kvs > *, .two > * { min-width: 0; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.dash { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1180px) { .dash { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .dash .side { position: sticky; top: 26px; } }

/* ---------- главная: прибыль и цель ---------- */

.hero { padding: 22px 22px 18px; position: relative; }
.hero .lbl { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero .big { font: 650 46px/1.05 var(--display); font-stretch: 90%; margin: 8px 0 4px; letter-spacing: -0.005em; }
.hero .big .u { font: 500 16px var(--font); color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.hero .note { color: var(--muted); font-size: 13.5px; }
.hero-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .hero-row { grid-template-columns: minmax(0, 1fr) 168px; align-items: center; } }
@media (min-width: 1000px) { .hero { padding: 28px 30px 24px; } .hero .big { font-size: 60px; } }

.ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--panel-2); }
.ring .val { transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a2) 60%, transparent)); }
.ring .in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .in b { font: 650 30px/1 var(--display); }
.ring .in span { color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 120px; }
.ring.sm { width: 64px; height: 64px; }
.ring.sm .in b { font-size: 15px; }

.flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border-radius: 14px; overflow: hidden; background: var(--line); }
@media (min-width: 720px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.flow > div { background: color-mix(in srgb, var(--panel) 88%, #000); padding: 12px 14px; min-width: 0; }
.flow .k { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.flow .k svg { width: 15px; height: 15px; color: var(--a1); }
.flow .v { font: 600 19px/1.3 var(--display); font-stretch: 92%; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.layers { display: flex; gap: 2px; height: 10px; margin-top: 16px; }
.layers span { border-radius: 4px; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

/* каналы */
.chan { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
a.chan:hover { border-color: var(--line-2); }
.chan .top { display: flex; align-items: center; gap: 12px; }
.chan .top .t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan .v { font: 650 26px/1 var(--display); font-stretch: 90%; }
.chan .row2 { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.share { height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.share i { display: block; height: 100%; border-radius: 3px; }
.hexm {
  width: 38px; height: 42px; flex: none; display: grid; place-items: center; color: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 800 13px var(--display); letter-spacing: 0.02em;
}
.hexm.sm { width: 26px; height: 29px; font-size: 10px; }

/* график по дням */
.chart { padding: 16px 14px 10px; }
.chart svg { width: 100%; height: 170px; display: block; }
.chart text { fill: var(--faint); font: 10px var(--font); }
.chart .legend { margin: 6px 4px 0; }

/* ---------- списки ---------- */

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 16px; width: 100%; text-align: left; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
a.row:hover, button.row:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.row .mc { flex: 1; min-width: 0; }
.row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s.wrap, .row .t.wrap { white-space: normal; overflow-wrap: anywhere; }
.row .t.clamp2 { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .side { text-align: right; flex: none; }
.row .side .s { margin-top: 2px; }
.row.voided .t, .row.voided .side { text-decoration: line-through; color: var(--faint); }
.row.tight { min-height: 48px; padding: 8px 16px; }
.chev { width: 18px; height: 18px; color: var(--faint); }
.ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--panel-2); color: var(--a1); }
.ico svg { width: 19px; height: 19px; }
.ico.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.ico.bad { background: color-mix(in srgb, var(--loss) 14%, transparent); color: var(--loss); }
.ico.ok { background: color-mix(in srgb, var(--gain) 14%, transparent); color: var(--gain); }
.thumb { width: 44px; height: 44px; border-radius: 12px; flex: none; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; color: var(--faint); }
.thumb svg { width: 20px; height: 20px; }
.dayhead { font-size: 12.5px; color: var(--faint); padding: 14px 6px 6px; font-weight: 500; }
.dayhead b { color: var(--muted); font-weight: 600; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-2); color: var(--muted); }
.pill.sold { background: color-mix(in srgb, var(--gain) 15%, transparent); color: var(--gain); }
.pill.cancelled { background: color-mix(in srgb, var(--loss) 15%, transparent); color: var(--loss); }
.pill.pending { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.frozen { background: color-mix(in srgb, #7dd3fc 14%, transparent); color: #7dd3fc; }

.empty { text-align: center; color: var(--muted); padding: 34px 20px; font-size: 14px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.loading { color: var(--faint); padding: 50px 0; text-align: center; }
.error-box { background: color-mix(in srgb, var(--loss) 12%, transparent); color: var(--loss); border-radius: var(--r); padding: 16px; border: 1px solid color-mix(in srgb, var(--loss) 30%, transparent); }
.note { background: var(--soft); border: 1px solid color-mix(in srgb, var(--a2) 30%, transparent); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--a1); }
.note.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.note.bad { background: color-mix(in srgb, var(--loss) 10%, transparent); border-color: color-mix(in srgb, var(--loss) 30%, transparent); color: var(--loss); }

/* ---------- статистика ---------- */

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 12.5px; display: flex; gap: 7px; align-items: center; }
.kpi .k svg { width: 15px; height: 15px; color: var(--a1); }
.kpi .v { font: 650 22px/1.25 var(--display); font-stretch: 92%; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .x { color: var(--faint); font-size: 12px; margin-top: 2px; }

.money { padding: 6px 0; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 18px; align-items: center; }
.mrow .t { font-size: 14px; }
.mrow .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.mrow .bar i { display: block; height: 100%; border-radius: 3px; background: var(--loss); opacity: 0.75; }
.mrow.plus .bar i { background: var(--grad); opacity: 1; }
.mrow.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
.mrow.total .t { font-weight: 600; }
.mrow.sub .t { color: var(--muted); padding-left: 14px; font-size: 13px; }
.mrow.sub .bar { margin-left: 14px; height: 4px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; color: var(--faint); font-weight: 500; font-size: 12px; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; }
.table td { text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table td .pn { display: flex; align-items: center; gap: 10px; white-space: normal; min-width: 160px; }
.table td .pn img, .table td .pn .thumb { width: 34px; height: 34px; border-radius: 9px; }
.scroll { overflow-x: auto; }
@media (max-width: 719px) { .table .opt { display: none; } }

/* ---------- каталог ---------- */

.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pcard { display: flex; flex-direction: column; overflow: hidden; min-width: 0; transition: border-color 0.15s, transform 0.12s; }
.pcard:hover { border-color: var(--line-2); }
.pcard:active { transform: scale(0.99); }
.pcard .pic { aspect-ratio: 1; background: var(--panel-2); position: relative; overflow: hidden; }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  width: 100%; height: 100%; display: grid; place-items: center; color: color-mix(in srgb, var(--a1) 70%, transparent);
  background:
    radial-gradient(70% 60% at 30% 25%, color-mix(in srgb, var(--a2) 30%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 6px), var(--panel-2);
  font: 700 34px var(--display);
}
.pcard .tag { position: absolute; left: 8px; top: 8px; }
.pcard .body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .nm { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .cost { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: auto; }
.pcard .cost b { font: 650 18px var(--display); font-stretch: 92%; }
.pcard .cost span { color: var(--faint); font-size: 12px; }
.pcard .meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.glass-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(11, 10, 20, 0.72); color: var(--text); font-size: 11.5px; font-weight: 600; }
.glass-tag svg { width: 13px; height: 13px; }

/* товар */
.phead { display: grid; gap: 16px; margin-bottom: 6px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .phead { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } }
.gallery { overflow: hidden; }
.gallery .big { aspect-ratio: 1; display: grid; place-items: center; background: var(--panel-2); width: 100%; }
.gallery .big img { width: 100%; height: 100%; object-fit: cover; }
.gallery .strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gallery .strip button { position: relative; flex: none; }
.gallery .strip img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; opacity: 0.65; }
.gallery .strip button.on img { opacity: 1; outline: 2px solid var(--a1); }
.gallery .add { width: 54px; height: 54px; border-radius: 10px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); }
@media (max-width: 819px) { .gallery .big { aspect-ratio: 16 / 10; } }
.costcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.costcard { padding: 14px 16px; }
.costcard .k { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.costcard .v { font: 650 28px/1.15 var(--display); font-stretch: 90%; margin-top: 6px; }
.costcard .x { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.stack { display: flex; height: 8px; gap: 2px; margin-top: 12px; }
.stack span { border-radius: 3px; min-width: 2px; }
.calc .row { min-height: 50px; }
.calc .op { width: 26px; text-align: center; color: var(--faint); font: 600 16px var(--display); flex: none; }
.calc .total .t { font-weight: 600; }

/* площадки */
.lgrid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); overflow: hidden; }
.lcard .pic { background: var(--panel-2); display: grid; place-items: center; color: var(--faint); min-height: 112px; }
.lcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.lcard .body { padding: 11px 13px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lcard .sku { font-weight: 600; word-break: break-all; }
.lcard .meta { color: var(--muted); font-size: 12.5px; }
.lcard .btns { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }
.lcard .btns .btn { flex: 1; padding: 0 8px; }

/* ---------- окна и формы ---------- */

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 3, 12, 0.66); opacity: 0; transition: opacity 0.2s; }
.overlay.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - var(--safe-top) - 20px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1a1530, #0f0c1c 40%); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 24px 24px 0 0; box-shadow: var(--shadow);
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.show { transform: none; }
.sheet.full { height: calc(100dvh - var(--safe-top) - 20px); }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 9px auto 0; flex: none; }
.sheet .shead { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 20px; flex: none; }
.sheet .shead h2 { flex: 1; margin: 0; font: 650 21px/1.2 var(--display); font-stretch: 90%; min-width: 0; }
.sheet .x { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); background: var(--panel-2); }
.sheet .x svg { width: 17px; height: 17px; }
.sheet .sbody { overflow-y: auto; padding: 6px 20px 18px; flex: 1; overscroll-behavior: contain; }
.sheet .sfoot { flex: none; display: flex; gap: 10px; padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.sheet .sfoot .btn { flex: 1; height: 50px; font-size: 15.5px; }
@media (min-width: 760px) {
  .sheet { left: auto; top: 0; bottom: 0; right: 0; width: 520px; max-height: none; height: 100dvh; border-radius: 24px 0 0 24px; border: 1px solid var(--line-2); border-right: 0; transform: translateX(100%); }
  .sheet.full { height: 100dvh; }
  .sheet .grip { display: none; }
  .sheet .shead { padding: 22px 18px 10px 26px; }
  .sheet .sbody { padding: 6px 26px 22px; }
  .sheet .sfoot { padding: 14px 26px 18px; }
  .sheet.narrow { width: 440px; }
}
/* окно-вопрос по центру */
.dialog {
  position: fixed; z-index: 60; left: 50%; top: 50%; width: min(92vw, 420px); transform: translate(-50%, -46%) scale(0.98); opacity: 0;
  transition: opacity 0.18s, transform 0.18s; padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.dialog.show { opacity: 1; transform: translate(-50%, -50%); }
.dialog h3 { margin: 0; font: 650 19px/1.25 var(--display); font-stretch: 92%; }
.dialog p { margin: 0; color: var(--muted); font-size: 14px; }
.dialog .opts { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dialog .opts .btn { height: auto; min-height: 46px; padding: 10px 14px; white-space: normal; text-align: left; justify-content: flex-start; }
.dialog .opts .btn small { display: block; font-weight: 400; opacity: 0.8; font-size: 12.5px; margin-top: 2px; }
.overlay.top { z-index: 59; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .lbl { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.hint.warn { color: var(--warn); }
.hint.bad { color: var(--loss); }
.hint.ok { color: var(--a1); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.input {
  width: 100%; height: 50px; padding: 0 14px; border-radius: var(--r-sm); outline: none; font-size: 16px;
  background: color-mix(in srgb, var(--panel-2) 80%, #000); border: 1px solid var(--line); transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--a2); box-shadow: 0 0 0 3px var(--soft); }
.input::placeholder { color: var(--faint); }
textarea.input { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.iw { position: relative; }
.iw .sfx { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 14.5px; }
.iw .input { padding-right: 52px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.search .input { padding-left: 40px; height: 44px; font-size: 15px; }
.stepper { display: flex; height: 50px; border-radius: var(--r-sm); overflow: hidden; background: color-mix(in srgb, var(--panel-2) 80%, #000); border: 1px solid var(--line); }
.stepper button { width: 50px; display: grid; place-items: center; color: var(--muted); }
.stepper button:hover { background: var(--hover); color: var(--text); }
.stepper input { flex: 1; min-width: 0; border: 0; background: transparent; text-align: center; font: 600 18px var(--font); outline: none; font-variant-numeric: tabular-nums; }
.picker {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 12px; text-align: left; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--panel-2) 80%, #000); border: 1px solid var(--line);
}
.picker:hover { border-color: var(--line-2); }
.picker .mc { flex: 1; min-width: 0; }
.picker .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .s { color: var(--muted); font-size: 12.5px; }
.picker.empty { color: var(--faint); min-height: 50px; }
.picker .ico, .picker .thumb { width: 38px; height: 38px; }
.choice { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 520px) and (max-width: 759px) { .choice.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choice button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 14px; text-align: left;
  background: color-mix(in srgb, var(--panel-2) 80%, #000); border: 1px solid var(--line); min-width: 0;
}
.choice button svg { color: var(--muted); }
.choice button b { font-weight: 600; font-size: 14px; }
.choice button span { color: var(--faint); font-size: 12px; line-height: 1.3; }
.choice button.on { border-color: var(--a2); background: var(--soft); box-shadow: 0 0 0 3px var(--soft); }
.choice button.on svg { color: var(--a1); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--panel-2) 80%, #000); border: 1px solid var(--line); cursor: pointer; }
.toggle .mc { flex: 1; min-width: 0; }
.toggle .t { font-weight: 500; }
.toggle .s { color: var(--faint); font-size: 12.5px; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle.on .switch { background: var(--a2); }
.toggle.on .switch::after { transform: translateX(18px); }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 118px 36px; gap: 8px; align-items: center; }
.line .picker { min-height: 50px; padding: 6px 10px; }
.line .rm { width: 36px; height: 36px; border-radius: 10px; color: var(--faint); display: grid; place-items: center; }
.line .rm:hover { color: var(--loss); background: color-mix(in srgb, var(--loss) 12%, transparent); }
.line .rm svg { width: 17px; height: 17px; }
.line.custom { grid-template-columns: minmax(0, 1fr) 118px 36px; }
.addl { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; color: var(--a1); font-size: 13.5px; font-weight: 500; padding: 4px 2px; }
.addl svg { width: 16px; height: 16px; }
.addrow { display: flex; gap: 16px; flex-wrap: wrap; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos .p { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; position: relative; background: var(--panel-2); }
.photos .p img { width: 100%; height: 100%; object-fit: cover; }
.photos .p .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: #fff; display: grid; place-items: center; }
.photos .p .rm svg { width: 13px; height: 13px; }
.photos .p.loading::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.photos .add { width: 74px; height: 74px; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--muted); display: grid; place-items: center; }
.photos .add:hover { border-color: var(--a2); color: var(--a1); }
.photos .add svg { width: 24px; height: 24px; }
.group-box { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 60%, transparent); display: flex; flex-direction: column; gap: 14px; }
.group-box > .gh { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.group-box > .gh svg { color: var(--a1); }
.summary { padding: 14px 16px; border-radius: 16px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--a2) 35%, transparent); }
.summary .ln { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.summary .ln span:first-child { color: var(--muted); }
.summary .ln.total { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 9px; font-weight: 600; font-size: 15px; }
.summary .ln.total:first-child { border-top: 0; margin-top: 0; padding-top: 3px; }
.summary .ln.total span:first-child { color: var(--text); }
.form-error { background: color-mix(in srgb, var(--loss) 12%, transparent); border: 1px solid color-mix(in srgb, var(--loss) 35%, transparent); color: var(--loss); border-radius: 12px; padding: 11px 14px; font-size: 14px; }
.pick-cat { font-size: 12.5px; color: var(--faint); margin: 14px 4px 7px; }
.pick-cat:first-child { margin-top: 0; }

/* меню «Записать» */
.acts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; text-align: left; min-height: 120px; }
.act:hover { border-color: var(--line-2); }
.act .hex { width: 46px; height: 50px; display: grid; place-items: center; background: var(--grad); color: var(--a-ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.act .hex svg { width: 22px; height: 22px; stroke-width: 2; }
.act b { font-weight: 600; font-size: 15px; }
.act .d { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
.act b { display: flex; align-items: center; gap: 8px; }

/* ---------- дополнения v2 ---------- */

.page { min-width: 0; }
.small { font-size: 12.5px; }
.top-gap { margin-top: 12px; }
.gap { height: 14px; }
.mt-8 { margin-top: -8px; }
.sgap { margin-bottom: 12px; }
.warnc { color: var(--warn); }
.hotc b { color: var(--loss); }
.ul { text-decoration: underline; text-underline-offset: 3px; }
.click { cursor: pointer; }

/* метка «системного окна» */
.sys {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font: 600 11px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--a1);
  padding: 6px 10px 6px 8px; border-radius: 8px; margin-bottom: 10px;
  background: var(--soft); border: 1px solid color-mix(in srgb, var(--a2) 35%, transparent);
}
.sys svg { width: 13px; height: 13px; }
.sec h2::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 2px;
  background: var(--grad); transform: rotate(45deg); box-shadow: 0 0 8px color-mix(in srgb, var(--a2) 80%, transparent);
}
.sec > div { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.sec small { margin-left: 0; }
.row .gain { color: var(--gain); }
.row .loss { color: var(--loss); }
@media (max-width: 480px) { .seg button { padding: 0 10px; } }
.sec .link { color: var(--a1); font-size: 13.5px; font-weight: 500; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; }
.loading.small { padding: 14px 0; font-size: 13px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--a1); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.month span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.month .mlock { width: 14px; height: 14px; color: var(--a1); }

/* главная */
.ring.click { cursor: pointer; }
.goal-chip { margin-top: 14px; height: 32px; font-size: 13px; }
.goal-chip svg { width: 15px; height: 15px; color: var(--a1); }
.flow .x { color: var(--faint); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { .flow > div { padding: 12px; } .flow .x { white-space: normal; } }
.cgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.hero .hnote { color: var(--muted); font-size: 13.5px; }
.narrow-only { display: block; }
.narrow-only > .sec:first-child { margin-top: 24px; }
.wide-only { display: none; }
@media (min-width: 1180px) { .narrow-only { display: none; } .wide-only { display: block; } .side > .wide-only:first-child .sec { margin-top: 0; } }
@media (max-width: 639px) { .ring { width: 148px; height: 148px; } .ring .in b { font-size: 27px; } }
.chan .x { color: var(--faint); font-size: 12px; margin-top: 4px; }
.chan .top .chev { margin-left: auto; }
.chan .hexm svg { width: 18px; height: 18px; }
.chart.card { padding: 16px 14px 12px; }
.chart .legend span { display: inline-flex; align-items: center; }
.side > .sec:first-child { margin-top: 0; }
@media (max-width: 1179px) { .side > .sec:first-child { margin-top: 24px; } }
.fz { display: flex; align-items: center; gap: 12px; }
.fz .mc { min-width: 0; }
.fz .t { font-weight: 600; }
.fz .s { color: var(--muted); font-size: 13px; }
.freeze { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.freeze .ico, .fz .ico { color: #7dd3fc; background: color-mix(in srgb, #7dd3fc 12%, transparent); }
.since .k { color: var(--muted); font-size: 12.5px; }
.since .v { font: 650 22px/1.3 var(--display); font-stretch: 92%; }
.since .hint { margin-top: 8px; }
.xp { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin-top: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.xp i { display: block; height: 100%; background: var(--grad); border-radius: 4px; box-shadow: 0 0 10px color-mix(in srgb, var(--a2) 70%, transparent); }
.welcome { display: flex; flex-direction: column; gap: 6px; }
.welcome h2 { margin: 0; font: 650 24px/1.2 var(--display); font-stretch: 90%; }
.welcome p { margin: 0 0 8px; }
.step { padding-left: 4px; padding-right: 4px; }
.stepn { width: 34px; height: 38px; flex: none; display: grid; place-items: center; font: 700 14px var(--display); color: var(--a1); background: var(--soft-2);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.step.done .stepn { background: var(--grad); color: var(--a-ink); }
.step.done .stepn svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* статистика */
.stat2 { margin-top: 22px; align-items: start; }
.mpad { padding: 4px 18px 10px; }
.stack.big { height: 14px; margin-top: 2px; }
.stack.big span { border-radius: 4px; }
.table tr.click:hover td { background: color-mix(in srgb, var(--hover) 50%, transparent); }
.table td .pn .hexm { width: 26px; height: 29px; font-size: 10px; }

/* заказы */
.seg .n { margin-left: 7px; font-size: 12px; color: var(--faint); font-weight: 600; }
.seg button.on .n { color: var(--a1); }
.seg button { display: inline-flex; align-items: center; justify-content: center; }
.seg button svg { width: 16px; height: 16px; margin-right: 7px; }
.dayhead { display: flex; align-items: baseline; gap: 4px; }
.dayhead .num { margin-left: auto; color: var(--muted); }
.tw { position: relative; flex: none; }
.hexm.corner { position: absolute; right: -5px; bottom: -6px; width: 20px; height: 22px; font-size: 8.5px; box-shadow: none; outline: 0; }
.thumb.letter { font: 700 17px var(--display); color: color-mix(in srgb, var(--a1) 80%, transparent);
  background: radial-gradient(80% 70% at 30% 25%, color-mix(in srgb, var(--a2) 35%, transparent), transparent 70%), var(--panel-2); }
.frz { color: #7dd3fc; display: inline-flex; align-items: center; gap: 4px; }
.frz svg { width: 13px; height: 13px; }
.btn.more { margin-top: 12px; }
.row.sel { background: var(--soft); }
.chev.on { color: var(--a1); }
.ohead { display: flex; align-items: center; gap: 12px; }
.ohead .mc { flex: 1; min-width: 0; }
.ohead .t { font-weight: 600; }
.ohead .s { color: var(--muted); font-size: 13px; }
.kvs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); }
.kvs:empty { display: none; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: color-mix(in srgb, var(--panel) 92%, #000); font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }
.form > div > .lbl { margin: 0 2px 8px; }

/* каталог */
.tabs { margin-bottom: 0; }
.tabs button { flex: 1 1 0; }
@media (max-width: 480px) { .tabs button svg { display: none; } .tabs button { padding: 0 8px; } }
.bar-row.top-gap { margin-top: 12px; }
.tag2 { position: absolute; right: 8px; top: 8px; width: 26px; padding: 0; justify-content: center; }
.fstrip { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.fstrip > svg { color: #7dd3fc; }
.fstrip { flex-wrap: wrap; }
.fstrip .mc { flex: 1 1 220px; min-width: 0; }
.fstrip .btn { margin-left: auto; }
.pricebox { display: flex; align-items: center; gap: 14px; padding: 18px; }
.pricebox .k { color: var(--muted); font-size: 12.5px; }
.pricebox .v { font: 650 28px/1.15 var(--display); font-stretch: 90%; }
.pricebox .s { color: var(--muted); font-size: 13px; }
.ptools { display: flex; gap: 6px; padding: 0 8px 8px; flex-wrap: wrap; }
.ptools:empty { display: none; }
.pinfo { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.calc-top { padding: 14px 16px 6px; }
.calc .row .t { white-space: normal; }
.gallery.nophoto .big { aspect-ratio: auto; height: 220px; }
@media (max-width: 819px) { .gallery.nophoto .big { height: 120px; } .gallery.nophoto .big .ph { font-size: 28px; } }
.calc-top .stack { margin-top: 0; }
.calc-h { padding: 12px 16px 4px; font-size: 12.5px; color: var(--faint); font-weight: 600; letter-spacing: 0.02em; border-top: 1px solid var(--line); }
.calc .calc-h + .row { border-top: 0; }
.calc .row.total { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.calc .row.total .t, .calc .row.total .side { font-weight: 650; }
.row-card { display: flex; align-items: center; gap: 12px; }
.row-card .mc { flex: 1; min-width: 0; }
.row-card .t { font-weight: 600; }
.row-card .s { color: var(--muted); font-size: 13px; }

/* расходы */
.exphead { display: flex; flex-direction: column; }
.exphead .big { font: 650 40px/1.1 var(--display); font-stretch: 90%; }
.exphead .big .u { font: 500 15px var(--font); color: var(--muted); margin-left: 8px; }
.note-line { display: flex; align-items: center; gap: 8px; color: var(--gain); font-size: 13px; margin-top: 6px; }
.note-line svg { width: 16px; height: 16px; }
.bars { margin: 14px -18px -8px; }
.bars .mrow .bar i { background: var(--grad); opacity: 0.85; }
.pad-hint { padding: 12px 6px 0; }

/* площадки */
.pf { display: flex; flex-direction: column; gap: 14px; margin-bottom: 4px; }
.pf-top { display: flex; align-items: center; gap: 12px; }
.pf-top .t { font: 650 19px var(--display); font-stretch: 92%; }
.pf-top .s { color: var(--muted); font-size: 13px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); }
.pf-stats > div { background: color-mix(in srgb, var(--panel) 90%, #000); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.pf-stats b { font: 600 18px var(--display); font-stretch: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-stats span { color: var(--faint); font-size: 12px; }
.lcard .pic .ph { font-size: 26px; }

/* система */
.sys-grid { align-items: start; }
.sys-grid > div > .sec:first-child { margin-top: 0; }
@media (max-width: 659px) { .sys-grid > div + div > .sec:first-child { margin-top: 24px; } }
.card.hud.pad { padding: 22px; }
.card.hud.pad > .hint, .card.hud.pad > p { margin: 12px 0 0; }
.card.hud.pad > .btn, .card.hud.pad > .addrow, .card.hud.pad > .note { margin-top: 14px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 4px 6px; border-radius: 12px; }
.sw .hexm { width: 40px; height: 44px; color: #fff; }
.sw .hexm svg { width: 18px; height: 18px; stroke-width: 2.4; }
.sw.on { color: var(--text); }

/* формы */
.iw.wide .input { padding-right: 84px; }
.line { grid-template-columns: minmax(0, 1fr) 100px 32px; }
.line .picker { gap: 8px; padding: 6px 12px; }
.line .picker .ico, .line .picker .chev, .line .picker .thumb { display: none; }
.line .rm { width: 32px; }
.inrow { display: flex; gap: 8px; }
.inrow > :first-child { flex: 1; min-width: 0; }
.inrow .btn { height: 50px; }
.form.tight { gap: 8px; }
.two.r520 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .two.r520 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.small-chips .chip { height: 30px; font-size: 13px; padding: 0 11px; }
.chips.wrap.small-chips .chip { height: auto; min-height: 30px; padding: 4px 11px; }
.toggle .ico { width: 36px; height: 36px; }
.calcsum .ln.warnc span:last-child, .summary .warnc { color: var(--warn); }
.summary .muted { font-size: 13.5px; }
.freeze-big { display: flex; flex-direction: column; }
.freeze-big .big { font: 650 44px/1.05 var(--display); font-stretch: 90%; }
.freeze-big .big .u { font: 500 15px var(--font); color: var(--muted); margin-left: 8px; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: var(--muted); }
.ticks li { position: relative; padding-left: 22px; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; background: var(--grad); transform: rotate(45deg); }
.dialog .opts .btn { gap: 12px; }
.dialog .opts .btn span { display: block; }
.dialog .opts .btn svg { flex: none; }
.dialog .sys { margin-bottom: 0; }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--nav) + var(--safe-bottom) + 22px); transform: translate(-50%, 16px);
  opacity: 0; pointer-events: none; width: max-content; max-width: min(92vw, 560px);
  padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: linear-gradient(180deg, #2a2148, #1d1735); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: color-mix(in srgb, var(--loss) 50%, transparent); color: #ffd5dc; }
@media (min-width: 1000px) { .toast { bottom: 28px; left: calc(50% + var(--rail) / 2); } }

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