/* Кабинет партнёра Kaya: раскладка как в admin.vargopartners.com, фирменный стиль kayapn.ink —
   тёмно-синие поверхности, красный акцент со свечением, Unbounded в заголовках и цифрах. */
:root {
  --bg: #0A0B0F;
  --card: #101219;
  --card-2: #161923;
  --hover: #161923;
  --input: #0D0F15;
  --border: #1D2230;
  --border-strong: #242A3A;
  --text: #EAECF2;
  --muted: #8B92A6;
  --faint: #5A6274;
  --primary: #FF3B4E;
  --primary-2: #FF6470;
  --primary-deep: #C41F30;
  --primary-soft: rgba(255, 59, 78, .12);
  --primary-glow: rgba(255, 59, 78, .30);
  --on-primary: #fff;
  --brand: #FF3B4E;
  --brand-deep: #C41F30;
  --green: #35D6A4;
  --green-bg: rgba(53, 214, 164, .12);
  --amber: #F5B454;
  --amber-bg: rgba(245, 180, 84, .12);
  --red: #FF6470;
  --red-bg: rgba(255, 59, 78, .12);
  --blue: #5B9DFF;
  --blue-bg: rgba(91, 157, 255, .12);
  --lime: #35D6A4;
  --r: 16px;
  --r-sm: 10px;
  --side: 248px;
  --disp: 'Unbounded', 'Inter', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }
.hidden { display: none !important; }

/* ---------- boot / logo ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .logo-mark { width: 40px; height: 40px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }
.logo-mark {
  position: relative; width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep));
  box-shadow: 0 6px 18px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.logo-mark::before { content: ""; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; }
.logo-mark::after {
  content: ""; position: absolute; left: 18%; top: calc(50% - 1.1px); width: 64%; height: 2.2px;
  background: #fff; transform: rotate(-32deg);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font: 700 18px/1 var(--disp); letter-spacing: .5px; }
.brand small { display: block; color: var(--faint); font: 500 9.5px/1 var(--sans); letter-spacing: 1.8px; text-transform: uppercase; margin-top: 6px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s; }
.shell.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.shell.collapsed .side { visibility: hidden; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 12px 14px; background: var(--bg);
  scrollbar-width: thin;
}
.side .brand { padding: 2px 8px 22px; }
.nav-label { padding: 0 10px; height: 32px; display: flex; align-items: center; color: var(--faint); font: 600 10.5px/1 var(--sans); letter-spacing: 1.4px; text-transform: uppercase; margin-top: 8px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 500; white-space: nowrap; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 59, 78, .18); }
.nav-link.active svg { color: var(--primary-2); }
.nav-link .chev { margin-left: auto; width: 15px; height: 15px; color: var(--muted); transition: transform .2s; }
.nav-parent.open > .nav-link .chev { transform: rotate(90deg); }
.nav-sub { display: none; margin: 2px 0 4px 15px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-parent.open > .nav-sub { display: grid; gap: 2px; }
.nav-sub .nav-link { height: 32px; }
.nav-link .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: var(--hover); color: var(--muted); font: 500 11px/1 var(--mono);
}
.side-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 2px; }
.side-foot .nav-link { color: var(--muted); font-size: 13px; height: 30px; }
.launch { padding: 12px 8px 4px; margin-top: 8px; border-top: 1px solid var(--border); }
.launch-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.launch-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.launch-bar i { height: 3px; border-radius: 2px; background: var(--hover); }
.launch-bar i.on { background: linear-gradient(90deg, var(--primary), var(--primary-2)); box-shadow: 0 0 8px var(--primary-glow); }
.launch a { font-size: 12px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.launch a:hover { color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 24px;
  background: rgba(10, 11, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; gap: 12px; height: 100%; width: 100%; }
.top .spacer { flex: 1; }
.top .sep { width: 1px; height: 22px; background: var(--border); }
.view { padding: 24px 24px 60px; width: 100%; }
.page-title { padding: 28px 24px 0; }
.page-title h1 { font: 700 24px/1.25 var(--disp); letter-spacing: -.6px; }
.page-title p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.page-title + .view { padding-top: 20px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); }
.page-head .spacer { flex: 1; }
.section { margin-top: 32px; }
.section:first-child { margin-top: 8px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font: 600 16px/1.3 var(--disp); letter-spacing: -.2px; }
.section-head span { color: var(--muted); font-size: 12px; }
.section-head .spacer { flex: 1; }

/* bot switcher, search, balance, avatar */
.switcher { position: relative; display: flex; align-items: center; }
.switcher .bot-ico { position: absolute; left: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); pointer-events: none; }
.switcher .bot-ico svg { width: 16px; height: 16px; }
.switcher select {
  appearance: none; -webkit-appearance: none; height: 36px; padding: 0 26px 0 42px; border: 0; background: none;
  cursor: pointer; font-weight: 600; font-size: 14px; max-width: 240px; text-overflow: ellipsis; border-radius: var(--r-sm);
}
.switcher select:hover { background: var(--hover); }
.switcher select option { background: var(--card); }
.switcher > svg { position: absolute; right: 6px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.top-search { position: relative; width: 256px; }
.top-search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--muted); }
.top-search input {
  width: 100%; height: 32px; padding: 0 60px 0 32px; border-radius: var(--r-sm); outline: none; text-overflow: ellipsis;
  background: var(--input); border: 1px solid var(--border-strong); font-size: 14px;
}
.top-search input::placeholder { color: var(--muted); }
.top-search input:focus { border-color: rgba(255, 59, 78, .55); }
.top-search kbd { position: absolute; right: 6px; top: 6px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 4px; background: var(--hover); border: 1px solid var(--border); color: var(--muted); font: 500 10px/1 var(--mono); }
.chip-balance {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 99px;
  background: var(--green-bg); border: 1px solid rgba(53, 214, 164, .25); color: var(--green); font: 600 12.5px/1 var(--mono); white-space: nowrap;
}
.chip-balance:hover { background: rgba(53, 214, 164, .18); }
.chip-balance svg { width: 14px; height: 14px; color: var(--green); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(140deg, #2B3145, #1B1F2C); border: 1px solid var(--border-strong); font: 700 13px/1 var(--disp); color: var(--text);
}
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 40;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.dropdown .who { padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown .who b { display: block; font-weight: 600; }
.dropdown .who span { color: var(--muted); font-size: 12px; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  background: none; border: 0; cursor: pointer; color: var(--text); text-align: left; font-size: 13.5px;
}
.dropdown a:hover, .dropdown button:hover { background: var(--hover); }
.dropdown svg { width: 15px; height: 15px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .15s, box-shadow .2s;
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(100deg, var(--primary), #E02338); box-shadow: 0 6px 18px var(--primary-glow); }
.btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 59, 78, .42); }
.btn-green { color: #06251B; background: linear-gradient(100deg, #3FE3B1, #28C291); box-shadow: 0 6px 18px rgba(53, 214, 164, .25); }
.btn-green:not(:disabled):hover { transform: translateY(-1px); }
.btn-ghost { background: var(--card-2); border-color: var(--border-strong); }
.btn-ghost:not(:disabled):hover { background: #1C2030; border-color: #313950; }
.btn-danger { color: var(--red); background: var(--red-bg); border-color: rgba(248, 113, 113, .25); }
.btn-danger:not(:disabled):hover { background: rgba(248, 113, 113, .2); }
.btn-text { background: none; color: var(--muted); padding: 0 8px; }
.btn-text:hover { color: var(--text); background: var(--hover); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); cursor: pointer;
  background: none; border: 1px solid var(--border-strong); color: var(--text);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 16px; height: 16px; }
.link { color: var(--primary-2); font-weight: 600; cursor: pointer; background: none; border: 0; font-size: 13px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.spin { width: 15px; height: 15px; border: 2px solid rgba(128, 128, 128, .35); border-top-color: currentColor; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; min-width: 0; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card h2 { font: 600 14px/1.3 var(--disp); letter-spacing: -.1px; }
.card-head .spacer { flex: 1; }
.card-head p, .card > p.sub { color: var(--muted); font-size: 13px; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--border); }
.card.flush > .card-head h2 { font-size: 13px; display: flex; gap: 8px; align-items: center; }
.card.flush > .card-head h2 svg { width: 15px; height: 15px; color: var(--primary-2); }
.card.flush > .card-body { padding: 16px; }
.grid { display: grid; gap: 12px; }
.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)); }
.g-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.align-start { align-items: start; }
.hero-card { position: relative; overflow: hidden; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card::after {
  content: ""; position: absolute; right: -140px; top: -160px; width: 400px; height: 400px; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 59, 78, .16), transparent 64%);
}
.hero-card.money::after { background: radial-gradient(circle, rgba(53, 214, 164, .14), transparent 64%); }
.dash-money { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-money .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.prices-grid { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); }
.mt { margin-top: 12px; }
.mt-l { margin-top: 24px; }

.hint-q {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; cursor: help;
  border: 1px solid var(--border-strong); color: var(--muted); font: 600 9px/1 var(--sans); margin-left: 6px; vertical-align: 1px;
}
.kicker { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; }
.kicker.green { color: var(--muted); }
.big { font: 700 44px/1.1 var(--disp); letter-spacing: -1.5px; margin: 10px 0 6px; }
.sub-line { color: var(--muted); font-size: 11.5px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font: 500 12px/1 var(--sans); }
.delta svg { width: 13px; height: 13px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }

.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; min-width: 0; position: relative; }
.stat .label { display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 500; }
.stat .value { font: 600 20px/1.25 var(--disp); margin-top: 8px; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .hint { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.stat .corner { position: absolute; right: 14px; bottom: 16px; }
.stat.blue .value { color: var(--text); }
.stat.green .value { color: var(--text); }
.card .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 18px; }

/* «Сейчас» — полоса текущих показателей */
.now { display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; gap: 0; }
.now > b { display: flex; align-items: center; font: 700 11px/1 var(--disp); color: var(--primary-2); letter-spacing: 1.2px; padding-right: 16px; margin-right: 8px; border-right: 1px solid var(--border); white-space: nowrap; }
.now > div { flex: 1; padding: 0 16px; min-width: 0; }
.now span { display: block; color: var(--muted); font-size: 12px; }
.now strong { font: 700 15px/1.6 var(--mono); }
.now small { color: var(--muted); font-size: 11.5px; }
.now strong.amber { color: var(--amber); }

/* ---------- segmented / chips ---------- */
.seg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: none; color: var(--text); font: 500 12px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.seg button:hover { background: var(--hover); }
.seg button.on { background: linear-gradient(100deg, var(--primary), #E02338); color: #fff; box-shadow: 0 4px 14px var(--primary-glow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--input); border: 1px dashed var(--border-strong); color: var(--text); font: 500 12px/1 var(--sans);
}
.chip b { color: var(--muted); font: 500 11px/1 var(--mono); }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--primary-soft); border: 1px solid rgba(255, 59, 78, .45); color: var(--text); }
.chip.on b { color: var(--primary-2); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; font: 500 11px/1 var(--sans); white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { color: var(--green); background: var(--green-bg); border-color: rgba(53, 214, 164, .25); }
.b-red { color: var(--red); background: var(--red-bg); border-color: rgba(255, 59, 78, .28); }
.b-amber { color: var(--amber); background: var(--amber-bg); border-color: rgba(245, 180, 84, .25); }
.b-blue { color: var(--blue); background: var(--blue-bg); border-color: rgba(96, 165, 250, .25); }
.b-gray { color: var(--muted); background: var(--input); border-color: var(--border); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--text); font-size: 13px; font-weight: 500; }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r-sm); outline: none;
  background: var(--input); border: 1px solid var(--border-strong); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: rgba(255, 59, 78, .55); box-shadow: 0 0 0 3px rgba(255, 59, 78, .12); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%23A8A8A8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select option { background: var(--card); }
.textarea { height: auto; min-height: 200px; padding: 10px 12px; resize: vertical; font: 13px/1.6 var(--mono); }
.input-group { display: flex; align-items: center; background: var(--input); border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.input-group:focus-within { border-color: rgba(255, 59, 78, .55); box-shadow: 0 0 0 3px rgba(255, 59, 78, .12); }
.input-group .input { border: 0; box-shadow: none !important; background: none; font-family: var(--mono); }
.input-group > span { padding: 0 12px; color: var(--muted); white-space: nowrap; }
.input.big-input { height: 48px; font: 600 20px/1 var(--mono); }
.search { position: relative; flex: 1 1 240px; max-width: 320px; }
.search svg { position: absolute; left: 10px; top: 10px; width: 15px; height: 15px; color: var(--muted); }
.search .input { padding-left: 32px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.form-grid { display: grid; gap: 14px; }

.switch { position: relative; display: inline-flex; width: 36px; height: 20px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--hover); border: 1px solid var(--border-strong); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + i { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:disabled + i { opacity: .4; cursor: not-allowed; }

input[type=range] { width: 100%; accent-color: var(--primary); }

/* ползунок наценки — как в vargo: заливка до бегунка, круглый бегунок */
.markup-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 20px 0 8px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--primary), var(--primary-2)) 0 / var(--fill, 0%) 100% no-repeat, var(--hover);
}
.markup-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 59, 78, .16), 0 2px 6px rgba(0, 0, 0, .45); cursor: grab;
}
.markup-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 59, 78, .16), 0 2px 6px rgba(0, 0, 0, .45); cursor: grab;
}
.markup-range::-moz-range-track { background: transparent; }
.markup-range:active::-webkit-slider-thumb { cursor: grabbing; box-shadow: 0 0 0 7px rgba(255, 59, 78, .22), 0 2px 6px rgba(0, 0, 0, .45); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font: 11px/1 var(--mono); }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.presets button {
  height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--card-2);
  color: var(--text); font: 500 12.5px/1 var(--mono); cursor: pointer; transition: background .15s, border-color .15s;
}
.presets button:hover { background: #1C2030; }
.presets button.on { background: var(--primary-soft); border-color: rgba(255, 59, 78, .6); }
.price-table td.num b { font: 600 13px/1 var(--mono); }
.price-edit { width: 26px; height: 26px; margin-left: 8px; vertical-align: middle; border-color: transparent; color: var(--faint); }
tr:hover .price-edit, .price-edit:focus-visible { color: var(--text); border-color: var(--border-strong); }
.price-edit svg { width: 13px; height: 13px; }
.price-edit-gap { display: inline-block; width: 34px; }
.price-editor { display: inline-flex; gap: 6px; align-items: center; }
.price-editor .input-group { width: 120px; }
.price-editor .icon-btn { width: 30px; height: 30px; }
.inline-ico { display: inline; width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--text); font-size: 12px; font-weight: 500; padding: 0 12px; height: 40px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
th.num, td.num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
th.num { font-family: var(--sans); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user .ava { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--hover); font: 600 11px/1 var(--sans); color: var(--text); }
.cell-user b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cell-user span { color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.table-foot { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 12px; flex-wrap: wrap; }
.table-foot .spacer { flex: 1; }

/* ---------- lists ---------- */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow span { color: var(--muted); font-size: 12px; }
.list-item .end { text-align: right; white-space: nowrap; }
.list-item .end b { display: block; font: 600 13px/1.4 var(--mono); }
.list-item .end span { color: var(--muted); font-size: 11.5px; }
.ico { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--hover); color: var(--muted); }
.ico svg { width: 16px; height: 16px; }
.ico.green { background: var(--green-bg); color: var(--green); }
.ico.red { background: var(--red-bg); color: var(--red); }
.ico.amber { background: var(--amber-bg); color: var(--amber); }
.ico.blue { background: var(--blue-bg); color: var(--blue); }

/* checklist */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--border); }
.step:hover { background: var(--hover); }
.step .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--border-strong); margin-top: 1px; }
.step.done .dot { background: var(--green); border-color: var(--green); color: #06251B; }
.step.done .dot svg { width: 11px; height: 11px; }
.step b { display: block; font-weight: 500; font-size: 13px; }
.step span { color: var(--muted); font-size: 12px; }
.step.done b { color: var(--muted); text-decoration: line-through; }
.progress { height: 4px; border-radius: 99px; background: var(--hover); overflow: hidden; width: 110px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: inherit; }

/* bot cards */
.bot-card { display: flex; flex-direction: column; gap: 14px; }
.bot-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.bot-ava { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font: 700 15px/1 var(--disp); color: #fff; background: linear-gradient(140deg, var(--primary), var(--primary-deep)); box-shadow: 0 6px 16px rgba(255, 59, 78, .22); }
.bot-top .grow { flex: 1; min-width: 0; }
.bot-top b { display: block; font: 600 15px/1.3 var(--disp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-top b .badge { vertical-align: 2px; margin-left: 6px; }
.bot-top span { color: var(--muted); font-size: 12.5px; }
.bot-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bot-nums div { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.bot-nums span { display: block; color: var(--muted); font-size: 11.5px; }
.bot-nums b { font: 600 14px/1.5 var(--mono); white-space: nowrap; }
.bot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--amber-bg); border: 1px solid rgba(250, 204, 21, .25); }
.alert svg { width: 17px; height: 17px; color: var(--amber); margin-top: 1px; }
.alert.red { background: var(--red-bg); border-color: rgba(248, 113, 113, .25); }
.alert.red svg { color: var(--red); }
.alert.blue { background: var(--input); border-color: var(--border); }
.alert.blue svg { color: var(--muted); }
.alert b { display: block; margin-bottom: 2px; font-weight: 600; }
.alert p { color: var(--muted); font-size: 13px; }
.howto { display: grid; gap: 10px; counter-reset: s; }
.howto li { list-style: none; display: flex; gap: 12px; color: var(--muted); }
.howto li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); font: 700 11px/1 var(--disp); }
.howto b { color: var(--text); font-weight: 600; }

/* ---------- empty / skeleton ---------- */
.empty { text-align: center; padding: 32px 16px; }
.empty .ico { margin: 0 auto 12px; width: 44px; height: 44px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-2); }
.empty .ico svg { width: 18px; height: 18px; }
.empty b { display: block; font: 600 14.5px/1.3 var(--disp); margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto; font-size: 13px; }
.empty .btn { margin-top: 14px; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: sh 1.3s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- chart ---------- */
.chart { position: relative; height: 240px; }
.chart.spark { height: 64px; margin-top: 14px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 400 11px var(--sans); }
.chart .bar { fill: rgba(255, 59, 78, .3); }
.chart .bar.hover { fill: rgba(255, 59, 78, .55); }
.chart .line { fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#spark-fill); }
.chart .dot { fill: var(--lime); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 170px;
  background: var(--card-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-size: 12px; transform: translate(-50%, -100%);
}
.tip b { display: block; margin-bottom: 6px; font-weight: 600; }
.tip div { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.tip div i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.tip div span { color: var(--text); font-family: var(--mono); }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.bars-h { display: grid; gap: 14px; }
.bar-h { display: grid; gap: 6px; }
.bar-h .top-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.bar-h .top-line b { font-weight: 500; }
.bar-h .track { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.bar-h .track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }

/* ---------- editor & telegram preview ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fmt-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.fmt-bar button { height: 28px; min-width: 30px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--input); color: var(--text); cursor: pointer; font-size: 12.5px; }
.fmt-bar button:hover { background: var(--hover); }
.fmt-bar button.on { background: var(--primary-soft); color: var(--text); border-color: rgba(255, 59, 78, .5); }
.fmt-bar button:disabled { opacity: .4; cursor: not-allowed; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.vars button { padding: 3px 8px; border-radius: 6px; border: 1px dashed var(--border-strong); background: none; color: var(--muted); cursor: pointer; font: 12px/1.4 var(--mono); }
.vars button:hover { color: var(--text); border-color: var(--muted); }
.tg {
  border-radius: 12px; padding: 16px; min-height: 200px;
  background: #0E1621; border: 1px solid var(--border);
}
.tg-label { color: var(--muted); font-size: 12px; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.tg-label svg { width: 14px; height: 14px; }
.tg-bubble {
  max-width: 100%; display: inline-block; padding: 9px 12px 8px; border-radius: 4px 14px 14px 14px;
  background: #182533; color: #F5F5F5; font: 14.5px/1.42 var(--sans); white-space: pre-wrap; word-break: break-word;
}
.wysiwyg {
  min-height: 220px; max-height: 560px; overflow-y: auto; padding: 12px 14px; border-radius: 10px; outline: none;
  background: #182533; border: 1px solid var(--border-strong); color: #F5F5F5;
  font: 14.5px/1.45 var(--sans); white-space: pre-wrap; word-break: break-word;
  transition: border-color .15s, box-shadow .15s;
}
.wysiwyg:focus { border-color: rgba(255, 59, 78, .55); box-shadow: 0 0 0 3px rgba(255, 59, 78, .12); }
.wysiwyg:empty::before { content: attr(data-placeholder); color: rgba(255, 255, 255, .35); }
.tg-bubble a, .wysiwyg a { color: #6AB3F3; }
.tg-bubble code, .wysiwyg code { font: 13px var(--mono); color: #E8A0BF; }
.tg-bubble pre, .wysiwyg pre { font: 13px var(--mono); background: rgba(0, 0, 0, .25); padding: 8px 10px; border-radius: 8px; margin: 2px 0; white-space: pre-wrap; }
.tg-bubble blockquote, .wysiwyg blockquote { border-left: 3px solid #6AB3F3; background: rgba(106, 179, 243, .1); padding: 4px 10px; border-radius: 4px; margin: 2px 0; }
.tg-bubble .spoiler { background: rgba(255, 255, 255, .22); color: transparent; border-radius: 4px; cursor: pointer; }
.tg-bubble .spoiler.shown { background: none; color: inherit; }
.wysiwyg .spoiler { background: rgba(255, 255, 255, .13); border-radius: 4px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .35); }
.tg-bubble .temoji, .wysiwyg .temoji { text-decoration: underline dotted rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; overflow-x: auto; max-width: 100%; }
.tabs button { height: 28px; padding: 0 12px; background: none; border: 0; border-radius: var(--r-sm); color: var(--text); cursor: pointer; font: 500 12.5px/1 var(--sans); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { background: var(--hover); }
.tabs button.on { background: linear-gradient(100deg, var(--primary), #E02338); color: #fff; box-shadow: 0 4px 14px var(--primary-glow); }
.tabs button.on .badge, .tabs button.on .faint { color: var(--on-primary); }

/* warmup */
.notice { border: 1px solid var(--border); border-radius: 10px; }
.notice + .notice { margin-top: 8px; }
.notice-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.notice-head .grow { flex: 1; min-width: 0; }
.notice-head b { font-weight: 500; }
.notice-head span { display: block; color: var(--muted); font-size: 12px; }
.notice-body { padding: 14px; border-top: 1px solid var(--border); }

/* audience options */
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer; background: none; border: 1px solid var(--border); text-align: left; }
.option b { font-weight: 500; font-size: 13.5px; }
.option span { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.option:hover { background: var(--hover); }
.option.on { border-color: rgba(255, 59, 78, .6); background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(255, 59, 78, .35); }
.option:disabled { opacity: .4; cursor: not-allowed; }

/* key box */
.keybox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--input); border: 1px solid var(--border-strong); font: 12.5px/1.5 var(--mono); word-break: break-all; }
.keybox span { flex: 1; }
.keybox > svg { width: 16px; height: 16px; color: var(--muted); }

/* ---------- modal / drawer / toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .16s; max-height: calc(100vh - 32px); overflow-y: auto; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal h3 { font: 600 16px/1.3 var(--disp); margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 13.5px; }
.modal .row.end { margin-top: 18px; }
.drawer-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); animation: fade .15s; }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(500px, 100%); background: var(--bg); border-left: 1px solid var(--border); overflow-y: auto; padding: 20px; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-head b { display: block; font: 600 16px/1.3 var(--disp); overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--border-strong); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: pop .18s; font-size: 13.5px; }
.toast svg { width: 16px; height: 16px; margin-top: 2px; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
}
.login::after { content: ""; position: absolute; width: 640px; height: 640px; left: 50%; top: 40%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255, 59, 78, .16), transparent 62%); pointer-events: none; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 410px; background: rgba(16, 18, 25, .92); border: 1px solid var(--border-strong); border-radius: 22px; padding: 30px 26px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.login-card .brand { justify-content: center; margin-bottom: 24px; text-align: left; }
.login-card h1 { font: 700 22px/1.25 var(--disp); letter-spacing: -.5px; margin-bottom: 8px; }
.login-card > p { color: var(--muted); margin-bottom: 22px; font-size: 13.5px; }
.login-code { font: 700 38px/1 var(--disp); letter-spacing: 10px; margin: 6px 0 4px 10px; }
.login-wait { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin: 18px 0 6px; font-size: 13px; }
.login-foot { margin-top: 18px; color: var(--muted); font-size: 12px; }
.tg-btn { color: #fff; background: linear-gradient(100deg, var(--primary), #E02338); box-shadow: 0 8px 22px var(--primary-glow); }
.tg-btn:hover { transform: translateY(-1px); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search { width: 200px; }
}
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .dash-money, .prices-grid { grid-template-columns: minmax(0, 1fr); }
  .now { flex-wrap: wrap; row-gap: 12px; }
  .now > b { width: 100%; border: 0; padding: 0; margin: 0 0 4px; }
  .now > div { flex: 1 1 40%; padding: 0; }
}
@media (max-width: 960px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; z-index: 70; width: 270px; transform: translateX(-100%); transition: transform .22s; border-right: 1px solid var(--border); visibility: visible !important; }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .6); }
  .top { padding: 0 16px; }
  .top-inner { gap: 8px; }
  .top-search, .top .sep { display: none; }
  .view { padding: 18px 16px 48px; }
  .page-title { padding: 22px 16px 0; }
  .g2, .g3, .editor, .options { grid-template-columns: minmax(0, 1fr); }
  .big { font-size: 36px; }
}
@media (max-width: 620px) {
  .switcher select { max-width: 150px; }
  .chip-balance span { display: none; }
  .g4, .bot-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 6px; }
  .page-title h1 { font-size: 21px; }
  .stat .corner { position: static; margin-top: 6px; }
}
