/* ShuntVPN — Liquid Glass */
:root {
  --bg: #07021a;
  --text: #f3efff;
  --muted: #b4aad8;
  --faint: #8278ad;
  --line: rgba(255, 255, 255, .10);
  --line-soft: rgba(255, 255, 255, .07);

  --violet: #8b5cf6;
  --violet-hi: #a78bfa;
  --violet-lo: #6d28d9;

  /* данные */
  --brass: #a78bfa;     /* пришло в кассу */
  --profit: #5eead4;    /* прибыль, заработано */
  --cost: #fb7185;      /* ноды */
  --cost-2: #f0abfc;    /* остальные расходы */
  --fee: #fbbf24;       /* комиссии */
  --warn: #fcd34d;
  --ice: #c4b5fd;       /* нейтральный акцент */

  --glass: linear-gradient(145deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .035) 55%, rgba(255, 255, 255, .055));
  --glass-strong: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  --blur: blur(28px) saturate(170%);
  --rim: linear-gradient(155deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08) 30%, rgba(255, 255, 255, .02) 60%, rgba(196, 181, 253, .35));
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -18px 40px -24px rgba(167, 139, 250, .25), 0 24px 60px -28px rgba(0, 0, 0, .8);

  --r-xl: 30px;
  --r-l: 24px;
  --r-m: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Onest", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -.005em;
  min-height: 100vh; background: transparent;
}
/* живой фон, сквозь который «смотрит» стекло */
body::before {
  content: ""; position: fixed; inset: -10vmax; z-index: -2;
  background:
    radial-gradient(38vmax 34vmax at 12% 8%, rgba(124, 58, 237, .55), transparent 62%),
    radial-gradient(34vmax 30vmax at 92% 18%, rgba(79, 70, 229, .42), transparent 64%),
    radial-gradient(42vmax 36vmax at 78% 92%, rgba(192, 38, 211, .30), transparent 66%),
    radial-gradient(30vmax 26vmax at 28% 78%, rgba(56, 189, 248, .14), transparent 66%),
    radial-gradient(60vmax 60vmax at 50% 50%, #120533, #07021a 70%);
  filter: saturate(120%);
  animation: drift 40s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
@keyframes drift { to { transform: translate3d(-3vmax, 2vmax, 0) rotate(4deg); } }

a { color: var(--violet-hi); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .tab { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; border-radius: 10px; }

/* ---------- стекло ---------- */
.glass, .panel, .metrics, .node, .rail, .hero, dialog, .tip, .toast, .seg {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  border: 0;
}
.glass::before, .panel::before, .metrics::before, .node::before, .rail::before, .hero::before, dialog::before, .seg::before, .btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 14px; margin: 14px 0 14px 14px; height: calc(100vh - 28px);
  padding: 18px 12px; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 3px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 20px -6px rgba(139, 92, 246, .8); }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--faint); letter-spacing: 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; color: var(--muted);
  cursor: pointer; border: 0; background: none; text-align: left; width: 100%; font-weight: 550; transition: color .2s, background .2s;
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-item[aria-current="page"] {
  color: #fff; background: linear-gradient(145deg, rgba(167, 139, 250, .38), rgba(109, 40, 217, .22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 24px -10px rgba(139, 92, 246, .9);
}
.rail-foot { margin-top: auto; padding: 12px 12px 4px; display: grid; gap: 8px; font-size: 13px; color: var(--faint); }
.status-line { display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--profit); box-shadow: 0 0 10px var(--profit); }
.dot.bad { background: var(--cost); box-shadow: 0 0 10px var(--cost); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--text); }

main { padding: 30px clamp(16px, 3vw, 40px) 90px; max-width: 1380px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -.035em; font-weight: 750; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.seg { display: inline-flex; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { position: relative; border: 0; background: none; padding: 7px 15px; border-radius: 999px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; transition: color .2s; }
.seg button[aria-pressed="true"] {
  color: #fff; background: linear-gradient(160deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 14px -4px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1);
}

.panel { border-radius: var(--r-l); padding: 22px 24px; }
.panel h2 { margin: 0 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1.35fr 1fr; }
.cols-2-even { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mt { margin-top: 18px; }

/* ---------- главный блок ---------- */
.hero { padding: 30px 30px 26px; border-radius: var(--r-xl); background: linear-gradient(150deg, rgba(167, 139, 250, .26), rgba(109, 40, 217, .10) 45%, rgba(255, 255, 255, .04)); }
.hero-title { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -.035em; font-weight: 750; margin: 0; max-width: 26ch; }
.hero-title .amt { background: linear-gradient(120deg, #99f6e4, var(--profit)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title.neg .amt { background: linear-gradient(120deg, #fecdd3, var(--cost)); -webkit-background-clip: text; background-clip: text; }
.hero-lead { color: var(--muted); margin: 10px 0 26px; max-width: 66ch; }
.flow { display: flex; height: 56px; border-radius: 18px; overflow: hidden; gap: 3px; padding: 3px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.flow-seg {
  position: relative; min-width: 4px; display: flex; align-items: center; padding: 0 14px; font-weight: 650; font-size: 14px; color: #1a0b3a;
  white-space: nowrap; overflow: hidden; border-radius: 14px; transform-origin: left; animation: grow 1s cubic-bezier(.2, .8, .2, 1) both;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -8px 14px -8px rgba(0, 0, 0, .25);
}
.flow-seg::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(rgba(255, 255, 255, .35), transparent); pointer-events: none; }
.flow-seg:nth-child(2) { animation-delay: .07s; } .flow-seg:nth-child(3) { animation-delay: .14s; } .flow-seg:nth-child(4) { animation-delay: .21s; } .flow-seg:nth-child(5) { animation-delay: .28s; }
@keyframes grow { from { transform: scaleX(0); opacity: .2; } to { transform: scaleX(1); opacity: 1; } }
.flow-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 20px; margin-top: 20px; }
.leg { display: grid; gap: 2px; }
.leg-name { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.leg-name i { width: 10px; height: 10px; border-radius: 4px; display: inline-block; box-shadow: 0 0 10px currentColor; }
.leg-val { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.leg-val small { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 6px; }

/* ---------- метрики ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-l); }
.metric { padding: 18px 22px; border-left: 1px solid var(--line-soft); }
.metric:first-child { border-left: 0; }
.metric-label { color: var(--muted); font-size: 13px; }
.metric-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 2px; }
.metric-note { color: var(--faint); font-size: 13px; margin-top: 2px; }

/* ---------- графики ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: rgba(255, 255, 255, .06); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.tip { position: fixed; pointer-events: none; border-radius: 16px; padding: 10px 12px; font-size: 13px; z-index: 50; min-width: 160px; background: linear-gradient(145deg, rgba(40, 24, 80, .82), rgba(20, 10, 45, .86)); }
.tip b { display: block; margin-bottom: 3px; }
.tip-row { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.tip-row span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- списки и таблицы ---------- */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); align-items: center; }
.row:first-child { border-top: 0; padding-top: 2px; }
.row-title { font-weight: 600; }
.row-sub { color: var(--muted); font-size: 13px; }
.row-right { text-align: right; display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.when { font-size: 13px; color: var(--muted); }
.when.soon { color: var(--warn); }
.when.late { color: var(--cost); font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 550; font-size: 12.5px; padding: 0 10px 10px; white-space: nowrap; }
th button { all: unset; cursor: pointer; }
th button:hover, th button[aria-pressed="true"] { color: var(--text); }
td { padding: 11px 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.dim td { color: var(--faint); }
tr.click { cursor: pointer; transition: background .15s; }
tr.click:hover td { background: rgba(255, 255, 255, .045); }
tr.click:hover td:first-child { border-radius: 12px 0 0 12px; } tr.click:hover td:last-child { border-radius: 0 12px 12px 0; }
.table-wrap { overflow-x: auto; margin: 0 -10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.pill.ok { background: rgba(94, 234, 212, .14); color: var(--profit); }
.pill.bad { background: rgba(251, 113, 133, .15); color: var(--cost); }
.pill.warn { background: rgba(252, 211, 77, .13); color: var(--warn); }
.pill.vio { background: rgba(167, 139, 250, .2); color: #ddd6fe; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--profit); box-shadow: 0 0 0 3px rgba(94, 234, 212, .2), 0 0 10px var(--profit); display: inline-block; flex: none; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mini-bar { width: 70px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-hi)); border-radius: 3px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.hbar .mini-bar { width: 100%; height: 8px; border-radius: 4px; }
.hbar b { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 40px; text-align: right; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- ноды ---------- */
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.node { border-radius: var(--r-l); padding: 18px 20px; display: grid; gap: 14px; }
.node.off { opacity: .55; }
.node-head { display: flex; justify-content: space-between; gap: 10px; }
.node-name { font-weight: 650; display: flex; align-items: center; gap: 8px; min-width: 0; }
.node-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { font-size: 11px; font-weight: 700; color: var(--ice); background: rgba(167, 139, 250, .14); border-radius: 6px; padding: 1px 6px; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.meter { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.meter .track { height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .3); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.meter .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-hi)); border-radius: 4px; box-shadow: 0 0 10px rgba(167, 139, 250, .6); }
.meter .track i.hot { background: linear-gradient(90deg, #f59e0b, var(--warn)); }
.meter b { text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.node-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.node-stats div { display: grid; }
.node-stats small { color: var(--faint); font-size: 12px; }
.node-stats strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.node-cost { display: flex; justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 12px; font-size: 13px; color: var(--muted); }
.node-cost strong { color: var(--violet-hi); }

/* ---------- кнопки и формы ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; color: var(--text); padding: 9px 16px; border-radius: 999px;
  cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px -10px rgba(0, 0, 0, .7);
  transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn.primary { color: #fff; background: linear-gradient(160deg, #b197fc, #7c3aed 55%, #6d28d9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 26px -10px rgba(139, 92, 246, .95); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: rgba(255, 255, 255, .04); }
.btn.danger { color: var(--cost); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); align-content: start; }
.field input, .field select, .field textarea, .search {
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .10); border-radius: 14px; padding: 10px 14px; color: var(--text); font-size: 15px; width: 100%;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { outline: none; border-color: var(--violet-hi); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 4px rgba(139, 92, 246, .22); }
.field select option { background: #1b0f3d; }
.field .hint { color: var(--faint); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; background: rgba(255, 255, 255, .06); padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); font-weight: 550; }
.chip[aria-pressed="true"] { color: #fff; background: linear-gradient(160deg, rgba(167, 139, 250, .45), rgba(109, 40, 217, .35)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { max-width: 340px; padding-left: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b4aad8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; border-radius: 999px; }

dialog { color: var(--text); border-radius: var(--r-xl); padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: linear-gradient(150deg, rgba(52, 30, 104, .82), rgba(18, 8, 44, .9)); overflow: auto; }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(5, 1, 18, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .28s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.dlg-head { padding: 22px 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.dlg-body { padding: 18px 26px; }
.dlg-foot { padding: 0 26px 24px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-foot .spacer { margin-right: auto; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: rgba(255, 255, 255, .05); border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.tile small { color: var(--faint); font-size: 12px; display: block; }
.tile strong { font-size: 18px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .row-sub { margin-top: 2px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); padding: 11px 18px; border-radius: 999px; z-index: 80; font-size: 14px; font-weight: 550; background: linear-gradient(145deg, rgba(60, 36, 120, .85), rgba(25, 12, 58, .9)); animation: rise .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast.err { color: #fecdd3; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.notice { border-radius: var(--r-m); padding: 12px 16px; color: #fde68a; font-size: 14px; margin-bottom: 16px; background: rgba(252, 211, 77, .08); box-shadow: inset 0 0 0 1px rgba(252, 211, 77, .2); }
.skeleton { height: 120px; border-radius: var(--r-l); background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 100%); background-size: 200% 100%; animation: sh 1.4s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
.pos { color: var(--profit); } .neg { color: var(--cost); } .brass { color: var(--violet-hi); } .muted { color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- мобильные ---------- */
@media (max-width: 1100px) {
  .cols-2, .cols-2-even, .cols-3 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  /* плавающая стеклянная капсула внизу, как в iOS */
  .rail {
    position: fixed; top: auto; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: auto; margin: 0;
    flex-direction: row; padding: 6px; border-radius: 30px; z-index: 40; justify-content: space-between; gap: 0;
    background: linear-gradient(145deg, rgba(60, 36, 120, .55), rgba(25, 12, 58, .6));
  }
  .brand, .rail-foot { display: none; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 7px 2px; align-items: center; text-align: center; border-radius: 24px; flex: 1; min-width: 0; }
  .nav-item svg { width: 21px; height: 21px; }
  main { padding: 20px 14px 120px; }
  .page-head h1 { font-size: 28px; }
  .hero { padding: 22px 18px; }
  .flow { height: 42px; border-radius: 14px; }
  .flow-seg { font-size: 12px; padding: 0 8px; border-radius: 11px; }
  .metric { padding: 14px 16px; }
  .metric-value { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .hide-m { display: none; }
  .search { max-width: none; }
  .dlg-head, .dlg-body { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, body::before { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce) {
  .panel, .metrics, .node, .rail, .hero, dialog, .seg { background: #1a0f3c; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.nav-item .s { display: none; }
@media (max-width: 760px) { .nav-item .l { display: none; } .nav-item .s { display: inline; } }
main, .grid > *, .panel { min-width: 0; }
html, body { overflow-x: hidden; }
tr.grp td { border-top: 0; padding: 18px 10px 6px; }
tr.grp:first-child td { padding-top: 0; }
.grp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
