/* Gaming DNS customer portal - "Cyber Glass" theme (2026-09-27).
   Used by the customer pages (login.html, dashboard.html) and the reseller
   panel (reseller_*.html, section at the end of this file).

   Performance notes (mobile-first):
   - Fonts are self-hosted (static/fonts/) - no Google Fonts round-trip,
     which is slow/unreliable from Iranian ISPs and would block first paint.
   - The glow-chase animates ONLY `transform` on its own layer, so it runs
     on the compositor with no per-frame repaint; the ring shape is a static
     mask on the parent. Offscreen cards are paused by portal.js.
   - backdrop-filter re-samples whatever moves behind it, so the ambient
     orbs only drift on large hover-capable screens; on phones they're
     static and the blur radius is smaller.
   - No background-attachment: fixed (forces full repaints on scroll on
     Android); the backdrop is a single position:fixed layer instead. */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/vazirmatn-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrainsmono-latin.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakrapetch-600-latin.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakrapetch-700-latin.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-0: #060818;
  --bg-1: #0b0f2e;
  --bg-2: #1a0f3d;
  --glass: rgba(22, 26, 64, 0.46);
  --glass-solid: rgba(19, 23, 58, 0.8);
  --glass-edge: rgba(160, 180, 255, 0.16);
  --text: #e9ecff;
  --text-dim: #9aa3d4;
  --text-faint: #6770a3;

  --cyan: #22e3ff;
  --cyan-rgb: 34, 227, 255;
  --violet: #b06bff;
  --violet-rgb: 176, 107, 255;
  --amber: #ffb52e;
  --amber-rgb: 255, 181, 46;
  --green: #3dfca0;
  --green-rgb: 61, 252, 160;
  --red: #ff5d7a;
  --red-rgb: 255, 93, 122;
  --neon-blue-rgb: 47, 125, 255;
  --neon-red-rgb: 255, 45, 85;

  --font-ui: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Chakra Petch", "Vazirmatn", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --blur: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ---------- ambient backdrop ---------- */
.scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, #2a1466 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 30%, #0c2a5c 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 45%, var(--bg-2) 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.orb.o1 { width: 420px; height: 420px; background: rgba(var(--cyan-rgb), .35); top: 8%; right: -120px; }
.orb.o2 { width: 520px; height: 520px; background: rgba(var(--violet-rgb), .38); top: 45%; left: -200px; }
.orb.o3 { width: 300px; height: 300px; background: rgba(var(--amber-rgb), .18); bottom: -80px; right: 20%; }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(140,160,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,160,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
@media (min-width: 900px) and (hover: hover) {
  .orb { animation: drift 26s var(--ease) infinite alternate; will-change: transform; }
  .orb.o2 { animation-duration: 32s; }
  .orb.o3 { animation-duration: 38s; }
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(40px,-60px,0) scale(1.12); } }

.wrap {
  position: relative; z-index: 1;
  max-width: 980px; margin: 0 auto;
  padding-inline: 16px;
  padding-block: calc(18px + env(safe-area-inset-top, 0px)) calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 18px;
}

/* ---------- glass primitive ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
          backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent 38%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(18, 21, 54, .9); }
}

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; }
.brand { display: flex; align-items: center; gap: 10px; direction: ltr; }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(var(--cyan-rgb), .7)); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .14em; line-height: 1.1; }
.brand-name small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .28em; color: var(--text-faint); }
.btn-ghost {
  font: inherit; font-size: 13.5px; color: var(--text-dim);
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-edge);
  padding: 6px 14px; border-radius: 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-ghost:hover { color: var(--red); border-color: rgba(var(--red-rgb), .45); box-shadow: 0 0 18px -4px rgba(var(--red-rgb), .5); }
.btn-ghost svg { width: 16px; height: 16px; }

/* ---------- flash messages ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0; font-size: 13.5px; line-height: 1.7;
  padding: 10px 12px; border-radius: 12px;
  color: #ffd3dc; background: rgba(var(--red-rgb), .1); border: 1px solid rgba(var(--red-rgb), .4);
  animation: flash-in .45s var(--ease) both;
}
.flash svg { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.flash--success { color: #c9ffe4; background: rgba(var(--green-rgb), .09); border-color: rgba(var(--green-rgb), .45); box-shadow: 0 0 24px -10px rgba(var(--green-rgb), .8); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- account panel ---------- */
.account { padding: 22px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.hello { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.hello h1 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; min-width: 0; }
.hello h1 b { font-family: var(--font-mono); font-weight: 600; color: var(--cyan); text-shadow: 0 0 14px rgba(var(--cyan-rgb), .45); overflow-wrap: anywhere; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--green);
  padding: 2px 11px; border-radius: 999px;
  background: rgba(var(--green-rgb), .08); border: 1px solid rgba(var(--green-rgb), .3);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(6, 8, 30, .45); border: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.stat-label { font-size: 12px; color: var(--text-faint); }
.stat-value { font-family: var(--font-mono); font-size: 17px; font-weight: 600; direction: ltr; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-value.fa { font-family: var(--font-ui); direction: rtl; font-size: 19px; font-weight: 800; }
.stat-value.fa small { font-size: 13px; font-weight: 500; color: var(--text-dim); margin-inline-start: 4px; }
.stat-value.empty { font-family: var(--font-ui); direction: rtl; font-size: 14px; font-weight: 500; color: var(--text-dim); }

.register { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.btn-primary {
  position: relative; overflow: hidden;
  font: inherit; font-size: 16px; font-weight: 700; color: #04121a;
  width: 100%; padding: 14px 20px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: linear-gradient(135deg, #5ff0ff 0%, var(--cyan) 45%, #3aa8ff 100%);
  box-shadow: 0 0 0 1px rgba(var(--cyan-rgb), .5), 0 10px 30px -10px rgba(var(--cyan-rgb), .7);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: box-shadow .3s var(--ease), transform .2s var(--ease), filter .3s var(--ease);
  touch-action: manipulation;
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(var(--cyan-rgb), .8), 0 0 34px -2px rgba(var(--cyan-rgb), .75); filter: brightness(1.06); }
.btn-primary:active { transform: scale(.985); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(-120%); }
.btn-primary svg { width: 20px; height: 20px; }
.btn-primary.is-loading { pointer-events: none; filter: saturate(.6) brightness(.9); }
.btn-primary.is-loading svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { margin: 0; font-size: 13px; color: var(--text-dim); display: flex; gap: 8px; line-height: 1.8; }
.hint svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--cyan); }

@media (min-width: 760px) {
  .account { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; padding: 26px 28px; }
  .hello, .account > .flash { grid-column: 1 / -1; }
}

/* ---------- DNS cards ---------- */
.cards { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--doh { grid-column: 1 / -1; }
}

.card { --c: var(--cyan); --c-rgb: var(--cyan-rgb); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card--v6 { --c: var(--violet); --c-rgb: var(--violet-rgb); }
.card--doh { --c: var(--amber); --c-rgb: var(--amber-rgb); }
.card {
  border-color: rgba(var(--c-rgb), .32);
  box-shadow:
    0 0 0 1px rgba(var(--c-rgb), .06),
    0 0 38px -12px rgba(var(--c-rgb), .38),
    0 20px 50px -24px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 0 40px -20px rgba(var(--c-rgb), .35);
}
.card:hover {
  border-color: rgba(var(--c-rgb), .55);
  box-shadow:
    0 0 0 1px rgba(var(--c-rgb), .14),
    0 0 54px -10px rgba(var(--c-rgb), .7),
    0 24px 56px -24px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 0 50px -18px rgba(var(--c-rgb), .45);
}
.card::after {
  content: ""; position: absolute; top: -1px; left: -1px; width: 26px; height: 26px;
  border-top: 2px solid var(--c); border-left: 2px solid var(--c);
  border-top-left-radius: var(--r-lg);
  filter: drop-shadow(0 0 6px var(--c)); pointer-events: none;
}

/* ---------- border glow chase ---------- */
/* A comet of the card's color orbits the edge. Only `transform` is
   animated; --d (the card diagonal) is set by portal.js so the rotating
   square always covers the card. */
.chase, .halo > span {
  position: absolute; pointer-events: none; overflow: hidden;
  -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);
}
.chase { inset: -1px; padding: 1.5px; border-radius: var(--r-lg); }
/* halo: the ring is clipped by the inner span, then the outer span blurs
   the clipped result - so the glow fades softly instead of ending in a
   hard edge. The blur is a compositor filter on a static layer. */
.halo { position: absolute; inset: -10px; pointer-events: none; filter: blur(9px); opacity: .75; transition: opacity .4s var(--ease); }
.halo > span { inset: 0; padding: 10px; border-radius: calc(var(--r-lg) + 10px); }
.chase i, .halo i {
  position: absolute; left: 50%; top: 50%;
  width: var(--d, 1400px); height: var(--d, 1400px);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: chase 11s linear infinite;
  animation-delay: var(--chase-delay, 0s);
  will-change: transform;
}
.is-offscreen .chase i, .is-offscreen .halo i { animation-play-state: paused; }
.chase i {
  background: conic-gradient(from 0deg,
    transparent 0turn 0.6turn,
    rgba(var(--c-rgb), .12) 0.7turn,
    rgba(var(--c-rgb), .75) 0.85turn,
    #ffffff 0.885turn,
    rgba(var(--c-rgb), .9) 0.89turn,
    transparent 0.9turn);
}
.halo i {
  background: conic-gradient(from 0deg,
    transparent 0turn 0.72turn,
    rgba(var(--c-rgb), .35) 0.83turn,
    rgba(var(--c-rgb), .95) 0.885turn,
    transparent 0.91turn);
}
.card:hover .halo, .dual:hover .halo { opacity: 1; }
.card--v6  { --chase-delay: -3.7s; }
.card--doh { --chase-delay: -7.3s; }
@keyframes chase { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* dual chase (account + login): neon blue and neon red comets 180° apart */
.dual {
  --c1-rgb: var(--neon-blue-rgb);
  --c2-rgb: var(--neon-red-rgb);
  border-color: rgba(150, 120, 255, .22);
  box-shadow:
    -16px -12px 46px -24px rgba(var(--c1-rgb), .6),
    16px 12px 46px -24px rgba(var(--c2-rgb), .55),
    0 30px 60px -30px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.dual .chase i {
  background: conic-gradient(from 0deg,
    transparent 0turn 0.1turn,
    rgba(var(--c1-rgb), .12) 0.2turn,
    rgba(var(--c1-rgb), .8) 0.35turn,
    #ffffff 0.385turn,
    rgba(var(--c1-rgb), .95) 0.39turn,
    transparent 0.4turn 0.6turn,
    rgba(var(--c2-rgb), .12) 0.7turn,
    rgba(var(--c2-rgb), .8) 0.85turn,
    #ffffff 0.885turn,
    rgba(var(--c2-rgb), .95) 0.89turn,
    transparent 0.9turn);
}
.dual .halo i {
  background: conic-gradient(from 0deg,
    transparent 0turn 0.22turn,
    rgba(var(--c1-rgb), .4) 0.33turn,
    rgba(var(--c1-rgb), 1) 0.385turn,
    transparent 0.41turn 0.72turn,
    rgba(var(--c2-rgb), .4) 0.83turn,
    rgba(var(--c2-rgb), 1) 0.885turn,
    transparent 0.91turn);
}
.login { --chase-delay: -2s; }

/* ---------- card content ---------- */
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: var(--c);
  background: rgba(var(--c-rgb), .1); border: 1px solid rgba(var(--c-rgb), .35);
  box-shadow: 0 0 18px -4px rgba(var(--c-rgb), .6);
}
.card-icon svg { width: 21px; height: 21px; }
.card-title { display: flex; flex-direction: column; line-height: 1.3; }
.card-title h2 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: .06em; color: var(--c); text-shadow: 0 0 16px rgba(var(--c-rgb), .55); }
.card-title span { font-size: 12.5px; color: var(--text-dim); }
.badge {
  margin-inline-start: auto;
  font-size: 11.5px; font-weight: 500; color: var(--c);
  padding: 3px 10px; border-radius: 999px;
  background: rgba(var(--c-rgb), .1); border: 1px solid rgba(var(--c-rgb), .35);
}

.rows { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ip-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  padding: 11px 12px 11px 11px; border-radius: var(--r-md);
  background: rgba(5, 7, 26, .5); border: 1px solid rgba(255,255,255,.06);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.ip-row:hover { border-color: rgba(var(--c-rgb), .3); background-color: rgba(5, 7, 26, .62); }
.ip-meta { display: flex; flex-direction: column; min-width: 0; }
.ip-label { font-size: 12px; color: var(--text-faint); }
.ip-value {
  font-family: var(--font-mono); font-size: 16.5px; font-weight: 500; color: var(--text);
  direction: ltr; text-align: right; unicode-bidi: plaintext;
  overflow-wrap: anywhere; line-height: 1.5; letter-spacing: .01em;
  -webkit-user-select: all; user-select: all;
}
.ip-value.long { font-size: 14px; }

.copy-btn {
  font: inherit; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 88px; min-height: 40px; justify-content: center;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  color: var(--c); background: rgba(var(--c-rgb), .08);
  border: 1px solid rgba(var(--c-rgb), .35);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
  touch-action: manipulation;
}
.copy-btn:hover { background-color: rgba(var(--c-rgb), .16); box-shadow: 0 0 20px -4px rgba(var(--c-rgb), .7); }
.copy-btn:active { transform: scale(.95); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn .i-check { display: none; }
.copy-btn.copied {
  color: var(--green); border-color: rgba(var(--green-rgb), .6);
  background-color: rgba(var(--green-rgb), .12); box-shadow: 0 0 22px -4px rgba(var(--green-rgb), .8);
}
.copy-btn.copied .i-copy { display: none; }
.copy-btn.copied .i-check { display: block; }
.copy-btn.copied .i-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.note {
  margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.85;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(var(--c-rgb), .05); border-inline-start: 2px solid rgba(var(--c-rgb), .5);
}
.note b { color: var(--text); font-weight: 600; }

.doh-body { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .doh-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.howto { padding: 14px; border-radius: var(--r-md); background: rgba(5, 7, 26, .45); border: 1px dashed rgba(var(--c-rgb), .3); }
.howto-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--c); display: flex; align-items: center; gap: 8px; }
.howto-title svg { width: 17px; height: 17px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.steps li::before {
  content: counter(s); flex: none;
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--c);
  background: rgba(var(--c-rgb), .1); border: 1px solid rgba(var(--c-rgb), .35);
}
.steps .en { font-family: var(--font-mono); font-size: 12.5px; direction: ltr; unicode-bidi: isolate; color: var(--text); }

/* ---------- toast (copy fallback) ---------- */
.toast {
  position: fixed; z-index: 10; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: 14px; font-size: 14px;
  background: rgba(20, 22, 50, .92); color: var(--text);
  border: 1px solid var(--glass-edge);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- login ---------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; }
.login-screen .wrap { width: 100%; max-width: 432px; }
.login { width: 100%; padding: 30px 24px 26px; display: flex; flex-direction: column; gap: 22px; }
.login .brand { justify-content: center; }
.login .brand svg { width: 46px; height: 46px; }
.login .brand-name { font-size: 22px; }
.login .sub { margin: -8px 0 0; text-align: center; font-size: 13.5px; color: var(--text-dim); }
.login form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-dim); }
.field input {
  font: inherit; font-size: 16px; /* >=16px stops iOS zoom-on-focus */
  color: var(--text); width: 100%;
  padding: 12px 14px; border-radius: 12px; outline: none;
  background: rgba(5, 7, 26, .55); border: 1px solid rgba(255,255,255,.1);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
  direction: ltr; text-align: left; font-family: var(--font-mono);
}
.field input:focus { border-color: rgba(var(--cyan-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), .15), 0 0 22px -6px rgba(var(--cyan-rgb), .7); background-color: rgba(5, 7, 26, .7); }
.login .btn-primary { margin-top: 4px; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.field input:focus-visible { outline: none; }
.footer { margin: 0; text-align: center; font-size: 12px; color: var(--text-faint); font-family: var(--font-display); font-weight: 600; letter-spacing: .2em; direction: ltr; }

/* ---------- phones ---------- */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  /* Phones: drop backdrop-filter. The scene behind the glass is already a
     blurred gradient, so a live blur adds almost nothing visible - but the
     compositor would redo it every frame the comets move. A slightly more
     opaque fill gives the same look for free. */
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }
  .halo { filter: blur(6px); }
}
/* .lite is set by portal.js on weak devices or when the first seconds run
   below ~45fps: keep the comet line + static glow, drop the blurred halo. */
.lite .halo { display: none; }
.lite .orb { animation: none; }
@media (max-width: 420px) {
  .account, .card { padding: 16px; }
  .stats { gap: 10px; }
  .stat-value { font-size: 15px; }
  .ip-value { font-size: 15px; }
  .ip-value.long { font-size: 13px; }
  .copy-btn { min-width: 44px; padding: 8px 10px; }
  .copy-btn .lbl { display: none; }
  .copy-btn.copied .lbl { display: inline; }
  .login { padding: 26px 18px 22px; }
}

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

/* ---------- reseller panel (stage 3, 2026-09-27) ---------- */
.card--create { --c: var(--green); --c-rgb: var(--green-rgb); }
.card--users { --c: var(--cyan); --c-rgb: var(--cyan-rgb); }
.card--ledger { --c: var(--violet); --c-rgb: var(--violet-rgb); }
/* phones: create -> users -> ledger; desktop: create | ledger side by side, users full width below */
.card--create { order: 1; } .card--users { order: 2; } .card--ledger { order: 3; }
@media (min-width: 760px) {
  .card--ledger { order: 2; }
  .card--users { order: 3; grid-column: 1 / -1; }
}
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat--coin .stat-value.fa { color: var(--amber); text-shadow: 0 0 18px rgba(var(--amber-rgb), .45); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.field select {
  font: inherit; font-size: 16px; color: var(--text); width: 100%;
  padding: 11px 14px; border-radius: 12px; outline: none; cursor: pointer;
  background: rgba(5, 7, 26, .55); border: 1px solid rgba(255,255,255,.1);
}
.field select:focus { border-color: rgba(var(--c-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--c-rgb), .15); }
.field select option { background: var(--bg-1); color: var(--text); }
.field select option:disabled { color: var(--text-faint); }
.field input:focus { border-color: rgba(var(--c-rgb, var(--cyan-rgb)), .7); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--text);
  padding: 9px 12px; border-radius: 12px; outline: none;
  background: rgba(5, 7, 26, .55); border: 1px solid rgba(255,255,255,.1);
}
.search input:focus { border-color: rgba(var(--c-rgb), .6); }

.u-list { display: flex; flex-direction: column; gap: 10px; }
.u-row {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border-radius: var(--r-md);
  background: rgba(5, 7, 26, .5); border: 1px solid rgba(255,255,255,.06);
  transition: border-color .3s var(--ease);
}
.u-row:hover { border-color: rgba(var(--c-rgb), .3); }
.u-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.u-name { font-family: var(--font-mono); font-weight: 600; direction: ltr; }
.u-meta { font-size: 12.5px; color: var(--text-dim); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.u-meta code { font-family: var(--font-mono); direction: ltr; color: var(--text); }
.u-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-actions form { display: flex; gap: 6px; align-items: center; margin: 0; }
.u-actions select {
  font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
  padding: 6px 10px; border-radius: 10px; outline: none;
  background: rgba(5, 7, 26, .6); border: 1px solid rgba(255,255,255,.1);
}
.u-actions select option { background: var(--bg-1); }
.pill { --pc-rgb: var(--green-rgb); margin-inline-start: auto; font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  color: rgb(var(--pc-rgb)); background: rgba(var(--pc-rgb), .1); border: 1px solid rgba(var(--pc-rgb), .35); }
.pill--off { --pc-rgb: var(--red-rgb); }
.pill--expired { --pc-rgb: var(--amber-rgb); }
.mini-btn {
  font: inherit; font-size: 13px; color: var(--text-dim); cursor: pointer;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-edge);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.mini-btn:hover { color: var(--text); border-color: rgba(var(--c-rgb), .5); }
.mini-btn--danger:hover { color: var(--red); border-color: rgba(var(--red-rgb), .5); }
.empty-state { margin: 0; font-size: 13.5px; color: var(--text-faint); text-align: center; padding: 14px 0; }

.ledger { display: flex; flex-direction: column; gap: 6px; }
.l-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px;
  background: rgba(5, 7, 26, .4); border: 1px solid rgba(255,255,255,.05);
}
.l-delta { font-family: var(--font-mono); font-weight: 700; direction: ltr; min-width: 3.5em; text-align: center; }
.l-delta.plus { color: var(--green); }
.l-delta.minus { color: var(--red); }
.l-what { color: var(--text-dim); min-width: 0; overflow-wrap: anywhere; }
.l-what b { color: var(--text); font-weight: 600; }
.l-when { font-size: 11.5px; color: var(--text-faint); direction: ltr; font-family: var(--font-mono); }
@media (max-width: 420px) {
  .stats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--3 .stat--coin { grid-column: 1 / -1; }
  .l-row { grid-template-columns: auto minmax(0, 1fr); }
  .l-when { grid-column: 2; }
}
