:root {
  --black: #131315;
  --dark: #1c1b1d;
  --card: #201f21;
  --border: #4f4537;
  --border-bright: #353437;
  --gold: #f5bd5d;
  --gold-light: #ffdeac;
  --gold-dim: #604100;
  --teal: #004f53;
  --teal-bright: #00dce6;
  --white: #e5e1e4;
  --muted: #9c8f7d;
  --green: #6af6ff;
  --green-dim: #003739;
  --red: #ffb4ab;
  --red-dim: #93000a;
  --yellow: #f5bd5d;
  --surface-high: #2a2a2c;
  --surface-highest: #353437;
  --surface-low: #1c1b1d;
  --surface-lowest: #0e0e10;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── SCREENS ── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ══════════════════════════════════
   SCREEN 1 — LOGIN / ONBOARDING
   ══════════════════════════════════ */
#screen-login {
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 50% 0%, #1a0f03 0%, var(--black) 60%);
}

.login-box {
  width: 100%;
  max-width: 440px;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.logo-icon {
  width: 42px; height: 42px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--black);
  box-shadow: 0 0 20px rgba(245,189,93,0.3);
}
.logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 28px; letter-spacing: -1px; font-weight: 900; color: var(--white); }
.logo-text span { color: var(--gold); }

.login-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 0.92;
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: -2px;
}
.login-headline em { color: var(--gold); font-style: normal; text-shadow: 0 0 30px rgba(245,189,93,0.3); }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 40px; line-height: 1.7; }

.field { margin-bottom: 16px; }
.field label { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.field input {
  width: 100%;
  background: var(--surface-highest);
  border: 1px solid transparent;
  color: var(--white);
  padding: 14px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245,189,93,0.3); }
.field input::placeholder { color: #3a3d42; }

.btn-primary {
  width: 100%;
  background: var(--gold);
  color: #281900;
  border: none;
  padding: 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(245,189,93,0.2);
}
.btn-primary:hover { background: var(--gold-light); box-shadow: 0 0 30px rgba(245,189,93,0.4); }
.btn-primary:active { transform: scale(0.98); }

.login-toggle { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.login-toggle a { color: var(--gold); cursor: pointer; text-decoration: none; }
.login-toggle a:hover { text-decoration: underline; }

.badge-row { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.badge { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 2px; color: var(--muted); border: 1px solid var(--border); padding: 6px 12px; text-transform: uppercase; font-weight: 600; }

/* ══════════════════════════════════
   MAIN APP SHELL
   ══════════════════════════════════ */
#screen-app {
  flex-direction: row;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface-lowest) 0%, var(--black) 100%);
  border-right: 1px solid rgba(245,189,93,0.08);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 30px rgba(0,0,0,0.5);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 24px 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.sidebar-logo .logo-icon { width: 32px; height: 32px; font-size: 14px; }
.sidebar-logo .logo-text { font-size: 22px; }

.nav-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 24px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid transparent;
  margin-bottom: 2px;
  font-weight: 500;
}
.nav-item:hover { background: var(--surface-high); color: var(--white); border-left-color: rgba(245,189,93,0.3); }
.nav-item.active { background: var(--surface-high); color: var(--gold); border-left-color: var(--gold); box-shadow: inset 3px 0 15px rgba(245,189,93,0.08); }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-item .nav-badge { margin-left: auto; background: var(--gold); color: var(--black); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; }

.sidebar-bottom {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; background: var(--gold); display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: var(--black); flex-shrink: 0; }
.user-info { min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--gold); font-family: 'Space Grotesk', sans-serif; }
.logout-btn { margin-top: 12px; width: 100%; background: none; border: 1px solid var(--border); color: var(--muted); padding: 8px; font-size: 12px; cursor: pointer; font-family: 'Space Grotesk', sans-serif; letter-spacing: 1px; transition: all 0.15s; }
.logout-btn:hover { border-color: var(--border-bright); color: var(--white); }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(19,19,21,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245,189,93,0.08);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.topbar-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; letter-spacing: 1px; }
.topbar-meta { font-size: 12px; color: var(--muted); font-family: 'Space Grotesk', sans-serif; }

.page { display: none; padding: 40px; flex: 1; }
.page.active { display: block; }

/* ── DASHBOARD ── */
.score-hero {
  background: linear-gradient(135deg, rgba(96,65,0,0.12), var(--card));
  border: 1px solid rgba(245,189,93,0.15);
  padding: 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px -10px rgba(245,189,93,0.1);
}
.score-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}
.score-hero::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  border: 1px solid rgba(245,189,93,0.08);
  border-radius: 50%;
}
.score-layout { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.score-ring-wrap { flex-shrink: 0; }
.score-ring {
  width: 120px; height: 120px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.score-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.score-ring-val { font-family: 'Space Grotesk', sans-serif; font-size: 36px; color: var(--gold); line-height: 1; }
.score-ring-lbl { font-size: 10px; color: var(--muted); font-family: 'Space Grotesk', sans-serif; text-align: center; }
.score-info { flex: 1; }
.score-info h2 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; margin-bottom: 8px; }
.score-info p { font-size: 14px; color: #9ab; line-height: 1.6; max-width: 400px; }
.readiness-bar-wrap { margin-top: 20px; }
.readiness-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.readiness-label span:last-child { color: var(--gold); font-weight: 600; }
.readiness-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.readiness-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 3px; transition: width 1s ease; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; margin-bottom: 28px; }
.stat-card {
  background: var(--card);
  border: 1px solid rgba(79,69,55,0.3);
  padding: 24px 20px;
  position: relative;
  transition: all 0.2s;
}
.stat-card:hover { background: var(--surface-high); border-color: rgba(245,189,93,0.2); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold); opacity: 0; transition: opacity 0.2s; }
.stat-card:hover::before { opacity: 1; box-shadow: 0 0 10px rgba(245,189,93,0.3); }
.stat-label { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.stat-val { font-family: 'Space Grotesk', sans-serif; font-size: 32px; color: var(--white); line-height: 1; margin-bottom: 4px; }
.stat-val.green { color: var(--green); }
.stat-val.yellow { color: var(--yellow); }
.stat-val.red { color: var(--red); }
.stat-sub { font-size: 11px; color: var(--muted); }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: 20px; letter-spacing: 1px; }
.section-action { font-size: 12px; color: var(--gold); cursor: pointer; font-family: 'Space Grotesk', sans-serif; }
.section-action:hover { text-decoration: underline; }

.next-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 28px; }
.step-row {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.step-row:hover { border-color: var(--border-bright); background: #151618; }
.step-num { font-family: 'Space Grotesk', sans-serif; font-size: 20px; color: var(--gold); width: 28px; flex-shrink: 0; }
.step-body { flex: 1; }
.step-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.step-desc { font-size: 12px; color: var(--muted); }
.step-status { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 1px; padding: 4px 10px; border-radius: 2px; }
.status-pending { background: rgba(201,150,58,0.1); color: var(--gold); border: 1px solid var(--gold-dim); }
.status-done { background: var(--green-dim); color: var(--green); border: 1px solid #1a4a2e; }
.status-locked { background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid var(--border); }

/* ── ASSESSMENT ── */
.assessment-wrap { max-width: 640px; }
.assess-progress { display: flex; gap: 4px; margin-bottom: 40px; }
.assess-prog-dot { flex: 1; height: 3px; background: var(--border); border-radius: 2px; transition: background 0.3s; }
.assess-prog-dot.done { background: var(--gold); }
.assess-prog-dot.active { background: var(--gold-light); }

.assess-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 20px;
}
.assess-q-num { font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: 2px; color: var(--gold); margin-bottom: 12px; }
.assess-q { font-family: 'Space Grotesk', sans-serif; font-size: 26px; line-height: 1.1; margin-bottom: 8px; }
.assess-hint { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

.assess-options { display: flex; flex-direction: column; gap: 8px; }
.assess-opt {
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 14px 18px;
  cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.15s;
  font-size: 14px;
}
.assess-opt:hover { border-color: var(--border-bright); background: #161819; }
.assess-opt.selected { border-color: var(--gold); background: rgba(201,150,58,0.06); color: var(--white); }
.assess-opt-radio { width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.assess-opt.selected .assess-opt-radio { border-color: var(--gold); background: var(--gold); }
.assess-opt.selected .assess-opt-radio::after { content: ''; width: 6px; height: 6px; background: var(--black); border-radius: 50%; }

.assess-input {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.assess-input:focus { border-color: var(--gold); }

.assess-nav { display: flex; gap: 12px; margin-top: 8px; }
.btn-back { background: none; border: 1px solid var(--border); color: var(--muted); padding: 12px 24px; font-family: 'Space Grotesk', sans-serif; font-size: 11px; letter-spacing: 1px; cursor: pointer; transition: all 0.15s; }
.btn-back:hover { border-color: var(--border-bright); color: var(--white); }
.btn-next { background: var(--gold); color: var(--black); border: none; padding: 12px 32px; font-family: 'Space Grotesk', sans-serif; font-size: 16px; letter-spacing: 2px; cursor: pointer; transition: background 0.15s; }
.btn-next:hover { background: var(--gold-light); }
.btn-next:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* ── ROADMAP ── */
.roadmap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 28px; }
@media (max-width: 900px) { .roadmap-grid { grid-template-columns: 1fr; } }

.roadmap-module {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  cursor: pointer;
  transition: border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.roadmap-module:hover { border-color: var(--border-bright); }
.roadmap-module.unlocked { border-left: 3px solid var(--gold); }
.roadmap-module.locked { opacity: 0.5; cursor: default; }
.roadmap-module-num { font-family: 'Space Grotesk', sans-serif; font-size: 48px; color: #1a1c1e; position: absolute; right: 20px; top: 10px; line-height: 1; }
.roadmap-module-tag { font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.roadmap-module-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; margin-bottom: 8px; line-height: 1.1; }
.roadmap-module-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.roadmap-module-tasks { display: flex; flex-direction: column; gap: 6px; }
.roadmap-task { font-size: 12px; display: flex; gap: 8px; align-items: flex-start; }
.roadmap-task-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-bright); flex-shrink: 0; margin-top: 4px; }
.roadmap-task.done .roadmap-task-dot { background: var(--green); }
.roadmap-task.active .roadmap-task-dot { background: var(--gold); }
.roadmap-module-footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.roadmap-module-pct { font-family: 'Space Grotesk', sans-serif; font-size: 10px; color: var(--muted); }
.module-prog-bar { flex: 1; height: 3px; background: var(--border); margin: 0 12px; border-radius: 2px; overflow: hidden; }
.module-prog-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* ── AI COACH ── */
.coach-layout { display: flex; gap: 24px; height: calc(100vh - 180px); }
.coach-sidebar { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.coach-topic {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}
.coach-topic:hover { border-color: var(--border-bright); background: #151618; }
.coach-topic.active { border-left: 2px solid var(--gold); background: #151618; color: var(--white); }
.coach-topic-label { font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }

.coach-main {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.coach-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.coach-messages::-webkit-scrollbar { width: 4px; }
.coach-messages::-webkit-scrollbar-track { background: transparent; }
.coach-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.msg { display: flex; gap: 12px; max-width: 90%; }
.msg.user { flex-direction: row-reverse; align-self: flex-end; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.msg.ai .msg-avatar { background: var(--gold); color: var(--black); }
.msg.user .msg-avatar { background: var(--teal-bright); color: var(--white); }
.msg-bubble { background: var(--dark); border: 1px solid var(--border); padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.msg.user .msg-bubble { background: var(--teal); border-color: var(--teal-bright); }
.msg-bubble strong { color: var(--gold); }
.msg-bubble ul { margin: 8px 0 0 16px; }
.msg-bubble li { margin-bottom: 4px; font-size: 13px; }

.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dot { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: typing 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.coach-input-row {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  gap: 12px;
}
.coach-input {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  height: 44px;
}
.coach-input:focus { border-color: var(--gold); }
.coach-send {
  background: var(--gold);
  color: var(--black);
  border: none;
  padding: 0 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.coach-send:hover { background: var(--gold-light); }
.coach-send:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* ── TRACKER ── */
.tracker-header { display: flex; gap: 2px; margin-bottom: 24px; flex-wrap: wrap; }
.tracker-stat { flex: 1; min-width: 140px; background: var(--card); border: 1px solid var(--border); padding: 20px; }
.tracker-stat-lbl { font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.tracker-stat-val { font-family: 'Space Grotesk', sans-serif; font-size: 28px; }

.add-app-btn { background: var(--gold); color: var(--black); border: none; padding: 10px 20px; font-family: 'Space Grotesk', sans-serif; font-size: 15px; letter-spacing: 1px; cursor: pointer; transition: background 0.15s; margin-bottom: 20px; }
.add-app-btn:hover { background: var(--gold-light); }

.app-table { width: 100%; border-collapse: collapse; }
.app-table th { font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 2px; color: var(--muted); text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--border); text-transform: uppercase; }
.app-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.app-table tr:hover td { background: #131416; }
.pill { display: inline-block; font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 1px; padding: 3px 8px; border-radius: 2px; }
.pill-approved { background: var(--green-dim); color: var(--green); }
.pill-pending { background: rgba(201,150,58,0.1); color: var(--gold); }
.pill-denied { background: var(--red-dim); color: var(--red); }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--dark); border: 1px solid var(--border-bright); padding: 36px; width: 100%; max-width: 500px; }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 24px; margin-bottom: 24px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.modal-field label { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.modal-field input, .modal-field select { width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--white); padding: 10px 12px; font-family: 'Manrope', sans-serif; font-size: 14px; outline: none; }
.modal-field input:focus, .modal-field select:focus { border-color: var(--gold); }
.modal-field select option { background: var(--dark); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-cancel { background: none; border: 1px solid var(--border); color: var(--muted); padding: 10px 20px; font-family: 'Space Grotesk', sans-serif; font-size: 11px; cursor: pointer; transition: all 0.15s; }
.btn-cancel:hover { color: var(--white); border-color: var(--border-bright); }
.btn-save { background: var(--gold); color: var(--black); border: none; padding: 10px 24px; font-family: 'Space Grotesk', sans-serif; font-size: 16px; letter-spacing: 1px; cursor: pointer; }
.btn-save:hover { background: var(--gold-light); }

/* ── BUSINESS IN A BOX ── */
.biab-tier-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border: 1px solid var(--border);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.biab-tier-btn:hover { border-color: var(--border-bright); background: #151618; }
.biab-tier-btn.active { border-color: var(--gold); background: rgba(201,150,58,0.05); border-top: 3px solid var(--gold); }
.tier-label { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; }
.tier-price { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--gold); opacity: 0.8; }
.biab-tier-btn.active .tier-price { opacity: 1; }
.biab-tier-dfy { opacity: 0.6; }

.biab-step {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.biab-step:hover { border-color: var(--border-bright); }
.biab-step.done { border-left: 3px solid var(--green); background: rgba(46,204,113,0.03); }
.biab-step.done .biab-check { background: var(--green); border-color: var(--green); color: var(--black); }
.biab-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
  color: transparent;
}
.biab-step-body { flex: 1; }
.biab-step-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.biab-step-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.biab-step-link { font-size: 11px; color: var(--gold); font-family: 'Space Grotesk', sans-serif; margin-top: 6px; display: inline-block; }
.biab-step-num { font-family: 'Space Grotesk', sans-serif; font-size: 18px; color: var(--border-bright); flex-shrink: 0; min-width: 24px; text-align: center; margin-top: 1px; }
.biab-step.done .biab-step-num { color: var(--green); }

.diwy-phase {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 16px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  text-align: center;
  line-height: 1.2;
  transition: all 0.15s;
  color: var(--muted);
}
.diwy-phase span { font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 1px; display: block; margin-top: 2px; }
.diwy-phase:hover { background: #151618; color: var(--white); }
.diwy-phase.active { border-top: 2px solid var(--gold); color: var(--white); background: #151618; }

.diwy-step-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 22px 24px;
  margin-bottom: 2px;
}
.diwy-step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.diwy-step-num-title { display: flex; align-items: center; gap: 12px; }
.diwy-step-n { font-family: 'Space Grotesk', sans-serif; font-size: 24px; color: var(--gold); }
.diwy-step-t { font-size: 15px; font-weight: 500; }
.diwy-expand-btn { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 1px; color: var(--muted); cursor: pointer; padding: 4px 10px; border: 1px solid var(--border); background: none; transition: all 0.15s; }
.diwy-expand-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.diwy-step-content { font-size: 13px; color: var(--muted); line-height: 1.8; }
.diwy-step-content strong { color: var(--white); }
.diwy-step-content .diwy-sub { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border-bright); }
.diwy-done-toggle { display: flex; align-items: center; gap: 8px; margin-top: 14px; cursor: pointer; font-size: 12px; color: var(--muted); }
.diwy-done-toggle input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }

/* ── AUTOMATION FLOWS ── */
.auto-flow { background:var(--card); border:1px solid var(--border); padding:24px; position:relative; overflow:hidden; }
.auto-flow::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; }
.auto-flow.active::before { background:var(--green); }
.auto-flow.setup::before { background:var(--gold); }
.auto-flow-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.auto-flow-title { font-family:'Space Grotesk',sans-serif; font-size:18px; }
.auto-flow-desc { font-size:12px; color:var(--muted); line-height:1.7; margin-bottom:12px; }
.auto-step { font-size:11px; color:#555; display:flex; gap:8px; margin-bottom:3px; }
.auto-step::before { content:'→'; color:var(--border-bright); flex-shrink:0; }
.escalation-row { background:var(--card); border:1px solid var(--border); padding:14px 18px; display:flex; align-items:center; gap:14px; font-size:13px; margin-bottom:2px; }
.esc-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.esc-time { font-family:'Space Grotesk',sans-serif; font-size:10px; color:var(--muted); margin-left:auto; }

/* ── 6 MONTHS TO 6 FIGURES ── */
.sm-hero {
  display: flex; gap: 32px; align-items: flex-start;
  background: linear-gradient(135deg, var(--teal) 0%, #060b10 100%);
  border: 1px solid var(--teal-bright); padding: 36px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.sm-hero-left { flex: 1; min-width: 260px; }
.sm-eyebrow { font-family:'Space Grotesk',sans-serif; font-size:9px; letter-spacing:3px; color:var(--gold); margin-bottom:10px; }
.sm-hero-title { font-family:'Space Grotesk',sans-serif; font-size:clamp(28px,4vw,40px); line-height:1.0; margin-bottom:10px; }
.sm-hero-sub { font-size:13px; color:#9ab; line-height:1.7; max-width:420px; }
.sm-hero-right { flex-shrink:0; }
.sm-countdown-wrap { display:flex; gap:24px; align-items:center; flex-wrap:wrap; }
.sm-countdown-ring { position:relative; width:110px; height:110px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sm-countdown-ring svg { position:absolute; inset:0; }
.sm-countdown-inner { text-align:center; }
.sm-days-val { font-family:'Space Grotesk',sans-serif; font-size:34px; color:var(--gold); line-height:1; }
.sm-days-lbl { font-family:'Space Grotesk',sans-serif; font-size:8px; color:var(--muted); }
.sm-countdown-meta { min-width:180px; }
.sm-meta-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; gap:16px; }
.sm-meta-label { font-family:'Space Grotesk',sans-serif; font-size:8px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; }
.sm-meta-val { font-size:13px; font-weight:500; }

.sm-phase-tabs { display:flex; gap:2px; margin-bottom:24px; flex-wrap:wrap; }
.sm-phase-tab {
  flex:1; min-width:120px; background:var(--card); border:1px solid var(--border);
  padding:16px 18px; cursor:pointer; transition:all 0.15s; position:relative; overflow:hidden;
}
.sm-phase-tab:hover { border-color:var(--border-bright); }
.sm-phase-tab.active { border-top:2px solid var(--gold); background:#151618; }
.sm-tab-label { font-family:'Space Grotesk',sans-serif; font-size:8px; letter-spacing:1px; color:var(--muted); margin-bottom:4px; }
.sm-tab-title { font-family:'Space Grotesk',sans-serif; font-size:20px; color:var(--white); margin-bottom:2px; }
.sm-tab-sub { font-size:11px; color:var(--muted); margin-bottom:10px; }
.sm-tab-bar { height:3px; background:var(--border); border-radius:2px; overflow:hidden; }
.sm-tab-fill { height:100%; background:var(--gold); border-radius:2px; transition:width 0.6s ease; }

.sm-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }

/* Credit Stack Cards */
.sm-stack-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:2px; margin-bottom:4px; }
.sm-stack-card {
  background:var(--card); border:1px solid var(--border); padding:22px;
  position:relative; transition:border-color 0.15s;
}
.sm-stack-card.completed { border-left:3px solid var(--green); }
.sm-stack-card.in-progress { border-left:3px solid var(--gold); }
.sm-stack-card-tag { font-family:'Space Grotesk',sans-serif; font-size:8px; letter-spacing:2px; color:var(--gold); margin-bottom:8px; }
.sm-stack-card-title { font-family:'Space Grotesk',sans-serif; font-size:18px; margin-bottom:6px; }
.sm-stack-card-desc { font-size:12px; color:var(--muted); line-height:1.7; margin-bottom:14px; }
.sm-account-inputs { display:flex; flex-direction:column; gap:6px; }
.sm-account-row { display:flex; gap:8px; align-items:center; }
.sm-account-row input[type=text] {
  flex:1; background:var(--dark); border:1px solid var(--border);
  color:var(--white); padding:7px 10px; font-size:12px; font-family:'DM Sans',sans-serif; outline:none;
}
.sm-account-row input[type=text]:focus { border-color:var(--gold); }
.sm-account-row input[type=checkbox] { width:16px; height:16px; accent-color:var(--gold); cursor:pointer; flex-shrink:0; }
.sm-account-row label { font-size:12px; color:var(--muted); flex-shrink:0; }
.sm-add-account { background:none; border:1px dashed var(--border); color:var(--muted); padding:6px 12px; font-size:11px; cursor:pointer; width:100%; margin-top:4px; transition:all 0.15s; font-family:'Space Grotesk',sans-serif; letter-spacing:1px; }
.sm-add-account:hover { border-color:var(--gold-dim); color:var(--gold); }

/* Discipline Grid */
.sm-discipline-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:2px; }
.sm-discipline-card {
  background:var(--card); border:1px solid var(--border); padding:20px; position:relative;
}
.sm-disc-icon { font-size:24px; margin-bottom:8px; }
.sm-disc-title { font-family:'Space Grotesk',sans-serif; font-size:17px; margin-bottom:4px; }
.sm-disc-rule { font-size:12px; color:var(--muted); line-height:1.6; margin-bottom:14px; }
.sm-disc-status { display:flex; gap:8px; }
.sm-disc-btn {
  flex:1; padding:7px; font-family:'Space Grotesk',sans-serif; font-size:9px; letter-spacing:1px;
  border:1px solid var(--border); background:none; color:var(--muted); cursor:pointer; transition:all 0.15s;
}
.sm-disc-btn:hover { border-color:var(--border-bright); color:var(--white); }
.sm-disc-btn.ok { background:var(--green-dim); border-color:#1a4a2e; color:var(--green); }
.sm-disc-btn.fail { background:var(--red-dim); border-color:#4a1a1a; color:var(--red); }

/* Day tasks list */
.sm-day-task { display:flex; gap:12px; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--border); }
.sm-day-task:last-child { border-bottom:none; }
.sm-day-check { width:20px; height:20px; border:2px solid var(--border-bright); flex-shrink:0; margin-top:1px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.15s; }
.sm-day-check.done { background:var(--gold); border-color:var(--gold); color:var(--black); font-size:11px; font-weight:700; }
.sm-day-task-body { flex:1; }
.sm-day-task-title { font-size:14px; font-weight:500; margin-bottom:3px; }
.sm-day-task-desc { font-size:12px; color:var(--muted); line-height:1.6; }
.sm-day-task-day { font-family:'Space Grotesk',sans-serif; font-size:10px; color:var(--gold); flex-shrink:0; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.4s ease both; }

/* ── PAGE PREVIEW BANNERS ── */
.page-preview-banner {
  width: 100%;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  max-height: 320px;
  background: var(--card);
}
.page-preview-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--black) 100%);
  pointer-events: none;
}
.page-preview-banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s ease;
  filter: brightness(0.85);
}
.page-preview-banner:hover img {
  transform: scale(1.03);
  filter: brightness(0.95);
}
.page-preview-banner .banner-label {
  position: absolute;
  bottom: 16px;
  left: 20px;
  z-index: 2;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  color: var(--white);
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.page-preview-banner .banner-tag {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 2;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(7,7,8,0.7);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border: 1px solid var(--gold-dim);
}
/* Login page preview grid */
.login-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 32px;
  width: 100%;
}
.login-preview-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  filter: brightness(0.5);
  transition: all 0.3s ease;
}
.login-preview-grid img:hover {
  filter: brightness(0.8);
  border-color: var(--gold-dim);
}

/* ── RESPONSIVE ── */
/* ── LOCKED CARD ── */
.locked-card {
  background: linear-gradient(135deg, #1c1812 0%, #0e0e10 100%);
  border: 1px solid var(--border);
  padding: 60px 40px;
  text-align: center;
  max-width: 500px;
  margin: 40px auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.locked-icon { font-size: 48px; margin-bottom: 24px; opacity: 0.5; }
.locked-title { font-family: 'Space Grotesk', sans-serif; font-size: 24px; letter-spacing: 2px; color: var(--gold); margin-bottom: 16px; }
.locked-desc { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 32px; }
.locked-price { font-family: 'Space Mono', monospace; font-size: 32px; color: var(--white); margin-bottom: 32px; }
.locked-price span { font-size: 12px; color: var(--muted); letter-spacing: 2px; }

/* ── VIGNETTE PAYWALL ── */
.vignette-blurred {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
  transition: all 0.5s ease;
}
.vignette-wrapper {
  position: relative;
}
.vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7,7,8,0.2);
  backdrop-filter: none;
}
.vignette-card {
  background: var(--card);
  border: 1px solid var(--gold-dim);
  padding: 40px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  animation: fadeUp 0.6s ease both;
}
.vignette-title { font-family: 'Space Grotesk', sans-serif; font-size: 24px; color: var(--gold); margin-bottom: 12px; }
.vignette-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }

/* ── SUBSCRIPTION MODAL ── */
.sub-modal-content {
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.9);
}
.pricing-header { text-align: center; margin-bottom: 40px; }
.pricing-title { font-family: 'Space Grotesk', sans-serif; font-size: 32px; color: var(--white); margin-bottom: 8px; }
.pricing-sub { font-size: 14px; color: var(--muted); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.price-card {
  background: var(--card); border: 1px solid var(--border); padding: 32px;
  display: flex; flex-direction: column; transition: all 0.3s ease; position: relative;
}
.price-card.popular { border-color: var(--gold); background: rgba(201,150,58,0.03); transform: scale(1.02); z-index: 2; }
.popular-tag {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: var(--gold); color: var(--black); font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 700; padding: 4px 12px; letter-spacing: 1px;
}
.price-name { font-family: 'Space Grotesk', sans-serif; font-size: 14px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.price-val { font-family: 'Space Mono', monospace; font-size: 40px; color: var(--white); margin-bottom: 4px; }
.price-val span { font-size: 14px; color: var(--muted); }
.price-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; min-height: 40px; }
.price-features { margin-bottom: 32px; flex: 1; }
.price-feature { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #ccc; margin-bottom: 12px; }
.price-feature span { color: var(--gold); font-weight: 700; }

.sub-modal-content::-webkit-scrollbar { width: 6px; }
.sub-modal-content::-webkit-scrollbar-track { background: transparent; }
.sub-modal-content::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 10px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .coach-layout { flex-direction: column; height: auto; }
  .coach-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .page { padding: 20px; }
  .topbar { padding: 14px 20px; }
  .score-layout { flex-direction: column; gap: 24px; }
  .biab-tier-btn { padding: 12px 8px; }
  .tier-label { font-size: 12px; }
  .tier-price { font-size: 9px; }
}
