/* ============================================================
   GRAVIO — Design System
   Black · Grey · Blue · White · Neon (cyan · green · purple)
   ============================================================ */

/* Global: HTML `hidden` attribute must always win over component display. */
[hidden] { display: none !important; }

/* ─── TOKENS ─── */
:root {
  --black:          #000000;
  --bg:             #050505;
  --surface-1:      #0a0a0a;
  --surface-2:      #111111;
  --surface-3:      #181818;
  --surface-4:      #202020;
  --border:         #222222;
  --border-bright:  #383838;

  --text-1:   #ffffff;
  --text-2:   #a1a1aa;
  --text-3:   #52525b;
  --text-4:   #3f3f46;

  /* Neon palette */
  --neon-cyan:          #00e5ff;
  --neon-cyan-bg:       rgba(0, 229, 255, 0.06);
  --neon-cyan-border:   rgba(0, 229, 255, 0.28);
  --neon-cyan-glow:     0 0 20px rgba(0, 229, 255, 0.35), 0 0 50px rgba(0, 229, 255, 0.12);

  --neon-green:         #00ff88;
  --neon-green-bg:      rgba(0, 255, 136, 0.07);
  --neon-green-border:  rgba(0, 255, 136, 0.22);

  --neon-purple:        #b77eff;
  --neon-purple-bg:     rgba(183, 126, 255, 0.07);
  --neon-purple-border: rgba(183, 126, 255, 0.22);

  --blue:       #3b82f6;
  --blue-bg:    rgba(59, 130, 246, 0.08);
  --blue-light: #60a5fa;

  --danger:  #ff4d4d;

  --font:      "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); }
img, svg { display: block; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── SHARED: CONTAINER ─── */
.m-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── SHARED: TERMINAL TOKENS ─── */
.t-prompt  { color: var(--text-4); user-select: none; }
.t-cmd     { color: var(--text-1); font-weight: 500; }
.t-comment { color: var(--text-3); }
.t-path    { color: var(--neon-cyan); }
.t-label   { color: var(--text-2); }
.t-value   { color: var(--text-1); }
.t-pass    {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}
.t-score-hi  {
  color: var(--neon-green);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.45);
}
.t-score-mid {
  color: var(--neon-cyan);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}
.t-bar-full { color: var(--neon-green); }
.t-bar-mid  { color: var(--neon-cyan); }
.t-score-final {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.6);
}
.t-pass-badge {
  color: #000;
  background: var(--neon-green);
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-shadow: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.t-cursor {
  color: var(--neon-cyan);
  animation: blink 1.1s step-end infinite;
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* ═══════════════════════════════════════
   MARKETING SURFACE  (body.marketing)
═══════════════════════════════════════ */

body.marketing {
  background:
    radial-gradient(ellipse 110% 55% at 50% -5%, rgba(0, 229, 255, 0.055) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 88% 90%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    var(--bg);
}

/* ── NAV ── */
.m-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.m-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.m-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.m-brand-icon { flex-shrink: 0; }
.m-brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-1);
}

.m-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.m-nav-links a:not(.m-btn) {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.15s;
}
.m-nav-links a:not(.m-btn):hover { color: var(--text-1); }

/* ── BUTTONS ── */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s;
  letter-spacing: -0.1px;
  white-space: nowrap;
  line-height: 1;
}
.m-btn-sm  { padding: 6px 13px; font-size: 13px; }
.m-btn-lg  { padding: 13px 26px; font-size: 15px; border-radius: var(--radius); }
.m-btn-full { width: 100%; text-align: center; }

.m-btn-neon {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  box-shadow: var(--neon-cyan-glow);
  font-weight: 700;
}
.m-btn-neon:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.45), 0 0 60px rgba(0, 229, 255, 0.15);
}

.m-btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-bright);
}
.m-btn-outline:hover {
  color: var(--text-1);
  border-color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
}

.m-btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.m-btn-ghost:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
}

/* ── HERO ── */
.m-hero {
  padding: 96px 28px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.m-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.m-hero-h1 {
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 22px;
}

.m-gradient-text {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.m-neon-text {
  color: var(--neon-cyan);
  text-shadow: 0 0 32px rgba(0, 229, 255, 0.5), 0 0 70px rgba(0, 229, 255, 0.18);
}

.m-hero-lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.72;
  margin-bottom: 30px;
  max-width: 460px;
}

.m-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.m-hero-note {
  font-size: 12px;
  color: var(--text-3);
}
.m-neon-subtle { color: var(--neon-cyan); opacity: 0.75; }

/* ── TERMINAL CARD ── */
.m-terminal-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.05),
    0 28px 56px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(0, 229, 255, 0.03);
}

.m-terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.m-terminal-dots { display: flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }

.m-terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  flex: 1;
  text-align: center;
}

.m-terminal-body { padding: 22px 24px; overflow-x: auto; }
.m-terminal-pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.72;
  white-space: pre;
  color: var(--text-2);
  margin: 0;
}

/* ── TRUST STRIP ── */
.m-trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.m-trust-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.m-trust-label {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.m-trust-items {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}
.m-dot { color: var(--border-bright); }

/* ── SECTIONS ── */
.m-section { padding: 96px 28px; }
.m-section-alt { background: rgba(255, 255, 255, 0.012); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.m-section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 60px;
}
.m-section-h2 {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.12;
  margin-bottom: 14px;
}
.m-section-sub {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.68;
}

/* ── STEPS ── */
.m-steps {
  display: flex;
  align-items: flex-start;
}
.m-step-card {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  transition: border-color 0.2s, box-shadow 0.18s;
}
.m-step-card:hover {
  border-color: var(--neon-cyan-border);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.06);
}
.m-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  margin-bottom: 12px;
}
.m-step-icon { font-size: 26px; margin-bottom: 14px; }
.m-step-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 9px;
}
.m-step-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}
.m-step-card code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  padding: 1px 6px;
  border-radius: 4px;
}
.m-step-connector {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  margin-top: 78px;
  flex-shrink: 0;
}

/* ── DIMENSIONS ── */
.m-dimensions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.m-dim-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: border-color 0.18s, transform 0.15s;
}
.m-dim-card:hover { transform: translateY(-2px); }
.m-dim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.m-dim-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.2px;
}
.m-dim-badge.safety       { background: rgba(255,77,77,0.1);   color: #ff8080;         border: 1px solid rgba(255,77,77,0.22); }
.m-dim-badge.reliability  { background: var(--neon-green-bg);  color: var(--neon-green); border: 1px solid var(--neon-green-border); }
.m-dim-badge.evaluation   { background: var(--neon-cyan-bg);   color: var(--neon-cyan);  border: 1px solid var(--neon-cyan-border); }
.m-dim-badge.observability{ background: var(--blue-bg);        color: var(--blue-light); border: 1px solid rgba(59,130,246,0.22); }
.m-dim-badge.governance   { background: var(--neon-purple-bg); color: var(--neon-purple);border: 1px solid var(--neon-purple-border); }

.m-dim-safety:hover       { border-color: rgba(255,77,77,0.3); }
.m-dim-reliability:hover  { border-color: var(--neon-green-border); }
.m-dim-evaluation:hover   { border-color: var(--neon-cyan-border); }
.m-dim-observability:hover{ border-color: rgba(59,130,246,0.3); }
.m-dim-governance:hover   { border-color: var(--neon-purple-border); }

.m-dim-weight { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); }
.m-dim-card p { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ── PRICING ── */
.m-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}
.m-plan-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  position: relative;
  transition: border-color 0.18s;
}
.m-plan-card:hover { border-color: var(--border-bright); }

.m-plan-featured {
  background: linear-gradient(170deg, rgba(0,229,255,0.04) 0%, rgba(0,229,255,0.01) 100%);
  border-color: var(--neon-cyan-border);
  box-shadow: 0 0 48px rgba(0,229,255,0.07), inset 0 1px 0 rgba(0,229,255,0.14);
}
.m-plan-featured:hover {
  border-color: rgba(0,229,255,0.5);
  box-shadow: 0 0 70px rgba(0,229,255,0.1), inset 0 1px 0 rgba(0,229,255,0.2);
}

.m-plan-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  border: 1px solid var(--neon-cyan-border);
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 18px;
  text-shadow: 0 0 12px rgba(0,229,255,0.4);
}
.m-plan-tier {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.m-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 14px;
}
.m-plan-amount {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}
.m-plan-per { font-size: 14px; color: var(--text-3); }
.m-plan-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.m-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 26px;
  font-size: 13px;
}
.m-plan-features li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--text-2);
}
.m-plan-no { color: var(--text-4); }

/* ── TEAM SEATS CALCULATOR ── */
.m-seats-calc {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.m-seats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.m-seats-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.m-seats-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-1);
}

.m-seats-slider {
  width: 100%;
  margin: 4px 0 8px;
  accent-color: var(--accent);
}

.m-seats-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}
.m-seats-total {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--neon-cyan);
}

/* ── INSTALL ── */
.m-install-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.m-install-feats {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.m-install-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.m-install-terminal {
  /* extends .m-terminal-card */
}

/* ── SECURITY ── */
.m-security-strip { padding: 72px 28px; }
.m-security-inner {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.m-security-inner::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan-border), transparent);
}
.m-security-h2 {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.m-security-inner p {
  font-size: 15px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 30px;
  line-height: 1.72;
}
.m-security-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.m-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  border: 1px solid var(--neon-cyan-border);
  padding: 5px 13px;
  border-radius: 99px;
  letter-spacing: 0.2px;
  text-shadow: 0 0 10px rgba(0,229,255,0.3);
}

/* ── FINAL CTA ── */
.m-cta-final {
  padding: 110px 28px;
  text-align: center;
}
.m-cta-h2 {
  font-size: clamp(30px, 3.8vw, 50px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}
.m-cta-final p {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 38px;
}
.m-cta-final .m-cta-row { justify-content: center; }

/* ── FOOTER ── */
.m-footer { border-top: 1px solid var(--border); padding: 30px 0; }
.m-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.m-footer-copy { font-size: 13px; color: var(--text-3); }
.m-footer-links { display: flex; align-items: center; gap: 20px; }
.m-footer-link { font-size: 13px; color: var(--text-3); transition: color 0.14s; }
.m-footer-link:hover { color: var(--neon-cyan); }

/* ═══════════════════════════════════════
   AUTH PAGE  (body.auth-page)
═══════════════════════════════════════ */

body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,229,255,0.06) 0%, transparent 70%),
    var(--bg);
}
.auth-shell {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
}
.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 16px;
  transition: background 0.14s, color 0.14s;
}
.auth-tab:hover { background: rgba(255,255,255,0.04); color: var(--text-1); }
.auth-tab.auth-tab-active {
  background: rgba(0,229,255,0.06);
  color: var(--neon-cyan);
  border-bottom: 2px solid var(--neon-cyan);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-field input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.auth-field input::placeholder { color: var(--text-3); }
.auth-field input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.08);
}
.auth-help {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
  color: var(--text-3);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-error {
  font-size: 13px;
  color: #ff4466;
  background: rgba(255,68,102,0.08);
  border: 1px solid rgba(255,68,102,0.18);
  border-radius: 8px;
  padding: 10px 14px;
}
.auth-submit { width: 100%; justify-content: center; }
.auth-footer-note { font-size: 13px; color: var(--text-3); }
.auth-footer-note a { color: var(--text-3); text-decoration: underline; }
.auth-footer-note a:hover { color: var(--neon-cyan); }

/* ═══════════════════════════════════════
   ADMIN PAGE  (body.admin-page)
═══════════════════════════════════════ */

body.admin-page { padding-top: 0; }

.adm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,5,5,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.adm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.adm-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(183,126,255,0.15);
  color: #b77eff;
  border: 1px solid rgba(183,126,255,0.25);
  border-radius: 5px;
  padding: 2px 7px;
  margin-left: 6px;
}
.adm-nav { display: flex; align-items: center; gap: 20px; }
.adm-nav a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.adm-nav a:hover { color: var(--neon-cyan); }
.adm-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 7px 14px;
  transition: border-color 0.14s, color 0.14s;
}
.adm-logout:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

.adm-main { padding-top: 48px; padding-bottom: 80px; }
.adm-page-header { margin-bottom: 40px; }
.adm-h1 { font-size: 32px; font-weight: 800; color: var(--text-1); letter-spacing: -0.5px; margin-bottom: 8px; }
.adm-lead { font-size: 15px; color: var(--text-2); }

.adm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}
.adm-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-stat-value { font-family: var(--font-mono); font-size: 36px; font-weight: 700; color: var(--neon-cyan); }
.adm-stat-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.adm-section { margin-bottom: 56px; }
.adm-section-h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.adm-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-table thead th {
  background: rgba(255,255,255,0.03);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 12px 16px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.adm-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.1s; }
.adm-table tbody tr:last-child { border-bottom: none; }
.adm-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.adm-table td { padding: 12px 16px; color: var(--text-1); vertical-align: middle; }
.adm-mono { font-family: var(--font-mono); font-size: 13px; }
.adm-loading, .adm-empty, .adm-error { color: var(--text-3); font-size: 14px; padding: 20px 16px !important; text-align: center; }
.adm-error { color: #ff4466; }
.adm-row-disabled td { opacity: 0.45; }
.adm-row-warn td { background: rgba(255,179,71,0.04); }
.adm-small { font-size: 11px; }

/* Billing diagnostics panel */
.adm-billing-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.adm-billing-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 24px;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.adm-billing-val { font-size: 28px; font-weight: 700; color: var(--text-1); }
.adm-billing-lbl { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.adm-billing-subh { font-size: 15px; font-weight: 600; color: var(--text-2); margin: 24px 0 12px; }
.adm-billing-note { font-weight: 400; color: var(--text-3); font-size: 13px; }

.adm-plan-pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: 5px; padding: 3px 8px;
}
.adm-plan-free { background: rgba(255,255,255,0.06); color: var(--text-2); }
.adm-plan-pro  { background: rgba(0,229,255,0.12); color: var(--accent); }
.adm-plan-team { background: rgba(183,126,255,0.15); color: #b77eff; }

.adm-bstatus { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 3px 8px; }
.adm-bstatus-active   { background: rgba(0,255,136,0.1); color: var(--neon-green); }
.adm-bstatus-cancelled{ background: rgba(255,179,71,0.12); color: #ffb347; }
.adm-bstatus-past_due { background: rgba(255,68,102,0.12); color: #ff4466; }
.adm-bstatus-unpaid   { background: rgba(255,68,102,0.12); color: #ff4466; }
.adm-bstatus-expired  { background: rgba(255,68,102,0.12); color: #ff4466; }
.adm-bstatus-none     { background: rgba(255,255,255,0.06); color: var(--text-3); }
.adm-bstatus-paused   { background: rgba(255,255,255,0.06); color: var(--text-3); }

.adm-role-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 3px 8px;
}
.adm-role-admin { background: rgba(183,126,255,0.15); color: #b77eff; }
.adm-role-user  { background: rgba(255,255,255,0.06); color: var(--text-2); }
.adm-status { font-size: 12px; font-weight: 600; }
.adm-status-active { color: var(--neon-green); }
.adm-status-disabled { color: #ff4466; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-act-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.adm-act-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.adm-act-ok   { color: var(--neon-green); border-color: rgba(0,255,136,0.2); }
.adm-act-ok:hover { background: rgba(0,255,136,0.08); }
.adm-act-warn  { color: #ffb347; border-color: rgba(255,179,71,0.2); }
.adm-act-warn:hover { background: rgba(255,179,71,0.08); }
.adm-act-danger { color: #ff4466; border-color: rgba(255,68,102,0.2); }
.adm-act-danger:hover { background: rgba(255,68,102,0.08); }
.adm-plan-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-1);
  color-scheme: dark;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.adm-plan-select:focus { border-color: var(--accent); outline: none; }
.adm-plan-select:disabled { opacity: 0.4; cursor: not-allowed; }

/* dashboard user pill + extra sections */
.db-user-pill {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.db-logout-btn { font-size: 13px; padding: 6px 14px; }

/* My projects + API keys: same surface treatment as the decrypt form-card */
.db-projects-section,
.db-apikeys-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
}
.db-projects-section .db-section-h2,
.db-apikeys-section .db-section-h2 {
  margin-top: 0;
  margin-bottom: 8px;
}
@media (max-width: 720px) {
  .db-projects-section,
  .db-apikeys-section { padding: 20px; }
}
.db-projects-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.db-project-item { display: contents; }
.db-project-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-1);
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 14px 18px;
  text-align: left;
  transition: border-color 0.14s, background 0.14s;
}
.db-project-btn:hover { border-color: var(--neon-cyan); background: rgba(0,229,255,0.04); }
.db-project-id { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.db-project-date { font-size: 12px; color: var(--text-3); }
.db-project-empty, .db-key-empty { font-size: 14px; color: var(--text-3); padding: 8px 0; }
.db-key-actions { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.db-key-label-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  width: 220px;
  transition: border-color 0.14s;
}
.db-key-label-input:focus { border-color: var(--neon-cyan); }
.db-key-label-input::placeholder { color: var(--text-3); }
.db-new-key-banner {
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.db-new-key-label { font-size: 12px; font-weight: 600; color: var(--neon-green); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.db-new-key-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.db-new-key-value { font-family: var(--font-mono); font-size: 13px; color: var(--text-1); word-break: break-all; }
.db-copy-btn { font-size: 12px; padding: 6px 12px; flex-shrink: 0; }
.db-keys-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.db-key-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}
.db-key-label { font-size: 14px; color: var(--text-1); flex: 1; }
.db-key-created { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.db-inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--neon-cyan);
}

/* ═══════════════════════════════════════
   ONBOARDING SURFACE (body.onboarding-page)
═══════════════════════════════════════ */

body.onboarding-page {
  background:
    radial-gradient(ellipse 110% 55% at 50% -5%, rgba(0, 229, 255, 0.055) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 88% 90%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    var(--bg);
}

.ob-main {
  padding-top: 96px;
  padding-bottom: 96px;
}

.ob-hero {
  margin-bottom: 34px;
}

.ob-title {
  font-size: clamp(30px, 4.8vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 8px 0 14px;
}

.ob-lead {
  max-width: 760px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
}

.ob-cta-row {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ob-auth-ok {
  margin-top: 12px;
  color: var(--neon-green);
  font-size: 14px;
}

.ob-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ob-step-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.ob-step-num {
  color: var(--neon-cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.ob-step-card h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.ob-step-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.ob-inline-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ob-project-input {
  width: 100%;
  background: #060606;
  border: 1px solid var(--border-bright);
  color: var(--text-1);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-family: var(--font-mono);
}

.ob-project-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.ob-code {
  background: #060606;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 12px;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}

.ob-copy {
  min-width: 130px;
}

.ob-os-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 14px 0 6px;
}
.ob-os-label:first-of-type { margin-top: 6px; }

.ob-step-foot {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 8px;
}

.ob-faq {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.ob-faq h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.ob-faq details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.ob-faq details:first-of-type {
  border-top: 0;
}

.ob-faq summary {
  font-weight: 600;
  cursor: pointer;
}

.ob-faq p {
  color: var(--text-2);
  margin-top: 8px;
}

.ob-auth-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.ob-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.ob-auth-modal {
  position: relative;
  width: min(92vw, 620px);
  background: var(--surface-1);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 20px;
  z-index: 1;
}

.ob-auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
}

.ob-auth-title {
  font-size: 26px;
  margin-bottom: 6px;
}

.ob-auth-sub {
  color: var(--text-2);
  margin-bottom: 16px;
  font-size: 14px;
}

/* onboarding header adapts to logged-in state */
.ob-user-pill {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.ob-logout-btn { font-size: 13px; padding: 6px 14px; }

/* Shared site-chrome user pill (used in modular header on every page) */
.sc-user-pill {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Tool-page guidance block: numbered "How to get this JSON" card */
.tool-howto { display: flex; flex-direction: column; gap: 18px; }
.tool-howto-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.tool-howto-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neon-cyan-bg, rgba(0,229,255,0.1));
  color: var(--neon-cyan, #00e5ff);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 13px;
  border: 1px solid var(--neon-cyan-border, rgba(0,229,255,0.3));
}
.tool-howto-body { flex: 1; min-width: 0; }
.tool-howto-body h3 {
  font-size: 15px;
  margin: 0 0 4px 0;
  font-weight: 600;
  color: var(--text-1);
}
.tool-howto-body p {
  margin: 0 0 8px 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}
.tool-howto-cmd {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-1);
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 6px;
}

/* ═══════════════════════════════════════
   APP TOOL SURFACE  (body.app-tool)
═══════════════════════════════════════ */

body.app-tool {
  background:
    radial-gradient(900px 380px at 15% -10%, rgba(0, 229, 255, 0.06), transparent 70%),
    radial-gradient(700px 320px at 95% 0%, rgba(183, 126, 255, 0.05), transparent 70%),
    var(--bg);
  padding: 0 0 64px;
}

body.app-tool #app    { max-width: 820px; margin: 0 auto; padding: 32px 16px 0; }
body.app-tool > #app > header  { margin-bottom: 28px; }

.tool-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.tool-brand { font-size: 15px; }
.tool-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-4);
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 99px;
}

body.app-tool header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.tool-beta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--neon-purple);
  background: var(--neon-purple-bg);
  border: 1px solid var(--neon-purple-border);
  padding: 2px 7px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 6px;
}

body.app-tool .subtitle { color: var(--text-2); margin-top: 6px; font-size: 14px; }

body.app-tool main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.app-tool .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(4px);
}

.quickstart-list {
  margin-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
}
.quickstart-list code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

.schema-title {
  margin-top: 14px;
  margin-bottom: 7px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.schema-block {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
  overflow-x: auto;
  line-height: 1.6;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.small-gap { margin-top: 8px; }

body.app-tool h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}

body.app-tool label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 5px;
  margin-top: 18px;
}
.hint { font-weight: 400; color: var(--border-bright); font-size: 12px; }

body.app-tool textarea {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.14s;
  line-height: 1.6;
}
body.app-tool textarea:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 0 2px rgba(0,229,255,0.08); }

body.app-tool input[type="text"],
body.app-tool input[type="number"] {
  width: 100%;
  margin-top: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color 0.14s;
}
body.app-tool input[type="text"]:focus,
body.app-tool input[type="number"]:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.08);
}

button#evaluate-btn {
  margin-top: 16px;
  background: var(--neon-cyan);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  cursor: pointer;
  box-shadow: var(--neon-cyan-glow);
  transition: all 0.16s;
}
button#evaluate-btn:hover {
  background: #fff;
  box-shadow: 0 0 30px rgba(0,229,255,0.45), 0 0 60px rgba(0,229,255,0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s;
}
.btn-secondary:hover { border-color: var(--neon-cyan-border); color: var(--text-1); }

.import-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.file-label { margin: 0; font-size: 12px; }
.actions-row { margin-top: 10px; }

.error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.validation-list {
  margin-top: 9px;
  margin-left: 18px;
  color: #ffb4b4;
  font-size: 13px;
}

.builder-subtitle { color: var(--text-3); font-size: 12px; margin-left: 2px; }
.builder-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
}

.results-section { margin-top: 32px; }

.score-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
}
.score-value {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 0 40px rgba(0,229,255,0.3);
  color: var(--neon-cyan);
}

.badge {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 13px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge.pass {
  background: var(--neon-green-bg);
  color: var(--neon-green);
  border: 1px solid var(--neon-green-border);
  text-shadow: 0 0 10px rgba(0,255,136,0.4);
}
.badge.fail {
  background: rgba(255,77,77,0.1);
  color: var(--danger);
  border: 1px solid rgba(255,77,77,0.3);
}

.metrics-row {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.metric {
  flex: 1;
  min-width: 130px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.metric-label { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.metric-value { font-size: 22px; font-weight: 700; }

.gates-list { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 26px; }
.gate-item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 14px;
  font-size: 13px;
}
.gate-item.fail { border-color: rgba(255,77,77,0.35); }
.gate-icon { font-size: 14px; flex-shrink: 0; }
.gate-label { flex: 1; }
.gate-actual { color: var(--text-3); font-size: 12px; font-family: var(--font-mono); }

.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.dim-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: border-color 0.14s;
}
.dim-card:hover { border-color: var(--neon-cyan-border); }
.dim-name { font-size: 11px; color: var(--text-3); text-transform: capitalize; margin-bottom: 7px; }
.dim-score { font-size: 28px; font-weight: 700; color: var(--neon-cyan); text-shadow: 0 0 20px rgba(0,229,255,0.35); }
.dim-weight { font-size: 10px; color: var(--text-4); margin-top: 3px; }

#raw-result {
  width: 100%;
  margin-top: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
}

/* ═══════════════════════════════════════
   DASHBOARD SURFACE  (body.dashboard)
═══════════════════════════════════════ */

.db-main {
  padding-top: 112px;   /* clear sticky nav */
  padding-bottom: 80px;
  max-width: 980px;
}

/* page header */
.db-header { margin-bottom: 48px; }
.db-h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text-1);
  margin: 8px 0 16px;
}
.db-lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 20px;
}
.db-mini-lead { font-size: 14px; margin-bottom: 14px; }

.db-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.db-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.db-stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.db-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  font-family: var(--font-mono);
}

.db-admin-back { margin-top: 16px; align-self: flex-start; }

/* form card */
.db-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.db-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.db-field { display: flex; flex-direction: column; gap: 6px; }
.db-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.db-field input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color 0.14s, box-shadow 0.14s;
  outline: none;
}
.db-field input::placeholder { color: var(--text-3); }
.db-field input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.08);
}
.db-field-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.db-field-hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--neon-cyan);
}

/* key mode toggle */
.db-key-mode {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  align-self: flex-start;
}
.db-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  transition: background 0.14s, color 0.14s;
}
.db-mode-btn:hover { background: rgba(255,255,255,0.05); }
.db-mode-btn.db-mode-active {
  background: rgba(0,229,255,0.1);
  color: var(--neon-cyan);
}
.db-key-panel { transition: opacity 0.14s; }
.db-panel-hidden { display: none; }

/* error */
.db-error {
  font-size: 14px;
  color: #ff4466;
  background: rgba(255,68,102,0.08);
  border: 1px solid rgba(255,68,102,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  line-height: 1.5;
}
.db-success {
  font-size: 14px;
  color: #00e5a0;
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  line-height: 1.5;
}
.db-submit { align-self: flex-start; }

.db-project-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
}

.db-project-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.db-project-code {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  font-size: 13px;
}

.db-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.db-detail-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.db-detail-chip span {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.db-detail-chip strong {
  color: var(--text-1);
  font-size: 18px;
  font-family: var(--font-mono);
}

.db-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0 10px;
}

.db-summary-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}

.db-summary-box p {
  color: var(--text-2);
  font-size: 14px;
}

.db-recommendations-list {
  margin-left: 18px;
  color: var(--text-2);
  font-size: 14px;
}

.db-scan-actions {
  margin: 8px 0 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.db-scan-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-right: 8px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}

.db-date-label {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.db-date-input {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-1);
  line-height: 1.4;
}
.db-date-input:focus {
  outline: none;
  border-color: var(--accent);
}

.db-delete-confirm {
  border: 1px solid rgba(255,68,102,0.25);
  background: rgba(255,68,102,0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.db-delete-confirm p {
  color: #ffb8c6;
  font-size: 13px;
  margin-bottom: 10px;
}

.db-delete-confirm-actions {
  display: flex;
  gap: 10px;
}

.db-scan-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}

.db-scan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.db-scan-table th,
.db-scan-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}

.db-scan-table th {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.db-scan-row-active {
  background: rgba(0,229,255,0.06);
}

.db-scan-view-btn {
  min-width: 60px;
}

.db-scan-detail {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  padding: 14px;
}

.db-scan-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.db-scan-detail-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.db-scan-detail-meta {
  font-size: 13px;
  color: var(--text-3);
}

.db-scan-compare-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.db-scan-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.db-scan-detail-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 12px;
}

.db-scan-detail-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.db-scan-overall-line {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.db-scan-dim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.db-scan-dim-table th,
.db-scan-dim-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}

.db-scan-dim-table th {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.db-inline-bar {
  width: 150px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
}

.db-inline-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,229,255,0.65), rgba(0,255,136,0.75));
}

.db-inline-score {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  vertical-align: middle;
}

.db-scan-toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.db-scan-toc-list a {
  font-size: 12px;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan-border);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--neon-cyan-bg);
}

.db-moscow-tier {
  margin-bottom: 12px;
}

.db-moscow-tier-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.db-moscow-critical { color: #ff8b8b; }
.db-moscow-high { color: #ffd166; }
.db-moscow-medium { color: var(--neon-cyan); }
.db-moscow-low { color: var(--text-3); }

.db-moscow-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,0.015);
  padding: 10px;
  margin-bottom: 8px;
}

.db-scan-rec-list,
.db-scan-checklist-list {
  margin-left: 18px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.db-scan-checklist-list {
  margin-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.db-scan-checklist-list li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
}

.db-scan-check-pass {
  background: rgba(0,255,136,0.05);
  border-color: rgba(0,255,136,0.18);
}

.db-scan-check-fail {
  background: rgba(255,77,77,0.05);
  border-color: rgba(255,77,77,0.18);
}

.db-scan-checklist-summary {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.db-scan-field-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
  margin-top: 8px;
}

.db-scan-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 13px;
  padding: 10px;
  resize: vertical;
}

.db-scan-detail-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.db-scan-context-status {
  font-size: 12px;
  color: var(--text-3);
}

.db-scan-context-status-error {
  color: var(--danger);
}

.db-scan-rec-empty,
.db-scan-checklist-empty {
  color: var(--text-3);
  font-size: 13px;
}

.db-scan-table tr:last-child td { border-bottom: none; }

/* results */
.db-results { margin-top: 40px; }

/* score banner */
.db-score-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.db-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.db-score-value {
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--neon-cyan);
  letter-spacing: -2px;
}
.db-banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 6px;
  padding: 5px 12px;
  text-transform: uppercase;
}
.badge-pass { background: rgba(0,255,136,0.12); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.2); }
.badge-fail { background: rgba(255,68,102,0.1); color: #ff4466; border: 1px solid rgba(255,68,102,0.2); }
.db-meta { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

/* top metrics row */
.db-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.metric-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.metric-value { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--neon-cyan); }

/* section headings */
.db-section-h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* gates list */
.gates-list {
  list-style: none;
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gate-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
}
.gate-icon { font-size: 13px; flex-shrink: 0; }
.gate-name { font-family: var(--font-mono); color: var(--text-1); font-size: 13px; }
.gate-detail { color: var(--text-3); font-size: 13px; margin-left: auto; text-align: right; }
.gate-empty { color: var(--text-3); font-size: 14px; padding: 12px 0; }

/* dimensions grid */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.dim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dim-name { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4; }
.dim-score { font-family: var(--font-mono); font-size: 36px; font-weight: 700; }
.dim-empty { color: var(--text-3); font-size: 14px; padding: 12px 0; }

/* raw JSON */
.db-raw-details { margin-bottom: 40px; }
.db-raw-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  padding: 10px 0;
}
.db-raw-summary:hover { color: var(--neon-cyan); }
.db-raw-json {
  display: block;
  width: 100%;
  min-height: 260px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
  margin-top: 12px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.db-reload-row { display: flex; justify-content: flex-start; }

/* ═══════════════════════════════════════
   DASHBOARD — REDESIGNED TWO-VIEW SPA
═══════════════════════════════════════ */

/* ── Projects home header ── */
.db-ph-header { margin-bottom: 32px; }
.db-ph-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.db-ph-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.db-search-wrap { flex: 1; min-width: 180px; }
.db-search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.db-search-input:focus { border-color: var(--neon-cyan); }
.db-search-input::placeholder { color: var(--text-3); }
.db-sort-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.db-sort-select:focus { border-color: var(--neon-cyan); }

/* ── Project cards grid ── */
.db-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.db-proj-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.db-proj-card:hover {
  border-color: var(--neon-cyan-border);
  background: rgba(0,229,255,0.03);
  transform: translateY(-1px);
}
.db-proj-card-alert { border-color: rgba(255,77,77,0.3); }
.db-proj-card-alert:hover { border-color: rgba(255,77,77,0.55); background: rgba(255,77,77,0.03); }
.db-proj-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.db-proj-card-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-proj-card-score-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.db-proj-card-score {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}
.db-proj-card-score-denom {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.db-proj-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.db-proj-meta-sep { color: var(--text-4); }

/* ── Score color tokens ── */
.db-score-hi   { color: var(--neon-green); text-shadow: 0 0 18px rgba(0,255,136,0.35); }
.db-score-mid  { color: var(--neon-cyan);  text-shadow: 0 0 18px rgba(0,229,255,0.35); }
.db-score-warn { color: #f59e0b; }
.db-score-lo   { color: var(--danger); }

/* ── Rating badges ── */
.db-rating-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.db-rating-excellent { background: rgba(0,255,136,0.12); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.22); }
.db-rating-good      { background: rgba(0,229,255,0.1);  color: var(--neon-cyan);  border: 1px solid rgba(0,229,255,0.22); }
.db-rating-fair      { background: rgba(245,158,11,0.12); color: #f59e0b;          border: 1px solid rgba(245,158,11,0.28); }
.db-rating-poor      { background: rgba(255,77,77,0.1);   color: var(--danger);    border: 1px solid rgba(255,77,77,0.22); }
.db-rating-failing   { background: rgba(255,77,77,0.16);  color: #ff4444;          border: 1px solid rgba(255,77,77,0.32); }
.db-rating-unknown   { background: rgba(255,255,255,0.05); color: var(--text-3);   border: 1px solid var(--border); }

/* ── Gate badges ── */
.db-gate-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.db-gate-pass { background: rgba(0,255,136,0.12); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.22); }
.db-gate-fail { background: rgba(255,77,77,0.1);  color: var(--danger);     border: 1px solid rgba(255,77,77,0.22); }
.db-gate-none { background: rgba(255,255,255,0.05); color: var(--text-3);   border: 1px solid var(--border); }

/* ── Trend badges ── */
.db-trend-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
.db-trend-up     { color: var(--neon-green); background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.2); }
.db-trend-down   { color: var(--danger);     background: rgba(255,77,77,0.08); border: 1px solid rgba(255,77,77,0.2); }
.db-trend-stable { color: var(--text-3);     background: rgba(255,255,255,0.04); border: 1px solid var(--border); }

/* ── Regression badges ── */
.db-regression-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.db-regression-down { color: var(--danger);     background: rgba(255,77,77,0.1);  border: 1px solid rgba(255,77,77,0.22); }
.db-regression-up   { color: var(--neon-green); background: rgba(0,255,136,0.12); border: 1px solid rgba(0,255,136,0.22); }
.db-regression-none { color: var(--text-3);     background: rgba(255,255,255,0.04); border: 1px solid var(--border); }

/* ── Empty state ── */
.db-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.db-empty-title { font-size: 18px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.db-empty-sub   { font-size: 14px; color: var(--text-3); line-height: 1.6; }
.db-empty-sub code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-cyan);
  background: rgba(0,229,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Back button ── */
.db-ws-nav { margin-bottom: 24px; }
.db-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.14s;
}
.db-back-btn:hover { color: var(--text-1); }

/* ── Workspace hero ── */
.db-ws-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.db-ws-hero-left  { flex: 1; min-width: 0; }
.db-ws-project-name {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-ws-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.db-ws-sep { color: var(--text-4); }
.db-ws-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.db-ws-score-value {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}
.db-ws-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Workspace tabs ── */
.db-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 24px 0 0;
}
.db-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  margin-bottom: -1px;
  transition: color 0.14s, border-color 0.14s;
}
.db-tab:hover { color: var(--text-1); }
.db-tab-active {
  color: var(--text-1);
  border-bottom-color: var(--neon-cyan);
}

/* ── Tab panels ── */
.db-tab-panel { padding: 24px 0; }

/* ── Overview tab ── */
.db-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.db-ov-summary-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.db-ov-summary-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Score trend chart ── */
.db-ov-chart-wrap {
  margin: 0 0 24px;
}
.db-chart-svg-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  padding: 4px 8px 0;
}
.db-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}
.db-chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.db-chart-fill {
  fill: rgba(0, 255, 136, 0.07);
}
.db-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.db-chart-dot {
  fill: var(--accent);
  cursor: pointer;
}
.db-chart-dot:hover {
  fill: #fff;
  r: 5;
}
.db-chart-label {
  font-size: 10px;
  fill: var(--text-3);
  font-family: var(--font-mono);
}
.db-chart-label-y {
  text-anchor: end;
}
.db-chart-label-x {
  text-anchor: middle;
}
.db-chart-empty {
  font-size: 13px;
  color: var(--text-3);
  padding: 8px 0 16px;
}

/* ── Recommendations tab ── */
.db-recs-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

/* ── ROI top-priority strip ── */
.db-roi-strip {
  background: linear-gradient(135deg, rgba(255,186,0,0.07), rgba(255,77,77,0.06));
  border: 1px solid rgba(255,186,0,0.24);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.db-roi-strip-title {
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.db-roi-items { display: flex; flex-direction: column; gap: 8px; }
.db-roi-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.db-roi-dim {
  font-size: 11px;
  color: var(--text-3);
  text-transform: capitalize;
}
.db-roi-title {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
}
.db-roi-lift {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-green, #00ff88);
  white-space: nowrap;
}
.db-rec-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.db-rec-text  { font-size: 14px; color: var(--text-1); flex: 1; line-height: 1.5; }
.db-rec-freq  { font-size: 11px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; padding-top: 2px; }
.db-recs-empty { font-size: 14px; color: var(--text-3); padding: 8px 0; }

.db-rec-hero {
  background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(59,130,246,0.08));
  border: 1px solid var(--neon-cyan-border);
  border-radius: var(--radius);
  padding: 16px;
}

.db-rec-hero-title {
  color: var(--text-1);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.db-rec-hero-text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

.db-rec-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.db-rec-block-title {
  color: var(--text-1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.db-rec-bullets {
  margin-left: 18px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

.db-rec-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.db-rec-action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255,255,255,0.015);
}

.db-rec-action-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.db-priority-chip,
.db-rec-dim-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
}

.db-priority-critical { background: rgba(255,77,77,0.18); color: #ff8b8b; border: 1px solid rgba(255,77,77,0.35); }
.db-priority-high { background: rgba(255,186,0,0.14); color: #ffd166; border: 1px solid rgba(255,186,0,0.3); }
.db-priority-medium { background: rgba(0,229,255,0.12); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.3); }
.db-priority-low { background: rgba(255,255,255,0.08); color: var(--text-2); border: 1px solid var(--border); }

.db-rec-dim-chip {
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  border: 1px solid var(--border);
  text-transform: capitalize;
}

.db-rec-action-title {
  color: var(--text-1);
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 4px;
}

.db-rec-action-why {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 6px;
}

.db-rec-action-how {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--neon-cyan-border);
}

.db-effort-chip,
.db-impact-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-3);
}

.db-effort-low,
.db-impact-high { color: var(--neon-green); border-color: rgba(0,255,136,0.25); background: rgba(0,255,136,0.07); }
.db-effort-medium,
.db-impact-medium { color: #ffd166; border-color: rgba(255,186,0,0.25); background: rgba(255,186,0,0.07); }
.db-effort-high,
.db-impact-low { color: var(--text-3); border-color: var(--border); background: rgba(255,255,255,0.04); }

.db-rec-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.db-rec-cmds code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan-border);
  background: var(--neon-cyan-bg);
  border-radius: 6px;
  padding: 3px 7px;
}

.db-copy-prompt-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  border: 1px solid var(--neon-cyan-border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.db-copy-prompt-btn:hover { opacity: 0.8; }
.db-copy-prompt-btn:disabled { opacity: 0.5; cursor: default; }

.db-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.db-dim-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.015);
  padding: 12px;
}

.db-dim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.db-dim-name { color: var(--text-1); font-size: 13px; font-weight: 650; }

.db-dim-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.db-dim-ready { color: var(--neon-green); border-color: rgba(0,255,136,0.28); background: rgba(0,255,136,0.08); }
.db-dim-near { color: var(--neon-cyan); border-color: var(--neon-cyan-border); background: var(--neon-cyan-bg); }
.db-dim-risk { color: #ffd166; border-color: rgba(255,186,0,0.28); background: rgba(255,186,0,0.08); }
.db-dim-critical { color: #ff8b8b; border-color: rgba(255,77,77,0.32); background: rgba(255,77,77,0.1); }

.db-dim-scores {
  color: var(--text-2);
  font-size: 12px;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.db-dim-summary {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

/* Free-tier limited recommendations */
.db-rec-hero-limited {
  background: linear-gradient(135deg, rgba(255,186,0,0.06), rgba(0,229,255,0.06));
  border-color: rgba(255,186,0,0.2);
}

.db-dim-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
}

.db-dim-preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.015);
  padding: 12px;
  position: relative;
}

.db-dim-preview-score {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.db-dim-preview-action {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.db-dim-preview-lock {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

.db-rec-upgrade-cta {
  border-color: rgba(0,229,255,0.2) !important;
  background: linear-gradient(135deg, rgba(0,229,255,0.05), rgba(59,130,246,0.05)) !important;
}

.db-upgrade-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.db-upgrade-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.db-upgrade-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 540px;
}

.db-ready-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-ready-list li {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.db-ready-pass {
  background: rgba(0,255,136,0.05);
  border-color: rgba(0,255,136,0.2);
}

.db-ready-fail {
  background: rgba(255,77,77,0.05);
  border-color: rgba(255,77,77,0.22);
}

.db-ready-icon {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-1);
}

.db-ready-label { color: var(--text-2); }
.db-ready-score { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }

/* ── Settings page ── */
.db-settings-sections { display: flex; flex-direction: column; gap: 32px; }
.db-settings-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.db-settings-section-head { margin-bottom: 20px; }
.db-settings-h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}
.db-settings-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 560px;
}
.db-settings-desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  background: rgba(0,229,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
}
.st-billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.st-billing-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-3);
}
.st-billing-k {
  font-size: 12px;
  color: var(--text-3);
}
.st-billing-v {
  font-size: 13px;
  color: var(--text-1);
  font-family: var(--font-mono);
}

.st-e2ee-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.015);
  font-size: 13px;
  color: var(--text-2);
}
.st-billing-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Plan badges */
.st-plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.st-plan-free    { background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border); }
.st-plan-pro     { background: rgba(80,140,255,.15); color: #6ea6ff; border: 1px solid rgba(80,140,255,.3); }
.st-plan-team    { background: rgba(138,100,255,.15); color: #b59dff; border: 1px solid rgba(138,100,255,.3); }

/* Status pills */
.st-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: capitalize;
}
.st-status-active    { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.25); }
.st-status-cancelled { background: rgba(251,191,36,.12); color: #f59e0b; border: 1px solid rgba(251,191,36,.25); }
.st-status-past_due  { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.25); }
.st-status-expired   { background: rgba(156,163,175,.12); color: var(--text-3); border: 1px solid var(--border); }
.st-status-none      { background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border); }

/* Cancel-at-period-end warning */
.st-billing-cancel-warn {
  margin-top: 10px;
  font-size: 12px;
  color: #f59e0b;
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

/* Seats adjuster */
.st-seats-adjuster {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.st-seats-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.st-seats-input {
  width: 72px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-1);
  font-size: 13px;
  font-family: var(--font-mono);
}
.st-seats-input:focus { outline: none; border-color: var(--neon); }

/* Cancel confirmation bar */
.st-cancel-confirm {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(248,113,113,.06);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
}
.st-cancel-confirm-btns { display: flex; gap: 8px; flex-shrink: 0; }
.st-btn-cancel-yes { background: var(--danger, #ef4444); color: #fff; border: none; }
.st-btn-cancel-yes:hover { opacity: .85; }

/* Cancel / Resume button tints */
.st-btn-cancel { border-color: rgba(248,113,113,.35) !important; color: #f87171 !important; }
.st-btn-cancel:hover { background: rgba(248,113,113,.08) !important; }
.st-btn-resume { border-color: rgba(52,211,153,.35) !important; color: #34d399 !important; }
.st-btn-resume:hover { background: rgba(52,211,153,.08) !important; }

/* Billing subsection (payment method + invoice history) */
.st-billing-subsection {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.st-billing-subh {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

/* Payment method row */
.st-payment-row {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-1);
  margin-bottom: 8px;
}
.st-update-payment-btn { font-size: 12px; }

/* Invoice table */
.st-invoices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.st-invoices-table th {
  text-align: left;
  color: var(--text-3);
  font-weight: 500;
  padding: 4px 10px 8px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.st-invoices-table td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.st-inv-date   { color: var(--text-2); white-space: nowrap; }
.st-inv-amount { font-family: var(--font-mono); color: var(--text-1); font-weight: 600; }
.st-inv-reason { color: var(--text-3); }
.st-inv-status { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.st-inv-paid      { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.2); }
.st-inv-pending   { background: rgba(251,191,36,.12); color: #f59e0b; border: 1px solid rgba(251,191,36,.2); }
.st-inv-void      { background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border); }
.st-inv-refunded  { background: rgba(156,163,175,.1); color: var(--text-3); border: 1px solid var(--border); }
.st-inv-receipt   { color: var(--neon); font-size: 11px; text-decoration: none; white-space: nowrap; }
.st-inv-receipt:hover { text-decoration: underline; }
.st-inv-receipt-none { color: var(--text-3); }

/* Billing status banners (Phase 4) — used on dashboard.html and settings.html */
.db-billing-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}
.db-billing-banner-warn {
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.25);
  color: #f59e0b;
}
.db-billing-banner-danger {
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.25);
  color: #f87171;
}

/* ─── ADD-PROJECT CARD ─── */
.db-proj-card-new {
  border-style: dashed;
  border-color: var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 140px;
  text-decoration: none;
  color: inherit;
}
.db-proj-card-new:hover {
  border-color: var(--neon-cyan-border);
  background: rgba(0,229,255,0.02);
  transform: translateY(-1px);
}
.db-proj-card-new-icon {
  font-size: 28px;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1;
  display: block;
}
.db-proj-card-new-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  display: block;
}
.db-proj-card-new-sub {
  font-size: 12px;
  color: var(--text-3);
  display: block;
}

/* ─── RUN SCANS TAB ─── */
.db-runscans {
  padding: 4px 0 32px;
}

.db-runscans-primary {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.db-runscans-primary .db-runscans-h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.db-runscans-details {
  padding: 16px 0;
}
.db-runscans-details-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.db-runscans-details-summary::-webkit-details-marker { display: none; }
.db-runscans-details-summary::before {
  content: "▶";
  font-size: 9px;
  transition: transform 0.15s;
}
details[open] > .db-runscans-details-summary::before { transform: rotate(90deg); }
.db-runscans-details-new-machine .db-runscans-details-summary {
  color: var(--neon-cyan);
  font-weight: 700;
}
.db-runscans-details-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 6px;
}
.db-runscans-details > .db-runscans-steps {
  margin-top: 16px;
}

.db-runscans-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.5;
}
.db-runscans-ok   { background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.18); }
.db-runscans-warn { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.22); }

.db-auth-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 5px;
  white-space: nowrap;
  margin-top: 1px;
}
.db-auth-badge-ok   { background: rgba(0,255,136,0.12); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.25); }
.db-auth-badge-warn { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }

.db-runscans-status-text {
  color: var(--text-2);
  margin: 0;
}

.db-runscans-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.db-runscans-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.db-runscans-step:last-child { border-bottom: none; }

.db-runscans-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-bright);
  color: var(--neon-cyan);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.db-runscans-step-body { flex: 1; min-width: 0; }

.db-runscans-h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 6px;
}
.db-runscans-note {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}
.db-runscans-p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 12px;
}
.db-runscans-platform {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin: 10px 0 5px;
}
.db-runscans-platform:first-of-type { margin-top: 0; }
.db-runscans-cmd-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.db-runscans-cmd {
  flex: 1;
  background: #060606;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  min-width: 0;
}
.db-runscans-cmd-row .m-btn {
  flex-shrink: 0;
  align-self: center;
}
.db-runscans-foot {
  font-size: 12px;
  color: var(--text-3);
  margin: 8px 0 0;
  line-height: 1.5;
}
.db-runscans-link {
  color: var(--neon-cyan);
  text-decoration: none;
}
.db-runscans-link:hover { text-decoration: underline; }

/* Advanced command reference list */
.db-cmd-ref-details {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.db-cmd-ref-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.db-cmd-ref-summary::-webkit-details-marker { display: none; }
.db-cmd-ref-summary::before {
  content: "▶";
  font-size: 9px;
  transition: transform 0.15s;
}
details[open] > .db-cmd-ref-summary::before { transform: rotate(90deg); }
.db-cmd-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 6px;
  color: var(--neon-cyan);
  font-weight: 700;
}
.db-cmd-ref {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.db-cmd-ref-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0 0 14px;
}
.db-cmd-ref-list {
  display: flex;
  flex-direction: column;
}
.db-cmd-ref-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.db-cmd-ref-item:last-child { border-bottom: none; }
.db-cmd-ref-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.db-cmd-ref-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-cyan);
  flex-shrink: 0;
}
.db-cmd-ref-purpose {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .m-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 64px 28px 56px;
  }
  .m-hero-h1 { font-size: clamp(34px, 7vw, 52px); }
  .m-dimensions { grid-template-columns: repeat(2, 1fr); }
  .m-pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .m-steps { flex-direction: column; }
  .m-step-connector { width: 1px; height: 28px; background: linear-gradient(180deg, transparent, var(--border-bright), transparent); margin: 0 0 0 28px; flex: none; }
  .m-install-inner { grid-template-columns: 1fr; gap: 40px; }
  .m-security-inner { padding: 40px 24px; }
  .m-nav-links a:not(.m-btn) { display: none; }
  .db-form-row { grid-template-columns: 1fr; }
  .db-overview { grid-template-columns: 1fr 1fr; }
  .db-detail-stats { grid-template-columns: 1fr 1fr; }
  .db-metrics-row { grid-template-columns: 1fr 1fr; }
  .dimensions-grid { grid-template-columns: 1fr 1fr; }
  .db-score-banner { flex-direction: column; gap: 16px; }
  .db-banner-right { align-items: flex-start; }
  .ob-steps { grid-template-columns: 1fr; }
  /* new dashboard */
  .db-projects-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .db-ws-hero { flex-direction: column; gap: 20px; }
  .db-ws-hero-right { align-items: flex-start; }
  .db-ws-badges { justify-content: flex-start; }
  .db-overview-stats { grid-template-columns: 1fr 1fr; }
  .db-ph-title-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .db-settings-section { padding: 20px; }
  .db-scan-detail-grid { grid-template-columns: 1fr; }
  .db-inline-bar { width: 110px; }
}

@media (max-width: 600px) {
  .m-dimensions { grid-template-columns: 1fr; }
  .m-cta-row { flex-direction: column; align-items: stretch; }
  .m-security-pills { gap: 7px; }
  .m-container, .m-section { padding-left: 18px; padding-right: 18px; }
  body.app-tool { padding: 0 0 48px; }
  body.app-tool #app { padding: 20px 14px 0; }
  .db-form-card { padding: 20px; }
  .db-project-detail { padding: 18px; }
  .db-overview { grid-template-columns: 1fr; }
  .db-detail-stats { grid-template-columns: 1fr; }
  .db-score-value { font-size: 48px; }
  .db-metrics-row { grid-template-columns: 1fr; }
  .dimensions-grid { grid-template-columns: 1fr; }
  .gate-detail { display: none; }
  .ob-main { padding-top: 84px; }
  .dl-wrap { padding: 40px 14px 60px; }
  .dl-os-grid { grid-template-columns: 1fr; }
  /* new dashboard */
  .db-projects-grid { grid-template-columns: 1fr; }
  .db-ws-hero { padding: 20px; }
  .db-ws-score-value { font-size: 44px; }
  .db-overview-stats { grid-template-columns: 1fr; }
  .db-tabs { overflow-x: auto; }
  .db-tab { padding: 10px 14px; font-size: 13px; }
  .st-billing-grid { grid-template-columns: 1fr; }
  .db-scan-actions { flex-direction: column; align-items: stretch; }
}

/* ─── DOWNLOAD PAGE ─── */
.dl-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.dl-hero {
  text-align: center;
  margin-bottom: 48px;
}

.dl-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.dl-sub {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
}

.dl-sub a { color: var(--neon-cyan); text-decoration: none; }
.dl-sub a:hover { text-decoration: underline; }

.dl-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
}

.dl-card-dim {
  background: var(--surface-1);
  opacity: 0.85;
}

.dl-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 18px;
}

.dl-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.dl-card p a { color: var(--neon-cyan); text-decoration: none; }
.dl-card p a:hover { text-decoration: underline; }

.dl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.dl-card-head h2 { margin: 0; }

.dl-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--neon-cyan);
  background: var(--neon-cyan-bg);
  border: 1px solid var(--neon-cyan-border);
  padding: 2px 7px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 6px;
}

.dl-badge-dim {
  color: var(--text-3);
  background: transparent;
  border-color: var(--border);
}

.dl-os-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.dl-os-block { display: flex; flex-direction: column; gap: 6px; }

.dl-os-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dl-cmd {
  background: var(--surface-4);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-1);
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.dl-note {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

.dl-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: dl-step;
}

.dl-steps li {
  counter-increment: dl-step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 14px;
  align-items: start;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

.dl-steps li::before {
  content: counter(dl-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--neon-cyan-bg);
  border: 1px solid var(--neon-cyan-border);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.dl-steps li pre { margin: 8px 0 0; }

.dl-dims {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dl-dims li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 14px;
  position: relative;
}

.dl-dims li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
}

.dl-binary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.dl-binary-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
}
