:root {
  color-scheme: dark;
  --sat: 0px;
  --sab: 0px;
  --ime: 0px;
  --bg: #080b10;
  --surface: #111822;
  --surface-2: #182231;
  --card-bg: #111822;
  --drawer-bg: #0c1118;
  --glass-line: rgba(255, 255, 255, .08);
  --text: #f5f8fb;
  --muted: #8f9cac;
  --line: rgba(148, 163, 184, .16);
  --primary: #1dd3e8;
  --blue: #4f8cff;
  --red: #ff5c73;
  --green: #35d58b;
  --gold: #f6c85f;
  --shadow: 0 18px 48px rgba(0, 0, 0, .32);
}
body[data-theme="dark"] {
  --bg: #05080D;
  --surface: #0D131C;
  --surface-2: #161F2B;
  --card-bg: #0D131C;
  --drawer-bg: #0D131C;
  --glass-line: rgba(255, 255, 255, .08);
  --text: #FFFFFF;
  --muted: #7D8795;
  --line: rgba(255, 255, 255, .08);
  --shadow: 0 18px 46px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #app { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden; background: var(--bg); color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 13px;
}
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
.app {
  height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background:
    radial-gradient(circle at 90% 0, rgba(8, 123, 255, .16), transparent 32%),
    radial-gradient(circle at 0 0, rgba(255, 255, 255, .18), transparent 34%),
    var(--bg);
}
body[data-theme="dark"] .app {
  background:
    radial-gradient(circle at 90% 0, rgba(0, 229, 255, .12), transparent 32%),
    var(--bg);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: max(12px, var(--sat), env(safe-area-inset-top)) 14px 8px;
  padding: 10px;
  border-radius: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; color: #fff; font-weight: 900; letter-spacing: 0;
  background: linear-gradient(135deg, var(--primary), var(--blue));
}
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 800; }
h1 { margin: 0; font-size: 20px; letter-spacing: 0; line-height: 1.15; }
h2, h3 { margin-top: 0; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.primary svg { width: 20px !important; height: 20px !important; }

.content {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 8px 14px calc(24px + var(--sab) + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
}
.content:has(.fixed-page) { overflow: hidden !important; padding-bottom: 0 !important; }
.fixed-page {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow: hidden; width: 100%;
  padding-bottom: calc(24px + var(--sab) + env(safe-area-inset-bottom));
}
.scroll-list {
  flex: 1; min-height: 0; overflow-y: auto !important;
  -webkit-overflow-scrolling: touch; width: 100%;
}

.login {
  min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: #05080D;
  position: relative; overflow: hidden;
  padding-bottom: calc(24px + var(--ime));
  transition: padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.login::before {
  content: ""; position: absolute; width: 150%; height: 150%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.03) 0%, transparent 70%);
  animation: rotateBg 20s linear infinite;
}
@keyframes rotateBg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.login-card {
  width: 100%; max-width: 360px;
  background: #0D131C;
  position: relative;
  border-radius: 32px; padding: 32px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  z-index: 1; overflow: visible;
  animation: loginFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.login-card::before {
  content: ""; position: absolute; inset: -1px;
  background: conic-gradient(from var(--a, 0deg), transparent, var(--primary), transparent 30%, transparent, var(--blue), transparent 80%);
  animation: borderRotate 4s linear infinite;
  border-radius: inherit; z-index: -1;
}
.login-card::after {
  content: ""; position: absolute; inset: 1px;
  background: #0D131C; border-radius: inherit; z-index: -1;
}
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes borderRotate { from { --a: 0deg; } to { --a: 360deg; } }
@keyframes loginFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.login-logo { width: 80px; height: 80px; border-radius: 22px; margin: 0 auto 20px; display: block; object-fit: contain; }
.login-logo.logo { display: grid; place-items: center; font-size: 22px; }
.pass-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
.pass-wrapper input { padding-right: 50px !important; }
.pass-toggle {
  position: absolute; right: 6px; top: 6px; bottom: 6px; width: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); color: var(--muted); border: 0; display: grid; place-items: center;
}
.login h1 { font-size: 26px; text-align: center; margin-bottom: 8px; letter-spacing: -0.5px; }
.login .eyebrow { text-align: center; display: block; margin-bottom: 32px; }
.login .primary { margin-top: 12px; width: 100%; height: 52px; font-size: 15px; }

.grid { display: grid; gap: 12px; width: 100%; }
.page-hero { display: grid; grid-template-columns: 52px 1fr; gap: 13px; align-items: center; padding: 14px; }
.page-icon {
  width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
}
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-mini-stats { margin-top: 4px; gap: 10px; }
.stat { padding: 14px; border-radius: 18px; border: 1px solid var(--line); }
.tone-card {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--tone) 32%, var(--line));
  box-shadow: var(--shadow), inset 4px 0 0 var(--tone);
}
.tone-card.blue { --tone: var(--blue); }
.tone-card.glass { --tone: var(--primary); }
.tone-card.gold { --tone: var(--gold); }
.tone-card.green { --tone: var(--green); }
.tone-card.cyan { --tone: #20d5f2; }
.tone-card.red { --tone: var(--red); }
.stat strong { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 11px; font-weight: 700; }
.field { display: grid; gap: 6px; }
.selection-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px;
}
.selection-item {
  padding: 14px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02); color: var(--muted);
  text-align: center; font-weight: 900; font-size: 11px;
  text-transform: uppercase; transition: all 0.2s ease;
  cursor: pointer;
}
.selection-item.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}
.selection-item:active { transform: scale(0.95); }

.field label { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; display: block; }

input, select {
  width: 100%; min-height: 46px; padding: 0 13px; border-radius: 14px;
  border: 1px solid var(--line); outline: 0; color: var(--text); background: var(--surface-2);
}
.primary, .secondary, .danger {
  min-height: 46px; border-radius: 15px; padding: 0 14px; color: #fff; font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 10px 18px rgba(18,13,45,.12);
  transition: transform .12s ease, filter .12s ease;
}
.primary { background: linear-gradient(135deg, var(--primary), var(--blue)); }
.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.danger { background: linear-gradient(135deg, #FF5265, #D32F2F); }
.primary:active, .secondary:active, .danger:active, .create-tile:active, .action-panel:active, .drawer-item:active {
  transform: translateY(3px) scale(.99);
  filter: saturate(1.06);
}
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  width: 100%;
}
.account-card {
  position: relative;
  width: 100%; max-width: 100%;
  padding: 14px; margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.01) !important;
  border: 1px solid var(--line) !important;
  border-radius: 20px;
  transition: border-color 0.2s ease;
  display: flex !important;
  flex-direction: column;
  height: auto !important;
  min-height: fit-content !important;
  flex-shrink: 0;
  overflow: hidden;
}

.account-card.online {
  border-color: color-mix(in srgb, var(--green) 35%, transparent) !important;
  box-shadow: inset 2px 0 0 var(--green) !important;
}
.account-card.offline {
  border-color: color-mix(in srgb, var(--red) 35%, transparent) !important;
  box-shadow: inset 2px 0 0 var(--red) !important;
}
.account-card.blocked {
  border-color: var(--red) !important;
  background: rgba(255, 82, 101, 0.05) !important;
}
.account-card.failed-provision {
  border-bottom: 2px solid var(--red) !important;
}
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; gap: 10px;
}
.user-main { flex: 1; min-width: 0; }
.user-title { display: flex; align-items: center; gap: 8px; }
.user-title h3 {
  margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.online-dot {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); opacity: 0.5;
}
.online-dot.on {
  background: var(--green); opacity: 1;
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
.user-sub {
  font-size: 11px; color: var(--muted); font-weight: 800;
  margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.credit-badge {
  font-size: 10px; font-weight: 900;
  background: rgba(0, 229, 255, 0.1); color: var(--primary);
  padding: 4px 9px; border-radius: 99px; white-space: nowrap;
}
.panel-account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  min-height: 72px;
}
.panel-account-summary h2 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.panel-account-meta {
  display: grid;
  gap: 5px;
  text-align: right;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  justify-items: end;
  min-width: max-content;
}
.panel-account-meta strong {
  color: var(--primary);
  font-size: 11px;
  line-height: 1.2;
}
.vpn-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.vpn-metrics span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  white-space: nowrap;
}
.vpn-metrics .credit-badge {
  min-height: 22px;
  padding: 0 9px;
}
.account-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px; padding: 12px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.account-card-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.account-action-open {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid color-mix(in srgb, var(--line) 76%, rgba(255,255,255,.2)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.32),
    0 8px 16px rgba(0,0,0,.18) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.account-action-open:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.035)),
    var(--surface-2) !important;
}
.account-action-open:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.account-action-open span,
.account-action-open svg {
  width: 16px;
  height: 16px;
  display: block;
}
.account-action-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.account-action-sheet .action-chip {
  padding: 0 10px !important;
  font-size: 10px !important;
  text-transform: none;
  justify-content: flex-start;
}
.account-action-sheet .action-chip span {
  flex: 0 0 16px;
}
.action-chip {
  width: 100%;
  min-height: 36px !important; padding: 0 4px !important;
  font-size: 9px !important; border-radius: 10px !important;
  text-transform: uppercase; font-weight: 900;
  background: rgba(255, 255, 255, 0.04) !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  gap: 4px; color: var(--text); border: 0;
  overflow: hidden;
}
.action-chip.danger {
  background: linear-gradient(135deg, #FF5265, #D32F2F) !important;
  color: #fff !important;
}
.action-chip.primary {
  background: linear-gradient(135deg, var(--primary), var(--blue)) !important;
  color: #fff !important;
}
.action-chip span {
  display: flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
}
.action-chip span svg { width: 14px !important; height: 14px !important; display: block; }

.meta-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
  color: var(--muted); font-size: 11px; font-weight: 800;
}
.meta-row span {
  min-height: 24px; display: inline-flex; align-items: center;
  padding: 0 9px; border-radius: 999px; background: var(--surface-2);
}
.user-tools {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 2; padding: 0 0 10px;
  background: transparent;
}
.search-box {
  min-width: 0; min-height: 48px; display: grid; grid-template-columns: 42px 1fr;
  align-items: center; border: 1px solid var(--line); border-radius: 17px;
  background: var(--surface-2);
  box-shadow: none;
}
.search-box span { display: grid; place-items: center; color: var(--primary); }
.search-box svg { width: 18px; height: 18px; display: block; }
.search-box input {
  min-height: 46px; padding: 0 12px 0 0; border: 0; background: transparent;
}
.user-count {
  min-height: 38px; display: inline-flex; align-items: center; padding: 0 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 11px; font-weight: 900; box-shadow: none;
}
.chart-card { overflow: hidden; }
.chart {
  height: 160px; display: grid; grid-template-columns: repeat(21, 1fr);
  align-items: end; gap: 4px; padding: 20px 0 10px; margin-top: 4px;
  background: transparent;
}
.bar {
  height: var(--h); min-height: 8px; border-radius: 999px;
  transform-origin: bottom; animation: growBar 0.8s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--d);
  background: var(--bar-bg);
  box-shadow: 0 4px 12px var(--bar-shadow);
  position: relative;
}
.bar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
}
.bar.blue { --bar-bg: linear-gradient(180deg, #45a6ff, #2979FF); --bar-shadow: rgba(41, 121, 255, 0.2); }
.bar.glass { --bar-bg: linear-gradient(180deg, #80F2FF, #00E5FF); --bar-shadow: rgba(0, 229, 255, 0.2); }
.bar.green { --bar-bg: linear-gradient(180deg, #68F0AE, #28E38A); --bar-shadow: rgba(40, 227, 138, 0.2); }

.chart-timeline {
  display: flex; justify-content: space-between;
  padding: 0 4px; margin-top: 4px;
  color: var(--muted); font-size: 9px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1px;
}
.legend-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px;
  color: var(--muted); font-size: 11px; font-weight: 800;
}
.dot { width: 9px; height: 9px; display: inline-block; margin-right: 6px; border-radius: 999px; }
.dot.blue { background: var(--blue); }
.dot.glass { background: rgba(16,184,217,.72); }
.dot.green { background: var(--green); }
.credit-hub {
  padding: 12px 18px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(41, 121, 255, 0.04));
  border: 1px solid rgba(0, 229, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative; overflow: hidden;
}
.credit-hub::before {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hub-info h2 { color: var(--text); }
.hub-stat { text-align: right; }

.forge-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.forge-tile {
  width: 100%; min-height: 110px; display: flex; flex-direction: column;
  justify-content: space-between; padding: 16px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line);
  text-align: left; transition: transform 0.1s ease;
}
.forge-tile.hero { grid-column: span 2; min-height: 90px; flex-direction: row; align-items: center; }
.forge-tile:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.05); }
.tile-icon {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 15%, transparent);
  color: var(--tone); box-shadow: 0 0 20px color-mix(in srgb, var(--tone) 20%, transparent);
}
.tile-icon svg { width: 22px; height: 22px; }
.tile-info { margin-top: 12px; }
.forge-tile.hero .tile-info { margin-top: 0; margin-left: 12px; flex: 1; }
.tile-info strong { display: block; font-size: 14px; color: var(--text); }
.tile-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.action-panel {
  width: 100%; min-height: 64px; display: grid; grid-template-columns: 42px 1fr;
  align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px;
  text-align: left; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border: 0; box-shadow: 0 8px 20px rgba(0, 229, 255, .2);
  margin-bottom: 8px;
}
.action-panel.danger {
  background: linear-gradient(135deg, #FF5265, #D32F2F);
  box-shadow: 0 8px 20px rgba(255, 82, 101, .2);
}
.action-panel small { color: rgba(255, 255, 255, .8); }
.action-panel-icon { background: rgba(255, 255, 255, .2); }

.fab {
  position: fixed; right: 20px; bottom: calc(24px + var(--sab) + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(0, 229, 255, .3);
  z-index: 10; border: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.fab:active { transform: scale(.92); }
.fab svg { width: 22px !important; height: 22px !important; display: block; }

.sheet-is-open .fab, .drawer-is-open .fab {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) translateY(20px);
}

.action-panel.primary { color: var(--text); background: var(--surface); }
.action-panel.danger {
  color: var(--text); background: var(--surface);
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
  box-shadow: var(--shadow), inset 4px 0 0 var(--red);
}
.action-panel-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px;
  color: #fff; background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.32), transparent 34%),
    linear-gradient(135deg, var(--tone-a), var(--tone-b));
}
.action-panel-icon svg { width: 23px; height: 23px; display: block; }
.action-panel strong { display: block; font-size: 14px; }
.action-panel small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.create-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 18px; color: #fff; font-weight: 900; font-size: 12px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.32), transparent 34%),
    linear-gradient(135deg, var(--tone-a), var(--tone-b));
}
.create-icon svg { width: 26px; height: 26px; display: block; }
.create-copy { display: grid; gap: 4px; min-width: 0; }
.create-copy strong { font-size: 15px; }
.create-copy small { color: var(--muted); font-size: 12px; }
.create-arrow { color: var(--muted); font-weight: 900; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 4; background: rgba(0, 0, 0, .42);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 6; top: 0; bottom: 0; left: 0; width: min(318px, 86vw);
  padding: max(18px, var(--sat), env(safe-area-inset-top)) 14px calc(18px + var(--sab));
  background: #0D131C !important;
  border-right: 0 !important;
  transform: translateX(-102%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  overflow: auto; box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body[data-theme="light"] .drawer {
  background: var(--drawer-bg) !important;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 4px 2px 16px; }
.drawer-title { font-weight: 900; font-size: 16px; }
.drawer-role { color: var(--muted); font-size: 11px; font-weight: 800; }
.drawer-group { margin: 10px 0 14px; }
.drawer-label {
  margin: 0 4px 8px; color: var(--muted); text-transform: uppercase;
  font-size: 10px; font-weight: 900; letter-spacing: .08em;
}
.drawer-item {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px;
  padding: 0 12px; margin-bottom: 6px; border-radius: 15px;
  background: transparent;
  color: var(--text); text-align: left; font-weight: 800;
  border: 0;
}
.drawer-item.active, .drawer-item:active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--blue)); border-color: transparent; }
.drawer-icon {
  min-width: 32px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: var(--tone-b); font-size: 10px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.drawer-icon svg { width: 17px; height: 17px; display: block; }
.drawer-item.active .drawer-icon { background: rgba(255,255,255,.18); color: #fff; }
.tone-blue { --tone-a: #5C9FFF; --tone-b: var(--blue); }
.tone-glass { --tone-a: #80F2FF; --tone-b: var(--primary); }
.tone-green { --tone-a: #68F0AE; --tone-b: var(--green); }
.tone-red { --tone-a: #FF8A98; --tone-b: var(--red); }
.tone-gold { --tone-a: #FFE55C; --tone-b: var(--gold); }
.hidden { display: none !important; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 6; background: rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.log-card {
  padding: 10px 14px !important;
  margin-bottom: 6px !important;
}
.log-card h3 { font-size: 13px !important; margin: 0 !important; }
.log-card p { font-size: 11px !important; margin-top: 4px !important; line-height: 1.3 !important; }
.log-card .badge { font-size: 9px !important; min-height: 18px !important; opacity: 0.7; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7;
  max-height: calc(100vh - var(--sat) - 40px);
  overflow-y: auto; padding: 10px 16px calc(24px + var(--sab) + var(--ime) + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 -18px 48px rgba(0,0,0,0.28);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.sheet.hidden {
  transform: translateY(105%);
  pointer-events: none;
  box-shadow: none !important;
  border-color: transparent !important;
}


.sheet h2 { margin: 4px 0 10px; font-size: 19px; }
.sheet-handle {
  width: 46px; height: 5px; border-radius: 999px; margin: 0 auto 14px;
  background: color-mix(in srgb, var(--muted) 34%, transparent);
}
.sheet-message { margin: 0 0 20px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.sheet-actions.single { grid-template-columns: 1fr; }
.toast {
  position: fixed; left: 18px; right: 18px; bottom: calc(22px + var(--sab) + env(safe-area-inset-bottom));
  z-index: 8; padding: 13px 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 84%, #000 16%);
  color: var(--text); text-align: center; font-weight: 850;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(16px);
  animation: toastIn .18s ease both;
}
.glow-text {
  text-shadow: 0 0 12px var(--tone);
}
.executive-hero {
  padding: 20px 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), transparent);
  border-radius: 22px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(40, 227, 138, 0.1); color: var(--green);
  font-size: 10px; font-weight: 900; text-transform: uppercase;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 rgba(40, 227, 138, 0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 227, 138, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(40, 227, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 227, 138, 0); }
}
.core-stat {
  padding: 20px 16px; border-left: 3px solid var(--tone) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 4px 16px 16px 4px;
}
.core-stat strong { font-size: 28px; letter-spacing: -1px; }

.result-card {
  margin-top: 24px; padding: 20px; border-radius: 24px;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.15);
  animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: 100%;
}
.result-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.02); margin-top: 10px;
  padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.03);
}
.result-data span { display: block; font-size: 9px; font-weight: 900; color: var(--primary); text-transform: uppercase; margin-bottom: 2px; }
.result-data strong { font-size: 14px; color: #fff; letter-spacing: 0.5px; }
.credential-lines {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.credential-lines b {
  color: var(--muted);
  font-weight: 900;
  text-transform: lowercase;
}
.credential-lines strong {
  color: var(--text);
  font-size: 13px;
}
.copy-chip {
  background: var(--primary); color: #000; border: 0;
  border-radius: 8px; padding: 6px 12px; font-size: 10px; font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}
.copy-chip:active { transform: scale(0.9); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.download-progress-container {
  width: 100%; height: 8px; background: rgba(255,255,255,0.05);
  border-radius: 99px; overflow: hidden; margin-top: 10px;
  border: 1px solid var(--line);
}
.download-progress-bar {
  height: 100%; width: 30%;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  border-radius: inherit;
  animation: downloadSlide 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes downloadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
@keyframes toastIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (min-width: 520px) {
  .account-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  html, body, #app {
    min-height: 100%;
  }

  body {
    overflow: hidden;
    font-size: 14px;
  }

  .app {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    background: var(--bg);
  }

  .drawer {
    position: static;
    grid-row: 1 / 3;
    width: 280px;
    transform: none !important;
    padding: 24px 16px;
    border-right: 1px solid var(--line) !important;
    box-shadow: none !important;
  }

  .drawer-backdrop,
  .menu-button {
    display: none !important;
  }

  .drawer-head {
    padding: 0 4px 24px;
    margin-bottom: 8px;
  }

  .drawer-group {
    margin: 18px 0 22px;
  }

  .drawer-item {
    min-height: 42px;
    border-radius: 12px;
    margin-bottom: 4px;
  }

  .topbar {
    grid-column: 2;
    margin: 0;
    padding: 24px 32px 14px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, var(--surface) 12%);
  }

  .topbar h1 {
    font-size: 24px;
  }

  .content {
    grid-column: 2;
    padding: 24px 32px 36px;
    align-items: center;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 34%, transparent), transparent 280px),
      var(--bg);
  }

  .content > .stack,
  .content > .page-stack,
  .content > .fixed-page {
    width: min(100%, 1180px);
  }

  .fixed-page {
    padding-bottom: 0;
  }

  .scroll-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-content: start;
    gap: 14px;
    padding: 2px 2px 90px;
  }

  .log-card,
  .scroll-list > .item:not(.account-card) {
    min-height: auto;
  }

  .executive-hero {
    padding: 26px 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .stat {
    padding: 18px;
    border-radius: 14px;
    background: var(--surface);
  }

  .stat strong {
    font-size: 28px;
  }

  .chart-card {
    max-width: 860px;
  }

  .forge-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
    gap: 16px;
  }

  .forge-tile,
  .forge-tile.hero {
    grid-column: auto;
    min-height: 132px;
    border-radius: 16px;
  }

  .credit-hub,
  .result-card {
    max-width: 760px;
  }

  .user-tools {
    grid-template-columns: minmax(320px, 520px) auto;
    justify-content: space-between;
    padding: 0 0 18px;
  }

  .account-card {
    margin: 0;
    border-radius: 14px;
    padding: 14px;
    background: var(--surface) !important;
  }

  .account-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding-top: 14px;
  }

  .action-chip {
    min-height: 38px !important;
    font-size: 10px !important;
    border-radius: 10px !important;
  }

  .fab {
    right: 32px;
    bottom: 32px;
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .sheet {
    left: 50%;
    right: auto;
    bottom: 50%;
    width: min(520px, calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 64px));
    padding: 18px 22px 24px;
    border-radius: 18px;
    transform: translate(-50%, 50%);
  }

  .sheet.hidden {
    transform: translate(-50%, 58%);
    opacity: 0;
  }

  .sheet-backdrop {
    background: rgba(2, 8, 23, .48);
  }

  .toast {
    left: auto;
    right: 32px;
    bottom: 32px;
    width: min(420px, calc(100vw - 64px));
  }

  .login {
    min-height: 100vh;
    padding: 48px;
  }

  .login-card {
    max-width: 420px;
    border-radius: 22px;
  }
}

@media (min-width: 1280px) {
  .scroll-list {
    grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  }

  .account-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .content > .stack,
  .content > .page-stack,
  .content > .fixed-page {
    width: 100%;
  }
}

/* Browser console layout */
body[data-theme="dark"] {
  --bg: #080b10;
  --surface: #111822;
  --surface-2: #182231;
  --card-bg: #111822;
  --drawer-bg: #0c1118;
  --text: #f5f8fb;
  --muted: #8f9cac;
  --line: rgba(148, 163, 184, .16);
  --primary: #1dd3e8;
  --blue: #4f8cff;
  --red: #ff5c73;
  --green: #35d58b;
  --gold: #f6c85f;
  --shadow: 0 18px 48px rgba(0, 0, 0, .32);
}

body[data-theme="dark"] .drawer,
body[data-theme="dark"] .login-card::after {
  background: var(--drawer-bg) !important;
}

body[data-theme="dark"] .account-card,
body[data-theme="dark"] .stat,
body[data-theme="dark"] .executive-hero,
body[data-theme="dark"] .credit-hub,
body[data-theme="dark"] .forge-tile,
body[data-theme="dark"] .item,
body[data-theme="dark"] .action-panel.primary,
body[data-theme="dark"] .action-panel.danger {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

@media (min-width: 900px) {
  body {
    background: var(--bg);
  }

  .app {
    grid-template-columns: 248px minmax(0, 1fr);
    background:
      linear-gradient(180deg, rgba(79, 140, 255, .06), transparent 280px),
      var(--bg);
  }

  .drawer {
    width: 248px;
    padding: 20px 14px;
  }

  .drawer-head {
    padding: 2px 6px 22px;
  }

  .drawer-item {
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .topbar {
    padding: 20px 28px 16px;
    background: rgba(8, 11, 16, .72);
    backdrop-filter: blur(14px);
  }

  body[data-theme="light"] .topbar {
    background: rgba(246, 251, 255, .82);
  }

  .content {
    align-items: stretch;
    padding: 24px 28px 32px;
    background: transparent;
  }

  .content > .stack,
  .content > .page-stack,
  .content > .fixed-page {
    width: min(100%, 1040px);
    margin: 0 auto;
  }

  .content > .fixed-page {
    width: min(100%, 1120px);
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 620px;
  }

  .stats {
    max-width: 620px;
  }

  .executive-hero,
  .chart-card,
  .credit-hub,
  .result-card {
    max-width: 720px;
  }

  .chart-card {
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    border-radius: 16px;
    padding: 18px;
  }

  .forge-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    max-width: 720px;
  }

  .forge-tile {
    min-height: 116px;
  }

  .scroll-list {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 12px;
  }

  .account-card {
    min-height: 142px !important;
  }

  .account-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .action-chip {
    font-size: 9px !important;
  }
}

@media (min-width: 1180px) {
  .content > .stack,
  .content > .page-stack {
    width: min(100%, 980px);
  }

  .content > .fixed-page {
    width: min(100%, 1080px);
  }
}

@media (min-width: 1440px) {
  .content > .stack,
  .content > .page-stack {
    width: 980px;
  }

  .content > .fixed-page {
    width: 1080px;
  }
}

@media (max-width: 899px) {
  body[data-theme="dark"] .app {
    background:
      radial-gradient(circle at 85% -10%, rgba(29, 211, 232, .14), transparent 38%),
      var(--bg);
  }

  .topbar {
    margin: max(10px, var(--sat), env(safe-area-inset-top)) 10px 6px;
    padding: 8px;
  }

  .content {
    padding: 8px 10px calc(22px + var(--sab) + env(safe-area-inset-bottom));
  }

  .account-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forge-grid {
    grid-template-columns: 1fr;
  }

  .forge-tile.hero {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .stats,
  .dashboard-stats {
    grid-template-columns: 1fr 1fr !important;
  }

  .user-tools {
    grid-template-columns: 1fr;
  }

  .user-count {
    justify-self: start;
  }

  .account-card {
    padding: 14px;
  }

  .action-chip {
    min-height: 38px !important;
    font-size: 9px !important;
  }
}

/* Standard dark web panel refinements */
body[data-theme="dark"] {
  color-scheme: dark;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 0;
}

.brand-logo img,
.login-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.logo-fallback-text {
  display: none;
  color: #fff;
  font-weight: 900;
}

.logo-fallback {
  background: linear-gradient(135deg, var(--primary), var(--blue));
}

.logo-fallback .logo-fallback-text {
  display: block;
}

.login {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0, rgba(29, 211, 232, .16), transparent 32%),
    linear-gradient(180deg, #0b1018, #070a0f);
}

.login::before {
  display: none;
}

.login-card {
  width: min(100%, 360px);
  padding: 26px 24px 24px;
  border-radius: 18px;
  background: var(--surface) !important;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.login-card::before,
.login-card::after {
  display: none;
}

.login-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  overflow: hidden;
  line-height: 0;
}

.login h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.login .eyebrow {
  margin-bottom: 24px;
  font-size: 9px;
}

.login .primary {
  height: 44px;
  min-height: 44px;
  font-size: 13px;
}

body,
button,
input,
select {
  font-size: 13px;
}

h1 {
  font-size: 18px;
}

.topbar h1 {
  font-size: 18px;
}

.eyebrow,
.drawer-label,
.field label {
  font-size: 9px;
  letter-spacing: .06em;
}

.drawer-title {
  font-size: 14px;
}

.drawer-role,
.drawer-item,
.stat span,
.tile-info small,
.action-panel small,
.user-sub,
.sheet-message {
  font-size: 11px;
}

.drawer-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 9px;
}

.drawer-icon svg {
  width: 15px;
  height: 15px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

input,
select {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 11px;
}

.primary,
.secondary,
.danger {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
}

.stat {
  border-radius: 12px;
}

.stat strong {
  font-size: 20px;
}

.core-stat strong {
  font-size: 23px;
}

.user-title h3 {
  font-size: 14px;
}

.account-card {
  border-radius: 12px;
}

.action-chip {
  min-height: 34px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
}

.tile-info strong,
.action-panel strong {
  font-size: 13px;
}

.tile-icon,
.action-panel-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.sheet h2 {
  font-size: 16px;
}

@media (min-width: 900px) {
  .app {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .drawer {
    width: 232px;
  }

  .topbar {
    padding: 16px 24px 12px;
  }

  .content {
    padding: 20px 24px 28px;
  }

  .content > .stack,
  .content > .page-stack {
    width: min(100%, 900px);
  }

  .content > .fixed-page {
    width: min(100%, 1000px);
  }

  .executive-hero,
  .chart-card,
  .credit-hub,
  .result-card,
  .forge-grid {
    max-width: 640px;
  }

  .executive-hero {
    padding: 20px 22px;
  }

  .dashboard-stats,
  .stats {
    max-width: 640px;
  }

  .chart {
    height: 124px;
  }

  .scroll-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .account-card {
    min-height: 136px !important;
    padding: 14px;
  }

  .account-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 900px) {
  .account-list {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 2px 2px 80px;
  }

  .account-list .account-card {
    min-height: 0 !important;
    margin: 0;
    padding: 10px 12px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(250px, auto) 150px;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
  }

  .account-list .account-card.online,
  .account-list .account-card.offline {
    box-shadow: inset 3px 0 0 var(--green) !important;
  }

  .account-list .account-card.offline {
    box-shadow: inset 3px 0 0 var(--red) !important;
  }

  .account-list .user-row {
    min-width: 0;
  }

  .account-list .user-title h3 {
    font-size: 13px;
  }

  .account-list .user-sub {
    margin-top: 2px;
    font-size: 10px;
  }

  .account-list .vpn-metrics {
    margin: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .account-list .vpn-metrics span {
    white-space: nowrap;
  }

  .account-list .account-card-footer {
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .account-list .account-action-open {
    min-height: 34px;
  }
}

@media (min-width: 1280px) {
  .content > .stack,
  .content > .page-stack {
    width: 900px;
  }

  .content > .fixed-page {
    width: 1000px;
  }
}

@media (max-width: 899px) {
  .panel-account-summary {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .panel-account-meta {
    text-align: left;
    justify-items: start;
    min-width: 0;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .login {
    padding: 18px;
  }

  .login-card {
    width: min(100%, 340px);
    padding: 24px 20px 22px;
  }

  .login-logo {
    width: 70px;
    height: 70px;
  }
}

@media (min-width: 900px) {
  .content > .stack:has(.panel-account-summary) {
    width: min(100%, 900px);
    align-self: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    gap: 14px;
  }

  .panel-account-summary {
    grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
    margin-bottom: 2px;
    width: 100%;
    max-width: 640px;
  }
}

/* Final theme and dashboard alignment pass */
body[data-theme="dark"] {
  --bg: #050908;
  --surface: #0e1716;
  --surface-2: #142321;
  --card-bg: #0e1716;
  --drawer-bg: #0b1211;
  --text: #f7fffd;
  --muted: #a8bbb6;
  --line: rgba(221, 255, 247, .13);
  --primary: #004d40;
  --primary-bright: #00a889;
  --blue: #2f8de4;
  --green: #00a889;
  --gold: #f2c14e;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f3faf8;
  --surface: #ffffff;
  --surface-2: #e8f3f0;
  --card-bg: #ffffff;
  --drawer-bg: #f8fcfb;
  --text: #10201d;
  --muted: #526763;
  --line: rgba(0, 77, 64, .18);
  --primary: #004d40;
  --primary-bright: #00796b;
  --blue: #1565c0;
  --red: #c62848;
  --green: #00796b;
  --gold: #8a6200;
  --shadow: 0 16px 36px rgba(0, 77, 64, .12);
}

body[data-theme="dark"] .app {
  background:
    radial-gradient(circle at 90% 0, rgba(0, 77, 64, .28), transparent 34%),
    var(--bg);
}

body[data-theme="light"] .app {
  background:
    radial-gradient(circle at 90% 0, rgba(0, 77, 64, .12), transparent 34%),
    linear-gradient(180deg, #ffffff 0, var(--bg) 280px);
}

body[data-theme="light"] .drawer,
body[data-theme="light"] .topbar,
body[data-theme="light"] .account-card,
body[data-theme="light"] .stat,
body[data-theme="light"] .executive-hero,
body[data-theme="light"] .credit-hub,
body[data-theme="light"] .forge-tile,
body[data-theme="light"] .item,
body[data-theme="light"] .chart-card,
body[data-theme="light"] .result-card,
body[data-theme="light"] .sheet {
  background: var(--surface) !important;
  color: var(--text);
  border-color: var(--line) !important;
}

body[data-theme="light"] .secondary,
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] .icon-btn {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.primary,
.drawer-item.active,
.drawer-item:active,
.copy-chip,
.fab {
  background: linear-gradient(135deg, var(--primary-bright, #00796b), var(--primary)) !important;
  color: #fff !important;
}

.copy-chip {
  box-shadow: 0 8px 18px rgba(0, 77, 64, .28);
}

.top-actions {
  align-items: center;
}

.theme-toggle,
.refresh-button {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
}

.theme-toggle svg,
.refresh-button svg {
  width: 19px;
  height: 19px;
}

body[data-theme="light"] .glow-text {
  text-shadow: none;
}

body[data-theme="light"] .status-pill,
body[data-theme="light"] .credit-badge {
  background: rgba(0, 77, 64, .1);
  color: var(--primary);
}

body[data-theme="dark"] .credit-badge {
  background: rgba(0, 168, 137, .16);
  color: var(--primary-bright);
  border: 1px solid rgba(0, 168, 137, .22);
}

@media (min-width: 900px) {
  .content > .stack:has(.panel-account-summary) {
    width: min(100%, 900px);
    margin: 0 auto;
    align-self: center;
    align-items: center;
  }

  .content > .stack:has(.panel-account-summary) > * {
    width: 100%;
    max-width: 640px;
  }
}

/* Create Account tile arrangement: 1 wide + 2x2 grid */
.credit-hub,
.forge-grid {
  width: 100%;
  max-width: 640px;
}

.forge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
}

.forge-tile.hero {
  grid-column: 1 / -1 !important;
  min-height: 94px;
  flex-direction: row;
  align-items: center;
}

.forge-tile:not(.hero) {
  min-height: 120px;
}

@media (max-width: 430px) {
  .forge-grid {
    gap: 12px;
  }

  .forge-tile {
    min-height: 120px;
    padding: 16px;
    border-radius: 18px;
  }

  .forge-tile.hero {
    min-height: 92px;
  }
}

/* Consistent menu content width */
.content > .stack,
.content > .page-stack,
.content > .fixed-page {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  align-self: flex-start !important;
  padding-top: 4px;
  padding-bottom: 28px;
}

.content > .stack,
.content > .page-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.content > .stack > *,
.content > .page-stack > *,
.content > .fixed-page > *,
.executive-hero,
.chart-card,
.dashboard-stats,
.stats,
.credit-hub,
.result-card,
.forge-grid,
.user-tools {
  max-width: 640px !important;
}

.account-list {
  grid-template-columns: 1fr !important;
}
