/* WEBISMS 3 — дизайн-система.
   Мотив: SIM-карта. Срезанный угол и золотой «чип» — только у телефонов и ключевых акцентов,
   всё остальное спокойное: графит, шалфейный фон, глубокий бирюзовый для действий. */

:root {
  --ink: #1b2420;
  --ink-2: #2a3530;
  --paper: #f2f4ef;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --line: #dde2da;
  --line-2: #c9d0c5;
  --muted: #66706a;
  --teal: #0e5e57;
  --teal-2: #0a4842;
  --teal-soft: #e1eeeb;
  --gold: #c9a227;
  --gold-soft: #f6eccb;
  --ok: #1f7a4d;
  --ok-soft: #e0f0e6;
  --warn: #9a630a;
  --warn-soft: #fbefd6;
  --bad: #b4382a;
  --bad-soft: #f8e3df;
  --side: #1b2420;
  --side-text: #c3ccc5;
  --side-muted: #7f8b84;
  --focus: 0 0 0 3px rgba(14, 94, 87, .28);
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 6px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7ece7; --ink-2: #cdd5cf; --paper: #121815; --surface: #19211d; --surface-2: #1e2723;
    --line: #2c3631; --line-2: #3a4640; --muted: #93a098; --teal: #3fb3a4; --teal-2: #6cc8bb; --teal-soft: #173430;
    --gold: #d8b440; --gold-soft: #3a3218; --ok: #5bc48a; --ok-soft: #173826; --warn: #e0a64a; --warn-soft: #3b2c12;
    --bad: #ec7b6c; --bad-soft: #3d1d18; --side: #0d1210; --side-text: #c3ccc5; --side-muted: #75817a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e7ece7; --ink-2: #cdd5cf; --paper: #121815; --surface: #19211d; --surface-2: #1e2723;
  --line: #2c3631; --line-2: #3a4640; --muted: #93a098; --teal: #3fb3a4; --teal-2: #6cc8bb; --teal-soft: #173430;
  --gold: #d8b440; --gold-soft: #3a3218; --ok: #5bc48a; --ok-soft: #173826; --warn: #e0a64a; --warn-soft: #3b2c12;
  --bad: #ec7b6c; --bad-soft: #3d1d18; --side: #0d1210; --side-text: #c3ccc5; --side-muted: #75817a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); font-feature-settings: "tnum" 0; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 .9em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
pre { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; overflow-x: auto; margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 252px, transparent 252px); }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand .wordmark { font-weight: 700; font-size: 21px; letter-spacing: -.03em; line-height: 1; }
.brand .logo-mark { flex: none; }
.brand-mark { width: 26px; height: 32px; background: var(--gold); clip-path: polygon(0 0, 68% 0, 100% 24%, 100% 100%, 0 100%); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 6px; top: 12px; width: 14px; height: 11px; border-radius: 2px; border: 1.5px solid rgba(27,36,32,.55); }
.nav { padding: 4px 10px 20px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-title { color: var(--side-muted); font-size: 12.5px; padding: 0 12px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; color: var(--side-text); padding: 7px 12px; border-radius: 8px; font-size: 14.5px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.09); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav .count { margin-left: auto; background: var(--gold); color: #1b2420; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.side-foot { padding: 14px 20px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: var(--side-muted); }
.side-foot a { color: var(--side-text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.top .burger { display: none; }
.top-spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--ink); background: var(--surface); white-space: nowrap; }
a.chip:hover { border-color: var(--line-2); text-decoration: none; }
.chip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.usage { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
.usage .meter { width: 120px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; padding: 4px; border-radius: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 220px; padding: 6px; display: none; box-shadow: 0 12px 30px rgba(20, 30, 25, .14); }
.menu.open { display: block; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.menu .sep { height: 1px; background: var(--line); margin: 6px 0; }

.content { padding: 28px 32px 48px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head .lead { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.imp-bar { background: var(--gold-soft); color: var(--ink); padding: 8px 32px; font-size: 14px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }

/* ---------- блоки ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head .actions { margin-left: auto; display: flex; gap: 8px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: 18px 22px 0; margin: 0 0 12px; }
.panel.tint { background: var(--surface-2); }
.grid { display: grid; gap: 20px; }
.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-side { grid-template-columns: minmax(0, 1fr) 340px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.right { margin-left: auto; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt { margin-top: 16px; }

.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13.5px; }
.stat .value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.15; }
.stat .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat .sub b { color: var(--ink); font-weight: 600; }

.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--teal); border-radius: 6px; }
.meter.hot > i { background: var(--warn); }
.meter.full > i { background: var(--bad); }

dl.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 550; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .nowrap { white-space: nowrap; }
.t .msg { max-width: 420px; overflow-wrap: anywhere; }
.t .chk { width: 36px; }
.panel .t th:first-child, .panel .t td:first-child { padding-left: 22px; }
.panel .t th:last-child, .panel .t td:last-child { padding-right: 22px; }
.minus { color: var(--bad); } .plus { color: var(--ok); }

/* статусы */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); background: var(--ok-soft); }
.st-wait { color: var(--warn); background: var(--warn-soft); }
.st-bad { color: var(--bad); background: var(--bad-soft); }
.st-mute { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.gold { background: var(--gold-soft); border-color: transparent; color: var(--ink); }

/* ---------- формы ---------- */
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; min-height: 40px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); }
input[readonly] { background: var(--surface-2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }
.input-group { display: flex; gap: 0; }
.input-group input { border-radius: 8px 0 0 8px; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.counter { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 140px; flex: 0 1 auto; }
.filters input[type=search] { min-width: 230px; }
.filters input[type=date] { width: 150px; }
.filters input, .filters select { min-height: 38px; padding: 7px 10px; font-size: 14px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 550; padding: 9px 16px; min-height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ink-2); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-2); border-color: var(--teal-2); }
:root[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { color: #fff; }
.btn-danger { color: var(--bad); border-color: var(--bad-soft); background: var(--bad-soft); }
.btn-danger:hover { border-color: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--teal); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
form.inline { display: inline; }

/* ---------- сообщения ---------- */
.alert { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14.5px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--teal-soft); color: var(--teal-2); }
:root[data-theme="dark"] .alert-info { color: var(--teal); }
.alert a { color: inherit; text-decoration: underline; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty .btn { margin-top: 8px; }

/* ---------- вкладки ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 550; font-size: 14.5px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--teal); }

/* ---------- телефоны: SIM-карта ---------- */
.sims { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sim { background: var(--surface); border: 1px solid var(--line); padding: 20px 20px 16px; position: relative; clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%); border-radius: var(--r-lg) 0 var(--r-lg) var(--r-lg); }
.sim::after { content: ""; position: absolute; right: 0; top: 0; width: 48px; height: 48px; background: linear-gradient(225deg, var(--line) 0 50%, transparent 50%); pointer-events: none; }
.sim-top { display: flex; gap: 14px; align-items: flex-start; }
.sim-chip { width: 38px; height: 30px; border-radius: 6px; background: var(--gold); flex: none; position: relative; overflow: hidden; }
.sim-chip::before, .sim-chip::after { content: ""; position: absolute; background: rgba(27, 36, 32, .35); }
.sim-chip::before { left: 12px; right: 12px; top: 0; bottom: 0; width: 1.5px; margin: 0 auto; box-shadow: -7px 0 0 rgba(27,36,32,.35), 7px 0 0 rgba(27,36,32,.35); }
.sim-chip::after { left: 0; right: 0; top: 14px; height: 1.5px; }
.sim.off .sim-chip { background: var(--line-2); }
.sim-name { font-weight: 650; font-size: 16px; line-height: 1.25; }
.sim-phone { font-variant-numeric: tabular-nums; color: var(--ink-2); margin-top: 2px; }
.sim-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sim-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.sim-stats div { font-size: 12.5px; color: var(--muted); }
.sim-stats b { display: block; font-size: 18px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sim-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; margin-right: 2px; }
.signal i { width: 3px; background: currentColor; border-radius: 1px; opacity: .25; }
.signal i:nth-child(1) { height: 4px; } .signal i:nth-child(2) { height: 7px; } .signal i:nth-child(3) { height: 10px; } .signal i:nth-child(4) { height: 14px; }
.signal.on i { opacity: 1; }
.online { color: var(--ok); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.offline { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.sim.add { display: grid; place-items: center; text-align: center; color: var(--muted); border-style: dashed; min-height: 230px; background: transparent; }
.sim.add::after { display: none; }

.key-box { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px 16px; font-family: var(--mono); font-size: 20px; letter-spacing: .04em; overflow-x: auto; }
.key-box .btn { margin-left: auto; font-family: var(--font); letter-spacing: 0; font-size: 13.5px; background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; display: inline-flex; gap: 8px; align-items: center; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.copy { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 2px; display: inline-flex; }
.copy:hover { color: var(--teal); }
ol.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 16px 40px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 13px; display: grid; place-items: center; }

/* ---------- тарифы ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; position: relative; }
.plan.hl { border-color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
.plan.current { border-color: var(--teal); }
.plan h3 { font-size: 18px; margin-bottom: 4px; }
.plan .price { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 7px; font-size: 14px; }
.plan li { display: flex; gap: 8px; }
.plan li .icon { color: var(--teal); width: 16px; height: 16px; margin-top: 2px; }
.plan li.no { color: var(--muted); }
.plan li.no .icon { color: var(--muted); }
.plan .btn { margin-top: auto; }
.period-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--surface); }
.period-switch a { padding: 6px 16px; border-radius: 999px; color: var(--muted); font-weight: 550; font-size: 14px; }
.period-switch a.on { background: var(--ink); color: var(--paper); text-decoration: none; }
.period-switch a:hover { text-decoration: none; }

/* ---------- графики ---------- */
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: var(--teal); }
.chart .bar.b2 { fill: var(--bad); }
.chart .bar.b3 { fill: var(--gold); }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- модальные окна ---------- */
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; max-width: 560px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(10, 20, 15, .3); }
dialog.modal::backdrop { background: rgba(20, 28, 24, .45); }
.modal-head { display: flex; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { margin: 0; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 16px 22px 22px; }

.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 14px 22px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pager a, .pager span.cur { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; color: var(--ink); }
.pager span.cur { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager a:hover { text-decoration: none; border-color: var(--line-2); }

.bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 520px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log { margin: 0; padding-left: 18px; font-size: 14px; }
.steps-inline { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }

/* ---------- вход и регистрация ---------- */
.auth-body { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); }
.auth-aside { background: var(--side); color: var(--side-text); padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-aside .brand { padding: 0; }
.auth-aside h2 { color: #fff; font-size: 30px; margin-top: auto; max-width: 15ch; line-height: 1.15; }
.auth-aside p { max-width: 42ch; }
.auth-aside .big-sim { position: absolute; right: -60px; top: 18%; width: 260px; height: 330px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); border-radius: 18px; }
.auth-aside .big-sim::after { content: ""; position: absolute; left: 50px; top: 120px; width: 110px; height: 86px; border-radius: 12px; background: var(--gold); opacity: .9; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
body.auth-body > .auth-card { margin: 48px auto; grid-column: 1 / -1; padding: 0 16px; }
.auth-card h1 { font-size: 28px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg label { text-align: center; padding: 9px 6px; font-size: 13.5px; cursor: pointer; border-right: 1px solid var(--line-2); font-weight: 550; color: var(--muted); }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--ink); }
.seg label:has(input:checked) { background: var(--teal-soft); color: var(--teal-2); }

/* ---------- адаптивность ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: 1fr; }
  .usage { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 16, 13, .45); }
  .top { padding: 10px 16px; }
  .top .burger { display: inline-flex; }
  .content { padding: 20px 16px 40px; }
  .imp-bar { padding: 8px 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .form.cols { grid-template-columns: 1fr; }
  .auth-body { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .hide-m { display: none !important; }
  .table-wrap .t { min-width: 600px; }
  .t .msg { min-width: 180px; }
  .grid { gap: 12px; }
  .grid > .panel { margin-bottom: 0; }
  .grid { margin-bottom: 12px; }
  h1 { font-size: 22px; }
  .panel { padding: 16px; }
  .panel .t th:first-child, .panel .t td:first-child { padding-left: 16px; }
  .panel .t th:last-child, .panel .t td:last-child { padding-right: 16px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 22px; }
  .page-head .actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .top, .page-head .actions { display: none; } .shell { display: block; } }

/* ---------- публичный сайт ---------- */
body.pub { background: var(--surface); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.pub-head { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; }
.pub-nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.pub-head .brand { color: var(--ink); padding: 0; }
.pub-links { display: flex; gap: 22px; }
.pub-links a, .pub-login { color: var(--ink-2); font-size: 15px; }
.pub-links a.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); }
.pub-spacer { flex: 1; }
.pub-burger { display: none; }
.pub-foot { background: var(--paper); border-top: 1px solid var(--line); margin-top: 40px; }
.pub-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 28px; padding: 44px 24px 24px; }
.pub-foot h4 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 4px 0 12px; }
.pub-foot-grid a:not(.brand) { display: block; color: var(--ink-2); font-size: 14.5px; margin-bottom: 8px; }
.pub-foot .brand { color: var(--ink); padding: 0; }
.pub-legal { color: var(--muted); font-size: 13px; padding: 16px 24px 32px; border-top: 1px solid var(--line); }
.crumbs { font-size: 14px; color: var(--muted); margin: 28px 0 10px; }
.crumbs a { color: var(--muted); }
.prose { font-size: 17px; line-height: 1.65; max-width: 72ch; }
.prose h2 { font-size: 24px; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 19px; margin: 1.3em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; border-left: 3px solid var(--gold); color: var(--ink-2); }
.prose pre { font-size: 13.5px; }
.page-title { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.025em; line-height: 1.08; margin: 6px 0 16px; max-width: 22ch; }
.page-lead { font-size: 19px; color: var(--ink-2); max-width: 62ch; margin-bottom: 28px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; color: var(--ink); background: var(--surface); }
.news-card:hover { text-decoration: none; border-color: var(--line-2); }
.news-card h3 { font-size: 18px; margin: 10px 0 8px; line-height: 1.3; }
.news-card p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.news-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-top: auto; }
.news-card.big { grid-column: span 2; background: var(--side); color: #fff; border-color: var(--side); }
.news-card.big h3 { font-size: 26px; color: #fff; }
.news-card.big p, .news-card.big .news-meta { color: var(--side-text); }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.cat-tabs a { padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 14px; }
.cat-tabs a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cat-tabs a:hover { text-decoration: none; }
.sol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.cta-band { background: var(--side); color: var(--side-text); border-radius: var(--r-lg); padding: 34px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 40px 0; }
.cta-band h2 { color: #fff; margin: 0; font-size: 24px; flex: 1; min-width: 240px; }
.cta-band .btn-primary { background: var(--gold); border-color: var(--gold); color: #1b2420; }
@media (max-width: 900px) {
  .pub-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--line); gap: 14px; }
  body.pub-open .pub-links { display: flex; }
  .pub-burger { display: inline-flex; }
  .pub-login { display: none; }
  .pub-nav .btn-primary { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.big { grid-column: auto; }
  .pub-foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .pub-foot-grid { grid-template-columns: 1fr; } .wrap { padding: 0 16px; } }

/* ---------- главная ---------- */
.hero { background: var(--side); color: var(--side-text); overflow: hidden; }
  .hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
  .hero h1 { color: #fff; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 20px; font-weight: 700; max-width: 16ch; }
  .hero p.lead { font-size: 18px; max-width: 46ch; color: #c3ccc5; margin-bottom: 28px; }
  .hero .btn-primary { background: var(--gold); border-color: var(--gold); color: #1b2420; }
  .hero .btn-primary:hover { background: #ddb53a; border-color: #ddb53a; }
  .hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
  .facts { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; font-size: 14px; color: #93a19a; }
  .facts b { display: block; color: #fff; font-size: 22px; font-weight: 650; }
  /* телефон с очередью */
  .device { justify-self: center; width: 330px; background: #0f1513; border-radius: 40px; padding: 14px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 80px rgba(0,0,0,.35); }
  .screen { background: #f2f4ef; border-radius: 28px; padding: 18px 16px 22px; color: #1b2420; min-height: 520px; }
  .screen-top { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 16px; }
  .screen-top .sim-chip { width: 28px; height: 22px; border-radius: 4px; }
  .screen-top b { font-size: 15px; }
  .q { background: #fff; border: 1px solid #dde2da; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; }
  .q .to { display: flex; justify-content: space-between; color: #66706a; font-size: 12px; margin-bottom: 3px; }
  .q.go { animation: slide 4.5s ease-in-out infinite; }
  @keyframes slide { 0%, 70% { transform: none; opacity: 1; } 85% { transform: translateX(16px); opacity: 0; } 86% { transform: translateX(-10px); opacity: 0; } 100% { transform: none; opacity: 1; } }
  section.block { padding: 72px 0; }
  section.block h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; max-width: 22ch; margin-bottom: 14px; }
  .sub-lead { color: var(--muted); font-size: 17px; max-width: 60ch; margin-bottom: 36px; }
  .how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .how div { border-top: 2px solid var(--ink); padding-top: 18px; }
  .how .n { font-family: var(--mono); color: var(--muted); font-size: 13px; }
  .how h3 { font-size: 19px; margin: 8px 0; }
  .uses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .use { background: var(--paper); border-radius: var(--r-lg); padding: 26px; }
  .use h3 { font-size: 19px; }
  .use pre { background: var(--surface); margin: 14px 0 0; font-size: 12.5px; }
  .docs-band { background: var(--paper); }
  .docs-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .docs-list div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
  .docs-list b { display: block; margin-bottom: 4px; }
  details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
  details.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
  details.faq p { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
  @media (max-width: 900px) {
    .hero-grid, .how, .uses, .docs-list { grid-template-columns: 1fr; }
    .device { width: 100%; max-width: 330px; }
  }
  @media (prefers-reduced-motion: reduce) { .q.go { animation: none; } }
.news-card .tag { align-self: flex-start; }
.hero-grid > *, .uses > *, .how > *, .docs-list > *, .pub-foot-grid > *, .news-grid > *, .sol-grid > * { min-width: 0; }
.use pre { white-space: pre-wrap; word-break: break-all; }
body.pub { overflow-x: hidden; }
@media (max-width: 520px) { .device { width: 100%; max-width: 300px; } .facts { gap: 18px; } .pub-nav { gap: 12px; } }
