/* ─────────── tokens ─────────── */
:root {
  --font: "Onest", -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", var(--font);
  --gutter: 16px;
  --tabbar-h: 62px;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));

  /* Чёрная тема с фиолетовым: панель всегда тёмная, независимо от темы Telegram */
  --bg: #000000;
  --surface: #0D0A14;
  --surface-2: #17111F;
  --line: rgba(167, 139, 250, .13);
  --text: #EDE6FF;
  --muted: #9A8BB8;
  --faint: #5F5478;
  --accent: #B794FF;
  --accent-strong: #7C3AED;
  --accent-grad: linear-gradient(135deg, #8B5CF6 0%, #A855F7 55%, #C084FC 100%);
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(157, 107, 255, .15);
  --title-grad: linear-gradient(90deg, #F5EEFF 0%, #C4A5FF 60%, #A78BFA 100%);
  --glow: 0 8px 24px -10px rgba(139, 92, 246, .75);
  --good: #5EE3A1;
  --good-soft: rgba(94, 227, 161, .13);
  --warn: #FBC34A;
  --warn-soft: rgba(251, 195, 74, .13);
  --bad: #FF6B86;
  --bad-soft: rgba(255, 107, 134, .13);
  --backdrop: rgba(0, 0, 0, .7);
  --shadow: inset 0 0 0 1px var(--line);

  /* Карточка на главной: сверху фиолетовое свечение, под волной — чёрная глубина с графиком */
  --ice: #160C2A;
  --ice-ink: #F5EEFF;
  --ice-muted: #A99BC4;
  --water-top: #0B0615;
  --water-bottom: #000000;
  color-scheme: dark;
}

/* ─────────── base ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  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;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  min-height: 100vh;
}

/* ─────────── typography ─────────── */
.screen-title {
  font: 600 24px/1.15 var(--display);
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.screen-sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.section-title {
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
  margin: 26px 2px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section-title small { font-weight: 400; font-size: 13px; color: var(--muted); }

/* ─────────── topbar ─────────── */
.topbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.topbar .who { flex: 1; min-width: 0; }
.topbar .hello { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.topbar .role { color: var(--muted); font-size: 13px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 15px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 500; flex: none; white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.status-pill.off .dot { background: var(--bad); }

/* ─────────── segmented ─────────── */
.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border-radius: 12px;
  margin-bottom: 14px;
}
.seg button {
  flex: 1; height: 32px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.seg { background: var(--surface); box-shadow: var(--shadow); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(183, 148, 255, .35); }

/* ─────────── hero ─────────── */
.hero {
  border-radius: 24px; overflow: hidden; background: var(--water-bottom);
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -30px rgba(139, 92, 246, .6);
}
.hero-top {
  background: radial-gradient(120% 160% at 0% 0%, #2B1454 0%, var(--ice) 60%);
  color: var(--ice-ink); padding: 18px 18px 6px;
}
.hero-label { font-size: 14px; color: var(--ice-muted); }
.hero-value {
  font: 600 38px/1.1 var(--display);
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .delta { font-size: 13px; font-weight: 500; }
.hero .delta.up { color: var(--good); }
.hero .delta.down { color: var(--bad); }
.hero .delta.flat { color: var(--ice-muted); }
.waterline { display: block; width: 100%; height: 22px; background: var(--ice); }
.waterline path { fill: var(--water-top); }
.hero-chart {
  position: relative; height: 180px;
  background: linear-gradient(180deg, var(--water-top), var(--water-bottom));
  padding: 4px 8px 10px 4px;
}
.hero-chart canvas { width: 100% !important; height: 100% !important; }
.hero-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 14px; text-align: center; padding: 0 24px;
}

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.metric {
  text-align: left; padding: 12px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
  min-width: 0;
}
.metric .m-label { font-size: 12px; color: var(--muted); display: block; }
.metric .m-value { font-weight: 600; font-size: 16px; line-height: 1.25; display: block; margin: 2px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric .m-delta { font-size: 12px; }
.up { color: var(--good); }
.down { color: var(--bad); }
.flat { color: var(--faint); }

/* ─────────── grouped lists ─────────── */
.group { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.group + .group { margin-top: 12px; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 10px 14px; width: 100%;
  text-align: left; position: relative;
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 14px;
  border-top: 1px solid var(--line);
}
.row.with-thumb + .row.with-thumb::before { left: 70px; }
button.row:active, .row.tap:active { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; display: block; }
/* Заголовок и подпись — отдельными строками (в разметке это span, по умолчанию они встают в одну линию).
   Длинный текст переносится, а не обрезается. */
.row .title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.row .sub { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row .end .title { color: var(--text); }
.row .end { text-align: right; flex: none; max-width: 45%; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.row .end .sub { font-size: 12px; }
.row .chev { color: var(--faint); flex: none; }
.row .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.row .ico.warn { background: var(--warn-soft); color: var(--warn); }
.row .ico.bad { background: var(--bad-soft); color: var(--bad); }
.row.danger .title { color: var(--bad); }
.row .wrap { white-space: normal; word-break: break-word; }

.thumb {
  width: 44px; height: 44px; border-radius: 12px; flex: none; overflow: hidden;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-grad); }

/* ─────────── badges ─────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badges { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }

/* ─────────── buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px;
  background: var(--accent-grad); color: var(--accent-ink);
  box-shadow: var(--glow);
  transition: opacity .15s, transform .1s;
}
.btn.soft, .btn.danger { box-shadow: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > .btn { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn.bad { color: var(--bad); }

/* ─────────── forms ─────────── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.input, .textarea {
  width: 100%; border: 1px solid transparent; outline: none;
  background: var(--surface-2); border-radius: 12px;
  padding: 0 14px; height: 48px; font-size: 16px;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.hint.warn { color: var(--warn); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); }

.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 42px; background: var(--surface); box-shadow: var(--shadow); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--faint); opacity: .55;
  transition: background .2s, opacity .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch input:checked + i { background: var(--accent-grad); opacity: 1; box-shadow: 0 0 14px -2px rgba(168, 85, 247, .6); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.photo-pick {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 14px; background: var(--surface-2); width: 100%; text-align: left;
}
.photo-pick .thumb { width: 56px; height: 56px; }

/* ─────────── product detail ─────────── */
.cover {
  aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .empty { display: grid; justify-items: center; gap: 6px; font-size: 14px; }
.kv { display: flex; gap: 16px; margin: 4px 0 16px; }
.kv div { min-width: 0; }
.kv b { display: block; font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.kv span { font-size: 13px; color: var(--muted); }

.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.profile-head .name { font: 600 20px/1.2 var(--display); word-break: break-word; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat b { display: block; font-weight: 600; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

/* ─────────── broadcast: визуальный редактор ─────────── */
.editor-box {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.editor-box:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.toolbar {
  display: flex; gap: 4px; padding: 8px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar button {
  min-width: 38px; height: 36px; padding: 0 10px; border-radius: 10px;
  background: var(--surface-2); font-size: 14px; flex: none;
  display: grid; place-items: center; color: var(--text);
}
.toolbar button[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--glow); }
.editor {
  min-height: 170px; padding: 14px; outline: none;
  font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  -webkit-user-select: text; user-select: text;
}
.editor:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.editor code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.editor .spoiler { background: rgba(183, 148, 255, .22); border-radius: 4px; box-shadow: 0 0 0 2px rgba(183, 148, 255, .22); }
.editor a { color: var(--accent); text-decoration: underline; }
.temoji { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.28em; object-fit: contain; margin: 0 1px; }

/* ─────────── premium emoji ─────────── */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.emoji-tile {
  aspect-ratio: 1; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 28px;
}
.emoji-tile:active { background: var(--accent-soft); }
.emoji-tile span { display: grid; place-items: center; width: 40px; height: 40px; }
.emoji-tile img { width: 40px; height: 40px; object-fit: contain; }
.emoji-big {
  width: 120px; height: 120px; margin: 4px auto 18px; border-radius: 28px;
  display: grid; place-items: center; font-size: 64px; background: var(--surface-2);
}
.emoji-big img { width: 88px; height: 88px; object-fit: contain; }
.ico-plain {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.card-text { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.preview {
  background: var(--surface); border-radius: 18px 18px 18px 6px; padding: 12px 14px;
  box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; overflow: hidden;
}
.preview img { border-radius: 12px; margin: -4px -6px 10px; max-width: calc(100% + 12px); }
.preview code, .preview pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.preview tg-spoiler, .preview .spoiler { background: var(--faint); color: transparent; border-radius: 4px; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin: 10px 0 8px; }
.progress i { display: block; height: 100%; background: var(--accent-grad); border-radius: 8px; transition: width .4s; }
.card { background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .main { flex: 1; min-width: 0; }
.card-head .title { display: block; font-weight: 600; }
.card-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-body .field:last-of-type { margin-bottom: 12px; }

/* ─────────── states ─────────── */
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .ico-lg {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.empty-state p { margin: 0 auto 16px; max-width: 30ch; }
.sk { background: var(--surface); border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.more-btn { margin-top: 12px; }

/* ─────────── tabbar ─────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding-bottom: var(--safe-bottom);
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar nav { display: flex; max-width: 560px; margin: 0 auto; height: var(--tabbar-h); }
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); font-size: 11px; font-weight: 500;
}
.tabbar button span.i { display: grid; place-items: center; width: 48px; height: 28px; border-radius: 999px; transition: background .2s; }
.tabbar button[aria-current="page"] { color: var(--accent); }
.tabbar button[aria-current="page"] span.i { background: var(--accent-soft); box-shadow: 0 0 18px -4px rgba(168, 85, 247, .55); }

/* ─────────── sheet ─────────── */
.backdrop {
  position: fixed; inset: 0; z-index: 40; background: var(--backdrop);
  animation: fade .2s ease-out;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto; max-height: 90vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: inset 0 1px 0 var(--line);
  padding-bottom: var(--safe-bottom);
  animation: rise .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet.closing { animation: sink .18s ease-in forwards; }
.backdrop.closing { animation: fade .18s ease-in reverse forwards; }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--faint); opacity: .5; margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px 20px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 600; }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; -webkit-overflow-scrolling: touch; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes sink { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ─────────── toast ─────────── */
.toast {
  position: fixed; left: 50%; z-index: 60;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px); width: max-content;
  padding: 12px 16px; border-radius: 14px;
  background: #1E1530; color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(183, 148, 255, .3), 0 10px 30px -10px rgba(0, 0, 0, .9);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  animation: toast-in .22s ease-out;
}
.toast.error { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.gate { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.gate h1 { font: 600 22px/1.2 var(--display); margin: 14px 0 6px; }
.gate p { color: var(--muted); max-width: 32ch; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media (max-width: 360px) {
  .hero-value { font-size: 32px; }
  .metric .m-value { font-size: 15px; }
}

/* апгрейд: настройка шанса */
.up-big { flex: none; font: 600 26px/1 var(--display); color: var(--accent); }
.up-range { width: 100%; accent-color: var(--accent); height: 28px; }
.up-preview { margin-top: 10px; }
.up-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.up-row span { color: var(--muted); }
.up-row b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ─────────── каталог и кейсы в админке ─────────── */
.cat-admin { margin-bottom: 12px; }
.cat-admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cat-admin-head .thumb { width: 44px; height: 44px; border-radius: 12px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cat-admin-head .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-admin-head .main { flex: 1; min-width: 0; display: grid; }
.cat-admin-head .sub { font-size: 13px; color: var(--muted); }
.cat-admin-cheat { border-top: 1px solid var(--line); }
.prize-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px 30px; gap: 6px; align-items: center; margin-bottom: 8px; }
.prize-row select.input { padding-right: 4px; text-overflow: ellipsis; }
.prize-row .input { padding-left: 10px; padding-right: 10px; min-width: 0; }
.prize-chance-in { position: relative; display: block; }
.prize-chance-in .input { padding-right: 22px; }
.prize-chance-in i { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 13px; }

/* ─────────── цены для реселлеров: таблица «как увидит реселлер» ─────────── */
.price-preview { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow); }
.pp-title { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pp-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pp-title + .pp-row { border-top: 0; }
.pp-row b { font-variant-numeric: tabular-nums; }
.pp-row em { font-style: normal; font-size: 12px; color: var(--good); min-width: 52px; text-align: right; }
.pp-title + .pp-row em { color: var(--muted); }
.pp-row.is-bad em { color: var(--bad); }

/* ─────────── забег верного в админке ─────────── */
.streak-stats { grid-template-columns: repeat(2, 1fr); }
.streak-stats b { font-size: 20px; }
.plan-row { display: grid; grid-template-columns: 1fr 18px 1fr 36px; gap: 6px; align-items: center; margin-bottom: 8px; }
.plan-field { position: relative; display: block; }
.plan-field .input { padding-right: 34px; }
.plan-field i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); }
.plan-arrow { color: var(--faint); display: grid; place-items: center; }
.plan-stat { grid-column: 1 / -1; margin: -2px 2px 2px; font-size: 12px; color: var(--muted); }
.run-mini { flex: none; width: 56px; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.run-mini i { display: block; height: 100%; border-radius: 6px; background: var(--good); }
