@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #04060c;
  --bg2: #0a1022;
  --panel: rgba(12, 19, 38, .62);
  --panel-solid: #0c1326;
  --line: rgba(120, 200, 255, .12);
  --line-2: rgba(120, 200, 255, .24);
  --text: #e6f1ff;
  --muted: #8193b2;
  --dim: #4d5c78;
  --cyan: #22e6ff;
  --violet: #a855f7;
  --pink: #ff3dcb;
  --green: #34f5a4;
  --amber: #ffb84d;
  --red: #ff4d6d;
  --grad: linear-gradient(135deg, var(--cyan), var(--violet));
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  --r: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; font-size: 15px;
}
::selection { background: rgba(34, 230, 255, .3); }
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Background ---------- */
#bg-canvas { position: fixed; inset: 0; z-index: -2; }
.bg-glow { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(34, 230, 255, .14), transparent 60%),
    radial-gradient(800px 600px at 110% 10%, rgba(168, 85, 247, .16), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(255, 61, 203, .08), transparent 60%),
    var(--bg);
}
.bg-grid { position: fixed; left: -50%; right: -50%; bottom: -10%; height: 55vh; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(34, 230, 255, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 230, 255, .13) 1px, transparent 1px);
  background-size: 60px 60px; transform: perspective(500px) rotateX(62deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,.7), transparent 85%); animation: gridmove 6s linear infinite;
}
@keyframes gridmove { to { background-position: 0 60px, 0 0; } }

/* ---------- Generic ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.label b { color: var(--cyan); font-weight: 500; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04); padding: 22px;
}
.panel::before, .panel::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--cyan); opacity: .55; pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--r); }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--r); border-color: var(--violet); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.panel-head h2 span { color: var(--cyan); margin-right: 8px; }

.btn {
  --c: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  font-weight: 500; font-size: 14px; transition: .2s; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset, 0 0 24px -6px var(--c); color: #fff; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { border: 0; color: #031018; background: var(--grad); font-weight: 600; box-shadow: 0 8px 30px -8px rgba(34, 230, 255, .6); }
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 10px 40px -6px rgba(168, 85, 247, .7); color: #031018; }
.btn.danger { --c: var(--red); color: #ffc2cd; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { border-color: var(--line-2); box-shadow: none; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 14px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.icon-btn { width: 34px; height: 34px; padding: 0; }

.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(4, 8, 18, .6); outline: none; transition: .2s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 230, 255, .15); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--panel-solid); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; color: var(--muted); font-family: var(--mono); letter-spacing: .06em; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; }
.badge.cyan { color: var(--cyan); background: rgba(34, 230, 255, .08); }
.badge.violet { color: var(--violet); background: rgba(168, 85, 247, .1); }
.badge.green { color: var(--green); background: rgba(52, 245, 164, .08); }
.badge.amber { color: var(--amber); background: rgba(255, 184, 77, .08); }
.badge.red { color: var(--red); background: rgba(255, 77, 109, .08); }
.badge.gray { color: var(--muted); background: rgba(255, 255, 255, .03); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--line-2); transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: rgba(34, 230, 255, .2); border-color: var(--cyan); }
.switch input:checked + i::after { left: 21px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); padding: 36px 32px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 12px rgba(34, 230, 255, .5)); }
.brand b { font-size: 20px; letter-spacing: .26em; font-weight: 700; }
.brand small { display: block; font-family: var(--mono); color: var(--muted); font-size: 10px; letter-spacing: .22em; margin-top: 2px; }
.auth-title { font-size: 30px; font-weight: 600; margin: 28px 0 6px; line-height: 1.1; }
.auth-sub { color: var(--muted); margin: 0 0 26px; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.25); margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.tabs button.on { background: rgba(34, 230, 255, .1); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(34, 230, 255, .35); }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin: -4px 0 10px; }
.form-ok { color: var(--green); font-size: 13px; }

/* ---------- Shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(4, 6, 12, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.topnav { display: flex; gap: 4px; margin-left: 18px; }
.topnav a { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.topnav a.on, .topnav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.topnav a.on { color: var(--cyan); box-shadow: inset 0 -2px 0 var(--cyan); border-radius: 9px 9px 2px 2px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.status-pill.on { color: var(--green); border-color: rgba(52, 245, 164, .4); }
.status-pill.off { color: var(--amber); border-color: rgba(255, 184, 77, .4); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 99px; border: 1px solid var(--line); cursor: pointer; background: rgba(255,255,255,.02); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #041018; font-weight: 700; font-size: 13px; }
.menu { position: absolute; right: 28px; top: 62px; min-width: 240px; padding: 8px; z-index: 40; }
.menu button, .menu a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--text); font-size: 14px; }
.menu button:hover, .menu a:hover { background: rgba(255,255,255,.05); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

main.page { max-width: 1320px; margin: 0 auto; padding: 28px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.hero h1 { margin: 6px 0 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }

.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; }
.stack { display: grid; gap: 20px; align-content: start; }

/* ---------- Drop zone ---------- */
.drop {
  position: relative; border: 1.5px dashed var(--line-2); border-radius: 16px; min-height: 250px;
  display: grid; place-items: center; text-align: center; padding: 28px; transition: .25s; overflow: hidden; cursor: pointer;
  background: radial-gradient(400px 200px at 50% 50%, rgba(34, 230, 255, .06), transparent 70%);
}
.drop:hover, .drop.over { border-color: var(--cyan); background: radial-gradient(400px 220px at 50% 50%, rgba(34, 230, 255, .14), transparent 70%); }
.drop.over .core { transform: scale(1.12); }
.core { position: relative; width: 118px; height: 118px; margin: 0 auto 18px; transition: transform .3s; }
.core i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.core i:nth-child(1) { border-top-color: var(--cyan); border-right-color: var(--cyan); animation: spin 3s linear infinite; filter: drop-shadow(0 0 6px var(--cyan)); }
.core i:nth-child(2) { inset: 14px; border-bottom-color: var(--violet); border-left-color: var(--violet); animation: spin 2.2s linear infinite reverse; filter: drop-shadow(0 0 6px var(--violet)); }
.core i:nth-child(3) { inset: 28px; border-color: rgba(255,255,255,.08); border-top-color: var(--pink); animation: spin 5s linear infinite; }
.core svg { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; color: var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); }
@keyframes spin { to { transform: rotate(360deg); } }
.drop h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.drop p { margin: 0; color: var(--muted); font-size: 14px; }

.filelist { margin-top: 16px; max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.filelist .f { display: grid; grid-template-columns: 22px 1fr auto 28px; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.filelist .f:last-child { border-bottom: 0; }
.filelist .f .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .f .s { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.filelist .f svg { width: 16px; height: 16px; color: var(--cyan); }
.filelist .x { border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 18px; line-height: 1; }
.filelist .x:hover { color: var(--red); }
.summary-bar { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }

.target-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.target { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); cursor: pointer; font-size: 13px; transition: .15s; }
.target svg { width: 15px; height: 15px; }
.target.on { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 230, 255, .08); box-shadow: 0 0 20px -8px var(--cyan); }

/* ---------- Code entry ---------- */
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 16px; }
.code-boxes input { text-align: center; font-family: var(--mono); font-size: 24px; font-weight: 600; padding: 14px 0; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(4, 8, 18, .7); outline: none; text-transform: uppercase; transition: .15s; min-width: 0; }
.code-boxes input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 230, 255, .18), 0 0 30px -8px var(--cyan); }
.code-display { display: flex; gap: 8px; justify-content: center; margin: 8px 0 14px; }
.code-display span { width: 46px; height: 58px; display: grid; place-items: center; font-family: var(--mono); font-size: 28px; font-weight: 700; border-radius: 10px; border: 1px solid rgba(34, 230, 255, .45); background: rgba(34, 230, 255, .06); color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }

/* ---------- Transfers ---------- */
.xfer { display: grid; grid-template-columns: 74px 1fr auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 8, 18, .45); margin-bottom: 12px; position: relative; overflow: hidden; }
.xfer::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: .8; }
.xfer.done::after { background: var(--green); }
.xfer.err::after { background: var(--red); }
.ring { width: 74px; height: 74px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .bgc { stroke: rgba(255, 255, 255, .06); }
.ring .fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .35s; filter: drop-shadow(0 0 6px rgba(34, 230, 255, .6)); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 14px; }
.xfer h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfer .meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.xfer .meta b { color: var(--text); font-weight: 500; }
.xfer .bar { height: 3px; background: rgba(255,255,255,.06); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.xfer .bar i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .35s; box-shadow: 0 0 10px var(--cyan); }
.xfer .cur { font-size: 12px; color: var(--dim); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.empty { text-align: center; padding: 30px 10px; color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

.incoming { border: 1px solid rgba(168, 85, 247, .5); background: rgba(168, 85, 247, .08); border-radius: 12px; padding: 14px; margin-bottom: 12px; animation: glowin 1.6s ease-in-out infinite; }
@keyframes glowin { 50% { box-shadow: 0 0 30px -10px var(--violet); } }

.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; background: rgba(255,255,255,.015); }
.device svg { width: 20px; height: 20px; color: var(--cyan); }
.device .nm { font-weight: 500; font-size: 14px; }
.device small { display: block; color: var(--muted); font-size: 11.5px; font-family: var(--mono); }

.meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; margin: 10px 0 8px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; box-shadow: 0 0 14px rgba(34, 230, 255, .6); }
.meter.warn i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); text-align: right; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: rgba(34, 230, 255, .025); }
td.num, th.num { text-align: right; font-family: var(--mono); }
.who { display: flex; align-items: center; gap: 10px; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.mini-meter { width: 120px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.mini-meter i { display: block; height: 100%; background: var(--grad); }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; }
.side { position: sticky; top: 90px; align-self: start; padding: 12px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; margin-bottom: 2px; }
.side a svg { width: 18px; height: 18px; }
.side a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.side a.on { color: var(--cyan); background: rgba(34, 230, 255, .08); box-shadow: inset 2px 0 0 var(--cyan); }
.side .label { padding: 10px 12px 6px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { padding: 18px 20px; }
.tile .v { font-size: 30px; font-weight: 600; margin: 8px 0 2px; letter-spacing: -.01em; }
.tile .s { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tile .v small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.chart { width: 100%; height: 220px; }
.chart .b { fill: url(#barGrad); }
.chart .rb { fill: var(--pink); opacity: .85; }
.chart text { fill: var(--dim); font-family: var(--mono); font-size: 10px; }
.chart line { stroke: var(--line); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2, 4, 10, .7); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: rgba(10, 16, 32, .96); }
.modal h3 { margin: 0 0 4px; font-size: 20px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 10px; width: min(380px, calc(100vw - 44px)); }
.toast { padding: 14px 16px; border-radius: 12px; background: rgba(10, 16, 32, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; display: flex; gap: 10px; animation: slidein .25s ease-out; border-left: 3px solid var(--cyan); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes slidein { from { transform: translateY(14px); opacity: 0; } }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 24px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .dash, .admin { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow: auto; gap: 4px; }
  .side .label { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main.page { padding: 18px 14px; }
  .topbar { padding: 12px 14px; }
  .topnav { margin-left: 0; }
  .brand small, .status-pill .txt, .user-chip .nm { display: none; }
  .xfer { grid-template-columns: 56px 1fr; }
  .xfer .ring { width: 56px; height: 56px; }
  .xfer > .act { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .code-display span { width: 40px; height: 52px; font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* icon sizing inside inline contexts */
.badge { white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.row > svg, .menu svg, .cur svg { width: 18px; height: 18px; flex: none; color: var(--cyan); }
.who .avatar { flex: none; }
