/* RQUEEN PisoWiFi Licensing
   Visual language adapted from ui/templete2 (dark zinc, Clash Display,
   pill buttons, light rays) with the logo's sky blue as the only accent. */

:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-2: #0e0e11;
  --card: #131316;
  --card-2: #18181b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f3f3;
  --text-2: #a5a5a5;
  --text-3: #71717a;
  --brand: #e4e4e7;
  --sky: #8fd3f4;
  --sky-dim: color-mix(in srgb, var(--sky) 14%, transparent);
  --gold: #e0b04a;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 18px;
  --display: "Clash Display", "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: -0.01em; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0.02em; }
small { display: block; color: var(--text-3); font-size: 0.8rem; }
::selection { background: var(--sky); color: #06121a; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  display: inline-block;
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.lead { color: var(--text-2); font-size: 1.06rem; }
.dim { color: var(--text-3); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-3); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: #000; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
.brand-mark img { width: 46px; height: 46px; max-width: none; margin-top: -3px; }
.brand-name { font: 600 1rem/1 var(--display); letter-spacing: 0.04em; }
.brand em { font: 400 0.8rem/1 var(--sans); font-style: normal; color: var(--text-3); margin-left: 0.4rem; letter-spacing: 0; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: var(--h); padding: 0 1.35rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 0.95rem/1 var(--sans);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--brand) linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
  color: #09090b;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 8px 30px -10px color-mix(in srgb, var(--sky) 45%, transparent);
}
.btn-primary:hover { background-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.3) inset, 0 10px 40px -8px color-mix(in srgb, var(--sky) 60%, transparent); }
.btn-secondary { background: rgba(255,255,255,0.06); border-color: var(--line-2); color: var(--text); backdrop-filter: blur(8px); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn-ok { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.btn-ok:hover { background: rgba(52, 211, 153, 0.22); }
.btn-danger-text:hover { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); }
.btn-sm { --h: 36px; padding: 0 1rem; font-size: 0.86rem; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }

.btn-copy {
  height: 34px; padding: 0 0.9rem; border-radius: 999px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line-2); color: var(--text);
  font: 500 0.8rem/1 var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s;
}
.btn-copy:hover { background: rgba(255,255,255,0.14); }
.btn-copy.copied { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.btn-copy-small { height: 26px; padding: 0 0.6rem; font-size: 0.72rem; margin-left: 0.4rem; }

/* ---------- Badges / status ---------- */
.badge {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.04);
  font: 500 0.72rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
}
.badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.14) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine 4.5s ease-in-out infinite;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: ping 2s infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }

.st {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.18rem 0.55rem; border-radius: 999px;
  font: 500 0.72rem/1.4 var(--sans); text-transform: capitalize;
  border: 1px solid transparent;
}
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-issued { color: #6ee7b7; background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.2); }
.st-pending { color: #fcd34d; background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.2); }
.st-rejected { color: #fca5a5; background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); }
.src { font: 500 0.72rem/1 var(--mono); color: var(--text-2); background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 0.25rem 0.45rem; border-radius: 6px; }

/* ---------- Flashes ---------- */
.flashes { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
.flash { padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.92rem; border: 1px solid; }
.flash-error { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); color: #fecaca; }
.flash-success { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.3); color: #a7f3d0; }

/* ---------- Site nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding: 14px 16px; transition: padding 0.3s var(--ease); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 10px 10px 10px 16px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled .nav-inner { background: color-mix(in srgb, var(--bg-2) 72%, transparent); border-color: var(--line); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a { padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--text-2); font-size: 0.92rem; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-cta { display: flex; align-items: center; gap: 0.5rem; }
.nav-signin { color: var(--text-2); font-size: 0.92rem; padding: 0.5rem 0.75rem; }
.nav-signin:hover { color: var(--text); }

/* ---------- Background FX ---------- */
.rays {
  position: absolute; inset: -120px 0 auto; height: 900px; pointer-events: none; z-index: 0;
  background:
    conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255,255,255,0.07) 172deg, transparent 178deg, rgba(255,255,255,0.05) 186deg, transparent 194deg, color-mix(in srgb, var(--sky) 6%, transparent) 200deg, transparent 212deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  animation: sway 14s ease-in-out infinite alternate;
}
.rays-soft { opacity: 0.6; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  opacity: 0.55;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: 110px; }
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 2rem 24px 3rem;
  display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 2rem;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.hero-title {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem); line-height: 0.98; letter-spacing: -0.03em;
  background: linear-gradient(to bottom, #fafafa 30%, #9a9aa2);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .muted { -webkit-text-fill-color: var(--text-3); font-style: italic; font-weight: 400; }
.hero-sub { color: var(--text-2); font-size: 1.12rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.keycard {
  margin-top: 0.75rem; width: 100%; max-width: 440px;
  padding: 1rem 1.1rem; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.keycard-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.keycard-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }
.keycard-row code { color: var(--text-2); }
.keycard-key { color: var(--sky) !important; font-weight: 500; text-shadow: 0 0 18px color-mix(in srgb, var(--sky) 45%, transparent); }
.keycard-arrow { display: flex; align-items: center; gap: 0.6rem; margin: 0.55rem 0; }
.keycard-arrow span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.keycard-arrow em { font: 400 0.65rem/1 var(--mono); font-style: normal; color: var(--text-3); letter-spacing: 0.08em; }

.hero-stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: center; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; cursor: grab; touch-action: pan-y; }
.hero-stage canvas:active { cursor: grabbing; }
.stage-glow {
  position: absolute; inset: 12%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--sky) 22%, transparent), color-mix(in srgb, var(--sky) 4%, transparent) 45%, transparent 70%);
  filter: blur(30px); animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.06); opacity: 0.8; } }
.stage-fallback { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 28px; mix-blend-mode: lighten; display: none; }
.no-webgl .stage-fallback { display: block; }
.stage-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.8rem; border-radius: 12px;
  background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); font-size: 0.8rem; color: var(--text-2);
  animation: float 7s ease-in-out infinite;
}
.chip-a { top: 16%; left: 2%; }
.chip-b { bottom: 18%; right: 0; animation-delay: -3s; color: var(--gold); font-family: var(--mono); }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
@keyframes float { 50% { transform: translateY(-10px); } }

.ticker { position: relative; z-index: 2; border-block: 1px solid var(--line); overflow: hidden; background: rgba(255,255,255,0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; gap: 2rem; width: max-content; padding: 1.1rem 0; animation: marquee 38s linear infinite; }
.ticker-track span { font: 500 0.95rem/1 var(--display); color: var(--text-2); letter-spacing: 0.02em; white-space: nowrap; }
.ticker-track i { color: var(--text-3); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; max-width: 1200px; margin: 0 auto; padding: 7rem 24px 0; }
.section-narrow { max-width: 820px; }
.section-head { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 3rem; max-width: 40rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.02em; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.step { position: relative; padding: 2rem 2rem 2rem 0; display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.step + .step { padding-left: 2rem; border-left: 1px solid var(--line); }
.step-num { font: 500 3.4rem/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--line-2); margin-bottom: 0.6rem; }
.step:hover .step-num { -webkit-text-stroke-color: var(--sky); }
.step h3 { font-size: 1.35rem; }
.step p { color: var(--text-2); }
.pill { margin-top: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.pill-ok { color: #6ee7b7; border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.07); }
.receipt { margin-top: 0.4rem; display: inline-flex; gap: 0.8rem; align-items: baseline; padding: 0.45rem 0.8rem; border-radius: 10px; background: linear-gradient(135deg, #1f9d6b, #11704b); color: #d1fae5; font-size: 0.85rem; }
.receipt b { font-weight: 500; color: #fff; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  padding: 1.75rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card) 60%);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.7rem;
  transform-style: preserve-3d; transition: transform 0.5s var(--ease), border-color 0.3s;
  will-change: transform;
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--sky) 9%, transparent), transparent 45%);
}
.tile:hover { border-color: var(--line-2); }
.tile:hover::before { opacity: 1; }
.tile h3 { font-size: 1.3rem; }
.tile p { color: var(--text-2); font-size: 0.97rem; }
.tile-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem; align-items: center; }
.tile-text { display: flex; flex-direction: column; gap: 0.7rem; }
.big-figure { font: 500 3.2rem/1 var(--display); letter-spacing: -0.03em; margin-bottom: auto; padding-bottom: 1.5rem; }
.big-figure small { display: inline; font: 400 1rem var(--sans); color: var(--text-3); margin-left: 0.2rem; }
.tile-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--sky-dim); border: 1px solid color-mix(in srgb, var(--sky) 25%, transparent); margin-bottom: auto; }
.tile-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--sky); stroke-width: 1.7; stroke-linecap: round; }
.tile-icon + h3 { margin-top: 1.5rem; }
.alphabet { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: auto; padding-bottom: 1.5rem; }
.alphabet span, .alphabet s { width: 34px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); font-size: 1rem; text-decoration: none; }
.alphabet s { color: var(--bad); border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.06); position: relative; opacity: 0.8; }
.alphabet s::after { content: ""; position: absolute; width: 70%; height: 1.5px; background: var(--bad); transform: rotate(-35deg); }

.bind-demo { display: grid; gap: 10px; }
.bind-row { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; padding: 0.8rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-size: 0.85rem; }
.bind-row code { color: var(--text); }
.bind-row span { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); grid-column: 1; }
.bind-row b { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 500 0.75rem var(--sans); padding: 0.25rem 0.55rem; border-radius: 999px; }
.bind-row.ok b { color: #6ee7b7; background: rgba(52,211,153,0.1); }
.bind-row.bad b { color: #fca5a5; background: rgba(248,113,113,0.1); }
.bind-row.bad { opacity: 0.75; }

.tile-log { justify-content: space-between; }
.tile-log .log li { grid-template-columns: 1fr auto; }
.tile-log .log time { display: none; }
.log { list-style: none; margin: 0; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.log li { display: grid; grid-template-columns: 1fr auto auto; gap: 0.8rem; align-items: center; padding: 0.7rem 0.9rem; font-size: 0.82rem; }
.log li + li { border-top: 1px solid var(--line); }
.log time { color: var(--text-3); font-size: 0.78rem; }

/* Pricing */
.pricing {
  display: grid; grid-template-columns: 1fr 420px; gap: 3rem; align-items: center;
  padding: 3rem; border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 85% 20%, color-mix(in srgb, var(--sky) 8%, transparent), transparent 60%),
    var(--bg-2);
}
.pricing-copy { display: flex; flex-direction: column; gap: 1rem; }
.pricing-copy h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.pricing-copy p { color: var(--text-2); max-width: 26rem; }
.price-card {
  padding: 1.75rem; border-radius: 22px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.03) inset;
  transition: transform 0.5s var(--ease);
}
.price-top { padding-bottom: 1.25rem; border-bottom: 1px dashed var(--line-2); margin-bottom: 1.25rem; }
.price-label { font-size: 0.85rem; color: var(--text-2); }
.price { font: 500 4rem/1 var(--display); letter-spacing: -0.03em; margin-top: 0.6rem; display: flex; align-items: flex-start; gap: 0.15rem; }
.price .cur { font-size: 1.8rem; margin-top: 0.45rem; color: var(--text-2); }
.price small { display: inline; align-self: flex-end; margin: 0 0 0.5rem 0.5rem; font: 400 0.9rem var(--sans); }
.checks { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.7rem; }
.checks li { position: relative; padding-left: 1.8rem; color: var(--text-2); font-size: 0.95rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 18px; height: 18px; border-radius: 50%; background: var(--sky-dim); }
.checks li::after {
  content: ""; position: absolute; left: 3px; top: calc(0.2rem + 3px); width: 12px; height: 12px; background: var(--sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.price-note { text-align: center; font-size: 0.8rem; color: var(--text-3); margin-top: 0.9rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.4rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font: 500 1.15rem/1.3 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5a5a5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding: 0 3rem 1.5rem 0; }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: 5rem 2rem; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--sky) 16%, transparent), transparent 60%), var(--bg-2);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.cta h2 { position: relative; font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 18ch; }
.cta p { position: relative; color: var(--text-2); margin-bottom: 0.75rem; }
.cta .btn { position: relative; }
.cta-rings { position: absolute; left: 50%; bottom: -60%; width: 0; height: 0; }
.cta-rings i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--sky) 22%, transparent); transform: translate(-50%, -50%); animation: ring 6s linear infinite; }
.cta-rings i:nth-child(2) { animation-delay: -2s; }
.cta-rings i:nth-child(3) { animation-delay: -4s; }
@keyframes ring { from { width: 100px; height: 100px; opacity: 1; } to { width: 1400px; height: 1400px; opacity: 0; } }

/* Footer */
.footer { margin-top: 7rem; border-top: 1px solid var(--line); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 3.5rem 24px 2.5rem; display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.footer-brand { max-width: 22rem; display: flex; flex-direction: column; gap: 1rem; }
.footer-brand p { color: var(--text-3); font-size: 0.92rem; }
.footer-cols { display: flex; gap: 4rem; }
.footer-cols div { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-cols h4 { font: 500 0.75rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.3rem; }
.footer-cols a { color: var(--text-2); font-size: 0.92rem; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 1.25rem 24px 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-3); font-size: 0.8rem; border-top: 1px solid var(--line); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Forms ---------- */
.panel { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: 1.75rem; }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.field > span { font-size: 0.85rem; color: var(--text-2); font-weight: 500; }
.field > span em { font-style: normal; color: var(--text-3); font-weight: 400; margin-left: 0.3rem; font-size: 0.78rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input, textarea {
  width: 100%; padding: 0.75rem 0.9rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder, textarea::placeholder { color: #52525b; }
input:focus, textarea:focus { outline: none; border-color: color-mix(in srgb, var(--sky) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 10%, transparent); }
input:user-invalid { border-color: rgba(248,113,113,0.5); }
textarea { resize: vertical; min-height: 88px; }
.field-hl input { font-size: 1.15rem; padding: 0.9rem 1rem; letter-spacing: 0.06em; }
.input-prefix { position: relative; }
.input-prefix i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-3); }
.input-prefix input { padding-left: 1.9rem; }

/* ---------- Order / done pages ---------- */
.page { position: relative; min-height: 100vh; padding: 130px 24px 0; overflow: hidden; }
.order { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 0.85fr 1fr; gap: 4rem; align-items: start; }
.order-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 1.1rem; }
.order-side h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: -0.02em; }
.mini-steps { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: s; display: grid; gap: 1rem; }
.mini-steps li { counter-increment: s; position: relative; padding-left: 2.8rem; color: var(--text-2); }
.mini-steps li b { color: var(--text); font-weight: 500; }
.mini-steps li::before { content: counter(s); position: absolute; left: 0; top: -0.1rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font: 500 0.85rem var(--display); color: var(--text); }

.done { position: relative; z-index: 1; max-width: 560px; margin: 2rem auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.done h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.done-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); box-shadow: 0 0 60px rgba(52,211,153,0.2); margin-bottom: 0.5rem; }
.done-mark svg { width: 34px; height: 34px; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.7s 0.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.summary { width: 100%; margin: 1rem 0; display: grid; gap: 0; padding: 0.5rem 1.25rem; text-align: left; }
.summary > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; }
.summary > div + div { border-top: 1px solid var(--line); }
.summary dt { color: var(--text-3); font-size: 0.88rem; }
.summary dd { margin: 0; text-align: right; }

/* ---------- Auth ---------- */
.auth-split { display: grid; grid-template-columns: minmax(360px, 520px) 1fr; min-height: 100vh; }
.auth-form { display: flex; flex-direction: column; justify-content: space-between; padding: 2rem 3rem; gap: 2rem; }
.auth-box { width: 100%; max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.auth-box h1 { font-size: 2.4rem; }
.auth-box .lead { margin-bottom: 0.75rem; }
.auth-back { color: var(--text-3); font-size: 0.88rem; }
.auth-back:hover { color: var(--text); }
.auth-stage { position: relative; max-width: none; aspect-ratio: auto; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(ellipse at 50% 40%, var(--card), var(--bg) 70%); }
.auth-stage .stage-glow { inset: 20%; }
.auth-stage canvas { top: 6%; left: 10%; width: 80%; height: 72%; }
.auth-quote { position: absolute; left: 2.5rem; right: 2.5rem; bottom: 2.5rem; z-index: 2; color: var(--text-3); font: 400 1.05rem/1.4 var(--display); max-width: 26rem; }

/* ---------- Admin shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2rem; padding: 1.4rem 1rem; border-right: 1px solid var(--line); background: var(--bg-2); }
.sidebar .brand { padding: 0 0.5rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { font: 500 0.68rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding: 1rem 0.75rem 0.5rem; }
.side-label:first-child { padding-top: 0; }
.side-nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; border-radius: 10px; color: var(--text-2); font-size: 0.92rem; transition: background 0.2s, color 0.2s; }
.side-nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.side-nav a.active { background: rgba(255,255,255,0.07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: rgba(251,191,36,0.15); color: #fcd34d; font: 600 0.72rem var(--sans); }
.side-foot { margin-top: auto; padding: 0 0.25rem; }
.side-foot .btn { width: 100%; }

.main { min-width: 0; padding: 2rem 2.5rem 4rem; max-width: 1280px; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.main-head h1 { font-size: 2.1rem; margin-top: 0.4rem; }
.main-actions { display: flex; gap: 0.5rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 1.75rem; }
.stat { position: relative; overflow: hidden; padding: 1.2rem 1.25rem; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card-2), var(--card)); display: flex; flex-direction: column; gap: 0.35rem; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c, rgba(255,255,255,0.05)); filter: blur(30px); }
.stat-warn { --c: rgba(251,191,36,0.16); }
.stat-ok { --c: rgba(52,211,153,0.14); }
.stat-bad { --c: rgba(248,113,113,0.12); }
.stat-label { font-size: 0.82rem; color: var(--text-2); }
.stat-num { font: 500 2.4rem/1.1 var(--display); letter-spacing: -0.02em; }
.stat-foot { font-size: 0.78rem; color: var(--text-3); }

.card-block { border: 1px solid var(--line); border-radius: 18px; background: var(--card); margin-bottom: 1.5rem; overflow: hidden; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.block-head h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 0.6rem; }
.block-head p { color: var(--text-3); font-size: 0.85rem; }
.count { font: 500 0.75rem var(--sans); padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--text-2); }

.empty { padding: 3rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; color: var(--text-3); }
.empty svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: rgba(52,211,153,0.08); fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.queue { display: flex; flex-direction: column; }
.order-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.1rem 1.25rem; }
.order-card + .order-card { border-top: 1px solid var(--line); }
.order-card:hover { background: rgba(255,255,255,0.015); }
.oc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.7rem; }
.oc-top { display: flex; align-items: center; gap: 0.75rem; }
.oc-id { font: 500 0.8rem var(--mono); color: var(--text-3); }
.oc-device { font-size: 1.02rem; color: var(--text); }
.oc-meta { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.oc-meta dt { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.oc-meta dd { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.oc-notes { font-size: 0.85rem; color: var(--text-2); padding: 0.55rem 0.75rem; border-left: 2px solid var(--line-2); background: rgba(255,255,255,0.02); border-radius: 0 8px 8px 0; }
.oc-actions { display: flex; flex-direction: column; gap: 0.5rem; flex: none; }
.oc-actions .btn { width: 100%; }

.search { position: relative; }
.search svg { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search input { padding: 0.5rem 0.8rem 0.5rem 2.2rem; border-radius: 999px; width: 260px; font-size: 0.88rem; background: var(--bg-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font: 500 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding: 0.8rem 1.25rem; background: rgba(255,255,255,0.015); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
td code { color: var(--text); }
.no-match { padding: 1.5rem; text-align: center; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; max-width: 1000px; }
.aside-note { padding: 1.25rem; border-radius: 16px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 0.75rem; }
.aside-note h3 { font-size: 1.05rem; }
.aside-note p { color: var(--text-2); font-size: 0.9rem; }

.key-hero { position: relative; overflow: hidden; max-width: 820px; padding: 2.5rem; border-radius: 24px; border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--card-2), var(--card)); display: flex; flex-direction: column; gap: 1.25rem; }
.key-hero-glow { position: absolute; left: 50%; top: -120px; width: 520px; height: 260px; transform: translateX(-50%); background: radial-gradient(ellipse, color-mix(in srgb, var(--sky) 20%, transparent), transparent 70%); pointer-events: none; }
.key-label { position: relative; color: var(--text-2); font-size: 0.9rem; }
.key-row { position: relative; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.key-big { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 500; letter-spacing: 0.08em; color: var(--sky); text-shadow: 0 0 30px color-mix(in srgb, var(--sky) 35%, transparent); padding: 0.6rem 0; }
.summary-inline { position: relative; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hint { position: relative; font-size: 0.85rem; color: var(--text-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 1rem; }
  .hero-copy { order: 1; }
  .hero-stage { order: 0; max-width: 460px; margin: -1rem auto 0; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: span 2; }
  .pricing { grid-template-columns: 1fr; padding: 2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .oc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-split { grid-template-columns: 1fr; }
  .auth-stage { display: none; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .main { padding: 1.5rem 16px 3rem; }
  .split { grid-template-columns: 1fr; }
  .order { grid-template-columns: 1fr; gap: 2rem; }
  .order-side { position: static; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 1.75rem 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .order-card { flex-direction: column; align-items: stretch; }
  .oc-actions { flex-direction: row; }
}
@media (max-width: 640px) {
  .nav { padding: 10px 12px; }
  .nav-signin { padding: 0.5rem; }
  .brand em { display: none; }
  .hero { padding-top: 84px; }
  .hero-inner, .section { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 5rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .chip-a { left: 0; top: 10%; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide, .tile-log { grid-column: auto; grid-template-columns: 1fr; }
  .pricing { padding: 1.25rem; gap: 2rem; border-radius: 22px; }
  .price-card { padding: 1.25rem; }
  .cta { padding: 3.5rem 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
  .page { padding: 100px 16px 0; }
  .panel { padding: 1.25rem; }
  .faq details p { padding-right: 0; }
  .footer-cols { gap: 2.5rem; }
  .hide-sm { display: none; }
  .auth-form { padding: 1.5rem 16px; }
  .search input { width: 100%; }
  .search { flex: 1; }
  .key-hero { padding: 1.5rem; }
  .log li { grid-template-columns: 1fr auto; }
  .log time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Online checkout ---------- */
.st-awaiting_payment { color: #93c5fd; background: rgba(147,197,253,0.08); border-color: rgba(147,197,253,0.2); }
.flash-info { background: color-mix(in srgb, var(--sky) 7%, transparent); border-color: color-mix(in srgb, var(--sky) 25%, transparent); color: #cfeefc; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.75rem; }
.pay-methods span { padding: 0.4rem 0.75rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); font: 500 0.82rem var(--sans); color: var(--text-2); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0 0.25rem; border-top: 1px dashed var(--line-2); }
.total span { color: var(--text-2); }
.total b { font: 500 1.8rem/1 var(--display); letter-spacing: -0.02em; }
.secure-note { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8rem; color: var(--text-3); }
.secure-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.key-panel { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin: 0.75rem 0 0.25rem; }
.key-panel .key-big { font-size: clamp(1.35rem, 6vw, 2.2rem); overflow-wrap: anywhere; }
.link { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--sky); animation: spin 0.9s linear infinite; margin-bottom: 0.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reseller accounts ---------- */
.st-revoked { color: var(--text-3); background: rgba(255,255,255,0.04); border-color: var(--line); }
.row-off td { opacity: 0.55; }
.right { text-align: right; }
.auth-switch { font-size: 0.9rem; color: var(--text-3); margin-top: 0.5rem; }
.credit-pill { display: inline-flex; align-items: center; gap: 0.6rem; height: 36px; padding: 0 0.5rem 0 0.9rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 0.85rem; color: var(--text-2); }
.credit-pill b { min-width: 28px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--sky-dim); color: var(--sky); font: 600 0.85rem var(--sans); }
.side-foot { display: flex; flex-direction: column; gap: 0.75rem; }
.side-user { padding: 0 0.5rem; min-width: 0; }
.side-user b { display: block; font-weight: 500; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.onboard { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 1.5rem; margin-bottom: 1.5rem; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--sky) 25%, transparent); background: radial-gradient(500px 200px at 0% 0%, color-mix(in srgb, var(--sky) 12%, transparent), transparent 70%), var(--card); }
.onboard h2 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.onboard p { color: var(--text-2); }

.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.25rem; margin-bottom: 1.5rem; align-items: stretch; }
.gen-card { margin: 0; display: flex; flex-direction: column; }
.gen-form { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.gen-form textarea { flex: 1; min-height: 150px; font-size: 0.95rem; line-height: 1.7; letter-spacing: 0.04em; background: var(--bg-2); }
.gen-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.85rem; }
.gen-aside { display: flex; flex-direction: column; gap: 12px; }
.aside-tip { font-size: 0.82rem; color: var(--text-3); padding: 0 0.25rem; }
.results { border-color: rgba(52,211,153,0.3); }
.key-cell { color: var(--sky) !important; }
.tag { font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.tag-new { color: #fcd34d; background: rgba(251,191,36,0.08); }
.tag-existing, .tag-restored { color: #6ee7b7; background: rgba(52,211,153,0.08); }
.head-tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bundle { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.5rem; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card-2), var(--card)); }
.bundle-hl { border-color: color-mix(in srgb, var(--sky) 40%, transparent); background: radial-gradient(400px 200px at 50% 0%, color-mix(in srgb, var(--sky) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--card-2), var(--card)); }
.bundle-tag { position: absolute; top: 1.2rem; right: 1.2rem; font: 500 0.7rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); padding: 0.3rem 0.6rem; border-radius: 999px; background: var(--sky-dim); }
.bundle-qty { font: 500 3rem/1 var(--display); letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 0.5rem; }
.bundle-qty small { display: inline; font: 400 0.95rem var(--sans); }
.bundle-price { font: 500 1.4rem var(--display); margin-top: 0.75rem; }
.bundle-each { font-size: 0.85rem; color: var(--text-3); margin-bottom: 1.25rem; }
.bundle .btn { margin-top: auto; }
.center-note { justify-content: center; margin: 1rem 0 2rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.two-col .card-block { margin: 0; }
.delta-up { color: #6ee7b7; font-weight: 600; }
.delta-down { color: var(--text-2); font-weight: 600; }
.done-left { align-items: flex-start; text-align: left; margin: 1rem 0 0; }

.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { padding: 0.4rem 0.6rem; font-size: 0.85rem; border-radius: 8px; }
.inline-form input[type=number] { width: 80px; }
.inline-form input[type=text] { width: 140px; }
.credit-num { font: 500 1.1rem var(--display); }

/* Landing: reseller bundles */
.resell { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding: 2rem 3rem; border-radius: 28px; border: 1px solid var(--line); background: var(--bg-2); }
.resell h3 { font-size: 1.6rem; margin: 0.6rem 0 0.5rem; }
.resell p { color: var(--text-2); max-width: 30rem; }
.resell-packs { display: flex; gap: 10px; flex-wrap: wrap; }
.resell-packs div { padding: 0.9rem 1.1rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); min-width: 118px; }
.resell-packs b { display: block; font: 500 1.5rem/1 var(--display); }
.resell-packs span { font-size: 0.8rem; color: var(--text-3); }
.resell-cta { grid-column: 1 / -1; display: flex; gap: 0.75rem; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .gen-grid { grid-template-columns: 1fr; }
  .gen-aside { flex-direction: row; flex-wrap: wrap; }
  .gen-aside .stat { flex: 1; min-width: 160px; }
  .two-col { grid-template-columns: 1fr; }
  .resell { grid-template-columns: 1fr; padding: 2rem; }
}

@media (max-width: 640px) {
  .bundles { grid-template-columns: 1fr; }
  .resell { padding: 1.25rem; border-radius: 22px; }
  .inline-form input[type=text] { width: 100px; }
}
.section-tight { padding-top: 0; }
td code { white-space: nowrap; }

/* ---------- Admin: theme ---------- */
.theme-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.theme-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; background: none; border: 0; color: var(--text-2); font: 500 0.78rem var(--sans); cursor: pointer; padding: 0; }
.swatch i { width: 46px; height: 46px; border-radius: 14px; background: var(--c); box-shadow: 0 0 0 1px var(--line-2); transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.swatch:hover i { transform: translateY(-2px); }
.swatch.on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c), 0 8px 24px -6px var(--c); }
.swatch.on span { color: var(--text); }
.custom-color { display: flex; align-items: center; gap: 0.75rem; }
.custom-color input[type=color] { width: 46px; height: 46px; padding: 3px; border-radius: 14px; background: var(--bg-2); cursor: pointer; }
.custom-color span { color: var(--text-2); font-size: 0.9rem; }
.custom-color input[type=text] { width: 130px; text-transform: lowercase; }
.contrast-warn { font-size: 0.85rem; color: #fcd34d; }
.tones { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.tone { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem 0.6rem 0.6rem; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; font-size: 0.9rem; color: var(--text-2); }
.tone input { position: absolute; opacity: 0; pointer-events: none; }
.tone-chip { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
.tone:has(input:checked) { border-color: var(--sky); color: var(--text); background: var(--sky-dim); }
.tone:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.theme-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.theme-preview { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pv-card { padding: 1.5rem; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(400px 220px at 50% 0%, var(--sky-dim), transparent 70%), var(--bg); display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.pv-card h3 { font-size: 1.7rem; letter-spacing: -0.02em; }
.pv-card .keycard { margin: 0; }
.pv-card .checks { margin: 0; }
.pv-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.pv-note { font-size: 0.8rem; color: var(--text-3); }
@media (max-width: 1024px) { .theme-grid { grid-template-columns: 1fr; } .theme-preview { position: static; } }
.tone-custom input[type=color] { position: static; opacity: 1; pointer-events: auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; box-shadow: 0 0 0 1px var(--line-2); }
.tone-custom input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.tone-custom input[type=color]::-webkit-color-swatch { border: 0; border-radius: 9px; }
.tone-warn { padding: 0 1.25rem 1.25rem; margin-top: -0.5rem; }

/* ---------- Email confirmation ---------- */
.mail-mark { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--sky-dim); border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); margin-bottom: 0.5rem; }
.mail-mark svg { width: 28px; height: 28px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.verify-tips { margin: 0 0 0.5rem; padding-left: 1.1rem; color: var(--text-2); font-size: 0.92rem; display: grid; gap: 0.35rem; }
.verify-tips b { color: var(--text); font-weight: 500; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.verify-inline { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.8rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; }
.forgot-link { font-size: 0.82rem; font-weight: 400; }

/* ---------- Sales & status dashboard ---------- */
.st-online { color: #6ee7b7; background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.2); }
.st-offline { color: #fca5a5; background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); }
.st-never { color: var(--text-3); background: rgba(255,255,255,0.04); border-color: var(--line); }
.tag-bad { color: #fca5a5; background: rgba(248,113,113,0.08); }
.tag-warn { color: #fcd34d; background: rgba(251,191,36,0.08); }
.tag-test { color: var(--text-3); background: rgba(255,255,255,0.05); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.secret-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.secret-row code { word-break: break-all; }
.setup-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }

.live-note { font-size: 0.75rem; color: var(--text-3); margin: -0.5rem 0 1rem; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 1.25rem; }
.kpi { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card-2) 60%, transparent); min-width: 0; }
.kpi-label { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.kpi-value { font: 600 1.55rem/1.15 var(--sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value small { display: inline; font-size: 0.95rem; font-weight: 500; color: var(--text-3); }
.kpi-trend { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; color: var(--text-3); }
.kpi-trend svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-trend.up { color: var(--ok); }
.kpi-trend.down { color: var(--bad); }
.kpi-alert { border-color: rgba(248,113,113,0.35); background: linear-gradient(180deg, rgba(248,113,113,0.07), transparent), var(--card); }
.kpi-alert .kpi-value { color: #fca5a5; }

/* Widget rows (template: 1fr + 300px) */
.dash-row { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; align-items: stretch; }
.dash-row-chart { grid-template-columns: minmax(0, 1fr) 300px; }
.dash-row-fleet { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
#fleet { margin-bottom: 1.25rem; }
.widget { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.4rem;
  background: color-mix(in srgb, var(--card-2) 45%, var(--bg)); margin-bottom: 1.25rem; }
.dash-row .widget { margin-bottom: 0; }
.widget-flush { padding: 0; overflow: hidden; }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.widget-flush .widget-head { padding: 1.1rem 1.4rem 0; }
.widget-head h3 { font: 400 1.05rem var(--sans); color: var(--text); display: flex; align-items: center; gap: 0.55rem; }
.widget-sub { font-size: 0.75rem; color: var(--text-3); }
.widget-empty { color: var(--text-3); font-size: 0.88rem; padding: 1.5rem 0; text-align: center; }

/* Area chart */
.area-chart { position: relative; display: grid; grid-template-columns: 3.6rem 1fr; grid-template-rows: 220px auto; }
.area-y { position: relative; grid-row: 1; }
.area-y span { position: absolute; right: 0.6rem; transform: translateY(-50%); font-size: 0.7rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.area-plot { position: relative; grid-row: 1; grid-column: 2; margin: 0 6px; }
.area-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.area-plot .grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.area-plot .grid.base { border-top-style: solid; border-color: var(--line-2); }
.area-line { fill: none; stroke: var(--sky); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.area-end, .area-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--sky);
  box-shadow: 0 0 0 2px var(--bg), 0 0 14px color-mix(in srgb, var(--sky) 60%, transparent); transform: translate(-50%, -50%); pointer-events: none; }
.area-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--line-2); pointer-events: none; }
.area-hit { position: absolute; top: 0; bottom: 0; width: 7.2%; transform: translateX(-50%); background: none; border: 0; padding: 0; cursor: crosshair; }
.area-hit:focus-visible { outline: 1px dashed var(--sky); }
.area-tip { position: absolute; z-index: 3; min-width: 110px; padding: 0.5rem 0.65rem; border-radius: 8px; pointer-events: none;
  background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0,0,0,0.45); font-size: 0.75rem; color: var(--text-2);
  transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.area-tip b { display: block; font-size: 0.95rem; color: var(--text); font-variant-numeric: tabular-nums; }
.area-x { position: relative; grid-row: 2; grid-column: 2; height: 1.6rem; margin: 0 6px; }
.area-x span { position: absolute; top: 0.45rem; transform: translateX(-50%); font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }
.area-x span:last-child { transform: translateX(-85%); }

/* Donut */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.donut { position: relative; width: 170px; height: 170px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 11; }
.donut-track { stroke: rgba(255,255,255,0.05); }
.donut-seg { stroke-linecap: butt; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center b { font: 600 1.8rem/1 var(--sans); }
.donut-center span { font-size: 0.74rem; color: var(--text-3); margin-top: 0.2rem; }
.seg-online { stroke: var(--ok); background: var(--ok); }
.seg-offline { stroke: var(--bad); background: var(--bad); }
.seg-never { stroke: #52525b; background: #52525b; }
.seg-alert { background: var(--warn); }
.legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 0.5rem; }
.legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--text-2); }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* Top vendos */
.leaders { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.leader-link { display: block; text-decoration: none; color: inherit; margin: -0.3rem -0.5rem; padding: 0.3rem 0.5rem; border-radius: 10px; }
.leader-link:hover { background: color-mix(in srgb, var(--sky) 10%, transparent); }
.leader-link:hover .leader-name { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.leader-top { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.86rem; margin-bottom: 0.4rem; }
.leader-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.leader-top b { font-variant-numeric: tabular-nums; }
.leader-bar { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.05); overflow: hidden; }
.leader-bar i { display: block; height: 100%; border-radius: 4px; background: var(--sky); min-width: 4px; }
.leaders small { display: block; margin-top: 0.3rem; font-size: 0.72rem; color: var(--text-3); }

/* Vendo table */
.fleet-tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.fleet-tools .search input { width: 220px; }
#fleet-sort, #log-filter select { padding: 0.45rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1.4rem 1rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.75rem; border-radius: 999px; font: 500 0.8rem var(--sans);
  color: var(--text-2); background: transparent; border: 1px solid var(--line); cursor: pointer; transition: all 0.15s var(--ease); }
.chip b { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { color: var(--text); border-color: color-mix(in srgb, var(--sky) 45%, transparent); background: var(--sky-dim); }
.chip.on b { color: var(--text); }
table.fleet th { padding: 0.7rem 1rem; }
table.fleet td { padding: 0.75rem 1rem; }
table.fleet tbody tr:nth-child(even) { background: rgba(255,255,255,0.012); }
table.fleet tbody tr:hover { background: rgba(255,255,255,0.03); }
table.fleet td small { display: block; font-size: 0.72rem; margin-top: 0.15rem; }
.vendo-name { display: block; font-weight: 500; color: var(--text); }
.vendo-id { font-size: 0.72rem; color: var(--text-3) !important; }
.seen { margin-top: 0.3rem !important; }
.fleet-wrap { max-height: 720px; overflow: auto; border-top: 1px solid var(--line); }
.recent-wrap { max-height: 520px; overflow: auto; border-top: 1px solid var(--line); }
.fleet-wrap thead th, .recent-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--card-2); }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; vertical-align: middle; margin-right: 0.45rem; }
.signal i { width: 3px; border-radius: 1px; background: rgba(255,255,255,0.12); }
.signal i:nth-child(1) { height: 25%; } .signal i:nth-child(2) { height: 50%; } .signal i:nth-child(3) { height: 75%; } .signal i:nth-child(4) { height: 100%; }
.signal.s4 i, .signal.s3 i:nth-child(-n+3) { background: var(--ok); }
.signal.s2 i:nth-child(-n+2) { background: var(--warn); }
.signal.s1 i:nth-child(1) { background: var(--bad); }
.health-meta { display: inline-block; vertical-align: middle; font-size: 0.82rem; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-row-fleet { grid-template-columns: 1fr; }
  .leaders { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dash-row-chart { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: row; justify-content: center; }
  .legend { width: auto; min-width: 150px; }
  .fleet-tools, .fleet-tools .search, .fleet-tools .search input { width: 100%; }
}


/* Phones: each vendo becomes a card instead of a wide table row. */
@media (max-width: 640px) {
  #fleet-table thead { display: none; }
  #fleet-table, #fleet-table tbody { display: block; }
  #fleet-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 1rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
  #fleet-table tr[hidden] { display: none; }
  #fleet-table td { display: block; padding: 0; border: 0; }
  #fleet-table td:nth-child(1) { grid-column: 1 / 3; }
  #fleet-table td:nth-child(2) { text-align: right; }
  #fleet-table td:nth-child(2) .seen { display: block; }
  #fleet-table td[data-label] { text-align: left; font-size: 0.85rem; }
  #fleet-table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.15rem; }
  #fleet-table td[data-label="Health"] { grid-column: 1 / -1; }
  #fleet-table .alerts-cell { grid-column: 1 / -1; }
  #fleet-table .alerts-cell .dim { display: none; }
  #fleet-table td.center { grid-column: 1 / -1; }
  .fleet-wrap { max-height: none; }
  .chips { overflow-x: auto; flex-wrap: nowrap; }
  .chip { flex: none; }
}

/* ---------- Coin-outs ---------- */
.kpi-good .kpi-value { color: #6ee7b7; }
.money-list { margin: 0; display: grid; gap: 0.1rem; }
.money-list div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.money-list div:last-child { border-bottom: 0; }
.money-list dt { color: var(--text-2); }
.money-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.money-list .money-total { border-bottom-style: solid; border-color: var(--line-2); }
.money-list .money-total dt, .money-list .money-total dd { color: var(--text); font-weight: 600; font-size: 1rem; }
.money-list .money-bad dd { color: #fca5a5; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0 1.4rem 1rem; }
.bulk-bar select, .bulk-bar input, .filter-row select { padding: 0.45rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }
.bulk-bar input { width: 130px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.note-row td { padding-top: 0 !important; font-size: 0.8rem; border-top: 0; }
.coinout-narrow { max-width: 520px; }

/* Collector app (phone first) */
body.collect { background: var(--bg); }
.collect-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.collect-bar .brand-name em { display: none; }
.collect-user { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--text-2); }
.collect-main { max-width: 560px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.collect-title { font: 600 1.6rem var(--display); margin: 0.25rem 0 1rem; }
.collect-search input { width: 100%; padding-top: 0.8rem; padding-bottom: 0.8rem; font-size: 1rem; }
.vendo-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.vendo-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; }
.vendo-list a:active, .vendo-list a:hover { border-color: color-mix(in srgb, var(--sky) 45%, transparent); }
.vl-name { display: flex; flex-direction: column; gap: 0.2rem; font-weight: 500; min-width: 0; }
.vl-name small { font-size: 0.72rem; color: var(--text-3); }
.vl-go { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--sky); font-size: 0.85rem; white-space: nowrap; }
.vl-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.vl-empty { padding: 2rem 1rem; }
.coinout-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 1.25rem; }
.co-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.co-head h2 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.co-expected { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem; border-radius: 12px; margin-bottom: 1.1rem;
  background: var(--sky-dim); border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); }
.co-expected span { font-size: 0.8rem; color: var(--text-2); }
.co-expected b { font: 600 2rem/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.co-expected small { font-size: 0.78rem; color: var(--text-3); }
.co-form input { font-size: 1.05rem; }
.co-calc { margin: 0.5rem 0 1rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 0.35rem; }
.co-calc div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.co-calc dt { color: var(--text-2); }
.co-calc dd { margin: 0; font-variant-numeric: tabular-nums; }
.co-calc .co-net { padding-top: 0.45rem; margin-top: 0.2rem; border-top: 1px solid var(--line); }
.co-calc .co-net dt, .co-calc .co-net dd { color: var(--text); font-weight: 600; font-size: 1.05rem; }
.co-calc .neg { color: #fca5a5; }
.co-calc .pos { color: #6ee7b7; }
.receipt-card { text-align: center; }
.receipt-card .co-calc { text-align: left; margin-top: 1.1rem; }
.receipt-card .done-mark { margin: 0.5rem auto 0.75rem; }
.collect-url { word-break: break-all; }
.collect-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1.1rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.collect-tabs a { text-align: center; padding: 0.55rem; border-radius: 999px; font-size: 0.9rem; color: var(--text-2); text-decoration: none; }
.collect-tabs a.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.period-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; margin-bottom: 1rem; }
.period-chips .chip { flex: none; text-decoration: none; }
.history-totals { margin: 0 0 1rem; }
.history-list a { align-items: center; }
.history-list .vl-name small { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-family: var(--sans); }
.hl-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl-amt small { font-size: 0.74rem; color: var(--text-3); }
.history-list .is-void a { opacity: 0.55; }
.history-list .is-void b { text-decoration: line-through; }
.done-mark-off { background: rgba(255,255,255,0.04); border-color: var(--line); box-shadow: none; }
.done-mark-off svg { stroke: var(--text-3); }
.co-note { margin: 0.75rem 0 0; font-size: 0.85rem; text-align: left; }
.collect-sum { margin: -0.5rem 0 1rem; font-size: 0.88rem; color: var(--text-2); }
.collect-sum b { color: var(--text); }
.vendo-list .vl-name { flex: 1; }
.vl-expected { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vl-expected b { font-size: 1.15rem; color: var(--sky); }
.vl-expected small { font-size: 0.7rem; color: var(--text-3); }
.vl-chev { width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 2; flex: none; }
.money-list .money-good dd { color: #6ee7b7; }
.money-list .money-sub { border-top: 1px solid var(--line); }
.money-list .money-sub dt { color: var(--text); font-weight: 500; }
.disc-bad { color: #fca5a5; font-weight: 600; }
.disc-warn { color: #fcd34d; }
.disc-over { color: #6ee7b7; }
.co-calc .co-disc { padding-top: 0.45rem; margin-top: 0.2rem; border-top: 1px solid var(--line); }
.co-calc .co-disc dt { color: var(--text); font-weight: 500; }
.co-calc .co-disc-sub dt { padding-left: 0.75rem; font-size: 0.84rem; color: var(--text-3); }
.co-calc .co-disc-sub dd { font-size: 0.84rem; }
.box-zero { color: var(--text-3); font-weight: 500; }
.since-amt { font-size: 1rem; }
.leaders-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 1.5rem; }
.dash-row-chart { align-items: start; }
.h-note { font-size: 0.75rem; font-weight: 400; color: var(--text-3); }
.page-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 1rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.page-tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.88rem; color: var(--text-2); text-decoration: none; }
.page-tabs a b { font-weight: 500; font-size: 0.78rem; color: var(--text-3); }
.page-tabs a.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.page-tabs a.on b { color: var(--text); }
.page-tabs-full { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.page-tabs-full a { justify-content: center; }

/* ---------- Vendos area: one page, four tabs ---------- */
.vendo-tabs { display: flex; gap: 0.25rem; margin: -0.5rem 0 1.4rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vendo-tabs::-webkit-scrollbar { display: none; }
.vendo-tabs a { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; padding: 0.75rem 1rem; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--text-2); font-size: 0.92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease); }
.vendo-tabs a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.vendo-tabs a:hover { color: var(--text); }
.vendo-tabs a.on { color: var(--text); border-bottom-color: var(--sky); }
.vendo-tabs a.on svg { color: var(--sky); opacity: 1; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.toolbar .page-tabs, .toolbar .filter-row { margin-bottom: 0; }
@media (max-width: 640px) { .vendo-tabs a { padding: 0.7rem 0.75rem; font-size: 0.86rem; } }

/* ---------- Install app ---------- */
.install-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 0.35rem; vertical-align: -2px; }
.install-btn[hidden] { display: none !important; }
.install-side { margin-bottom: 0.5rem; border-color: color-mix(in srgb, var(--sky) 40%, transparent); color: var(--sky); }
.install-login { margin-top: 0.9rem; }
.ios-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 16px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); }
.ios-sheet[hidden] { display: none; }
.ios-card { width: 100%; max-width: 420px; padding: 1.25rem; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.ios-card > b { display: block; font-size: 1.05rem; margin-bottom: 0.75rem; }
.ios-card ol { margin: 0 0 1.1rem; padding-left: 1.2rem; display: grid; gap: 0.55rem; color: var(--text-2); font-size: 0.92rem; }
.ios-card ol b { color: var(--text); }
.ios-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--bg-2); vertical-align: -6px; }
.ios-share svg { width: 15px; height: 15px; fill: none; stroke: #60a5fa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Installed app: respect the phone's notch / status bar */
@media (display-mode: standalone) {
  .collect-bar { padding-top: max(0.75rem, env(safe-area-inset-top)); }
  body.admin .main { padding-top: max(2rem, calc(env(safe-area-inset-top) + 1rem)); }
}
@media (max-width: 420px) { .collect-name { display: none; } }

/* ---------- Landing: get the app ---------- */
.nav-install { border-color: color-mix(in srgb, var(--sky) 40%, transparent); color: var(--sky); }
.app-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-card { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.app-card img { flex: none; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.app-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; min-width: 0; }
.app-body h3 { font-size: 1.25rem; }
.app-body > p { color: var(--text-2); }
.app-body .app-how { font-size: 0.8rem; color: var(--text-3); }
.app-body .app-how b { color: var(--text-2); font-weight: 500; }
@media (max-width: 760px) { .app-cards { grid-template-columns: 1fr; } }
.nav-signin { white-space: nowrap; }
@media (max-width: 560px) {
  .nav-install { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .nav-install .install-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-install svg { margin: 0; width: 18px; height: 18px; }
}
@media (max-width: 480px) { .app-card { flex-direction: column; } }

.install-card { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.1rem; padding: 0.85rem; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); background: color-mix(in srgb, var(--sky) 7%, var(--card)); }
.install-card[hidden] { display: none; }
.install-card img { flex: none; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.install-card-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.install-card-body b { font-size: 0.95rem; }
.install-card-body span { font-size: 0.8rem; color: var(--text-2); line-height: 1.35; }
.install-card .install-btn { flex: none; }


/* ---------- Phones: slide-out sidebar ---------- */
.mobile-bar, .side-close, .side-backdrop { display: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
@media (max-width: 820px) {
  .mobile-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 16px; padding-top: max(0.6rem, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mobile-bar .brand-name em { display: none; }
  .mobile-title { margin-left: auto; font-size: 0.88rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .menu-btn, .side-close { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px;
    border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
  .menu-btn svg, .side-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; height: auto; width: min(86vw, 310px);
    padding-top: max(1.1rem, env(safe-area-inset-top)); padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain; transform: translateX(-102%); visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0s linear 0.28s; box-shadow: 20px 0 60px rgba(0,0,0,0.55); }
  body.nav-open .sidebar { transform: none; visibility: visible; transition: transform 0.28s var(--ease), visibility 0s; }
  .side-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity 0.25s var(--ease); }
  .side-backdrop[hidden] { display: none; }
  body.nav-open .side-backdrop { opacity: 1; }
  body.nav-open { overflow: hidden; }
  .side-nav a { padding: 0.75rem 0.8rem; font-size: 0.98rem; }
  .main-head { padding-top: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .side-backdrop { transition: none !important; } }

/* ---------- Vendo maps ---------- */
.map { position: relative; z-index: 0; width: 100%; background: #0e1116; }
.map-fleet { height: 420px; border-top: 1px solid var(--line); }
.map-picker { height: 380px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.78rem; color: var(--text-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.map-legend i, .map-pop i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.map-foot { padding: 0.7rem 1.4rem; font-size: 0.82rem; border-top: 1px solid var(--line); }
.map-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 0 1.4rem 1.3rem; color: var(--text-2); font-size: 0.9rem; }
/* Leaflet controls and popups in the site's dark look */
.map.leaflet-container { font: inherit; background: #0e1116; }
.map .leaflet-bar a { background: var(--card-2); color: var(--text); border-color: var(--line-2) !important; }
.map .leaflet-bar a:hover { background: var(--card); color: var(--text); }
.map .leaflet-control-attribution { background: rgba(9,9,11,0.7) !important; color: var(--text-3) !important; }
.map .leaflet-control-attribution a { color: var(--text-2) !important; }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--card-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.map .leaflet-popup-content { margin: 0.8rem 0.95rem; }
.map.leaflet-container a.leaflet-popup-close-button { color: var(--text-3); }
.map-pop { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--text-2); min-width: 170px; }
.map-pop > b { font-size: 0.95rem; color: var(--text); }
.map-pop .mono { font-size: 0.72rem; color: var(--text-3); }
.map-pop div { display: flex; align-items: center; gap: 0.4rem; }
.map-pop b { color: var(--text); }
.map-pop-alert { color: #fcd34d; }
.map-pop-note { color: var(--text-3); font-style: italic; }
/* Pin used when placing a vendo */
.map-pin span { position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--sky); border: 3px solid #09090b; box-shadow: 0 6px 14px rgba(0,0,0,0.5); }
.map-pin span::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #09090b; }
/* Set-location page */
.loc-card { max-width: 820px; }
.loc-form { display: grid; gap: 1rem; padding: 0 1.4rem 1.4rem; }
.loc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.loc-tools .btn svg, .nav-btn svg, .nearest-row svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 0.35rem; vertical-align: -2px; }
.loc-coords { font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.loc-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-2); white-space: nowrap; }
.loc-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.loc-link.is-set { color: #6ee7b7; }
.loc-link:hover { color: var(--text); }
.loc-note { display: block; max-width: 220px; white-space: normal; }
/* Collector app */
.nearest-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.9rem; font-size: 0.82rem; }
.nearest-row .chip { display: inline-flex; align-items: center; }
.vendo-list li { display: grid; }
.vl-where { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 1.1rem 0.75rem;
  margin-top: -0.75rem; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--card); }
.vendo-list li:has(.vl-where) > a { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; padding-bottom: 1.3rem; }
.vl-landmark { font-size: 0.78rem; color: var(--text-3); min-width: 0; }
.vl-dist { display: inline-block; margin-top: 0.15rem; font-size: 0.74rem; font-weight: 500; color: var(--sky); }
.vl-dist[hidden] { display: none; }
.co-head-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.co-landmark { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--text-2); }
@media (max-width: 640px) { .map-fleet { height: 340px; } .map-picker { height: 320px; } }

/* ---------- Coin-out location check ---------- */
.gps-note { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--text-3); line-height: 1.45; }
.gps-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--sky); stroke-width: 1.8; }
.gps-where { margin-left: 0.35rem; font-size: 0.75rem; color: var(--text-2); text-decoration: underline; }
.co-gps { margin-top: 0.3rem; } .co-gps .tag { font-size: 0.7rem; }
table.co-table th, table.co-table td { padding-left: 0.7rem; padding-right: 0.7rem; } table.co-table th:first-child, table.co-table td:first-child { padding-left: 1.1rem; }

/* Sales & status map: set-location tools */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem 1rem; }
.map-set { position: relative; display: inline-flex; align-items: center; }
.map-set svg { position: absolute; left: 0.75rem; width: 15px; height: 15px; fill: none; stroke: var(--sky); stroke-width: 2; pointer-events: none; }
.map-set select { padding: 0.45rem 0.9rem 0.45rem 2.1rem; border-radius: 999px; font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer;
  color: var(--text); background: var(--sky-dim); border: 1px solid color-mix(in srgb, var(--sky) 40%, transparent); max-width: 220px; }
.map-empty-note { padding: 0 1.4rem 1rem; color: var(--text-2); font-size: 0.9rem; }
.map-unpinned { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.75rem 1.4rem 1rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.map-unpinned .chip { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }
.map-unpinned .chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.map-pop-edit { margin-top: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--sky) !important; }

/* ---------- Command center: one live screen ---------- */
.main.main-cc { max-width: none; display: flex; flex-direction: column; height: 100dvh; padding-top: 1.1rem; padding-bottom: 1rem; }
.main-cc .main-head { margin-bottom: 0.5rem; }
.main-cc .main-head h1 { font-size: 1.6rem; }
.main-cc .main-head .eyebrow { display: none; }
.main-cc .vendo-tabs { margin: 0 0 0.75rem; }
.cc { flex: 1; min-height: 0; display: grid; gap: 10px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.85fr);
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 34%);
  grid-template-areas: "kpis kpis kpis" "map map attn" "chart top feed"; }
.cc-kpis { grid-area: kpis; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.cc-kpi { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; padding: 0.6rem 0.8rem; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card-2) 55%, var(--bg)); }
.cc-kpi > span { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-kpi b { font: 600 1.25rem/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-kpi small { font-size: 0.68rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-kpi.cc-good b { color: #6ee7b7; }
.cc-kpi.cc-bad { border-color: rgba(248,113,113,0.4); } .cc-kpi.cc-bad b { color: #fca5a5; }
.cc-kpi.cc-warn { border-color: rgba(251,191,36,0.4); } .cc-kpi.cc-warn b { color: #fcd34d; }
.cc-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card-2) 45%, var(--bg)); overflow: hidden; }
.cc-map { grid-area: map; } .cc-attn { grid-area: attn; } .cc-chart { grid-area: chart; } .cc-top { grid-area: top; } .cc-feed { grid-area: feed; }
.cc-head { display: flex; align-items: center; gap: 0.6rem 0.9rem; flex-wrap: wrap; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.cc-head h3 { font: 500 0.92rem var(--sans); display: flex; align-items: center; gap: 0.45rem; margin-right: auto; }
.cc-head .map-legend { font-size: 0.72rem; }
.cc-head .map-set select { padding-top: 0.3rem; padding-bottom: 0.3rem; font-size: 0.8rem; }
.cc-mapbox { flex: 1; min-height: 0; height: auto; }
.cc-map-empty { position: absolute; margin: 3.5rem 1rem 0; z-index: 500; padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 0.85rem; color: var(--text-2); }
.cc-map { position: relative; }
.cc-list { list-style: none; margin: 0; padding: 0.35rem 0; overflow-y: auto; flex: 1; min-height: 0; }
.cc-empty { padding: 0.9rem; font-size: 0.82rem; color: var(--text-3); }
.cc-item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0.9rem; }
.cc-item + .cc-item { border-top: 1px solid var(--line); }
.cc-dot { flex: none; width: 8px; height: 8px; margin-top: 0.4rem; border-radius: 50%; background: var(--warn); }
.cc-bad .cc-dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(248,113,113,0.18); }
.cc-item-body { display: flex; flex-direction: column; min-width: 0; font-size: 0.82rem; }
.cc-item-body b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-item-body span { color: var(--text-2); font-size: 0.76rem; }
.cc-bad .cc-item-body span { color: #fca5a5; } .cc-warn .cc-item-body span { color: #fcd34d; }
.cc-seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.cc-seg button { padding: 0.2rem 0.65rem; border: 0; border-radius: 999px; background: none; color: var(--text-2); font: 500 0.74rem var(--sans); cursor: pointer; }
.cc-seg button.on { background: var(--card-2); color: var(--text); }
.cc-bars { flex: 1; min-height: 0; display: flex; align-items: stretch; gap: 3px; padding: 0.7rem 0.9rem 0.4rem; }
.cc-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.25rem; }
.cc-bar i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--sky) 55%, transparent); transition: height 0.4s var(--ease); }
.cc-bar.is-now i { background: var(--sky); box-shadow: 0 0 12px color-mix(in srgb, var(--sky) 45%, transparent); }
.cc-bar span { height: 0.9rem; font-size: 0.62rem; color: var(--text-3); white-space: nowrap; }
.cc-toplist { padding: 0.5rem 0.9rem; display: grid; gap: 0.55rem; align-content: start; }
.cc-toplink { display: block; text-decoration: none; color: inherit; margin: -0.2rem -0.35rem; padding: 0.2rem 0.35rem; border-radius: 8px; }
.cc-toplink:hover { background: color-mix(in srgb, var(--sky) 12%, transparent); }
.cc-vname-link { color: inherit; text-decoration: none; }
.cc-vname-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.cc-topline { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; }
.cc-topline span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-topline b { font-variant-numeric: tabular-nums; }
.cc-topbar { display: block; height: 5px; margin-top: 0.25rem; border-radius: 3px; background: rgba(255,255,255,0.05); overflow: hidden; }
.cc-topbar i { display: block; height: 100%; border-radius: 3px; background: var(--sky); transition: width 0.4s var(--ease); }
.cc-sale { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.35rem 0.9rem; font-size: 0.8rem; }
.cc-sale time { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.74rem; }
.cc-sale-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.cc-sale b { font-variant-numeric: tabular-nums; color: #6ee7b7; }
.cc-sale.is-test b { color: var(--text-3); font-weight: 400; }
.cc-sale.is-new { animation: cc-flash 2.5s var(--ease); }
@keyframes cc-flash { 0% { background: color-mix(in srgb, var(--sky) 28%, transparent); } 100% { background: transparent; } }
.cc-live { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem; border: 1px solid var(--line); color: var(--text-2); }
.cc-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.cc-live.is-ok i { animation: cc-pulse 2s infinite; }
.cc-live.is-warn i { background: var(--warn); } .cc-live.is-off i { background: var(--bad); }
@keyframes cc-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
[data-cc-tv] svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-right: 0.35rem; vertical-align: -2px; }
/* TV mode: only the dashboard */
body.cc-tv .shell { grid-template-columns: 1fr; }
body.cc-tv .sidebar, body.cc-tv .mobile-bar, body.cc-tv .vendo-tabs, body.cc-tv .main-head > div:first-child, body.cc-tv .credit-pill { display: none; }
body.cc-tv .main.main-cc { padding: 0.75rem; }
body.cc-tv .main-head { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 5; margin: 0; }
body.cc-tv .cc-kpis { padding-right: 9.5rem; }
body.cc-tv [data-cc-tv] span { display: none; }            /* icon only; the label is in the tooltip */
body.cc-tv [data-cc-tv] { padding-left: 0.6rem; padding-right: 0.6rem; }
body.cc-tv [data-cc-tv] svg { margin-right: 0; }
body.cc-tv .main-head .main-actions { gap: 0.4rem; }
@media (prefers-reduced-motion: reduce) { .cc-live.is-ok i, .cc-sale.is-new { animation: none; } }
/* Smaller laptops: 4 totals per row */
@media (max-width: 1250px) { .cc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Short screens — small laptops, or any laptop at 125–150% display scaling —
   tighten the spacing so the one-screen dashboard still fits without clipping. */
@media (min-width: 901px) and (max-height: 820px) {
  .main.main-cc { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .main-cc .main-head { margin-bottom: 0.3rem; }
  .main-cc .main-head h1 { font-size: 1.3rem; }
  .main-cc .vendo-tabs { margin-bottom: 0.45rem; }
  .cc { gap: 8px; }
  .cc-kpi { padding: 0.4rem 0.6rem; }
  .cc-kpi b { font-size: 1.05rem; }
  .cc-kpi > span { font-size: 0.68rem; }
  .cc-kpi small { font-size: 0.64rem; }
}
/* Phones and tablets: stack panels in order of importance, page scrolls */
@media (max-width: 900px) {
  .main.main-cc { height: auto; }
  .cc { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "kpis" "attn" "map" "feed" "chart" "top"; }
  .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-mapbox { height: 320px; flex: none; }
  .cc-attn .cc-list, .cc-feed .cc-list { max-height: 300px; }
  .cc-bars { height: 170px; flex: none; }
  [data-cc-tv] { display: none; }
}

/* Dark map: OpenStreetMap tiles recoloured (pins, popups and controls are untouched) */
.map.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55); }
.map.map-dark.leaflet-container { background: #0b0d11; }
.map .map-theme-btn { font-size: 15px; line-height: 30px; text-align: center; cursor: pointer; }
.map .map-base-btn { font-size: 10px; font-weight: 700; line-height: 30px; text-align: center; cursor: pointer; }
.map .leaflet-bar[hidden] { display: none; }

/* ---------- Command center v2: vendos left · map centre · attention right ----------
   Four columns so every panel (incl. Top vendos) has an explicit slot and nothing
   is auto-placed into a dangling bottom row. */
.cc { grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 36%);
  grid-template-areas: "kpis kpis kpis kpis" "vendos map map attn" "vendos chart top feed"; }
.cc-vendos { grid-area: vendos; }
/* vendo list */
.cc-vtools { display: grid; gap: 0.45rem; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
.cc-vtools input { width: 100%; padding: 0.4rem 0.75rem; border-radius: 999px; font: inherit; font-size: 0.8rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }
.cc-vfilter { display: flex; gap: 0.3rem; }
.cc-vfilter button { flex: 1; padding: 0.22rem 0; border-radius: 999px; font: 500 0.72rem var(--sans); color: var(--text-2); background: none; border: 1px solid var(--line); cursor: pointer; }
.cc-vfilter button.on { color: var(--text); background: var(--sky-dim); border-color: color-mix(in srgb, var(--sky) 40%, transparent); }
.cc-vlist { padding: 0.2rem 0; }
.cc-vrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; padding: 0.42rem 0.75rem; cursor: pointer; }
.cc-vrow + .cc-vrow { border-top: 1px solid var(--line); }
.cc-vrow:hover, .cc-vrow:focus-visible { background: rgba(255,255,255,0.035); outline: none; }
.cc-vdot { width: 8px; height: 8px; border-radius: 50%; background: #71717a; }
.cc-vrow.is-online .cc-vdot { background: var(--ok); } .cc-vrow.is-offline .cc-vdot { background: var(--bad); }
.cc-vrow.has-alert .cc-vdot { box-shadow: 0 0 0 3px rgba(251,191,36,0.35); }
.cc-vmain, .cc-vamt { display: flex; flex-direction: column; min-width: 0; }
.cc-vmain b { font-size: 0.82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-vmain span { font-size: 0.7rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-vrow.is-offline .cc-vmain span { color: #fca5a5; }
.cc-vamt { align-items: flex-end; }
.cc-vamt b { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.cc-vamt span { font-size: 0.68rem; color: var(--text-3); }
.cc-foot-link { padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--text-2); text-align: center; }
.cc-foot-link:hover { color: var(--text); }
/* bar chart: bars get their own plot area, labels sit underneath, so nothing is clipped */
.cc-bars { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.3rem; padding: 0.45rem 0.9rem 0.5rem; }
.cc-peak { font-size: 0.66rem; color: var(--text-3); line-height: 1; }
.cc-plot { flex: 1; min-height: 0; display: flex; align-items: stretch; gap: 3px; border-bottom: 1px solid var(--line-2); }
.cc-plot .cc-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0; }
.cc-plot .cc-bar i { width: 100%; max-width: 30px; border-radius: 3px 3px 0 0; }
.cc-xlabels { display: flex; gap: 3px; }
.cc-xlabels span { flex: 1; min-width: 0; text-align: center; font-size: 0.62rem; color: var(--text-3); white-space: nowrap; overflow: visible; }
.cc-xlabels span.is-now { color: var(--sky); }
/* TV mode: bigger type for viewing from across the room */
@media (min-width: 1600px) {   /* big TVs / monitors: larger type for viewing from across the room */
  body.cc-tv .cc-kpi b { font-size: 1.45rem; }
  body.cc-tv .cc-head h3 { font-size: 1rem; }
  body.cc-tv .cc-vmain b, body.cc-tv .cc-sale { font-size: 0.88rem; }
}
@media (max-width: 1250px) { .cc { grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.4fr) minmax(0, 0.95fr) minmax(0, 0.95fr); } }
/* Short screens (small laptops, or 125–150% display scaling): let the dashboard
   scroll with readable panel floors instead of crushing the map and lists. */
@media (min-width: 901px) and (max-height: 600px) {
  .main.main-cc { height: auto; min-height: 100dvh; }
  .cc { grid-template-rows: auto minmax(230px, auto) minmax(200px, auto); }
  .cc-mapbox { min-height: 230px; }
}
@media (max-width: 900px) {
  .cc { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "kpis" "attn" "map" "vendos" "top" "feed" "chart"; }
  .cc-vendos .cc-list { max-height: 360px; }
  .cc-bars { height: 190px; flex: none; }
}

/* Command center line chart (7 days / 14 days / month) */
.cc-line { flex: 1; min-height: 0; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.cc-yaxis { position: relative; }
.cc-yaxis span { position: absolute; right: 0.5rem; transform: translateY(-50%); font-size: 0.64rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-lplot { position: relative; margin: 0.35rem 6px 0; touch-action: pan-y; cursor: crosshair; }
.cc-lplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.cc-grid.base { border-top-style: solid; border-color: var(--line-2); }
.cc-lpath { fill: none; stroke: var(--sky); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.cc-ldot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--sky); transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px color-mix(in srgb, var(--sky) 60%, transparent); }
.cc-lcross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--line-2); pointer-events: none; }
.cc-ltip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 10px)); padding: 0.4rem 0.6rem; border-radius: 8px; pointer-events: none;
  background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0,0,0,0.45); font-size: 0.7rem; color: var(--text-2);
  display: flex; flex-direction: column; white-space: nowrap; }
.cc-ltip b { font-size: 0.9rem; color: var(--text); font-variant-numeric: tabular-nums; }
.cc-ldot[hidden], .cc-lcross[hidden], .cc-ltip[hidden] { display: none; }
.cc-lx { position: relative; grid-column: 2; height: 1.3rem; margin: 0 6px; }
.cc-lx span { position: absolute; top: 0.3rem; transform: translateX(-50%); font-size: 0.62rem; color: var(--text-3); white-space: nowrap; }
.cc-lx span:first-child { transform: none; }
.cc-lx span:last-child { transform: translateX(-100%); }
.cc-lx span.is-now { color: var(--sky); }
.cc-chart .cc-seg button { padding: 0.2rem 0.55rem; }
.cc-line { padding-top: 0.55rem; }
/* Highest point: always labelled on the line charts */
.cc-ldot.is-peak { width: 11px; height: 11px; background: #fcd34d; box-shadow: 0 0 0 2px var(--bg), 0 0 14px rgba(252,211,77,0.6); z-index: 1; }
.cc-peaktag { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 11px)); display: inline-flex; align-items: baseline; gap: 0.35rem;
  padding: 0.18rem 0.5rem; border-radius: 999px; white-space: nowrap; pointer-events: none; font-size: 0.66rem; color: var(--text-2);
  background: color-mix(in srgb, var(--card-2) 92%, transparent); border: 1px solid rgba(252,211,77,0.45); transition: opacity 0.15s; }
.cc-peaktag b { font-size: 0.78rem; color: #fcd34d; font-variant-numeric: tabular-nums; }
.cc-peaktag > span:first-child { color: #fcd34d; }
.cc-peaktag.is-below { transform: translate(-50%, 11px); }
.cc-peaktag.is-dim { opacity: 0.25; }
.cc-ltip { z-index: 4; }

/* Dropdown menus: solid dark list with bright text on every browser.
   (A see-through select background made some browsers draw the open list light
   with light-grey text, e.g. the "Set location…" vendo list.) */
select { color-scheme: dark; }
select option { background-color: #18181b; color: #f3f3f3; }
select option:checked, select option:hover { background-color: #27272a; color: #ffffff; }
select option[value=""] { color: #a5a5a5; }
select optgroup { background-color: #0e0e11; color: #fcd34d; font-style: normal; font-weight: 600; }
select optgroup option { color: #f3f3f3; font-weight: 400; }
.map-set select { background-color: #1c1a12; }    /* solid (was see-through), same gold tint */

/* ---------- Vendo rates ---------- */
.rates-card { max-width: 980px; }
.rates-status { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; text-align: right; }
.rates-status small { font-size: 0.75rem; max-width: 360px; }
.rates-form { display: grid; gap: 0.9rem; padding: 0 0 1.2rem; }
.rates-form > *:not(.table-wrap) { margin: 0 1.4rem; }
.rates-table input, .rates-table select { padding: 0.4rem 0.55rem; border-radius: 8px; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }
.rates-table input[name="name"] { width: 100%; min-width: 110px; }
.rates-table .in-num { width: 5.2rem; }
.rates-table .in-profile { width: 8rem; }
.rates-table td { padding: 0.5rem 0.6rem; }
.rates-table th em { font-style: normal; text-transform: none; letter-spacing: 0; }
.rates-actions { display: flex; align-items: center; gap: 0.8rem; font-size: 0.82rem; }
.rates-also { border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem 0.9rem; }
.rates-also summary { cursor: pointer; font-size: 0.9rem; font-weight: 500; }
.rates-also-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0.7rem 0 0.4rem; }
.rates-also-tools input[type=search] { padding: 0.4rem 0.75rem; border-radius: 999px; font: inherit; font-size: 0.82rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }
.rates-also-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.2rem 1rem; }
.chk { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 0.85rem; cursor: pointer; }
.chk small { margin-left: auto; font-size: 0.72rem; }
.rates-stop { padding: 0 1.4rem 1.2rem; }
.rates-link { margin-top: 0.3rem; }
.rates-link.is-applied { color: #6ee7b7; } .rates-link.is-pending { color: #fcd34d; }
.st-pending { color: #fcd34d; background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.2); }
.rates-status .st { text-transform: none; }

.rates-empty { padding: 0 1.4rem 1.3rem; display: grid; gap: 0.8rem; color: var(--text-2); font-size: 0.9rem; max-width: 720px; }
.rates-table .was { display: block; margin-top: 0.25rem; font-size: 0.7rem; }
.rates-table tr.is-pending td:first-child small { display: block; color: #fcd34d; font-size: 0.7rem; }
.rates-table td b { font-weight: 500; }

/* Licence leases & moving a licence */
.lic-sub { display: block; font-size: 0.72rem; margin-top: 0.15rem; }
.lease-end { color: #fcd34d; }
.st-replaced { color: #93c5fd; background: rgba(147,197,253,0.08); border-color: rgba(147,197,253,0.2); }
.move-card { max-width: 720px; }
.move-body { display: grid; gap: 1rem; padding: 1.2rem 1.25rem 1.4rem; color: var(--text-2); }
.move-steps, .move-notes { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.move-form { max-width: 380px; }

/* Reset a vendo's data after testing */
.reset-card { max-width: 760px; }
.reset-body { display: grid; gap: 1rem; padding: 0 1.4rem 1.4rem; color: var(--text-2); font-size: 0.92rem; }
.reset-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin: 0; }
.reset-stats div { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; }
.reset-stats dt { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.reset-stats dd { margin: 0.2rem 0 0; color: var(--text); font-weight: 600; }
.reset-stats small { font-weight: 400; }
.reset-form { display: grid; gap: 0.8rem; max-width: 420px; }
.btn-danger { background: rgba(248,113,113,0.14); color: #fecaca; border: 1px solid rgba(248,113,113,0.4); }
.btn-danger:hover { background: rgba(248,113,113,0.24); color: #fff; }
.reset-link { color: var(--text-3); }
.reset-link:hover { color: #fca5a5; }
.reset-mini { display: block; font-size: 0.72rem; color: var(--text-3); margin-top: 0.15rem; }
.reset-mini:hover { color: #fca5a5; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; border-top: 1px solid var(--line); padding-right: 0.6rem; }
.cc-foot .cc-foot-link { border-top: 0; text-align: left; }
.reset-set svg { stroke: #fca5a5; }
.reset-set select, .map-set.reset-set select { background-color: #1f1416; border-color: rgba(248,113,113,0.35); }
.cc-foot .reset-set select { padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 0.75rem; max-width: 170px; }
.reset-mini { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.3rem; padding: 0.1rem 0.5rem; border: 1px solid var(--line-2); border-radius: 999px; }
.reset-mini svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.reset-mini:hover { border-color: rgba(248,113,113,0.4); }

/* ---------- Downloads + hotspot portal designer ---------- */
.chk input { width: auto; flex: none; accent-color: var(--sky); }
.dl-uploads { margin-bottom: 1.5rem; }
.dl-form, .pd-body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.dl-form .btn { align-self: flex-start; }
input[type=file] { padding: 0.55rem 0.7rem; font-size: 0.85rem; cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 0.75rem; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font: 500 0.8rem var(--sans); cursor: pointer; }
.dl-notes { max-width: 420px; white-space: pre-line; color: var(--text-2); font-size: 0.88rem; }
.dl-portal { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem; }
.dl-portal p { margin: 0 0 0.3rem; }
.dl-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dl-history { padding: 0 1.25rem 1.1rem; font-size: 0.88rem; color: var(--text-2); }
.dl-history summary { cursor: pointer; color: var(--text-3); }
.dl-history ul { margin: 0.6rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; }

.pd { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1.5rem; align-items: start; }
.pd-controls .card-block { margin-bottom: 1.25rem; }
.pd-body select { padding: 0.7rem 0.9rem; border-radius: 12px; font: inherit; font-size: 0.95rem; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); }
.pd-logo { display: flex; gap: 1rem; align-items: flex-start; }
.pd-logo img, .pd-logo-empty { flex: none; width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line-2); background: var(--bg-2); }
.pd-logo-empty { display: grid; place-items: center; color: var(--text-3); font-size: 0.8rem; }
.pd-logo .field { flex: 1; }
.pd-slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.pd-slide { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.pd-slide img { width: 120px; height: 68px; object-fit: cover; border-radius: 9px; background: var(--bg); }
.pd-slide-fields { display: grid; gap: 0.4rem; }
.pd-slide-fields input { padding: 0.5rem 0.7rem; font-size: 0.85rem; border-radius: 9px; }
.pd-slide-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.pd-slide-tools > div, .pd-slide-tools .btn { min-width: 36px; padding: 0 0.6rem; }
.pd-check { align-self: end; padding-bottom: 0.8rem; }
.pd-adv summary { cursor: pointer; list-style: none; }
.pd-adv summary::-webkit-details-marker { display: none; }
.pd-adv summary h2::after { content: "▾"; font-size: 0.8em; color: var(--text-3); margin-left: 0.25rem; }
.pd-adv[open] summary h2::after { content: "▴"; }
.pd-adv:not([open]) summary { border-bottom: 0; }
.pd-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.pd-preview { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pd-tabs { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pd-tabs .chip { cursor: pointer; }
.pd-busy { margin-left: auto; font-size: 0.78rem; color: var(--text-3); }
.pd-phone { width: 100%; max-width: 400px; aspect-ratio: 400 / 760; max-height: calc(100vh - 9rem); margin: 0 auto; padding: 10px; border-radius: 34px;
  background: #050505; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7); }
.pd-phone iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 25px; background: #00020f; }
.center { text-align: center; }
@media (max-width: 1100px) {
  .pd { grid-template-columns: 1fr; }
  .pd-preview { position: static; order: -1; }
  .pd-phone { height: 560px; aspect-ratio: auto; }
}
@media (max-width: 640px) {
  .pd-slide { grid-template-columns: 88px minmax(0, 1fr); }
  .pd-slide img { width: 88px; height: 50px; }
  .pd-slide-tools { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; }
  .pd-logo { flex-direction: column; }
}
.pd-body .tones { display: flex; }
@media (max-width: 640px) { .pd-phone { height: 480px; } }

/* Portal designer: draggable layout */
.pd-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.pd-block { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.pd-block-main { border-color: color-mix(in srgb, var(--sky) 35%, var(--line)); }
.pd-block-name { flex: 1; font-weight: 500; font-size: 0.92rem; min-width: 0; }
.pd-block-name small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-3); }
.pd-block .chk { padding: 0; }
.pd-block-move { display: flex; gap: 0.25rem; }
.pd-block-move .btn { min-width: 34px; padding: 0 0.5rem; --h: 32px; }
.pd-grip { flex: none; width: 28px; height: 32px; border-radius: 8px; cursor: grab; touch-action: none;
  background: radial-gradient(circle, var(--text-3) 1.4px, transparent 1.6px) 0 0 / 8px 8px content-box; padding: 8px 6px; }
.pd-grip:hover { background-color: rgba(255,255,255,0.05); }
.sorting, .sorting * { cursor: grabbing !important; user-select: none; }
.pd-block.dragging, .pd-slide.dragging { border-color: var(--sky); background: var(--sky-dim); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8); position: relative; z-index: 2; }
.pd-block.moved, .pd-slide.moved { animation: pd-moved 0.6s ease; }
@keyframes pd-moved { from { background: var(--sky-dim); } }
.pd-slide { grid-template-columns: 28px 120px minmax(0, 1fr) auto; }
.pd-own-color { display: flex; align-items: center; gap: 0.75rem; min-height: 46px; }
.pd-own-color input[type=color] { width: 46px; height: 40px; padding: 3px; border-radius: 10px; background: var(--bg-2); cursor: pointer; }
@media (max-width: 640px) {
  .pd-slide { grid-template-columns: 28px 88px minmax(0, 1fr); }
  .pd-block { flex-wrap: wrap; }
}

/* Portal designer: Insert coin panel layouts + tap-to-edit highlight */
.pd-layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.pd-layout { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.75rem 0.5rem; border: 1px solid var(--line); border-radius: 14px;
  cursor: pointer; font-size: 0.78rem; line-height: 1.3; text-align: center; color: var(--text-2); }
.pd-layout input { position: absolute; opacity: 0; pointer-events: none; }
.pd-layout:has(input:checked) { border-color: var(--sky); color: var(--text); background: var(--sky-dim); }
.pd-layout:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.pd-mini { display: grid; gap: 4px; width: 72px; height: 50px; padding: 6px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line-2); }
.pd-mini i { display: block; border-radius: 3px; background: var(--line-2); }
.pd-mini i.b { background: var(--sky); }
.pd-mini-stacked, .pd-mini-button_top { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pd-mini-stacked i.b { grid-column: 1 / -1; }
.pd-mini-button_top i.b { grid-column: 1 / -1; grid-row: 1; }
.pd-mini-split_right, .pd-mini-split_left { grid-template-columns: 1fr 26px; grid-template-rows: 1fr 1fr; align-items: center; }
.pd-mini-split_right i.b, .pd-mini-split_left i.b { grid-column: 2; grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; }
.pd-mini-split_left { grid-template-columns: 26px 1fr; }
.pd-mini-split_left i.b { grid-column: 1; }
.pd-mini-split_left i.r { grid-column: 2; }
.pd-checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.pd-flash { animation: pd-flash 1.2s ease; }
@keyframes pd-flash { 0%, 40% { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-dim); } }
@media (max-width: 640px) { .pd-layouts { grid-template-columns: 1fr 1fr; } }
.pd-mini-split_right i.r, .pd-mini-split_left i.r { height: 12px; }

/* Portal designer: ready-made layouts */
.pd-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; padding: 1.25rem; }
.pd-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0.8rem; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--text); font: inherit; transition: border-color 0.2s, transform 0.2s; }
.pd-preset:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pd-preset.on { border-color: var(--sky); background: var(--sky-dim); }
.pd-preset b { font-size: 0.92rem; }
.pd-preset small { color: var(--text-3); font-size: 0.76rem; line-height: 1.35; flex: 1; }
.pd-preset-tag { font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--sky); }
.pd-sketch { align-self: stretch; display: flex; flex-direction: column; gap: 4px; height: 118px; padding: 8px; margin-bottom: 0.3rem;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); overflow: hidden; }
.pd-sketch > span { flex: none; border-radius: 4px; background: var(--line-2); }
.pd-sketch-square > span { border-radius: 1px; }
.pd-sketch .sk-notice { height: 6px; background: color-mix(in srgb, var(--sky) 35%, var(--line-2)); }
.pd-sketch .sk-slides { height: 22px; background: linear-gradient(135deg, var(--line-2), color-mix(in srgb, var(--sky) 25%, var(--line-2))); }
.pd-sketch .sk-logo { height: 10px; width: 40%; align-self: center; }
.pd-sketch .sk-headline { height: 6px; width: 70%; align-self: center; }
.pd-sketch .sk-badges { height: 5px; width: 50%; align-self: center; }
.pd-sketch .sk-voucher { height: 18px; }
.pd-sketch .sk-coin { display: grid; gap: 3px; padding: 4px; background: color-mix(in srgb, var(--sky) 12%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--sky) 40%, transparent);
  grid-template-columns: 1fr 1fr; }
.pd-sketch .sk-coin i { display: block; height: 7px; border-radius: 2px; background: var(--line-2); }
.pd-sketch .sk-coin i.b { grid-column: 1 / -1; height: 8px; background: var(--sky); }
.pd-sketch .sk-size-big i.b { height: 11px; }
.pd-sketch .sk-size-huge i.b { height: 14px; }
.pd-sketch .sk-button_top i.b { grid-row: 1; }
.pd-sketch .sk-split_right, .pd-sketch .sk-split_left { grid-template-columns: 1fr 22px; align-items: center; }
.pd-sketch .sk-split_right i.r, .pd-sketch .sk-split_left i.r { grid-column: 1; }
.pd-sketch .sk-split_right i.b, .pd-sketch .sk-split_left i.b { grid-column: 2; grid-row: 1 / 3; width: 20px; height: 20px; }
.pd-sketch .sk-split_left { grid-template-columns: 22px 1fr; }
.pd-sketch .sk-split_left i.r { grid-column: 2; }
.pd-sketch .sk-split_left i.b { grid-column: 1; }
.pd-sketch .sk-btn-circle i.b { border-radius: 50%; }
.pd-sketch .sk-btn-circle.sk-stacked i.b, .pd-sketch .sk-btn-circle.sk-button_top i.b { width: 18px; height: 18px; justify-self: center; }
.pd-preset-note { padding: 0 1.25rem 1.1rem; margin-top: -0.4rem; }
@media (max-width: 1280px) { .pd-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pd-presets { grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 1rem; } .pd-sketch { height: 96px; } }

/* Type-to-confirm dialog (deletes) */
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid rgba(248,113,113,0.35); border-radius: 18px;
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.85); }
.confirm-dialog::backdrop { background: rgba(0,0,0,0.65); backdrop-filter: blur(3px); }
.confirm-dialog form { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.4rem; }
.confirm-dialog h3 { font-size: 1.15rem; margin: 0; }
.confirm-dialog p { margin: 0; color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }
.confirm-dialog .field b { color: var(--text); background: var(--bg-2); padding: 0.1rem 0.4rem; border-radius: 6px; }
.cd-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.confirm-dialog .btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.trash-block { opacity: 0.92; }

/* Signed licence (RQLIC2, firmware 1.2.0) */
.signed-lic { display: grid; gap: 0.55rem; margin-top: 1rem; padding: 0.9rem 1rem; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--bg-2); text-align: left; }
.signed-lic .hint { margin: 0; }
.signed-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.signed-sig { flex: 1; min-width: 0; word-break: break-all; font-size: 0.82rem; line-height: 1.45; padding: 0.5rem 0.65rem; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.fw-warn { margin: 0.5rem 0 0; padding: 0.55rem 0.7rem; border-radius: 10px; font-size: 0.8rem; line-height: 1.45; white-space: normal;
  color: #fde68a; background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.25); }
.lic-migration { margin-bottom: 1.5rem; }
.lic-migration .stat-num small { font-size: 0.5em; color: var(--text-3); }
.lic-migration .stat-num { white-space: nowrap; }
.gen-both { margin-top: 0.35rem; font-size: 0.82rem; color: var(--text-2); }
.gen-both b { color: var(--text); }
.signed-cell { white-space: nowrap; }
.signed-cell code { font-size: 0.8rem; color: var(--text-2); margin-right: 0.25rem; }

/* Admin: Server load card */
.load-card { --lvl: #34d399; }
.load-card.lvl-busy { --lvl: #fbbf24; }
.load-card.lvl-peak { --lvl: #f87171; }
.load-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 600; font-size: 0.8rem;
  color: var(--text); border: 1px solid color-mix(in srgb, var(--lvl) 45%, transparent); background: color-mix(in srgb, var(--lvl) 12%, transparent); }
.load-badge b { color: var(--lvl); font-size: 0.7rem; }
.load-body { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) minmax(240px, 1.2fr); gap: 1.4rem; padding: 0.4rem 1.4rem 1.3rem; align-items: start; }
.load-hero { display: flex; flex-direction: column; gap: 0.25rem; }
.load-pct { font: 500 3.2rem/1 var(--display); letter-spacing: -0.03em; color: var(--text); }
.load-pct::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--lvl); margin-top: 0.5rem; }
.load-sub { color: var(--text-2); font-size: 0.88rem; }
.load-why, .load-scale { font-size: 0.75rem; }
.load-scale { margin-top: 0.4rem; line-height: 1.45; }
.load-meters { display: grid; gap: 0.7rem; }
.meter { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: 0.7rem; font-size: 0.82rem; --m: #34d399; }
.meter[data-lvl="busy"] { --m: #fbbf24; }
.meter[data-lvl="peak"] { --m: #f87171; }
.meter-name { color: var(--text-2); }
.meter-track { position: relative; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; min-width: 2px; border-radius: 8px; background: var(--m); transition: width 0.4s ease; }
.meter-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--card); }
.meter-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.meter-note { font-size: 0.75rem; margin: 0; }
.load-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0; }
.load-facts div { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.75rem; }
.load-facts dt { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.load-facts dd { margin: 0.2rem 0 0; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.load-facts small { font-weight: 400; }
.load-spark-wrap { grid-column: 1 / -1; display: grid; gap: 0.4rem; }
.load-spark-label { font-size: 0.72rem; }
.load-spark { display: flex; align-items: flex-end; gap: 2px; height: 46px; border-bottom: 1px solid var(--line); }
.load-spark i { flex: 1; min-width: 2px; background: var(--sky, #8fd3f4); border-radius: 4px 4px 0 0; opacity: 0.75; }
.load-spark i:hover { opacity: 1; }
@media (max-width: 1100px) { .load-body { grid-template-columns: 1fr 1fr; } .load-facts { grid-column: 1 / -1; } }
@media (max-width: 640px) { .load-body { grid-template-columns: 1fr; padding: 0.4rem 1rem 1.1rem; } .meter { grid-template-columns: 7.5rem 1fr 2.8rem; } .load-facts { grid-template-columns: 1fr; } }
