/* Личный кабинет — тема «Ночной сигнал» */
:root {
  --bg: #0A0B0D;
  --side: #0D0F12;
  --surface: #121418;
  --surface-2: #15181D;
  --surface-3: #1A1D22;
  --chip: #1F2329;
  --line: #22262D;
  --line-2: #2C3139;
  --line-soft: #1A1D22;
  --text: #EDEEF0;
  --text-2: #C9CED5;
  --muted: #9AA1AB;
  --faint: #7D848E;
  --accent: #C8F25A;
  --accent-ink: #0A0B0D;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);
  --warn: #FF9F6E;
  --warn-soft: rgba(255, 145, 87, 0.12);
  --violet: #C2B8FF;
  --violet-soft: rgba(169, 155, 255, 0.14);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { filter: brightness(1.12); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
input::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex-shrink: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* Boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.86); opacity: 0.6; } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.82); } }

/* App shell */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar {
  flex: 1 1 248px; max-width: 280px; padding: 24px 16px; background: var(--side);
  border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted); }
.acc-switch { position: relative; }
.acc-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 56px;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left;
}
.acc-btn .label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; }
.acc-btn .value { font-weight: 600; display: block; }
.acc-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-3);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  max-height: 320px; overflow-y: auto;
}
.acc-menu button { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; }
.acc-menu button:hover, .acc-menu button[aria-current="true"] { background: var(--chip); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--muted); font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--surface-2); filter: none; }
.nav a[aria-current="page"] { background: var(--surface-3); color: var(--text); font-weight: 600; }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav .grow { flex-grow: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: #181B20; font-family: var(--mono); font-size: 12px; color: var(--text); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.user-box { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid var(--line-soft); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; text-transform: uppercase; }
.user-box .who { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.user-box .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-bar { display: none; }

/* Header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; min-width: 0; }
.card.glow { background-image: radial-gradient(460px 240px at 100% 0%, var(--accent-glow), transparent 70%); }
.card h2, .h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > * { min-width: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--line-2); background: var(--surface-3); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-accent:hover:not(:disabled) { background: var(--accent); filter: brightness(1.06); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-danger { background: var(--warn-soft); border-color: rgba(255,159,110,0.45); color: var(--warn); }
.btn-outline-accent { background: transparent; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.btn-lg { min-height: 52px; padding: 0 22px; border-radius: var(--r); font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); position: relative; }
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.icon-btn.round { border-radius: 50%; }
.icon-btn.play { background: var(--surface-3); border-color: var(--line-2); color: var(--accent); }
.icon-btn.play.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }

/* Segmented control / chips */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.seg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg.sm { padding: 3px; background: var(--side); border-radius: 12px; }
.seg.sm button { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.seg.sm button[aria-pressed="true"] { background: #23272E; color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--text-2); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.fail { background: var(--warn-soft); color: var(--warn); }
.chip.pending { background: var(--violet-soft); color: var(--violet); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field-label { font-size: 12px; color: var(--muted); }
.input, .select {
  min-height: 44px; padding: 0 14px; background: var(--side); border: 1px solid var(--line); border-radius: 12px; color: var(--text); outline: none; width: 100%;
}
.input:focus, .select:focus { border-color: var(--accent-line); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.input-icon { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: var(--side); border: 1px solid var(--line); border-radius: 12px; }
.input-icon input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; }
.input-icon:focus-within { border-color: var(--accent-line); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; background: transparent; border: 0; font-weight: 600; }
.switch .track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background .2s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left .2s, background .2s; }
.switch[aria-pressed="true"] .track { background: var(--accent); }
.switch[aria-pressed="true"] .knob { left: 19px; background: var(--accent-ink); }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.check-cell { width: 44px; height: 44px; display: inline-grid; place-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: left; padding: 0 10px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-top: 1px solid var(--line-soft); height: 60px; vertical-align: middle; }
.tbl td.num, .tbl .mono { font-family: var(--mono); font-size: 13px; }
.tbl tr.active > td { background: var(--surface-2); }
.tbl tr.expand > td { border-top: 0; height: auto; padding: 0 10px 16px; background: var(--surface-2); }
.tbl .ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .actions { display: flex; gap: 8px; }
.empty { padding: 48px 12px; text-align: center; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); margin-top: 4px; }
.pager nav { display: flex; align-items: center; gap: 4px; }
.pager .pg { min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-family: var(--mono); }
.pager .pg[aria-current="page"] { background: var(--text); color: var(--bg); }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px; color: var(--muted); }

/* KPIs */
.balance-num { display: flex; align-items: baseline; gap: 4px; font-family: var(--mono); white-space: nowrap; margin: 18px 0; }
.balance-num .cur { font-size: 28px; color: var(--muted); }
.balance-num .int { font-size: 56px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.balance-num .frac { font-size: 28px; color: var(--muted); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv > span:first-child { font-size: 12px; color: var(--muted); }
.kv > span:last-child { font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 132px; }
.kpi h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi .v { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.kpi .d { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.delta-up { color: var(--accent); font-family: var(--mono); font-weight: 500; }
.delta-down { color: var(--warn); font-family: var(--mono); font-weight: 500; }

/* Charts */
.chart { position: relative; height: 220px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-x { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 2px; border-radius: 2px; background: var(--accent); display: inline-block; }
.legend i.dash { height: 0; border-top: 2px dashed #6B727C; background: none; }
.legend i.bar { height: 10px; width: 10px; border-radius: 3px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--chip); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; }
.now-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.now-dot span { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); }
.now-dot span.ping { animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite; }

/* Player */
.player { display: flex; flex-direction: column; gap: 16px; margin-left: 54px; padding: 20px; background: var(--side); border: 1px solid var(--line); border-radius: 18px; }
.player-main { display: flex; align-items: center; gap: 20px; }
.player-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 6px var(--accent-soft); flex-shrink: 0; }
.wave { flex: 1; min-width: 0; height: 56px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.wave span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: #3A4048; }
.wave span.on { background: var(--accent); }
.player-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.player-meta .facts { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--muted); }
.player-meta .facts b { font-family: var(--mono); color: var(--text); font-weight: 400; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 16px; }

/* Destinations / bars */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.bars li { display: flex; flex-direction: column; gap: 8px; }
.bars .track { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 3px; background: var(--accent); }

/* Login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-art {
  flex: 1 1 560px; min-width: 0; padding: 40px 48px 0; display: flex; flex-direction: column; gap: 32px; overflow: hidden;
  background-color: var(--side);
  background-image: radial-gradient(640px 420px at 0% 100%, var(--accent-glow), transparent 70%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px; border-right: 1px solid var(--line-soft);
}
.login-art h1 { margin: 48px 0 0; font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1.05; }
.login-art p { margin: 0; font-size: 18px; color: var(--muted); max-width: 480px; }
.login-bars { margin-top: auto; height: 240px; display: flex; align-items: flex-end; gap: 6px; }
.login-bars span { flex: 1 1 0; min-width: 3px; border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rise 2.6s ease-in-out infinite; }
.login-form-wrap { flex: 1 1 440px; min-width: 0; padding: 40px 48px; display: flex; flex-direction: column; }
.login-form { margin: auto 0; align-self: center; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.login-form h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -0.02em; }
.login-form .input { min-height: 52px; font-size: 15px; background: var(--surface); border-color: var(--line-2); border-radius: var(--r); }
.pw-wrap { display: flex; align-items: center; min-height: 52px; padding: 0 4px 0 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); }
.pw-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pw-wrap input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 15px; }
.form-error { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* Finance */
.amount-input { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 0 18px; background: var(--side); border: 1px solid var(--line-2); border-radius: 16px; }
.amount-input span { font-family: var(--mono); font-size: 24px; color: var(--muted); }
.amount-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.coins { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)); gap: 8px; }
.coin { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 12px; border-radius: var(--r); text-align: left; background: var(--side); border: 1px solid var(--line); }
.coin[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.coin .g { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--chip); color: var(--text-2); flex-shrink: 0; }
.coin[aria-pressed="true"] .g { background: var(--accent); color: var(--accent-ink); }
.coin small { display: block; font-size: 12px; color: var(--muted); }
dl.summary { margin: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--chip); }
dl.summary div { display: flex; justify-content: space-between; gap: 12px; }
dl.summary dt { color: var(--muted); }
dl.summary dd { margin: 0; font-family: var(--mono); text-align: right; }
.qr { padding: 12px; background: #F4F5F2; border-radius: 18px; width: 196px; height: 196px; display: grid; place-items: center; }
.qr img { width: 172px; height: 172px; image-rendering: pixelated; }
.addr { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: var(--side); border: 1px solid var(--line-2); border-radius: var(--r); }
.addr span { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; word-break: break-all; line-height: 1.45; }
.progress { height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1s linear; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); border: 1px solid var(--chip); }
.steps li.current { background: var(--surface-3); border-color: var(--line-2); }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; border: 1.5px solid var(--line-2); color: var(--faint); flex-shrink: 0; }
.steps li.current .n { border-color: var(--accent); color: var(--text); }
.steps li.done .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps b { display: block; font-size: 13px; }
.steps small { display: block; font-size: 12px; color: var(--muted); }
.note-warn { display: flex; gap: 12px; padding: 14px 16px; background: rgba(255,159,110,0.08); border: 1px solid rgba(255,159,110,0.28); border-radius: var(--r); font-size: 13px; color: #F2D2C2; }
.note-warn strong { color: #fff; }
.success-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 12px 24px; text-align: center; }
.success-icon { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 12px var(--accent-soft), 0 0 60px var(--accent-glow); }
.live-chip { position: relative; width: 8px; height: 8px; display: inline-block; }
.live-chip span { position: absolute; inset: 0; border-radius: 50%; background: currentColor; }
.live-chip span.ping { animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }

/* Toasts */
.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { padding: 14px 16px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); font-weight: 600; }
.toast.error { border-color: rgba(255,159,110,.45); color: #FFD6C2; }
.toast.ok { border-color: var(--accent-line); }

/* Softphone */
.sp-fab { position: fixed; z-index: 60; right: 24px; bottom: 24px; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 6px var(--accent-soft); }
.sp-fab .st { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: var(--warn); }
.sp-fab .st.reg { background: #33D17A; }
.sp-panel { position: fixed; z-index: 61; right: 24px; bottom: 96px; width: 320px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 24px 60px rgba(0,0,0,.55); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sp-num { min-height: 52px; font-family: var(--mono); font-size: 20px; text-align: center; background: var(--side); border: 1px solid var(--line-2); border-radius: var(--r); width: 100%; outline: none; }
.sp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp-keys button { min-height: 52px; border-radius: var(--r); border: 1px solid var(--line); background: var(--side); font-family: var(--mono); font-size: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.sp-keys button small { font-family: var(--font); font-size: 9px; letter-spacing: .12em; color: var(--faint); }
.sp-keys button:active { background: var(--surface-3); }
.sp-call { display: flex; gap: 10px; justify-content: center; }
.sp-call .go { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #33D17A; color: #062B12; display: grid; place-items: center; }
.sp-call .end { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #F0605D; color: #fff; display: grid; place-items: center; }
.sp-incall { text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.sp-incall .who { font-family: var(--mono); font-size: 22px; }
.sp-incall .t { font-family: var(--mono); color: var(--muted); }
.sp-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp-tools button { min-height: 56px; border-radius: var(--r); border: 1px solid var(--line); background: var(--side); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.sp-tools button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sp-hist { display: flex; flex-direction: column; gap: 2px; max-height: 160px; overflow-y: auto; }
.sp-hist button { display: flex; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; font-family: var(--mono); font-size: 13px; }
.sp-hist button:hover { background: var(--surface-3); }

/* Responsive */
@media (max-width: 960px) {
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; max-width: 85vw; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .app.menu-open .sidebar { transform: none; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 40; width: 100%; padding: 10px 16px; background: rgba(13,15,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
  .main { padding: 20px 16px 96px; }
  .page-head h1 { font-size: 24px; }
  .player { margin-left: 0; }
  .balance-num .int { font-size: 44px; }
}
@media (max-width: 640px) {
  .login-art { display: none; }
  .login-form-wrap { padding: 24px; }
}
.has-softphone .toasts { bottom: 100px; }
.has-softphone .main { padding-bottom: 112px; }
