/* SMSHub portal — end-user surface
   Direction: slate + indigo + sky accents.
   Fonts: Space Grotesk (display) + Manrope (UI). */

:root {
  --bg0: #070b14;
  --bg1: #0f172a;
  --bg2: #1e293b;
  --ink: #eef2ff;
  --muted: #94a3b8;
  --teal: #60a5fa;
  --teal-dim: rgba(96, 165, 250, 0.14);
  --amber: #818cf8;
  --amber-dim: rgba(129, 140, 248, 0.14);
  --danger: #f87171;
  --line: rgba(148, 163, 184, 0.14);
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font: "Manrope", "Segoe UI", sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --surface: rgba(15, 23, 42, 0.72);
  --bar-bg: rgba(7, 11, 20, 0.88);
  --chip-bg: rgba(96, 165, 250, 0.12);
  --chip-fg: #bfdbfe;
  --chip-border: rgba(96, 165, 250, 0.28);
  --nav-active-bg: rgba(99, 102, 241, 0.16);
  --nav-active-fg: #c7d2fe;
  --ok: #4ade80;
  --modal-scrim: rgba(7, 11, 20, 0.62);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg0: #f4f6fb;
  --bg1: #ffffff;
  --bg2: #e8eef8;
  --ink: #0f172a;
  --muted: #475569;
  --teal: #2563eb;
  --teal-dim: rgba(37, 99, 235, 0.1);
  --amber: #4f46e5;
  --amber-dim: rgba(79, 70, 229, 0.1);
  --danger: #dc2626;
  --line: rgba(15, 23, 42, 0.12);
  --surface: rgba(255, 255, 255, 0.92);
  --bar-bg: rgba(255, 255, 255, 0.92);
  --chip-bg: rgba(37, 99, 235, 0.1);
  --chip-fg: #1e3a8a;
  --chip-border: rgba(37, 99, 235, 0.22);
  --nav-active-bg: rgba(37, 99, 235, 0.12);
  --nav-active-fg: #1e3a8a;
  --ok: #15803d;
  --modal-scrim: rgba(15, 23, 42, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg0);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 0.9rem; margin-top: 0.5rem; }
.ok-msg { color: var(--ok); font-size: 0.9rem; margin-top: 0.5rem; line-height: 1.4; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}
.auth-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted, #6b645c);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active {
  border-color: rgba(96, 165, 250, 0.45);
  color: var(--ink);
  background: var(--teal-dim);
}
.cf-turnstile-slot {
  min-height: 65px;
  margin: 0.85rem 0 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.cf-turnstile-slot.hidden { display: none !important; }

.tg-login-wrap {
  margin: 0 0 1rem;
  text-align: center;
}
.tg-login-lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}
#tg-login-widget {
  display: flex;
  justify-content: center;
  min-height: 40px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.35rem;
  color: var(--muted, #6b645c);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tg-login-wrap.hidden { display: none; }

.cta-group .btn.ghost {
  border-color: rgba(255,255,255,0.35);
  color: inherit;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #f8fafc;
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.22);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: rgba(96, 165, 250, 0.45); color: var(--ink); background: var(--teal-dim); }
.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn.danger:hover { filter: brightness(1.05); }
.btn.sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; border-radius: 10px; }
.btn.block { width: 100%; margin-top: 0.65rem; }

/* ——— Landing ——— */
.landing {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  display: grid;
  grid-template-rows: 1fr;
  background: #070b14;
}

.landing-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 32%, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0.08) 28%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 62% 48%, rgba(59, 130, 246, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 38% 55%, rgba(56, 189, 248, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #070b14 46%, #05070f 100%);
}

.stage-glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(140vw, 1100px);
  height: min(140vw, 1100px);
  transform: translate(-50%, -55%);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(59, 130, 246, 0.08) 32%, transparent 68%);
  filter: blur(28px);
  animation: glow-breathe 7s ease-in-out infinite;
}

.stage-grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.landing-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem) clamp(2.5rem, 8vh, 4rem);
  min-height: 0;
}

.landing-mark {
  position: relative;
  width: clamp(6.5rem, 18vw, 8.5rem);
  height: clamp(6.5rem, 18vw, 8.5rem);
  margin-bottom: clamp(1.1rem, 2.5vh, 1.6rem);
  display: grid;
  place-items: center;
  animation: brand-in 1s var(--ease) both;
}

.landing-mark-halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.32), transparent 70%);
  animation: halo-pulse 4.5s ease-in-out infinite;
}

.landing-logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin: 0 0 clamp(0.9rem, 2vh, 1.25rem);
  color: #f8fafc;
  animation: rise-in 0.9s var(--ease) 0.08s both;
}

.headline {
  font-family: var(--font);
  font-size: clamp(1.12rem, 2.6vw, 1.42rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 24ch;
  margin: 0 0 0.55rem;
  color: rgba(226, 232, 240, 0.94);
  animation: rise-in 0.85s var(--ease) 0.16s both;
}

.support {
  color: var(--muted);
  font-size: clamp(0.92rem, 1.8vw, 1.02rem);
  line-height: 1.5;
  max-width: 36ch;
  margin: 0 0 1.85rem;
  animation: rise-in 0.85s var(--ease) 0.24s both;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  animation: rise-in 0.85s var(--ease) 0.32s both;
}

.cta-group .btn.primary {
  min-width: 10.5rem;
  padding: 1rem 2rem;
  font-size: 1.05rem;
}
.cta-group .btn.ghost {
  min-width: 10.5rem;
  padding: 1rem 1.6rem;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.35);
}

@keyframes brand-in {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -55%) scale(1.06); }
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 480px) {
  .cta-group {
    width: min(100%, 22rem);
    flex-direction: column;
  }
  .cta-group .btn.primary,
  .cta-group .btn.ghost {
    width: 100%;
    min-width: 0;
  }
  .landing-hero {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .brand {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }
  .headline {
    font-size: clamp(1.05rem, 4.6vw, 1.25rem);
  }
  .support {
    font-size: 0.92rem;
  }
  .landing-mark {
    width: clamp(5.5rem, 28vw, 7rem);
    height: clamp(5.5rem, 28vw, 7rem);
  }
  .app-bar #btn-logout {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
  }
  .brand-mark { font-size: 1.05rem; }
  .view-title { font-size: 1.35rem; }
  .period-grid { grid-template-columns: 1fr; }
  .sms-mode-tabs { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .app-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.55rem max(1rem, env(safe-area-inset-left)) 0.45rem max(1rem, env(safe-area-inset-right));
    gap: 0.25rem;
  }
  .app-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto;
    font-size: 0.82rem;
    padding: 0.5rem 0.85rem;
  }
  .home-actions { grid-template-columns: 1fr; }
  .list-row {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .cf-turnstile-slot {
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow: visible;
  }
}

/* ——— Login sheet ——— */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease;
}
.sheet-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(92vh, 92dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem 1.35rem max(1.75rem, env(safe-area-inset-bottom));
  box-shadow: 0 -16px 48px rgba(2, 6, 23, 0.45);
  animation: sheet-up 0.35s var(--ease);
}
@media (min-width: 640px) {
  .sheet { place-items: center; }
  .sheet-panel { border-radius: 20px; }
}
@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.sheet-brand img {
  object-fit: contain;
  flex-shrink: 0;
}
.sheet-panel h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0;
}
.sheet-panel label {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.sheet-panel input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: inherit;
}
.sheet-panel input:focus {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  outline-offset: 1px;
}

/* ——— App ——— */
.app {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(99, 102, 241, 0.16), transparent 50%),
    radial-gradient(ellipse 60% 30% at 0% 10%, rgba(59, 130, 246, 0.1), transparent 45%),
    linear-gradient(180deg, #0b1220, #070b14 40%);
  display: flex;
  flex-direction: column;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem max(1.25rem, calc((100% - 720px) / 2 + 1rem));
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: var(--bar-bg);
}
.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.lang-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.lang-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}
.lang-seg-btn.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}
.landing-lang {
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  z-index: 5;
}
.help-sections {
  display: grid;
  gap: 0.85rem;
}
.help-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  padding: 0.85rem 1rem;
}
.help-card .subhead { margin-top: 0; }
.help-card .meta { margin: 0; line-height: 1.5; }
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}
.app-logo {
  object-fit: contain;
  flex-shrink: 0;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.bal-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  border: 1px solid var(--chip-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7.5rem;
}

.app-nav {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem max(1.25rem, calc((100% - 720px) / 2 + 1rem));
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  background: var(--bar-bg);
}
.app-nav::-webkit-scrollbar { display: none; }
.nav-item {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.app-main {
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1.15rem max(0.9rem, env(safe-area-inset-right)) max(2.5rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left));
}

.view-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.view-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
}
.view-heading .view-title,
.view-heading .byod-page-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.help-tip {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.help-tip:hover {
  background: rgba(96, 165, 250, 0.22);
  border-color: rgba(96, 165, 250, 0.7);
}
.help-tip:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}
.help-modal {
  width: min(100%, 480px);
}
.help-modal-body {
  padding: 0.45rem 1rem 0.25rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}
.help-modal-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}
.help-modal-body ol {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}
html[data-theme="light"] .help-tip {
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.28);
}
.view-lead { color: var(--muted); margin-bottom: 1.25rem; }

.service-help {
  margin: 0.85rem 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.15rem 0.85rem 0.35rem;
}
.service-help > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.7rem 0.15rem;
  user-select: none;
}
.service-help > summary::-webkit-details-marker { display: none; }
.service-help > summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
  font-weight: 500;
  transition: transform 0.15s ease;
}
.service-help[open] > summary::after { transform: rotate(180deg); }
.service-help .howto-list {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}
.service-help .howto-list strong { color: var(--text); }
.service-help-grid {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.1rem 0.85rem;
}
.service-help-grid strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}
.service-help-grid .meta { margin: 0; line-height: 1.45; }
.home-help { margin-top: 1.25rem; }
.byod-panel.service-help { margin-top: 0.35rem; }

.subhead {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.25rem 0 0.55rem;
  color: var(--amber);
}

.prefs-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.85rem 1rem;
  margin-bottom: 0.35rem;
}
.prefs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.prefs-row .meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}
.theme-seg {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg0);
  gap: 0.15rem;
}
.theme-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.theme-seg-btn.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}
.theme-seg-btn:hover:not(.active) {
  color: var(--ink);
}

.home-actions {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .home-actions { grid-template-columns: 1fr 1fr; }
}

.action-tile {
  text-align: left;
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
  color: inherit;
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
  transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.action-tile:hover {
  border-color: rgba(96, 165, 250, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.28);
}
.tile-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}
.tile-meta { color: var(--muted); font-size: 0.85rem; }

.search-wrap { display: block; margin-bottom: 1rem; }
.search-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: inherit;
}
.search-wrap input:focus {
  outline: 2px solid rgba(96, 165, 250, 0.5);
  outline-offset: 1px;
}

.stack-list { display: grid; gap: 0.55rem; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
  transition: border-color 0.2s;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.list-row:hover { border-color: rgba(96, 165, 250, 0.4); }
.list-row.static { cursor: default; }
.list-row .meta { color: var(--muted); font-size: 0.8rem; }
.list-row .mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.period-grid {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
@media (min-width: 480px) {
  .period-grid { grid-template-columns: 1fr 1fr; }
}

.period-btn {
  appearance: none;
  border: 1px solid rgba(129, 140, 248, 0.18);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(17, 24, 39, 0.94));
  color: var(--ink);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.period-btn:hover {
  border-color: rgba(96, 165, 250, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.22);
}
.period-btn small {
  display: block;
  font-weight: 500;
  color: var(--amber);
  margin-top: 0.2rem;
}

.renew-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.35rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
  cursor: pointer;
}
.renew-opt input {
  margin-top: 0.2rem;
  accent-color: #6366f1;
  flex-shrink: 0;
}

.balance-hero {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 700;
  color: var(--nav-active-fg);
  margin: 0.25rem 0 0.75rem;
}

.result-banner {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
  white-space: pre-wrap;
  font-size: 0.92rem;
  animation: rise-in 0.35s var(--ease);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  background: #1e293b;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  animation: rise-in 0.3s var(--ease);
}

.rent-ok-card { text-align: left; }
.rent-ok-label { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.35rem; }
.rent-ok-phone {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  display: block;
}
.rent-ok-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sms-live-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}
.sms-body { white-space: pre-wrap; word-break: break-word; }
.rent-mine-row .rent-ok-phone { font-size: 1.2rem; margin-top: 0.15rem; }

.mine-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
}
.sms-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.sms-mode-tab {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.sms-mode-tab:hover { color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.sms-mode-tab.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
  border-color: transparent;
}
.mine-tab {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.mine-tab:hover { color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.mine-tab.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
  border-color: transparent;
}
.mine-form {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0.75rem 0 1rem;
}
.mine-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.mine-form input,
.mine-form select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.mine-form .btn { justify-self: start; }

.howto-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.howto-list li { margin: 0.25rem 0; }
.list-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.list-card .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.byod-download-banner {
  margin-top: 0.5rem;
}
.byod-download-banner .meta {
  margin-top: 0.25rem;
}
.byod-download-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.byod-page-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.byod-summary-banner {
  margin: 0 0 0.15rem;
  padding: 0.55rem 0.65rem;
}
.byod-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
}
.byod-kpi {
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  overflow: hidden;
  text-align: center;
}
.byod-kpi .meta {
  display: block;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.byod-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: 0.1rem;
  line-height: 1.1;
  color: var(--ink);
}
.byod-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 1.1rem;
  align-items: stretch;
  padding: 1rem 1.05rem;
}
.byod-setup-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
}
.byod-download-inline {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}
.byod-download-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}
.byod-download-copy p {
  margin: 0;
  font-size: 0.9rem;
}
.byod-qr-host {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.byod-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(165deg, rgba(56, 189, 248, 0.1), transparent 42%),
    rgba(2, 6, 23, 0.45);
}
.byod-qr-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
}
.byod-qr-plate {
  display: grid;
  place-items: center;
  width: 188px;
  height: 188px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 10px 28px rgba(2, 6, 23, 0.28);
}
.byod-qr-plate img {
  width: 168px;
  height: 168px;
  display: block;
  border-radius: 4px;
}
.byod-download-qr,
.byod-qr-mini {
  display: none;
}
.download-hash {
  word-break: break-all;
}
.byod-period-card {
  text-align: left;
  align-items: flex-start;
  padding: 0.8rem;
  min-height: 96px;
}
.byod-period-card small {
  display: block;
  color: var(--muted);
  margin-top: 0.35rem;
}
.byod-period-card .price {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.byod-discount {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: rgba(45, 212, 191, 0.16);
  vertical-align: middle;
}
.byod-discount.muted {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  font-weight: 600;
}
.byod-compare {
  margin-left: 0.35rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}
.byod-transfer-box {
  grid-column: 1 / -1;
}
.byod-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  margin-bottom: 0.9rem;
}
.byod-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.byod-card-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.byod-status-pill {
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  background: rgba(46, 196, 182, 0.12);
}
.byod-status-pill.expired,
.byod-status-pill.revoked {
  background: rgba(232, 93, 93, 0.12);
}
.byod-status-pill.unpaired {
  background: rgba(232, 165, 75, 0.14);
}
.byod-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem 1rem;
  margin-top: 0.9rem;
}
.byod-meta-box {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.04);
}
.byod-meta-box .label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}
.byod-renew-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.byod-shell {
  display: grid;
  gap: 0.75rem;
  color: #eef2ff;
}
.byod-hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(220px, 0.9fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.32), transparent 34%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.34);
}
.byod-hero-compact .view-title {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}
.byod-hero-compact .view-lead {
  margin: 0;
  font-size: 0.92rem;
}
.byod-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.4);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.byod-hero .view-title {
  margin-bottom: 0.3rem;
}
.byod-hero-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 55%),
    rgba(255,255,255,0.04);
}
.byod-hero-note strong {
  font-size: 1rem;
  color: #f8fafc;
}
.byod-hero-note span {
  color: #cbd5e1;
  font-size: 0.92rem;
}
.byod-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.byod-top-compact .byod-panel {
  padding: 0.75rem 0.85rem;
}
.byod-panel {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
}
.byod-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.15rem;
}
.byod-section-head .subhead {
  margin-bottom: 0.1rem;
}
.byod-section-head .muted {
  margin: 0;
  font-size: 0.85rem;
}
.byod-period-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}
.byod-period-card {
  min-height: 96px;
  padding: 0.8rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.24), transparent 48%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(17, 24, 39, 0.94));
  border-color: rgba(129, 140, 248, 0.18);
}
.byod-period-card:hover {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 14px 32px rgba(30, 41, 59, 0.32);
}
.byod-list {
  gap: 0.7rem;
}
.byod-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  padding: 1rem 1.05rem;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.2);
}
.byod-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.byod-status-pill {
  white-space: nowrap;
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(59, 130, 246, 0.14);
  color: #dbeafe;
}
.byod-status-pill.active { background: rgba(34, 197, 94, 0.14); color: #dcfce7; }
.byod-meta-box strong,
.byod-meta-box .mono {
  display: block;
  margin-top: 0.12rem;
}
.byod-meta-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.byod-meta-box .label {
  color: #94a3b8;
}
.byod-renew-grid .btn.ghost {
  border-color: rgba(129, 140, 248, 0.18);
  background: rgba(99, 102, 241, 0.08);
  color: #e2e8f0;
}
.byod-renew-grid .btn.ghost:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.12);
}
@media (max-width: 820px) {
  .byod-hero,
  .byod-top-grid,
  .byod-setup {
    grid-template-columns: 1fr;
  }
  .byod-qr-host {
    justify-self: center;
  }
}
@media (max-width: 640px) {
  .byod-hero {
    padding: 0.85rem;
    border-radius: 16px;
  }
  .byod-card {
    padding: 0.9rem;
  }
  .byod-card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .byod-status-pill {
    align-self: flex-start;
  }
  .byod-meta-grid {
    grid-template-columns: 1fr;
  }
  .byod-renew-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .byod-renew-grid .btn {
    width: 100%;
  }
  .byod-period-grid {
    grid-template-columns: 1fr 1fr;
  }
  .byod-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .byod-qr-plate {
    width: 172px;
    height: 172px;
  }
  .byod-qr-plate img {
    width: 152px;
    height: 152px;
  }
}

.byod-howto-box {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.byod-after-box {
  margin-top: 0;
  background: rgba(96, 165, 250, 0.08);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
}
.byod-after-box .subhead {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.byod-after-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}
.byod-after-list li::marker {
  color: var(--teal);
}
html[data-theme="light"] .byod-after-box {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
}
.byod-use-hint {
  margin: 0.35rem 0 0.15rem;
  color: var(--teal);
}
.byod-howto-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
}
.byod-howto-list li::marker {
  color: #60a5fa;
  font-weight: 700;
}
html[data-theme="light"] .byod-howto-box {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .byod-howto-list {
  color: #475569;
}
html[data-theme="light"] .byod-howto-list li::marker {
  color: #2563eb;
}
.byod-steps-inline {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.byod-steps-inline li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.88rem;
}
.byod-hint { margin: 0.45rem 0 0; }
.byod-steps li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--muted); font-size: 0.92rem; }
.byod-steps li.current { color: var(--ink); font-weight: 600; }
.byod-steps li.done { color: var(--teal); }
.byod-steps .step-n {
  width: 1.35rem; height: 1.35rem; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--teal-dim); color: var(--teal); font-size: 0.72rem; font-weight: 700; flex: 0 0 auto;
}
.byod-progress { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 0.45rem; }
.byod-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 0.35s var(--ease);
}
@media (max-width: 640px) {
  .app-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .app-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; }
}
.inv-bulk-bar { margin-top: 0.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.landing-updates-link {
  margin-top: 1rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}
.updates-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--teal-dim);
}
.updates-panel { max-height: min(88vh, 720px); overflow: auto; }
.updates-list { display: grid; gap: 0.85rem; margin: 0.75rem 0 1rem; }
.updates-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg1);
}
.updates-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.updates-highlights {
  margin: 0.4rem 0 0 1.1rem;
  color: var(--ink);
  font-size: 0.92rem;
}
.updates-highlights li { margin: 0.25rem 0; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--modal-scrim);
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none !important; }
.confirm-modal {
  width: min(100%, 420px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.confirm-modal h3 {
  margin: 0;
  padding: 1rem 1rem 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.confirm-message {
  margin: 0;
  padding: 0.5rem 1rem 0.25rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.confirm-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1rem;
}

/* ——— Light theme surfaces (readable text + cards) ——— */
html[data-theme="light"] .landing {
  background: var(--bg0);
}
html[data-theme="light"] .stage-wash {
  background:
    radial-gradient(ellipse 70% 55% at 50% 32%, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0.05) 28%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 62% 48%, rgba(79, 70, 229, 0.1) 0%, transparent 58%),
    linear-gradient(180deg, #eef2ff 0%, #f4f6fb 46%, #e8eef8 100%);
}
html[data-theme="light"] .stage-glow {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(79, 70, 229, 0.06) 32%, transparent 68%);
}
html[data-theme="light"] .stage-grain {
  opacity: 0.06;
  mix-blend-mode: multiply;
}
html[data-theme="light"] .brand {
  color: var(--ink);
}
html[data-theme="light"] .headline {
  color: #334155;
}
html[data-theme="light"] .cta-group .btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}
html[data-theme="light"] .landing-updates-link {
  color: #475569;
}

html[data-theme="light"] .sheet-backdrop {
  background: rgba(15, 23, 42, 0.35);
}
html[data-theme="light"] .sheet-panel {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .sheet-panel input,
html[data-theme="light"] .search-wrap input {
  background: #f1f5f9;
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .app {
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(37, 99, 235, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 30% at 0% 10%, rgba(79, 70, 229, 0.08), transparent 45%),
    linear-gradient(180deg, #eef2ff, #f4f6fb 40%);
}

html[data-theme="light"] .action-tile {
  border-color: rgba(15, 23, 42, 0.1);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .action-tile:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .list-row {
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}
html[data-theme="light"] .list-row:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

html[data-theme="light"] .period-btn {
  border-color: rgba(79, 70, 229, 0.18);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 48%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}
html[data-theme="light"] .period-btn:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .byod-kpi,
html[data-theme="light"] .byod-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .byod-meta-box {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .byod-shell {
  color: var(--ink);
}
html[data-theme="light"] .byod-hero {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .byod-eyebrow {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
}
html[data-theme="light"] .byod-hero-note {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 55%),
    #f8fafc;
}
html[data-theme="light"] .byod-hero-note strong {
  color: var(--ink);
}
html[data-theme="light"] .byod-hero-note span {
  color: var(--muted);
}

html[data-theme="light"] .toast {
  background: #0f172a;
  color: #f8fafc;
}

html[data-theme="light"] .updates-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .updates-banner {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
}

html[data-theme="light"] .landing-logo {
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
}

html[data-theme="light"] .result-banner {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: var(--ink);
}

html[data-theme="light"] .byod-panel,
html[data-theme="light"] .byod-period-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .byod-period-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .byod-status-pill {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.1);
  color: #1e3a8a;
}
html[data-theme="light"] .byod-status-pill.active {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}
html[data-theme="light"] .byod-meta-box .label {
  color: var(--muted);
}
html[data-theme="light"] .byod-renew-grid .btn.ghost {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f1f5f9;
  color: var(--ink);
}
html[data-theme="light"] .byod-renew-grid .btn.ghost:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.1);
  color: var(--ink);
}
html[data-theme="light"] .byod-kpi {
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}
html[data-theme="light"] .byod-qr-card {
  background:
    linear-gradient(165deg, rgba(37, 99, 235, 0.08), transparent 42%),
    #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .byod-qr-badge {
  color: #2563eb;
}
html[data-theme="light"] .prefs-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .lang-seg {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .help-card {
  background: rgba(15, 23, 42, 0.03);
}
html[data-theme="light"] .theme-seg {
  background: #f1f5f9;
}
