/* ─────────────────────────────────────────────────────────────
   theme.css — Dingofy app theme (matches landing page)
   Load AFTER styles.css so these rules cascade on top.

   Font system
     · Inter        — body text (readable for paragraphs)
     · DM Mono      — labels, code, accents, numbers
     · Bebas Neue   — display headings only
   Palette
     · #050505       background
     · #e5e7eb       body text (soft white — not harsh)
     · #FB923C       amber accent (brand)
   ───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&family=Bebas+Neue&display=swap');

/* ═══ 1. ROOT PALETTE OVERRIDES ═══ */
:root {
  --primary:        #FB923C;
  --primary-dark:   #e67a24;
  --primary-light:  #ffb366;
  --primary-xlight: #2a1a0b;

  --accent:         #FB923C;
  --accent-light:   #3a2410;

  --success:        #4dffb4;
  --success-light:  #0a1f14;
  --warning:        #FB923C;
  --warning-light:  #2a1a0b;
  --danger:         #ff6b6b;
  --danger-light:   #2a0d0d;

  --sidebar-bg:     #070707;
  --sidebar-hover:  #121212;
  --sidebar-active: #1a1a1a;
  --sidebar-border: rgba(255,255,255,0.06);

  --text:    #e5e7eb;         /* soft white — primary body */
  --text-2:  #b4b4b4;         /* secondary text */
  --text-3:  #808080;         /* tertiary / labels */

  --bg:      #050505;
  --card:    #0d0d0d;
  --border:  #1c1c1c;

  --shadow:     0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);

  /* Font stacks */
  --f-body:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --f-mono:    'DM Mono', ui-monospace, Menlo, monospace;
  --f-display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
}

/* ═══ 2. BASE TYPOGRAPHY ═══ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--f-body) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  overflow: auto !important;      /* allow page scroll */
  min-height: 100vh;
}

p, li, span:not([class]), div:not([class]) {
  color: inherit;
}

/* ═══ 3. HEADINGS — Bebas Neue for display, Inter for mid-level ═══ */
h1, h2 {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.03em !important;
  color: #ffffff !important;
  line-height: 1.05 !important;
}
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }

h3, h4 {
  font-family: var(--f-body) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}
h3 { font-size: 17px; }
h4 { font-size: 14px; }

.modal-title, .cel-title {
  font-family: var(--f-display) !important;
  color: #ffffff !important;
  letter-spacing: 0.03em !important;
}

/* ═══ 4. SCROLLBARS ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FB923C; }

/* ═══ 5. LAYOUT ═══ */
#app {
  display: flex !important;
  min-height: calc(100vh - 36px);        /* leave room for back-bar */
  background: var(--bg) !important;
  overflow: visible !important;
}

#sidebar {
  background: var(--sidebar-bg) !important;
  border-right: 1px solid var(--sidebar-border) !important;
  width: 272px;
  min-width: 272px;
  overflow-y: auto;
  max-height: 100vh;
}

#main, main {
  background: var(--bg) !important;
  color: var(--text) !important;
  flex: 1 1 auto;
  min-width: 0;                           /* allow proper shrinking */
  overflow-x: hidden;
  padding: 28px 36px !important;
}

#content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ═══ 6. SIDEBAR — logo + brand ═══ */
.sidebar-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--sidebar-border); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 36px; height: 36px; border-radius: 8px; }
.logo-text {
  font-family: var(--f-mono) !important;
  color: #ffffff !important;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.logo-sub {
  font-family: var(--f-mono) !important;
  color: #FB923C !important;
  opacity: 0.85;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ═══ 7. CONFIDENCE WIDGET ═══ */
.confidence-widget { padding: 18px 20px; border-bottom: 1px solid var(--sidebar-border); display: flex; align-items: center; gap: 14px; }
.confidence-ring-wrap { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.confidence-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: rgba(255,255,255,0.08) !important; stroke-width: 6; }
.ring-fill { fill: none; stroke: #FB923C !important; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(.4,0,.2,1); }
.confidence-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#confidence-pct   { color: #ffffff !important; font-family: var(--f-display) !important; font-size: 20px; letter-spacing: 0.02em; }
.confidence-label { color: var(--text-3) !important; font-family: var(--f-mono) !important; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: -2px; }
.conf-startup-name { color: #ffffff !important; font-weight: 600; font-size: 13px; }
.conf-status       { color: var(--text-3) !important; font-size: 11px; margin-top: 2px; }

/* ═══ 8. SIDEBAR NAV ITEMS ═══ */
.phase-nav { padding: 12px 10px; }
.nav-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px !important;
  color: var(--text-2) !important;
  background: transparent !important;
  border-radius: 8px !important;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border: none;
  font-family: var(--f-body) !important;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover         { background: var(--sidebar-hover) !important; color: #fff !important; }
.nav-item.active        { background: var(--sidebar-active) !important; color: #FB923C !important; }
.nav-icon               { opacity: 0.9; font-size: 14px; flex-shrink: 0; }
.nav-label              { flex: 1; min-width: 0; }
.nav-item .nav-name     { color: inherit !important; font-weight: 600; display: block; }
.nav-item .nav-phase-num { color: #FB923C !important; opacity: 0.7; font-family: var(--f-mono) !important; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; display: block; }
.nav-arrow              { color: var(--text-3); opacity: 0.5; flex-shrink: 0; }

/* ═══ 9. CARDS (phase cards, metric cards, task cards) ═══ */
.card, .phase-card, .next-action-item, .task-card,
.metric-card, .tip-card, .insight-card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: none !important;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover, .phase-card:hover, .next-action-item:hover {
  border-color: #FB923C !important;
  transform: translateY(-2px);
}

/* ═══ 10. PHASE GRID + PHASE CARDS ═══ */
.phase-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 16px !important;
  margin-top: 16px;
}
.phase-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.phase-card-icon   { color: #FB923C !important; font-size: 24px; }
.phase-card-pct    { color: #FB923C !important; font-family: var(--f-mono) !important; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; }
.phase-card-num    { color: var(--text-3) !important; font-family: var(--f-mono) !important; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; }
.phase-card-name   { color: #ffffff !important; font-family: var(--f-display) !important; font-size: 22px; letter-spacing: 0.03em; margin: 4px 0 6px; line-height: 1; }
.phase-card-tagline { color: var(--text-2) !important; font-size: 12px; line-height: 1.5; font-style: italic; }
.phase-card-bar    { background: #181818 !important; height: 4px; border-radius: 2px; margin-top: 12px; overflow: hidden; }
.phase-card-fill   { background: #FB923C !important; height: 100%; transition: width 0.6s ease; }
.phase-card.complete { border-color: #FB923C !important; }

/* ═══ 11. BUTTONS ═══ */
.btn-primary {
  background: #FB923C !important;
  color: #000 !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 22px !important;
  font-family: var(--f-body) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.02em !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #ffb366 !important; }
.btn-primary.full  { width: 100%; justify-content: center; }

.btn-secondary, .btn-ghost {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 10px !important;
  padding: 11px 20px !important;
  font-family: var(--f-body) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer;
}
.btn-secondary:hover, .btn-ghost:hover { border-color: #FB923C !important; color: #FB923C !important; }

/* ═══ 12. INPUTS ═══ */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
textarea, select, .form-input {
  background: #111 !important;
  border: 1px solid #2a2a2a !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-family: var(--f-body) !important;
  font-size: 14px !important;
  line-height: 1.4;
  outline: none !important;
  width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: #FB923C !important; }
::placeholder { color: #666 !important; opacity: 1; }

.modal-field { margin-bottom: 16px; }
.modal-field label {
  color: var(--text-2) !important;
  font-family: var(--f-mono) !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  display: block;
  margin-bottom: 6px;
}

/* ═══ 13. MODALS ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9) !important;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.hidden { display: none; }
.modal, .celebration-inner {
  background: #0a0a0a !important;
  border: 1px solid #FB923C44 !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
  padding: 32px !important;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title, .cel-title {
  color: #ffffff !important;
  font-size: 24px;
  margin-bottom: 8px;
}
.modal-desc, .cel-sub {
  color: var(--text-2) !important;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* ═══ 14. SIDEBAR FOOTER ═══ */
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 16px 20px;
  color: var(--text-2) !important;
  font-size: 12px;
  margin-top: auto;
}
.sidebar-footer a { color: #FB923C !important; }
.sidebar-footer a:hover { color: #ffb366 !important; }

/* ═══ 15. LINKS ═══ */
a { color: #FB923C; }
a:hover { color: #ffb366; }

/* ═══ 16. DASHBOARD GREETING + SECTIONS ═══ */
.dashboard-greeting, .overview-greeting {
  font-family: var(--f-display) !important;
  color: #ffffff !important;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 8px;
}
.dashboard-sub, .overview-sub {
  color: var(--text-2) !important;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.overview-section,
.overview-section + .overview-section { margin-top: 32px; }

.section-title, .overview-section h2 {
  font-family: var(--f-display) !important;
  color: #ffffff !important;
  font-size: 24px;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

/* ═══ 17. NEXT ACTIONS ═══ */
.next-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px !important;
  margin-bottom: 8px;
  cursor: pointer;
}
.next-action-item .action-text { color: var(--text) !important; flex: 1; font-size: 13px; padding-right: 10px; }
.next-action-item .action-meta { color: var(--text-3) !important; font-family: var(--f-mono) !important; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ═══ 18. TASKS ═══ */
.task-item, .task-row {
  background: #0a0a0a !important;
  border: 1px solid #181818 !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  color: var(--text) !important;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.task-item.completed, .task-row.completed {
  border-color: #FB923C44 !important;
  opacity: 0.6;
}
.task-item.completed .task-text { text-decoration: line-through; color: var(--text-3) !important; }
.task-text   { color: var(--text) !important; flex: 1; }
.task-detail { color: var(--text-2) !important; font-size: 12px; margin-top: 4px; line-height: 1.5; }
.task-example { color: var(--text-3) !important; font-size: 12px; margin-top: 6px; font-style: italic; line-height: 1.55; }

input[type=checkbox] {
  accent-color: #FB923C;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}

/* ═══ 19. METRIC DISPLAYS ═══ */
.metric-value, .metric-n {
  font-family: var(--f-display) !important;
  color: #FB923C !important;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
  letter-spacing: 0.02em;
}
.metric-label, .metric-l {
  color: var(--text-3) !important;
  font-family: var(--f-mono) !important;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}
.metric-benchmark, .vc-benchmark {
  color: #FB923C !important;
  font-family: var(--f-mono) !important;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.metric-input-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.metric-input-row input { max-width: 160px; }

/* ═══ 20. STATUS INDICATORS ═══ */
.status-good { color: #4dffb4 !important; }
.status-warn { color: #FB923C !important; }
.status-bad  { color: #ff6b6b !important; }

/* ═══ 21. VC INSIGHT CALLOUTS ═══ */
.vc-insight, .insight-card {
  background: #0a0a0a !important;
  border-left: 3px solid #FB923C !important;
  border-radius: 0 10px 10px 0 !important;
  padding: 16px 20px !important;
  color: var(--text-2) !important;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}
.vc-insight-label {
  color: #FB923C !important;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--f-mono) !important;
  margin-bottom: 6px;
  display: block;
}

/* ═══ 22. TIPS / HELP TEXT ═══ */
.tip-card, .tip-item {
  background: transparent !important;
  border-left: 2px solid #2a2a2a !important;
  padding: 8px 14px !important;
  color: var(--text-2) !important;
  font-size: 13px;
  line-height: 1.55;
  margin: 6px 0;
}
.tip-card::before, .tip-item::before { content: ''; }

/* ═══ 23. BACK-TO-LANDING BAR ═══ */
.landing-back-bar {
  background: #050505;
  border-bottom: 1px solid #181818;
  padding: 8px 20px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.landing-back-bar a {
  color: #FB923C;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.landing-back-bar a:hover { color: #ffb366; }
.landing-back-bar .meta { color: #555; letter-spacing: 0.18em; }

/* ═══ 24. CELEBRATION OVERLAY ═══ */
.celebration { background: rgba(0,0,0,0.9) !important; }
.celebration-inner { text-align: center; max-width: 420px; }
.cel-emoji { font-size: 56px; margin-bottom: 14px; display: block; }

/* ═══ 25. TABLES ═══ */
table { border-collapse: collapse; width: 100%; color: var(--text); font-size: 13px; }
th, td { border-bottom: 1px solid #181818; padding: 10px 12px; text-align: left; vertical-align: top; }
th {
  color: #FB923C;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

/* ═══ 26. CODE-STYLE LABELS ═══ */
.label-tag, .code-label {
  color: #FB923C !important;
  font-size: 10px !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  font-family: var(--f-mono) !important;
  opacity: 0.85;
}

/* ═══ 27. CHECKS ═══ */
.check-complete { color: #FB923C !important; }
.check-pending  { color: #666 !important; }

/* ═══════════════════════════════════════════════════════════
   27A. PURPLE-KILLER OVERRIDES
   Catches any residual purple text / background from the
   original styles.css (indigo palette: #6366f1 / #818cf8 /
   #4f46e5 / #e0e7ff). Forces readable amber or soft-white.
   ─────────────────────────────────────────────────────────── */

/* Inline-style purples */
[style*="color: #6366f1"],
[style*="color:#6366f1"],
[style*="color: #818cf8"],
[style*="color:#818cf8"],
[style*="color: #4f46e5"],
[style*="color:#4f46e5"],
[style*="color: #a5b4fc"],
[style*="color:#a5b4fc"],
[style*="color: #c7d2fe"],
[style*="color:#c7d2fe"],
[style*="color: #e0e7ff"],
[style*="color:#e0e7ff"],
[style*="color: var(--primary)"],
[style*="color:var(--primary)"] { color: #FB923C !important; }

[style*="background: #6366f1"],
[style*="background:#6366f1"],
[style*="background-color: #6366f1"],
[style*="background: #818cf8"],
[style*="background:#818cf8"],
[style*="background: #4f46e5"],
[style*="background:#4f46e5"] { background: #FB923C !important; color: #000 !important; }

[style*="background: #e0e7ff"],
[style*="background:#e0e7ff"] { background: #2a1a0b !important; color: #FB923C !important; }

/* Catch common app class patterns that may carry the primary indigo */
.text-primary, .primary-text, .primary, .accent-text { color: #FB923C !important; }
.bg-primary, .primary-bg, .btn-primary { background: #FB923C !important; }

/* Any headline / strong title inherits white not purple */
.title, .heading, .page-title, .view-title, .phase-title,
.panel-title, .widget-title, .card-title,
h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

/* Specific app elements that often get the primary color */
.highlight, .emphasis, mark { color: #FB923C !important; background: transparent !important; }

/* Progress bars, pills, badges — keep the amber fill */
.progress-fill, .progress-bar-fill, [class*="progress-fill"],
.bar-fill, .fill-primary { background: #FB923C !important; }

.badge, .pill, .chip {
  background: #1a1a1a !important;
  color: #FB923C !important;
  border: 1px solid #FB923C44 !important;
}
.badge.active, .pill.active, .chip.active,
.badge-primary, .pill-primary {
  background: #FB923C !important;
  color: #000 !important;
  border-color: #FB923C !important;
}

/* Icon containers that used primary-xlight pale indigo as background */
.icon-circle, .icon-box, .icon-wrap,
[class*="icon-primary"], [class*="icon-wrap"] {
  background: #1a1a1a !important;
  color: #FB923C !important;
}

/* Any remaining purple that leaks through via !important in styles.css:
   force body text containers to use our soft white */
.view, .panel, .section-body, .content-body,
#content > div, #content > section {
  color: #e5e7eb !important;
}

/* Text inside any colored "info" / "insight" blocks */
.info, .info-box, .note-box, .callout {
  color: #e5e7eb !important;
  background: #0a0a0a !important;
  border-color: #FB923C44 !important;
}

/* ═══════════════════════════════════════════════════════════
   27B. HARDCODED DARK-COLOR OVERRIDES
   Specific classes from styles.css that used dark hex colors
   designed for light-background pills. Remap them for dark bg.
   ─────────────────────────────────────────────────────────── */

/* VC Insight — was deep indigo on pale lavender */
.vc-insight {
  background: #0a0a0a !important;
  border: 1px solid #1c1c1c !important;
  border-left: 3px solid #FB923C !important;
  border-radius: 10px !important;
  padding: 16px 20px !important;
  margin: 16px 0;
}
.vc-insight-label {
  color: #FB923C !important;
  font-family: var(--f-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2em !important;
  margin-bottom: 8px !important;
  display: block;
}
.vc-insight-text {
  color: #e5e7eb !important;
  font-family: var(--f-body) !important;
  font-size: 13.5px !important;
  line-height: 1.7 !important;
}

/* Metric status pills — dark text on light pill → bright text on dark pill */
.metric-status.good {
  background: #0a1f14 !important;
  color: #4dffb4 !important;
  border: 1px solid #4dffb433 !important;
}
.metric-status.warn {
  background: #2a1a0b !important;
  color: #FB923C !important;
  border: 1px solid #FB923C33 !important;
}
.metric-status.bad {
  background: #2a0d0d !important;
  color: #ff6b6b !important;
  border: 1px solid #ff6b6b33 !important;
}
.metric-status.neutral {
  background: #1a1a1a !important;
  color: #aaa !important;
  border: 1px solid #2a2a2a !important;
}
.metric-status {
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-family: var(--f-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

/* Problem-card body text — was dark green on pale green */
.pcb-text {
  color: #e5e7eb !important;
  font-family: var(--f-body) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}
.pcb-icon { color: #FB923C !important; }

/* ═══ 28. UTILITIES — prevent overflow ═══ */
pre, code { white-space: pre-wrap; word-break: break-word; }
img, svg, video { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ─────────────────────────────────────────────────────────── */

/* Narrow desktop: tighten main padding */
@media (max-width: 1200px) {
  #main, main { padding: 24px 28px !important; }
  #sidebar { width: 240px; min-width: 240px; }
}

/* Tablet */
@media (max-width: 960px) {
  #sidebar { width: 220px; min-width: 220px; }
  .logo-text { font-size: 16px; }
  .confidence-widget { padding: 14px 16px; }
  #main, main { padding: 20px 22px !important; }
  .phase-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; }
  h1 { font-size: clamp(26px, 4vw, 36px); }
  .dashboard-greeting, .overview-greeting { font-size: clamp(24px, 4vw, 32px); }
}

/* Mobile — sidebar stacks above content */
@media (max-width: 760px) {
  #app {
    flex-direction: column !important;
    min-height: auto;
  }
  #sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-height: none;
    border-right: none !important;
    border-bottom: 1px solid var(--sidebar-border) !important;
    overflow-y: visible;
  }
  .sidebar-header { padding: 14px 18px 12px; }
  .confidence-widget { padding: 14px 18px; gap: 12px; }
  .confidence-ring-wrap { width: 56px; height: 56px; }
  #confidence-pct { font-size: 16px; }

  .phase-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
  }
  .nav-item {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px !important;
    font-size: 12px;
    justify-content: flex-start;
  }
  .nav-item .nav-name { font-size: 12px; }
  .nav-item .nav-phase-num { font-size: 8px; letter-spacing: 0.12em; }

  #main, main { padding: 18px 16px !important; }
  #content { padding: 0; }

  .phase-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .dashboard-greeting, .overview-greeting { font-size: 24px; }
  .section-title, .overview-section h2 { font-size: 20px; }

  .next-action-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .next-action-item .action-meta { align-self: flex-end; }

  .task-item, .task-row { padding: 12px 14px !important; font-size: 13px; }
  .task-detail, .task-example { font-size: 12px; }

  .modal, .celebration-inner {
    padding: 24px 20px !important;
    max-width: 92vw;
  }
  .modal-title, .cel-title { font-size: 22px; }
  .modal-desc, .cel-sub { font-size: 12px; }

  .btn-primary, .btn-secondary, .btn-ghost {
    padding: 11px 18px !important;
    font-size: 12px !important;
  }

  .vc-insight, .insight-card { padding: 14px 16px !important; font-size: 12.5px; }

  .landing-back-bar {
    padding: 8px 14px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .landing-back-bar .meta { display: none; }

  .metric-value, .metric-n { font-size: 26px; }
}

/* Very small phones */
@media (max-width: 420px) {
  #main, main { padding: 14px 12px !important; }
  .phase-card-name { font-size: 20px; }
  .modal, .celebration-inner { padding: 20px 16px !important; }
}
