/* OneSave Admin — стили. Токены сняты с site/index.html. */
:root {
  --navy: #041324;
  --navy-soft: #0A1E33;
  --navy-lift: #102942;
  --ink: #EAF2FA;
  --muted: #8AA0B8;
  --edge: rgba(138,160,184,.18);
  --edge-strong: rgba(138,160,184,.34);
  --cyan: #3AD3E4;
  --cyan-deep: #00A9C9;
  --orange: #FF6A2B;
  --green: #46D39A;
  --red: #FF5C6C;
  --yellow: #FFC857;
  --on-accent: #04202A;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2,.7,.3,1);
  --side-w: 248px;
  --skeleton: linear-gradient(90deg, rgba(138,160,184,.10) 25%, rgba(138,160,184,.22) 50%, rgba(138,160,184,.10) 75%);
  /* графики: категориальные (валидировано на тёмной поверхности) */
  --c1: #1BA3B9; --c2: #EE5E2E; --c3: #27AE7C; --c4: #9B7CF0;
  --grid: rgba(138,160,184,.14);
  --tick: #8AA0B8;
}
:root[data-theme="light"] {
  --navy: #F3F7FB;
  --navy-soft: #FFFFFF;
  --navy-lift: #E8EFF6;
  --ink: #0B1C2E;
  --muted: #5B7088;
  --edge: rgba(11,28,46,.10);
  --edge-strong: rgba(11,28,46,.22);
  --cyan: #0097B4;
  --cyan-deep: #007C94;
  --orange: #E0531A;
  --green: #1F9E6E;
  --red: #D83A4A;
  --yellow: #B8860B;
  --on-accent: #FFFFFF;
  --shadow: 0 10px 30px rgba(11,28,46,.12);
  --skeleton: linear-gradient(90deg, rgba(11,28,46,.06) 25%, rgba(11,28,46,.12) 50%, rgba(11,28,46,.06) 75%);
  --c1: #0097B4; --c2: #E0531A; --c3: #1F9E6E; --c4: #7B4FD8;
  --grid: rgba(11,28,46,.09);
  --tick: #5B7088;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--ink);
  font-family: var(--sans); line-height: 1.5; font-size: 15px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 520px at 50% -8%, rgba(58,211,228,.12), transparent 62%),
    radial-gradient(600px 400px at 88% 12%, rgba(255,106,43,.06), transparent 60%);
  background-repeat: no-repeat; background-attachment: fixed;
  transition: background-color .25s, color .25s;
}
:root[data-theme="light"] body {
  background-image:
    radial-gradient(900px 520px at 50% -8%, rgba(0,151,180,.10), transparent 62%),
    radial-gradient(600px 400px at 88% 12%, rgba(224,83,26,.05), transparent 60%);
}
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.small-text { font-size: 13px; }
em { font-style: normal; color: var(--cyan); }

/* ---------------- Экран входа ---------------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; text-align: center; padding: 36px 28px 20px;
  background: var(--navy-soft); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow);
  animation: pop .5s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.login-logo { width: 84px; height: 84px; border-radius: 24px; display: block; margin: 0 auto 14px;
  animation: logo-in .7s var(--ease) both; box-shadow: 0 10px 30px rgba(58,211,228,.22); }
@keyframes logo-in { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); } 60% { transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
.login-name { font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-bottom: 22px; }
.login-name span { color: var(--muted); font-weight: 500; font-size: 17px; margin-left: 4px; }
.login-step { animation: fade .25s var(--ease) both; }
.login-hint { color: var(--muted); margin: 10px 0 14px; }
.login-icon { font-size: 36px; }
.login-error { color: var(--red); font-size: 14px; margin: 10px 0 0; }
.login-foot { margin-top: 20px; }
.login .spin { margin: 10px auto 0; }
.spin { width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 2.5px solid rgba(138,160,184,.3); border-top-color: var(--cyan); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Каркас ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 14px;
  background: var(--navy-soft); border-right: 1px solid var(--edge);
  transition: transform .25s var(--ease);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side-brand img { width: 34px; height: 34px; border-radius: 10px; }
.side-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; flex: 1; }
.icon-btn.side-close { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 550; font-size: 14.5px; transition: background .15s, color .15s;
}
.side-nav a .ico { width: 20px; text-align: center; font-size: 15px; opacity: .85; }
.side-nav a:hover { background: var(--navy-lift); color: var(--ink); }
.side-nav a.active { background: linear-gradient(135deg, rgba(58,211,228,.18), rgba(0,169,201,.10)); color: var(--cyan); }
.side-nav .badge { margin-left: auto; }
.side-foot { padding-top: 12px; border-top: 1px solid var(--edge); display: flex; flex-direction: column; gap: 10px; }
.side-user { font-size: 13px; color: var(--muted); padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(2,9,15,.55); z-index: 40; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: color-mix(in srgb, var(--navy) 82%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--edge);
}
.page-title { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.02em; flex: 1; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn.burger { display: none; }
.content { padding: 22px 24px 48px; max-width: 1400px; width: 100%; }

/* ---------------- Кнопки, поля ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 13px; border: 1.5px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 14.5px; line-height: 1.2; background: var(--navy-lift); color: var(--ink);
  transition: filter .16s, opacity .16s, border-color .16s, background .16s, transform .1s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { color: var(--on-accent); background: linear-gradient(135deg, var(--cyan), var(--cyan-deep)); box-shadow: 0 6px 18px rgba(58,211,228,.22); }
.btn.ghost { background: transparent; border-color: var(--edge-strong); }
.btn.ghost:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.btn.danger { background: rgba(255,92,108,.14); color: var(--red); border-color: rgba(255,92,108,.3); }
.btn.success { background: rgba(70,211,154,.14); color: var(--green); border-color: rgba(70,211,154,.3); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px;
  background: var(--navy-soft); border: 1px solid var(--edge); cursor: pointer; font-size: 16px; color: var(--muted);
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.lang-btn { font-size: 12.5px; font-weight: 700; }
.link { background: none; border: none; padding: 0; color: var(--cyan); cursor: pointer; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 550; }
.field .help { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=search], textarea, .select {
  width: 100%; padding: 11px 14px; background: var(--navy-lift); color: var(--ink);
  border: 1.5px solid var(--edge); border-radius: var(--r-sm); outline: none;
  transition: border-color .16s, box-shadow .16s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(58,211,228,.14); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.small { width: auto; padding: 8px 30px 8px 12px; font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan-deep); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 100px; background: var(--navy-lift); border: 1px solid var(--edge-strong); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + i { background: var(--cyan-deep); border-color: var(--cyan-deep); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------------- Карточки, сетки ---------------- */
.card {
  background: var(--navy-soft); border: 1px solid var(--edge); border-radius: var(--r); padding: 18px 20px;
  animation: rise .35s var(--ease) both; animation-delay: var(--d, 0ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h3 { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.card h3 .muted { font-weight: 500; font-size: 13px; margin-left: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.stack { display: grid; gap: 16px; }
.kpis > *, .charts > *, .stack > *, .plans > *, .providers > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 550; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi.accent .value { color: var(--cyan); }
.kpi.warn .value { color: var(--orange); }
.kpi.ok .value { color: var(--green); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart-box { position: relative; height: 240px; }
.chart-box canvas { position: absolute; inset: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); } .c4 { background: var(--c4); }

/* сервер */
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.gauge { text-align: center; }
.gauge svg { width: 110px; height: 110px; display: block; margin: 0 auto 4px; }
.gauge .track { stroke: var(--navy-lift); }
.gauge .bar { stroke: var(--cyan); transition: stroke-dashoffset .9s var(--ease); }
.gauge.warn .bar { stroke: var(--orange); }
.gauge.bad .bar { stroke: var(--red); }
.gauge .num { font-size: 18px; font-weight: 800; fill: var(--ink); }
.gauge .cap { font-size: 12.5px; color: var(--muted); }
.gauge .cap b { display: block; color: var(--ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 100px;
  background: var(--navy-lift); border: 1px solid var(--edge); font-size: 13px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip.ok .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(70,211,154,.18); }
.chip.bad .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255,92,108,.18); }
.chip.warn .dot { background: var(--yellow); }
.chip .mono { color: var(--muted); }

/* ---------------- Таблицы ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; }
.toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--edge); background: var(--navy-soft);
  animation: rise .35s var(--ease) both; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--edge); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--navy-soft); position: sticky; top: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--navy-lift); }
tbody tr.clickable { cursor: pointer; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.pager .row { gap: 6px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 100px; font-size: 12px; font-weight: 600; background: var(--navy-lift); color: var(--muted); border: 1px solid var(--edge); white-space: nowrap; }
.tag.ok { color: var(--green); border-color: rgba(70,211,154,.35); background: rgba(70,211,154,.10); }
.tag.bad { color: var(--red); border-color: rgba(255,92,108,.35); background: rgba(255,92,108,.10); }
.tag.warn { color: var(--orange); border-color: rgba(255,106,43,.35); background: rgba(255,106,43,.10); }
.tag.info { color: var(--cyan); border-color: rgba(58,211,228,.35); background: rgba(58,211,228,.10); }
.badge { display: inline-block; min-width: 20px; padding: 2px 7px; border-radius: 100px; text-align: center;
  font-size: 11.5px; font-weight: 700; background: var(--orange); color: #fff; }
.delta-pos { color: var(--green); font-weight: 600; }
.delta-neg { color: var(--red); font-weight: 600; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------------- Скелетоны ---------------- */
.skeleton { position: relative; overflow: hidden; border-radius: 10px; background: var(--skeleton); background-size: 400% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-line { height: 14px; margin: 8px 0; }
.sk-kpi { height: 88px; border-radius: var(--r); }
.sk-chart { height: 240px; border-radius: var(--r); }
.sk-table { height: 320px; border-radius: var(--r); }

/* ---------------- Drawer ---------------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(2,9,15,.55); animation: fade .2s both; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); display: flex; flex-direction: column;
  background: var(--navy); border-left: 1px solid var(--edge); box-shadow: var(--shadow); animation: slide-in .25s var(--ease) both; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--edge); }
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 750; }
.drawer-body { padding: 18px 22px 40px; overflow-y: auto; flex: 1; }
.drawer-body .card { padding: 14px 16px; }
.kv { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--edge); overflow-x: auto; }
.tabs button { background: none; border: none; padding: 9px 12px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.subtabs { margin-bottom: 18px; }
.subtabs a { display: inline-block; padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.subtabs a:hover { color: var(--ink); }
.subtabs a.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------------- Modal ---------------- */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(2,9,15,.6); animation: fade .2s both; }
.modal { position: relative; width: 100%; max-width: 440px; background: var(--navy-soft); border: 1px solid var(--edge);
  border-radius: 20px; padding: 22px 22px 18px; box-shadow: var(--shadow); animation: pop .25s var(--ease) both; }
.modal h3 { margin: 0 0 10px; font-size: 18px; }
.modal-body { color: var(--muted); font-size: 14.5px; }
.modal-body .field { margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------------- Toasts ---------------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--navy-lift); border: 1px solid var(--edge-strong); color: var(--ink);
  font-size: 14px; box-shadow: var(--shadow); animation: toast-in .3s var(--ease) both; }
.toast.ok { border-color: rgba(70,211,154,.5); }
.toast.err { border-color: rgba(255,92,108,.6); }
.toast.out { animation: toast-out .25s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------------- Разделы ---------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.plan-card .price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.plan-card .price small { color: var(--muted); font-weight: 500; font-size: 13px; }
.plan-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.prov-type { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.err-item { border-bottom: 1px solid var(--edge); padding: 12px 0; }
.err-item:last-child { border-bottom: none; }
.err-item .head { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.err-item .head .msg { flex: 1; min-width: 0; }
.err-item .ctx { font-weight: 650; }
.err-item .text { color: var(--muted); font-size: 13.5px; word-break: break-word; }
.err-item pre { margin: 10px 0 0; padding: 12px; border-radius: var(--r-sm); background: var(--navy); border: 1px solid var(--edge);
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; color: var(--muted); }
.err-item .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.broadcast-card, .settings-card { max-width: 720px; }
.field-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0 4px; border-top: 1px solid var(--edge); cursor: pointer; }
.field-switch .help { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.field-error { font-size: 12.5px; color: var(--red); }
input.invalid, input.invalid:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,92,108,.14); }
.side-foot a.btn { text-decoration: none; }
.counter { display: inline-block; }
.pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0; }
.plan-list li { margin-bottom: 4px; }

/* ---------------- Адаптив ---------------- */
@media (max-width: 960px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-104%); box-shadow: var(--shadow); }
  .app.side-open .sidebar { transform: none; }
  .app.side-open .scrim { display: block; animation: fade .2s both; }
  .icon-btn.side-close { display: inline-grid; }
  .icon-btn.burger { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 48px; }
  .page-title { font-size: 18px; }
}
@media (max-width: 560px) {
  .top-actions #refresh { display: none; }
  .kpi .value { font-size: 24px; }
  .charts { grid-template-columns: 1fr; }
  .chart-box { height: 200px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}

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