:root {
  --bg: #05070f;
  --bg-2: #090e1c;
  --surface: rgba(17, 24, 43, 0.68);
  --surface-strong: rgba(21, 30, 54, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.25);
  --text: #e8eefc;
  --muted: #91a0ba;
  --muted-2: #6c7b96;
  --accent: #8b6cff;
  --accent-2: #5edcff;
  --accent-3: #49e2a2;
  --danger: #ff6b8a;
  --warning: #ffca6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --sidebar: 258px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(139, 108, 255, 0.20), transparent 55%),
    radial-gradient(880px 600px at 96% 4%, rgba(94, 220, 255, 0.12), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(73, 226, 162, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  opacity: 0.28;
  z-index: 0;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #a4f0ff; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
::selection { background: rgba(139, 108, 255, 0.4); color: #fff; }

/* ------------------------------------------------------------------ */
/* Auth / forced password                                             */
/* ------------------------------------------------------------------ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 18px;
  position: relative;
  z-index: 1;
}
.auth-wrap { width: min(1080px, 100%); display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 34px; align-items: center; }
.auth-hero { padding: 24px 10px; animation: rise 0.75s ease both; }
.auth-card {
  width: 100%;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(23, 32, 58, 0.90), rgba(9, 13, 26, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  animation: rise 0.65s ease both;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #9b7dff, #45d6ff);
  color: #071020; font-weight: 900; letter-spacing: -1px;
  box-shadow: 0 12px 30px rgba(112, 118, 255, 0.35);
}
.logo-word { font-weight: 800; letter-spacing: 0.04em; }
.logo-word span { color: var(--accent-2); }
.auth-card h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.04em; }
.auth-card p.sub { margin: 0 0 24px; color: var(--muted); }
.auth-hero .display { margin: 18px 0 16px; font-size: clamp(34px, 5vw, 62px); line-height: 1.03; letter-spacing: -0.065em; font-weight: 800; }
.auth-hero .display span { background: linear-gradient(100deg, #b19cff, #6de4ff 55%, #6effc0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { max-width: 560px; color: var(--muted); font-size: 15px; }
.auth-hero-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.auth-hero-points span { border: 1px solid var(--border); background: var(--surface-soft); padding: 7px 11px; border-radius: 999px; color: #c7d4eb; font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Layout                                                             */
/* ------------------------------------------------------------------ */
.app-shell { min-height: 100vh; display: flex; position: relative; z-index: 1; }
.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  min-height: 100vh;
  position: sticky;
  top: 0;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(11, 16, 31, 0.92), rgba(6, 9, 18, 0.80));
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 40;
}
.brand-row { display: flex; align-items: center; gap: 11px; padding: 2px 8px 10px; }
.brand-row .logo-mark { width: 38px; height: 38px; border-radius: 12px; }
.brand-meta small { display: block; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
.brand-meta strong { display: block; letter-spacing: 0.01em; font-size: 15px; }
.nav { display: grid; gap: 4px; }
.nav-section-label { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; padding: 12px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid transparent; color: #adbbd3; font-weight: 600; font-size: 13px; transition: 0.18s ease;
}
.nav-link:hover { color: #e7efff; background: rgba(255, 255, 255, 0.04); }
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(139, 108, 255, 0.24), rgba(94, 220, 255, 0.07));
  border-color: rgba(139, 108, 255, 0.26);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-icon { width: 18px; height: 18px; opacity: 0.8; flex: 0 0 18px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-soft);
}
.avatar {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 36px;
  display: grid; place-items: center; font-weight: 800; color: #08101f;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
}
.sidebar-user .who { min-width: 0; }
.sidebar-user .who strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who small { display: block; color: var(--muted); font-size: 10px; }
.sidebar-logout { border: 0; background: transparent; color: var(--muted); padding: 4px; border-radius: 8px; margin-left: auto; }
.sidebar-logout:hover { color: var(--danger); background: rgba(255,107,138,.08); }

.main { flex: 1; min-width: 0; padding: 28px clamp(16px, 3.2vw, 46px) 48px; }
.topbar { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 26px; }
.page-title { margin: 0; font-size: clamp(24px, 2.7vw, 34px); letter-spacing: -0.045em; }
.page-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 11px; width: 40px; height: 40px; }
.sidebar-backdrop { display: none; }

/* ------------------------------------------------------------------ */
/* Components                                                         */
/* ------------------------------------------------------------------ */
.glass {
  border: 1px solid var(--border);
  background: linear-gradient(155deg, rgba(20, 29, 52, 0.72), rgba(9, 13, 26, 0.62));
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.19);
  backdrop-filter: blur(18px);
}
.card { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-head .head-side { color: var(--muted); font-size: 12px; white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 18px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; right: -48px; top: -46px; background: radial-gradient(circle, rgba(139,108,255,.22), transparent 68%); }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.stat-value { margin-top: 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.stat-foot { margin-top: 8px; color: var(--muted-2); font-size: 11px; }
.stat-icon { position: absolute; top: 16px; right: 16px; color: var(--accent-2); opacity: 0.75; }

.btn {
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 14px;
  background: rgba(255,255,255,.04); color: var(--text); font-weight: 700; font-size: 12px;
  transition: 0.18s ease; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5d9eff); border-color: transparent; color: #fff; box-shadow: 0 10px 24px rgba(110, 102, 255, .25); }
.btn-primary:hover { background: linear-gradient(135deg, #9b7dff, #72adff); }
.btn-success { background: rgba(73, 226, 162, .14); border-color: rgba(73, 226, 162, .35); color: #8fffce; }
.btn-success:hover { background: rgba(73, 226, 162, .22); }
.btn-danger { background: rgba(255, 107, 138, .11); border-color: rgba(255, 107, 138, .29); color: #ffb1c1; }
.btn-danger:hover { background: rgba(255, 107, 138, .2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-small { padding: 6px 9px; font-size: 11px; border-radius: 8px; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.form-grid { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.label { color: #c5d1e6; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(3, 7, 16, .48); color: var(--text); padding: 11px 12px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus { border-color: rgba(139,108,255,.65); box-shadow: 0 0 0 3px rgba(139,108,255,.12); }
.input::placeholder { color: #62708a; }
textarea.input { min-height: 100px; resize: vertical; }
.hint { color: var(--muted-2); font-size: 11px; }
.inline-form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.inline-form .input { width: auto; min-width: 90px; padding: 7px 9px; font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.check-row input { accent-color: var(--accent); width: 15px; height: 15px; }
.form-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 4px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 108, 255, 0.45) transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(139, 108, 255, 0.35); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(139, 108, 255, 0.6); }
table { width: 100%; border-collapse: collapse; min-width: 460px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid rgba(148,163,184,.075); vertical-align: middle; }
th { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; background: rgba(255,255,255,.018); }
td { color: #d8e2f4; font-size: 12px; }
tbody tr:hover { background: rgba(255,255,255,.018); }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { color: #f1f5ff; font-weight: 600; }
.cell-sub { color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.mono { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; letter-spacing: -0.02em; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 30px 12px; font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-success { color: #7ff0c0; background: rgba(73,226,162,.08); border-color: rgba(73,226,162,.23); }
.badge-warning { color: #ffda8a; background: rgba(255,202,107,.08); border-color: rgba(255,202,107,.23); }
.badge-danger { color: #ff9ab0; background: rgba(255,107,138,.08); border-color: rgba(255,107,138,.23); }
.badge-muted { color: #9eacc3; background: rgba(148,163,184,.08); }
.badge-purple { color: #c4b5ff; background: rgba(139,108,255,.1); border-color: rgba(139,108,255,.24); }

.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 18px; font-size: 12px; animation: slideIn .35s ease both; }
.flash-success { color: #a8ffdb; border-color: rgba(73,226,162,.28); background: rgba(73,226,162,.08); }
.flash-error { color: #ffbdc9; border-color: rgba(255,107,138,.3); background: rgba(255,107,138,.08); }
.flash-icon { flex: 0 0 18px; font-weight: 900; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.alert-danger { color: #ffbdc9; border-color: rgba(255,107,138,.3); background: rgba(255,107,138,.07); }
.alert-warning { color: #ffe0a2; border-color: rgba(255,202,107,.28); background: rgba(255,202,107,.06); }
.alert-success { color: #9fffd7; border-color: rgba(73,226,162,.28); background: rgba(73,226,162,.06); }

.tab-panel { display: none; animation: fadeIn .25s ease both; }
.tab-panel.active { display: block; }
.stack { display: grid; gap: 18px; }
.section-gap { margin-top: 18px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .muted { color: var(--muted); font-size: 12px; }
.secret-box { border: 1px dashed rgba(139,108,255,.4); background: rgba(139,108,255,.06); border-radius: 12px; padding: 12px; word-break: break-all; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.secret-box code { color: #e3dcff; font-size: 12px; }
.copy-btn { border: 1px solid var(--border-strong); background: rgba(255,255,255,.04); color: var(--muted); border-radius: 8px; padding: 6px 9px; font-size: 10px; }
.copy-btn:hover { color: #fff; }
.kill-card { border-color: rgba(255,107,138,.18); background: linear-gradient(155deg, rgba(255,107,138,.06), rgba(9,13,26,.62)); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 12px rgba(73,226,162,.8); margin-right: 6px; }
.status-dot.off { background: var(--danger); box-shadow: 0 0 12px rgba(255,107,138,.8); }

.footer-note { color: var(--muted-2); font-size: 10px; text-align: center; margin-top: 28px; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--accent-3); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* TOTP / security                                                    */
/* ------------------------------------------------------------------ */
.security-hero { display: flex; gap: 14px; align-items: flex-start; }
.security-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(139,108,255,.12); border: 1px solid rgba(139,108,255,.25); font-size: 20px; flex: 0 0 48px; }
.totp-steps { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* ------------------------------------------------------------------ */
/* Animations                                                         */
/* ------------------------------------------------------------------ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; max-width: 520px; gap: 18px; }
  .auth-hero { display: none; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-104%);
    transition: transform .22s ease; box-shadow: 24px 0 70px rgba(0,0,0,.45); overflow-y: auto;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(1,4,10,.62); z-index: 30; backdrop-filter: blur(3px); }
  .hamburger { display: inline-grid; place-items: center; }
  .main { padding: 20px 16px 42px; }
  .topbar { align-items: flex-start; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; border-radius: 20px; }
  .top-actions .btn span { display: none; }
  .toolbar { align-items: flex-start; }
  .table-wrap { border-radius: 11px; }
  th, td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ================================================================== */
/* Rehzen Premium SaaS UI v2                                          */
/* Dark + Light theme, glass surfaces, guide, quick actions            */
/* ================================================================== */

:root {
  --premium-radius: 22px;
  --premium-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  --premium-glow: 0 0 0 1px rgba(255,255,255,.045) inset, 0 20px 60px rgba(2,6,23,.28);
}

body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.008em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 8px 0 10px;
  background: linear-gradient(180deg, rgba(5, 7, 15, .78), rgba(5, 7, 15, .38) 72%, transparent);
  backdrop-filter: blur(18px);
}

.sidebar {
  box-shadow: 18px 0 60px rgba(0, 0, 0, .16);
}

.glass, .auth-card, .sidebar, .stat-card, .table-wrap {
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.glass {
  border-radius: var(--premium-radius);
  background: linear-gradient(155deg, rgba(26, 36, 62, .72), rgba(8, 13, 26, .74));
  box-shadow: var(--premium-glow);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 108, 255, .28);
}

.nav-link {
  border: 1px solid transparent;
}

.nav-link.active {
  border-color: rgba(139, 108, 255, .18);
  box-shadow: 0 9px 26px rgba(78, 63, 180, .16);
}

.sidebar-theme {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 11px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  transition: .18s ease;
}

.sidebar-theme:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, .06);
}

.theme-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--accent-2);
}

.sidebar-theme .icon-sun { display: none; }
html[data-theme="light"] .sidebar-theme .icon-moon { display: none; }
html[data-theme="light"] .sidebar-theme .icon-sun { display: block; }

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.quick-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.balance-btn {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: .16s ease;
}

.balance-btn:hover { transform: translateY(-1px); }
.balance-plus { color: #8fffce; border-color: rgba(73, 226, 162, .24); background: rgba(73, 226, 162, .08); }
.balance-plus:hover { background: rgba(73, 226, 162, .16); }
.balance-minus { color: #ffb1c1; border-color: rgba(255, 107, 138, .24); background: rgba(255, 107, 138, .07); }
.balance-minus:hover { background: rgba(255, 107, 138, .14); }

.guide-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: -50% auto auto 55%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 220, 255, .13), transparent 64%);
  pointer-events: none;
}

.guide-hero-copy { position: relative; max-width: 680px; }
.guide-hero h2 { margin: 8px 0 10px; font-size: clamp(27px, 3.5vw, 42px); line-height: 1.05; letter-spacing: -.055em; }
.guide-hero p { max-width: 640px; margin: 0; font-size: 13px; }
.guide-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.eyebrow { display: block; color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.guide-hero-mark {
  position: relative;
  display: grid;
  width: 168px;
  height: 168px;
  flex: 0 0 168px;
  place-items: center;
  border: 1px solid rgba(139, 108, 255, .2);
  border-radius: 48px;
  background: radial-gradient(circle at 30% 20%, rgba(139, 108, 255, .22), transparent 55%), rgba(3, 7, 16, .28);
  transform: rotate(7deg);
}
.guide-mark-inner {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, #a98dff, #48d3ff);
  color: #07101f;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.08em;
  box-shadow: 0 18px 45px rgba(107, 99, 255, .34);
}
.guide-orbit { position: absolute; border: 1px solid rgba(94, 220, 255, .22); border-radius: 50%; }
.orbit-one { inset: 19px; }
.orbit-two { inset: 38px; border-color: rgba(139, 108, 255, .22); }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.guide-step { position: relative; padding: 20px; overflow: hidden; }
.guide-step:hover { transform: translateY(-3px); border-color: rgba(94, 220, 255, .24); }
.guide-number { position: absolute; right: 16px; top: 14px; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .12em; opacity: .7; }
.guide-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(94, 220, 255, .22); border-radius: 12px; background: rgba(94, 220, 255, .07); color: #a4f0ff; font-size: 17px; }
.guide-step h3, .guide-note h3 { margin: 13px 0 6px; font-size: 13px; letter-spacing: -.02em; }
.guide-step p, .guide-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.guide-step strong, .guide-note strong { color: var(--text); }
.guide-copy { margin-top: 11px; border: 0; background: transparent; color: var(--accent-2); padding: 0; font-size: 10px; font-weight: 800; }
.guide-copy:hover { color: #a4f0ff; text-decoration: underline; }
.guide-note { display: flex; gap: 13px; margin-top: 14px; padding: 18px 20px; }
.guide-note-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 9px; background: rgba(255, 203, 113, .1); color: #ffe0a3; font-weight: 800; font-size: 12px; }
.guide-note h3 { margin-top: 2px; }
.guide-note p { font-size: 11px; }

@media (max-width: 1100px) {
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .guide-hero { align-items: flex-start; }
  .guide-hero-mark { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .topbar { position: relative; }
}

/* ------------------------------------------------------------------ */
/* Light theme                                                        */
/* ------------------------------------------------------------------ */
html[data-theme="light"] {
  --bg: #f2f5fb;
  --bg-2: #e9eef7;
  --surface: rgba(255, 255, 255, .74);
  --surface-strong: rgba(255, 255, 255, .94);
  --surface-soft: rgba(15, 23, 42, .035);
  --border: rgba(15, 23, 42, .09);
  --border-strong: rgba(15, 23, 42, .17);
  --text: #101828;
  --muted: #5d6d84;
  --muted-2: #7b8ba2;
  --accent: #7256e8;
  --accent-2: #168fb5;
  --accent-3: #12966a;
  --danger: #d94d6d;
  --warning: #a87318;
  --shadow: 0 22px 64px rgba(31, 45, 72, .10);
  --premium-shadow: 0 22px 64px rgba(31, 45, 72, .10);
  color-scheme: light;
}

html[data-theme="light"] body {
  background:
    radial-gradient(850px 500px at 8% -10%, rgba(139, 108, 255, .13), transparent 55%),
    radial-gradient(820px 560px at 96% 2%, rgba(94, 220, 255, .12), transparent 60%),
    radial-gradient(700px 480px at 50% 110%, rgba(73, 226, 162, .08), transparent 60%),
    var(--bg);
  color: var(--text);
}
html[data-theme="light"] body::before { opacity: .12; }
html[data-theme="light"] .topbar { background: linear-gradient(180deg, rgba(242, 245, 251, .9), rgba(242, 245, 251, .5) 76%, transparent); }
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(247, 249, 253, .9));
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 18px 0 60px rgba(31, 45, 72, .08);
}
html[data-theme="light"] .glass,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .table-wrap {
  background: linear-gradient(155deg, rgba(255, 255, 255, .92), rgba(249, 251, 255, .82));
  border-color: rgba(15, 23, 42, .08);
  box-shadow: var(--premium-shadow), inset 0 1px 0 rgba(255, 255, 255, .85);
}
html[data-theme="light"] .nav-link { color: #5b6b83; }
html[data-theme="light"] .nav-link:hover { color: #101828; background: rgba(114, 86, 232, .06); }
html[data-theme="light"] .nav-link.active { color: #5a3dd8; background: rgba(114, 86, 232, .1); border-color: rgba(114, 86, 232, .16); }
html[data-theme="light"] .nav-section-label,
html[data-theme="light"] .footer-note,
html[data-theme="light"] .sidebar-user .who small { color: var(--muted-2); }
html[data-theme="light"] .page-title,
html[data-theme="light"] .card-head h2,
html[data-theme="light"] .card-head h3,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .cell-main,
html[data-theme="light"] .guide-step h3,
html[data-theme="light"] .guide-note h3 { color: var(--text); }
html[data-theme="light"] td { color: #344054; }
html[data-theme="light"] th { color: var(--muted); background: rgba(15, 23, 42, .025); border-bottom-color: rgba(15, 23, 42, .075); }
html[data-theme="light"] td { border-bottom-color: rgba(15, 23, 42, .065); }
html[data-theme="light"] .table-wrap { background: rgba(255, 255, 255, .66); }
html[data-theme="light"] .input,
html[data-theme="light"] select.input,
html[data-theme="light"] textarea.input {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(15, 23, 42, .11);
  color: #101828;
}
html[data-theme="light"] .input::placeholder { color: #93a1b4; }
html[data-theme="light"] .btn { background: rgba(15, 23, 42, .035); border-color: rgba(15, 23, 42, .12); color: #1d2939; }
html[data-theme="light"] .btn:hover { background: rgba(15, 23, 42, .06); border-color: rgba(15, 23, 42, .2); }
html[data-theme="light"] .btn-primary { color: #fff; border-color: transparent; }
html[data-theme="light"] .badge { background: rgba(15, 23, 42, .04); border-color: rgba(15, 23, 42, .08); color: #5d6d84; }
html[data-theme="light"] .flash { background: rgba(255, 255, 255, .86); border-color: rgba(15, 23, 42, .08); color: #344054; }
html[data-theme="light"] .auth-hero-points span { color: #475467; background: rgba(255, 255, 255, .62); border-color: rgba(15, 23, 42, .08); }
html[data-theme="light"] .sidebar-theme { background: rgba(15, 23, 42, .025); border-color: rgba(15, 23, 42, .09); color: #5d6d84; }
html[data-theme="light"] .sidebar-theme:hover { background: rgba(114, 86, 232, .06); color: #101828; }
html[data-theme="light"] .guide-hero { background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(247, 249, 255, .84)); }
html[data-theme="light"] .guide-hero-mark { background: radial-gradient(circle at 30% 20%, rgba(114, 86, 232, .12), transparent 55%), rgba(255, 255, 255, .42); }
html[data-theme="light"] .guide-mark-inner { color: #fff; }
html[data-theme="light"] .guide-icon { background: rgba(22, 143, 181, .07); border-color: rgba(22, 143, 181, .18); color: #168fb5; }
html[data-theme="light"] .guide-note { background: linear-gradient(155deg, rgba(255, 250, 235, .92), rgba(255, 255, 255, .82)); }
html[data-theme="light"] .balance-plus { background: rgba(18, 150, 106, .07); color: #12966a; }
html[data-theme="light"] .balance-minus { background: rgba(217, 77, 109, .06); color: #d94d6d; }
html[data-theme="light"] .secret-box,
html[data-theme="light"] pre,
html[data-theme="light"] code { color: #344054; }
html[data-theme="light"] ::selection { background: rgba(114, 86, 232, .22); color: #101828; }

/* Light theme semantic states */
html[data-theme="light"] .badge-success { background: rgba(18, 150, 106, .09); border-color: rgba(18, 150, 106, .18); color: #0f7a56; }
html[data-theme="light"] .badge-danger { background: rgba(217, 77, 109, .08); border-color: rgba(217, 77, 109, .18); color: #b83253; }
html[data-theme="light"] .badge-warning { background: rgba(168, 115, 24, .09); border-color: rgba(168, 115, 24, .18); color: #8a5a10; }
html[data-theme="light"] .badge-purple { background: rgba(114, 86, 232, .09); border-color: rgba(114, 86, 232, .18); color: #5a3dd8; }
html[data-theme="light"] .badge-muted { background: rgba(15, 23, 42, .045); border-color: rgba(15, 23, 42, .09); color: #66758a; }
html[data-theme="light"] .btn-success { background: rgba(18, 150, 106, .08); border-color: rgba(18, 150, 106, .18); color: #0f7a56; }
html[data-theme="light"] .btn-success:hover { background: rgba(18, 150, 106, .14); }
html[data-theme="light"] .btn-danger { background: rgba(217, 77, 109, .07); border-color: rgba(217, 77, 109, .18); color: #b83253; }
html[data-theme="light"] .btn-danger:hover { background: rgba(217, 77, 109, .13); }
html[data-theme="light"] .alert-warning { background: rgba(168, 115, 24, .07); border-color: rgba(168, 115, 24, .16); color: #7a5210; }
html[data-theme="light"] .footer-note, html[data-theme="light"] .hint, html[data-theme="light"] .text-muted { color: #66758a; }
html[data-theme="light"] .sidebar-user .avatar { box-shadow: 0 8px 22px rgba(114, 86, 232, .18); }

/* Light theme readability fixes */
html[data-theme="light"] .label,
html[data-theme="light"] .field .label {
  color: #475467;
}
html[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #7256e8, #4f8ff7);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(91, 76, 214, .24);
}
html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #8065f0, #62a0ff);
  color: #ffffff;
}
html[data-theme="light"] .btn-primary:disabled {
  opacity: .55;
  color: #ffffff;
}

/* Auth v2 — refined login experience                                  */
/* ------------------------------------------------------------------ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 92px 26px 40px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.auth-shell::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
  z-index: -2;
}
.auth-shell::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  left: -240px;
  top: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 108, 255, .20), transparent 66%);
  filter: blur(12px);
  z-index: -1;
}
.auth-theme {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(9, 14, 28, .62);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(14px);
}
.auth-theme svg { width: 14px; height: 14px; }
.auth-theme:hover { color: var(--text); border-color: var(--border-strong); }
.auth-wrap {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .82fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
}
.auth-hero { padding: 14px 0 14px 8px; animation: rise .7s ease both; position: relative; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aab7d4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  padding: 7px 10px;
  margin-bottom: 30px;
}
.auth-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 4px rgba(73, 226, 162, .10); }
.auth-version { color: var(--accent-2); border-left: 1px solid var(--border); padding-left: 8px; letter-spacing: .08em; }
.auth-hero .auth-logo { margin-bottom: 26px; }
.auth-hero .display {
  margin: 0 0 20px;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 800;
  max-width: 760px;
}
.auth-hero .display span {
  background: linear-gradient(100deg, #c3b2ff 0%, #7ce6ff 58%, #78ffd1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-lead { max-width: 580px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.auth-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 32px; max-width: 760px; }
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  min-width: 0;
}
.auth-feature-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #a9dcff;
  background: rgba(94, 220, 255, .08);
  border: 1px solid rgba(94, 220, 255, .14);
}
.auth-feature-icon svg { width: 16px; height: 16px; }
.auth-feature strong { display: block; font-size: 11px; letter-spacing: -.01em; color: #e8eefc; margin-bottom: 2px; }
.auth-feature small { display: block; color: var(--muted-2); font-size: 10px; line-height: 1.45; }
.auth-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 25px; color: var(--muted-2); font-size: 11px; }
.auth-live { display: inline-flex; align-items: center; gap: 7px; color: #a9c4c0; }
.auth-live > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 4px rgba(73, 226, 162, .09); }
.auth-trust-sep { opacity: .45; }
.auth-card {
  width: 100%;
  max-width: 454px;
  justify-self: end;
  position: relative;
  padding: 27px 28px 22px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(24, 34, 61, .92), rgba(8, 13, 27, .90));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .045);
  backdrop-filter: blur(26px);
  animation: rise .6s ease both;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: -130px;
  left: 12%;
  right: 12%;
  height: 190px;
  background: radial-gradient(ellipse, rgba(139, 108, 255, .24), transparent 68%);
  pointer-events: none;
}
.auth-card > * { position: relative; }
.auth-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.auth-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 0; }
.auth-logo-compact .logo-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 14px; }
.auth-logo-compact .logo-word { font-size: 12px; letter-spacing: .07em; }
.auth-secure { display: inline-flex; align-items: center; gap: 6px; color: #9fb7d6; font-size: 10px; font-weight: 700; border: 1px solid var(--border); border-radius: 999px; padding: 5px 8px; }
.auth-secure span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-3); }
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(139, 108, 255, .10);
  border: 1px solid rgba(139, 108, 255, .18);
  color: #b9a8ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 9px;
  margin-bottom: 13px;
}
.auth-chip span { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.auth-card h1 { margin: 0 0 7px; font-size: 28px; line-height: 1.1; letter-spacing: -.045em; }
.auth-card p.sub { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-card .alert { margin: 0 0 16px; font-size: 12px; }
.auth-form { gap: 15px; }
.auth-form .field { gap: 6px; }
.auth-form .label { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #9aa9c2; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon {
  position: absolute;
  left: 13px;
  color: #6f819e;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.auth-input-icon svg { width: 16px; height: 16px; }
.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 13px 0 39px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, .20);
  background: rgba(2, 6, 18, .38);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-input::placeholder { color: #5d6b84; }
.auth-input:focus { border-color: rgba(139, 108, 255, .65); box-shadow: 0 0 0 3px rgba(139, 108, 255, .13); background: rgba(2, 6, 18, .52); }
.auth-input-password { padding-right: 72px; }
.auth-input-wrap-code .auth-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .28em; font-size: 17px; }
.auth-reveal {
  position: absolute;
  right: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #8b9bb6;
  font-size: 10px;
  font-weight: 700;
  padding: 7px 9px;
}
.auth-reveal:hover { color: var(--text); background: rgba(255, 255, 255, .055); }
.auth-submit { height: 46px; margin-top: 2px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; letter-spacing: .01em; }
.auth-submit span { font-size: 16px; line-height: 1; transform: translateY(-1px); transition: transform .18s ease; }
.auth-submit:hover span { transform: translate(3px, -1px); }
.auth-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 20px; padding-top: 14px; color: var(--muted-2); font-size: 10px; }
.auth-card-foot > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.auth-card-foot svg { width: 12px; height: 12px; }
.auth-foot-links { display: inline-flex; align-items: center; gap: 6px; color: #8495b1; }
.auth-foot-links a { color: #9fb1cc; }
.auth-foot-links a:hover { color: var(--accent-2); }
html[data-theme="light"] .auth-theme { background: rgba(255, 255, 255, .7); color: #52617a; }
html[data-theme="light"] .auth-shell::before { opacity: .42; }
html[data-theme="light"] .auth-shell::after { background: radial-gradient(circle, rgba(114, 86, 232, .11), transparent 66%); }
html[data-theme="light"] .auth-eyebrow { color: #56647a; background: rgba(255, 255, 255, .68); }
html[data-theme="light"] .auth-hero .display { color: #111a2e; }
html[data-theme="light"] .auth-hero .display span { background: linear-gradient(100deg, #7458e8, #258fbe 58%, #168f68); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .auth-lead { color: #596980; }
html[data-theme="light"] .auth-feature { background: rgba(255, 255, 255, .70); border-color: rgba(15, 23, 42, .09); }
html[data-theme="light"] .auth-feature strong { color: #182338; }
html[data-theme="light"] .auth-feature small { color: #77869c; }
html[data-theme="light"] .auth-card { background: linear-gradient(155deg, rgba(255, 255, 255, .96), rgba(244, 247, 255, .92)); border-color: rgba(15, 23, 42, .10); box-shadow: 0 28px 80px rgba(32, 47, 78, .12); }
html[data-theme="light"] .auth-card h1 { color: #111a2e; }
html[data-theme="light"] .auth-card p.sub { color: #66758b; }
html[data-theme="light"] .auth-form .label { color: #63728a; }
html[data-theme="light"] .auth-input { background: rgba(255, 255, 255, .85); border-color: rgba(15, 23, 42, .12); color: #111a2e; }
html[data-theme="light"] .auth-input::placeholder { color: #9aa7ba; }
html[data-theme="light"] .auth-input-icon { color: #7c8ba1; }
html[data-theme="light"] .auth-reveal { color: #65748b; }
html[data-theme="light"] .auth-secure { color: #56677e; border-color: rgba(15, 23, 42, .10); }
html[data-theme="light"] .auth-card-foot { border-color: rgba(15, 23, 42, .08); color: #7a889d; }
html[data-theme="light"] .auth-foot-links a { color: #5f7188; }
@media (max-width: 1100px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr) minmax(360px, 410px); gap: 38px; }
  .auth-hero .display { font-size: clamp(40px, 5vw, 58px); }
  .auth-features { grid-template-columns: 1fr; max-width: 390px; gap: 7px; }
  .auth-feature { padding: 10px 12px; }
}
@media (max-width: 860px) {
  .auth-shell { padding: 74px 18px 32px; align-items: start; }
  .auth-wrap { grid-template-columns: 1fr; max-width: 460px; gap: 0; }
  .auth-hero { display: none; }
  .auth-card { justify-self: stretch; max-width: none; }
}
@media (max-width: 520px) {
  .auth-shell { padding: 66px 13px 22px; }
  .auth-card { padding: 22px 20px 18px; border-radius: 20px; }
  .auth-card-top { margin-bottom: 23px; }
  .auth-card h1 { font-size: 25px; }
  .auth-theme { top: 15px; right: 15px; }
  .auth-card-foot { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Login typography final */
.auth-hero .display { font-size: clamp(40px, 4.5vw, 60px); max-width: 720px; }

.auth-hero .display .display-tail { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); -webkit-text-fill-color: var(--text); }
html[data-theme="light"] .auth-hero .display .display-tail { color: #111a2e; -webkit-text-fill-color: #111a2e; }


/* Customer license cards */
.license-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.customer-license-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
.license-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.014));
  padding: 17px;
  min-width: 0;
  transition: border-color .2s ease, transform .2s ease;
}
.license-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.license-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.license-kicker { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.license-key-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 13px; }
.license-key { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 15px; letter-spacing: .02em; font-weight: 700; }
.license-copy { flex: 0 0 auto; }
.copy-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: #86efac; border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.license-product { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.license-product strong { font-size: 13px; }
.license-product span { color: var(--muted-2); font-size: 10px; }
.license-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 13px 0; }
.license-meta-grid div { min-width: 0; }
.license-meta-grid span { display: block; color: var(--muted-2); font-size: 9px; margin-bottom: 3px; }
.license-meta-grid strong { display: block; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.license-card-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.license-card-actions form { margin: 0; }
.license-empty { text-align: center; padding: 44px 20px 34px; }
.license-empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; font-size: 21px; font-weight: 900; color: #071020; background: linear-gradient(145deg, #9b7dff, #45d6ff); box-shadow: 0 14px 34px rgba(112,118,255,.28); }
.license-empty h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.03em; }
.license-empty p { margin: 0 auto 16px; max-width: 420px; color: var(--muted); font-size: 12px; }
.license-empty .form-actions { justify-content: center; }
@media (max-width: 900px) { .customer-license-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .license-key { font-size: 13px; } .license-meta-grid { gap: 6px; } .license-head-actions { width: 100%; justify-content: space-between; } }
html[data-theme="light"] .license-card { background: rgba(255,255,255,.72); }
html[data-theme="light"] .copy-btn { background: rgba(255,255,255,.8); }
