/* ══════════════════════════════════════════
   VENTANO — DARK CHARCOAL + PURPLE REDESIGN
   Modern glassmorphism dashboard
══════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --bg-base: #0c0b14;
  --bg-surface: #13121d;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.06);
  --bg-input-focus: rgba(255,255,255,0.1);
  --border-subtle: rgba(255,255,255,0.06);
  --border-card: rgba(255,255,255,0.08);
  --border-glow: rgba(139,92,246,0.3);
  --text-primary: #f0eef6;
  --text-secondary: rgba(255,255,255,0.55);
  --text-muted: rgba(255,255,255,0.35);
  --purple-accent: #8b5cf6;
  --purple-glow: rgba(139,92,246,0.15);
  --purple-deep: #2a2355;
  --purple-mid: #7b75b0;
  --green: #34d399;
  --green-dim: rgba(52,211,153,0.15);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.15);
  --neon-green: #39ff14;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(139,92,246,0.08);
  --shadow-modal: 0 24px 80px rgba(0,0,0,0.5);
  --glass-blur: blur(20px);
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ── */
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden}

.dash {
  font-family: var(--font);
  background: var(--bg-base);
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
}

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

.dash > * { position: relative; z-index: 1; }

/* ── PAGE SYSTEM ── */
.page{display:none;flex-direction:column;flex:1;min-height:0;overflow-y:auto !important;}
.page.active{display:flex;animation:pageEnter 0.34s cubic-bezier(0.22,1,0.36,1) both;}
@keyframes pageEnter{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}
@media (prefers-reduced-motion: reduce){.page.active{animation:none;}}

/* ── AUTH PAGES ── */
.auth-page{align-items:center;justify-content:center;background:var(--bg-base);}
.auth-landing-page{
  justify-content:flex-start;
  padding-top:clamp(70px, 12vh, 108px);
}

.auth-title {
  color: var(--text-primary);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.auth-landing-page .auth-title {
  margin-bottom: 10px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 34px;
  text-align: center;
  max-width: min(520px, 86vw);
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  width: min(480px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp 0.5s ease forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 18px;
  font-size: clamp(15px, 1.7vw, 18px);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.auth-btn:hover::after { opacity: 1; }
.auth-btn:active { transform: scale(0.98); }

.auth-btn.purple {
  background: linear-gradient(135deg, var(--purple-accent), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.auth-btn.purple:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.auth-btn.black {
  background: #fff;
  color: #0c0b14;
}
.auth-btn.black:hover {
  background: #f0eef6;
  transform: translateY(-1px);
}

.auth-btn.google {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.auth-btn.google:hover { background: var(--bg-input-focus); }

.auth-btn.ghost {
  background: none;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.5vw, 16px);
  padding: 10px;
  font-weight: 500;
}
.auth-btn.ghost:hover { color: var(--text-primary); }

.welcome-info-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 700;
  margin-top: 22px;
  padding: 8px 10px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.welcome-info-link:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.what-is-page {
  justify-content: flex-start;
  padding: clamp(26px, 5vw, 52px);
}

.what-is-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 34px;
}

.what-is-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font);
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 800;
  padding: 8px 0;
}

.what-is-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(139,92,246,0.16), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025));
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 30px;
  box-shadow: var(--shadow-card);
  padding: clamp(30px, 6vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.what-is-hero h1 {
  color: var(--text-primary);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 760px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.what-is-hero-copy > p {
  color: var(--text-secondary);
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 650;
  line-height: 1.55;
  max-width: 670px;
  position: relative;
  z-index: 1;
}

.what-is-preview {
  position: relative;
  z-index: 1;
  min-height: 330px;
  border-radius: 26px;
  padding: 16px;
  background:
    radial-gradient(circle at 14% 62%, rgba(52,211,153,0.16), transparent 34%),
    linear-gradient(155deg, rgba(16,15,25,0.98), rgba(20,19,31,0.92));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 70px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.what-is-preview::before {
  content: '';
  position: absolute;
  inset: auto -20% -28% 18%;
  width: 280px;
  height: 180px;
  border-radius: 999px;
  background: rgba(139,92,246,0.12);
  filter: blur(36px);
  pointer-events: none;
}

.preview-dash-top {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.preview-dash-select {
  min-height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
  line-height: 1.1;
}

.preview-dash-select > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-chevron {
  color: var(--text-secondary);
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.preview-dash-title {
  color: var(--text-primary);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
}

.preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-avatar svg {
  width: 23px;
  height: 23px;
  display: block;
}

.preview-dash-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  flex: 1;
}

.preview-profit-card,
.preview-goals-card,
.preview-module-row span {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
}

.preview-profit-card {
  min-height: 176px;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.preview-profit-line {
  height: 74px;
  border-radius: 14px;
  background:
    linear-gradient(345deg, transparent 0 44%, rgba(52,211,153,0.92) 44% 50%, transparent 50%),
    radial-gradient(circle at 30% 62%, rgba(52,211,153,0.2), transparent 56%);
}

.preview-profit-card p {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 4px;
}

.preview-profit-card strong {
  display: block;
  color: var(--green);
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
}

.preview-profit-card span {
  display: block;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 900;
  margin-top: 6px;
}

.preview-goals-card {
  min-height: 176px;
  padding: 16px;
  overflow: hidden;
}

.preview-goals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.preview-goals-head strong {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.preview-goals-head span {
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid rgba(52,211,153,0.22);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  padding: 5px 9px;
}

.preview-goal-row {
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.preview-goal-row p {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 900;
}

.preview-goal-row b {
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
}

.preview-goal-row i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #70ff4f, #67d4a0);
}

.preview-module-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.preview-module-row span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.what-is-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
}

.what-is-feature {
  background: linear-gradient(150deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid var(--border-card);
  border-radius: 24px;
  height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-med), border-color var(--transition-med), background var(--transition-med);
}

.what-is-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,0.38);
  background: linear-gradient(150deg, rgba(139,92,246,0.13), rgba(255,255,255,0.035));
}

.feature-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.what-is-feature h2 {
  color: var(--text-primary);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-top: auto;
}

.what-is-feature p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  margin-top: 14px;
}

.what-is-close {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.what-is-close .auth-btn {
  width: 100%;
  min-width: 0;
}

.auth-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: clamp(15px, 1.7vw, 17px);
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  width: 100%;
  transition: all var(--transition-med);
}
.auth-input:focus {
  border-color: var(--purple-accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.auth-input::placeholder { color: var(--text-muted); }

.auth-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: clamp(15px, 1.7vw, 17px);
  font-family: var(--font);
  color: var(--text-secondary);
  outline: none;
  width: 100%;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.auth-select option { background: #1e1b2e; color: #fff; }

.forgot-text {
  text-align: center;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
}

/* Hustle tiles */
.hustle-tile {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-med);
  font-family: var(--font);
  user-select: none;
}
.hustle-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.hustle-tile.selected {
  background: var(--purple-accent);
  border-color: var(--purple-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* ══════════════════════════════════════════
   MAIN DASHBOARD
══════════════════════════════════════════ */
.dash-page { padding: 36px 56px; }

.title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0;
  margin-bottom: 32px;
  flex-shrink: 0;
}

.title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  width: min(720px, calc(100% - 560px));
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User icon */
.user-icon-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  padding: 8px;
  line-height: 0;
  transition: all var(--transition-med);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 0 16px rgba(139,92,246,0.1);
}
.user-icon-btn svg { width: 24px; height: 24px; }

/* ── DASHBOARD SELECTOR ── */
.dash-sel-wrap {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
}

.dash-sel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: clamp(14px,1.4vw,17px);
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: all var(--transition-med);
  white-space: nowrap;
  width: clamp(160px,18vw,210px);
  min-height: 46px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}
.dash-sel-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-sel-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--border-glow);
}
.dash-sel-btn[aria-expanded="true"] {
  border-color: rgba(139,92,246,0.55);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.16), 0 12px 28px rgba(0,0,0,0.2);
}
.dash-sel-btn svg {
  flex-shrink: 0;
  opacity: 0.68;
  transition: transform var(--transition-fast);
}
.dash-sel-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.dash-sel-popup {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 12px;
  width: clamp(280px,30vw,360px);
  max-height: min(420px, calc(100vh - 140px));
  overflow-y: auto;
  z-index: 500;
  box-shadow: var(--shadow-modal);
  animation: popIn 0.18s ease;
  flex-direction: column;
  gap: 6px;
}
.dash-sel-popup.open { display: flex; }

.dash-sel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: clamp(14px,1.5vw,16px);
  font-weight: 650;
  color: var(--text-secondary);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  width: 100%;
  min-height: 48px;
  cursor: pointer;
}
.dash-sel-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.dash-sel-item.active {
  background: rgba(139,92,246,0.22);
  border-color: rgba(139,92,246,0.32);
  color: var(--purple-accent);
  font-weight: 800;
}
.dash-sel-item:focus-visible,
.dash-sel-new:focus-visible,
.dash-sel-btn:focus-visible {
  outline: 3px solid rgba(139,92,246,0.35);
  outline-offset: 2px;
}

.dash-sel-item-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
}
.dash-sel-item.active .dash-sel-item-name,
.dash-sel-item-name:hover { color: inherit; }
.dash-sel-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-sel-item-meta {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-sel-item.active .dash-sel-item-meta {
  color: rgba(244,240,255,0.66);
}

.dash-sel-rename {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(139,92,246,0.2);
  cursor: pointer;
  color: var(--purple-accent);
  width: auto;
  min-width: 62px;
  height: 28px;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  opacity: 1;
  padding: 0 10px;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}
.dash-sel-rename:hover {
  color: var(--purple-accent);
  border-color: rgba(139,92,246,0.42);
  background: rgba(139,92,246,0.16);
}

.team-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.team-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(18,18,28,0.92));
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 22px;
  padding: 22px 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 40px rgba(0,0,0,0.18);
}
.team-kicker {
  color: var(--purple-accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.team-overview h2 {
  color: var(--text-primary);
  font-size: clamp(20px,2.2vw,30px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 7px;
}
.team-overview p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  max-width: 680px;
}
.team-grid {
  display: grid;
  grid-template-columns: minmax(300px,0.9fr) minmax(420px,1.35fr);
  gap: 18px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.team-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}
.team-card {
  background: linear-gradient(145deg, rgba(20,20,31,0.98), rgba(14,14,23,0.98));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 18px 40px rgba(0,0,0,0.16);
  padding: 24px 26px;
}
.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.team-card-label {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 5px;
}
.team-card-copy,
.team-empty-copy {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.team-count-pill {
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.28);
  border-radius: 999px;
  color: var(--text-primary);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 11px;
  white-space: nowrap;
}
.team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.team-members-card,
.team-teams-card {
  min-height: 320px;
}
.team-members-list,
.team-share-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 3px;
}
.team-share-card {
  min-height: 300px;
}
.team-empty-state {
  align-items: center;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 16px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}
.team-empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}
.team-invite-row,
.team-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.team-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text-primary);
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 750;
  min-width: 0;
  outline: none;
  padding: 13px 15px;
}
.team-input:focus {
  border-color: rgba(139,92,246,0.5);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.13);
}
.team-primary-action,
.team-secondary-action {
  align-items: center;
  border-radius: 13px;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.team-primary-action {
  background: linear-gradient(135deg, #5c3bb1, #2a2355);
  border: 1px solid rgba(139,92,246,0.42);
  color: var(--text-primary);
}
.team-secondary-action {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-primary);
}
.team-primary-action:hover,
.team-secondary-action:hover {
  transform: translateY(-1px);
  border-color: rgba(139,92,246,0.56);
}
.team-inline-msg {
  color: var(--text-muted);
  display: none;
  font-size: 12px;
  font-weight: 800;
  margin-top: 10px;
}
.team-card-row,
.team-member-row,
.team-share-row {
  align-items: center;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  display: flex;
  gap: 13px;
  padding: 13px 14px;
}
.team-card-row {
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.team-card-row:hover,
.team-card-row.selected {
  background: rgba(139,92,246,0.16);
  border-color: rgba(139,92,246,0.42);
  transform: translateY(-1px);
}
.team-avatar {
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  color: var(--text-primary);
  display: flex;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.team-row-main {
  flex: 1;
  min-width: 0;
}
.team-row-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-row-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-status-pill {
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
}
.team-remove-btn,
.team-danger-action {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.18);
  border-radius: 10px;
  color: #ff8b8b;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 11px;
}
.team-remove-btn {
  font-size: 16px;
  line-height: 1;
  padding: 7px 10px;
}
.team-share-row {
  background: rgba(255,255,255,0.06);
  justify-content: space-between;
}
.team-share-row.is-shared {
  background: rgba(139,92,246,0.14);
  border-color: rgba(139,92,246,0.28);
}
.team-share-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex: 1;
  gap: 12px;
  min-width: 0;
}
.team-share-checkbox {
  display: none;
}
.team-share-check {
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  display: flex;
  flex-shrink: 0;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.team-share-checkbox:checked + .team-share-check {
  background: #8b5cf6;
  border-color: #8b5cf6;
}
.team-share-checkbox:checked + .team-share-check::after {
  color: white;
  content: "✓";
  font-size: 15px;
  font-weight: 950;
}
.team-share-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.team-share-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-share-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}
.team-share-access {
  background: rgba(10,10,18,0.92);
  border: 1px solid rgba(139,92,246,0.32);
  border-radius: 12px;
  color: var(--text-primary);
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 900;
  outline: none;
  padding: 10px 12px;
}
.team-share-access:disabled {
  color: var(--text-muted);
  opacity: 0.66;
}

.team-shared-dashboard-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(255,255,255,0.055));
  border: 1px solid rgba(139,92,246,0.34);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 28px rgba(0,0,0,0.16);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.team-shared-dashboard-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9b6cff, #31e69f);
}
.team-shared-dashboard-card:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.24), rgba(255,255,255,0.07));
  border-color: rgba(139,92,246,0.48);
  transform: translateY(-1px);
}
.team-shared-dashboard-card:focus-visible {
  outline: 3px solid rgba(139,92,246,0.35);
  outline-offset: 2px;
}
.team-shared-dashboard-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(139,92,246,0.22);
  border: 1px solid rgba(139,92,246,0.32);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 900;
}
.team-shared-dashboard-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.team-shared-dashboard-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-shared-dashboard-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-shared-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.team-shared-dashboard-badge {
  color: #d9ccff;
  background: rgba(139,92,246,0.18);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}
.team-shared-dashboard-open {
  color: var(--purple-accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dash-sel-delete {
  background: rgba(255,255,255,0.06);
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}
.dash-sel-item:hover .dash-sel-delete { opacity: 1; }
.dash-sel-delete:hover {
  color: var(--red);
  border-color: rgba(239,68,68,0.26);
}

.dash-sel-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 2px 4px;
  flex-shrink: 0;
}

.dash-sel-new {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--purple-accent);
  font-family: var(--font);
  font-size: clamp(14px,1.5vw,16px);
  font-weight: 750;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  width: 100%;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.dash-sel-new:hover {
  background: var(--purple-glow);
  border-color: rgba(139,92,246,0.24);
}

/* ── SITE DIALOGS ── */
.site-dialog-backdrop,
.upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 4, 12, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
}

.site-dialog-backdrop.open,
.upgrade-modal-backdrop.open {
  display: flex;
}

.site-dialog-card,
.upgrade-modal-card {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  background: #171622;
  border: 1px solid rgba(139,92,246,0.34);
  border-radius: 26px;
  box-shadow: var(--shadow-modal), inset 0 1px 0 rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-family: var(--font);
  padding: 30px;
}

.site-dialog-kicker,
.upgrade-modal-kicker {
  color: var(--purple-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.site-dialog-title,
.upgrade-modal-title {
  color: var(--text-primary);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
  text-align: left;
}

.site-dialog-message,
.upgrade-modal-reason {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 14px 0 0;
}

.site-dialog-input {
  width: 100%;
  margin-top: 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  outline: none;
  padding: 16px 18px;
  transition: all var(--transition-med);
}

.site-dialog-input:focus {
  border-color: rgba(139,92,246,0.72);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.16);
}

.site-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 26px;
}

.site-dialog-btn,
.upgrade-modal-btn {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 22px;
  transition: all var(--transition-med);
}

.site-dialog-btn.secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.site-dialog-btn.primary,
.upgrade-modal-btn {
  background: linear-gradient(135deg, var(--purple-accent), #7c3aed);
  color: #fff;
  box-shadow: 0 12px 28px rgba(124,58,237,0.22);
}

.site-dialog-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.site-dialog-btn:hover,
.upgrade-modal-btn:hover {
  transform: translateY(-1px);
}

/* Non-blocking toasts (success/error/info). Stack bottom-center, auto-dismiss. */
#toast-host {
  position: fixed;
  z-index: 100000;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #171622;
  border: 1px solid var(--border-card);
  border-left: 3px solid var(--purple-accent);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  padding: 13px 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}
.toast-msg { min-width: 0; }
.toast-success { border-left-color: var(--green); }
.toast-success .toast-icon { background: var(--green); color: #06281c; }
.toast-error { border-left-color: var(--red); }
.toast-error .toast-icon { background: var(--red); color: #2c0a0a; }
.toast-info { border-left-color: var(--purple-accent); }
.toast-info .toast-icon { background: var(--purple-accent); }
@media (max-width: 560px) {
  #toast-host { bottom: 16px; max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s ease; transform: none; }
  .toast.show { transform: none; }
}

.upgrade-modal-card {
  width: min(560px, 100%);
  padding: 34px;
}

.upgrade-modal-icon {
  align-items: center;
  background: rgba(139,92,246,0.16);
  border: 1px solid rgba(139,92,246,0.28);
  border-radius: 18px;
  color: #f8fafc;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  width: 52px;
}

.upgrade-modal-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.upgrade-modal-list li {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 10px;
  line-height: 1.35;
}

.upgrade-modal-list li::before {
  color: var(--purple-accent);
  content: "✓";
  font-size: 18px;
  font-weight: 900;
}

.upgrade-modal-price {
  color: var(--text-primary);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 26px 0 20px;
  text-align: center;
}

.upgrade-modal-price span {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 700;
}

.upgrade-modal-btn {
  width: 100%;
}

.upgrade-modal-later {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: block;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  margin: 16px auto 0;
}

.strat-business { grid-column: 1; grid-row: 1; }
.strat-chat     { grid-column: 2; grid-row: 1 / 3; }
.strat-prompts  { grid-column: 1; grid-row: 2; }

@media (max-width: 720px) {
  .strat-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    gap: 16px;
    overflow-y: visible;
    min-height: 0;
  }
  .strat-business { order: 1; }
  .strat-chat { order: 2; min-height: 360px; }
  .strat-chat #strat-messages { flex: 1; min-height: 0; }
  .strat-prompts { order: 3; }
  .title-row {
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100px;
    padding: 0;
  }
  .title {
    position: static;
    transform: none;
    width: 100%;
    padding: 0 56px;
    text-align: center;
  }
  .dash-sel-wrap {
    bottom: 0;
    left: 0;
    top: auto;
    transform: none;
  }
  .dash-sel-btn {
    width: min(calc(100vw - 112px), 280px);
    min-height: 42px;
    padding: 8px 12px;
  }
  .dash-sel-popup {
    left: 0;
    width: min(calc(100vw - 32px), 360px);
  }
  .user-icon-btn {
    top: auto;
    bottom: 0;
    transform: none;
  }
  .team-overview,
  .team-invite-row,
  .team-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .team-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .team-column {
    overflow: visible;
  }
  .team-share-row {
    align-items: stretch;
    flex-direction: column;
  }
  .team-share-access {
    width: 100%;
  }
  .team-shared-dashboard-card {
    align-items: flex-start;
  }
  .team-shared-dashboard-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
}

@media (hover: none) {
  .dash-sel-rename,
  .dash-sel-delete {
    opacity: 0.8;
  }
}

.user-popup {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px 16px;
  min-width: 260px;
  z-index: 200;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.user-popup.open { display: flex; }
.popup-email { font-size: 14px; color: var(--text-secondary); font-weight: 500; margin-bottom: 14px; }
.plan-badge-row {
  display: flex;
  justify-content: flex-start;
  margin: -2px 0 10px;
}
.plan-badge-pill {
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  padding: 5px 13px;
}
.plan-badge-pill.pro {
  background: #7b75b0;
  color: #fff;
}
.plan-badge-pill.free {
  background: rgba(255,255,255,0.12);
  color: var(--text-secondary);
}
.popup-item {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  padding: 10px 0;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  width: 100%;
  display: block;
  transition: color var(--transition-fast);
}
.popup-item:hover { color: var(--purple-accent); }
.popup-divider { height: 1px; background: var(--border-subtle); margin: 6px 0; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 0.4s ease both;
}

.clickable-card {
  cursor: pointer;
  position: relative;
}

.clickable-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(139,92,246,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
  z-index: 1;
}

.clickable-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
}
.clickable-card:hover::before { opacity: 1; }
.clickable-card:active { transform: translateY(-1px) scale(0.99); }

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Dashboard nav card icons */
.card svg, .clickable-card svg {
  transition: all var(--transition-med);
}
.clickable-card:hover svg {
  stroke: var(--purple-accent) !important;
  filter: drop-shadow(0 0 8px rgba(139,92,246,0.3));
}

/* ── GRID LAYOUTS ── */
.grid {
  display: grid;
  grid-template-columns: 0.75fr 0.75fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 60px;
  flex: 1;
  min-height: 0;
}
.profit-card { grid-column: span 2; flex-direction: row; align-items: center; }
.goals-card { grid-column: span 2; }

/* ── PROFIT CARD ── */
.profit-chart-wrap { flex: 0 0 38%; height: 70%; }
.profit-chart-wrap svg { width: 100%; height: 100%; }
.profit-info { flex: 1; padding-left: 12px; display: flex; flex-direction: column; justify-content: center; }
.profit-info .lbl { font-size: 14px; color: var(--text-secondary); font-weight: 500; margin-bottom: 5px; }
.profit-info .amt { font-size: clamp(24px, 2.8vw, 40px); font-weight: 800; color: var(--green); line-height: 1; margin-bottom: 7px; }
.profit-info .more { font-size: 14px; color: var(--text-secondary); font-weight: 600; }
.home-profit-visual {
  align-items: center;
  display: flex;
  flex: 0 0 52%;
  flex-direction: column;
  gap: 10px;
  height: 92%;
  justify-content: center;
  min-width: 0;
  padding-right: 8px;
}
.home-profit-graph {
  height: min(160px, 92%);
  max-width: 260px;
  overflow: visible;
  width: 100%;
  color: var(--green);
}
.home-chart-area {
  fill: url(#home-chart-grad);
  stroke: none;
  transition: d 0.4s ease;
}
.home-chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: d 0.4s ease, stroke 0.25s ease;
}
.home-chart-dot {
  fill: currentColor;
  transition: cx 0.4s ease, cy 0.4s ease, fill 0.25s ease;
}
.home-chart-dot-glow {
  fill: currentColor;
  opacity: 0.28;
  transition: cx 0.4s ease, cy 0.4s ease, opacity 0.25s ease;
}
.home-profit-graph.loss { color: var(--red); }
.home-profit-graph.neutral { color: rgba(255,255,255,0.5); }
.home-profit-graph.neutral .home-chart-dot-glow { opacity: 0.14; }

/* Empty state (no sessions yet): a faint upward "ghost" trend instead of a
   flat dead line, in the brand green->purple blend. */
.home-profit-graph.empty .home-chart-line {
  stroke: url(#home-chart-ghost);
  stroke-dasharray: 5 6;
  animation: ghostPulse 2.6s ease-in-out infinite;
}
.home-profit-graph.empty .home-chart-area { fill: url(#home-chart-ghost); opacity: 0.08; }
.home-profit-graph.empty .home-chart-dot { fill: #8b5cf6; opacity: 0.75; }
.home-profit-graph.empty .home-chart-dot-glow { fill: #8b5cf6; opacity: 0.16; }
@keyframes ghostPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.72; } }
@media (prefers-reduced-motion: reduce) {
  .home-profit-graph.empty .home-chart-line { animation: none; opacity: 0.6; }
}
/* Animate the "Add a new session" column in when Financials opens */
@keyframes finAddSessionIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
#fin-addsession-col.animate-in { animation: finAddSessionIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── GOAL PROGRESS ── */
.goals-inner { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.goals-amt { font-size: clamp(16px, 1.8vw, 22px); font-weight: 600; color: var(--text-primary); }
.goals-amt strong { font-weight: 700; }
.goals-amt span { font-weight: 400; font-size: clamp(13px, 1.2vw, 15px); color: var(--text-secondary); }
.prog-track { background: rgba(255,255,255,0.08); border-radius: 999px; height: 12px; overflow: hidden; margin-top: 12px; }
.prog-fill { background: var(--neon-green); height: 100%; border-radius: 999px; width: 54%; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
/* ── HOME 3-COLUMN LAYOUT ── */
.home-grid { display: grid; grid-template-columns: clamp(258px, 23vw, 320px) minmax(0,1fr) clamp(258px, 23vw, 320px); gap: clamp(14px, 1.6vw, 24px); flex: 1; min-height: 0; }
.home-col { display: flex; flex-direction: column; gap: 24px; min-height: 0; }
.home-profit-card { flex: 0 0 auto; }
.home-grid .home-goals-card { flex: 1; }
.home-nav-card { flex: 1; }
.home-nav-card .card-title { font-size: clamp(16px,1.5vw,20px); }
.home-nav-card svg { width: 60px !important; height: 60px !important; }
/* Sessions feed */
.home-feed-card { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; }
.home-feed-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.home-feed-header p { margin: 0; color: var(--text-primary); font-size: clamp(20px,2.2vw,26px); font-weight: 800; letter-spacing: -0.3px; }
.home-feed-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; flex: 1; padding-right: 4px; }
.home-sess { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.home-sess-l { min-width: 0; }
.home-sess-nm { color: var(--text-primary); font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-sess-meta { color: var(--text-secondary); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-sess-r { text-align: right; flex-shrink: 0; }
.home-sess-pf { font-size: 16px; font-weight: 800; }
.home-sess-pf.pos { color: var(--green); }
.home-sess-pf.neg { color: var(--red); }
.home-sess-rc { color: var(--text-secondary); font-size: 11px; margin-top: 2px; }
.home-viewfin { flex-shrink: 0; background: none; border: none; cursor: pointer; font-family: var(--font); text-align: center; color: var(--text-primary); font-size: clamp(14px,1.5vw,16px); font-weight: 700; padding: 4px; }
.home-viewfin:hover { color: var(--purple-accent); }

.home-goals-card { grid-column: auto !important; padding: 24px 28px !important; gap: 16px; justify-content: flex-start; min-height: 0; }
.home-goals-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.home-goals-title { color: var(--text-primary); font-size: clamp(17px,1.9vw,23px); font-weight: 800; letter-spacing: -0.4px; }
.home-goals-count { color: var(--green); background: var(--green-dim); border: 1px solid rgba(52,211,153,0.2); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.home-goals-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; flex: 1; padding-right: 4px; }
.home-goal-item { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; flex-shrink: 0; }
.home-goal-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.home-goal-name { color: var(--text-primary); font-size: clamp(14px,1.45vw,17px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-goal-percent { color: var(--green); font-size: clamp(15px,1.7vw,20px); font-weight: 900; flex-shrink: 0; }
.home-goal-meta { color: var(--text-secondary); font-size: 12px; font-weight: 650; display: flex; justify-content: space-between; gap: 10px; }
.home-goal-track { background: rgba(255,255,255,0.09); border-radius: 999px; height: 9px; overflow: hidden; }
.home-goal-fill { background: linear-gradient(90deg,var(--neon-green),var(--green)); border-radius: inherit; height: 100%; transition: width 0.6s ease; }
.home-goal-empty { color: var(--text-secondary); border: 1px dashed var(--border-card); border-radius: 14px; padding: 28px 16px; text-align: center; font-size: 14px; font-weight: 650; min-height: 90px; flex: 1; display: flex; align-items: center; justify-content: center; }
.overview-goals-panel { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: 18px; padding: 22px 24px; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.overview-goals-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.overview-goals-title { color: var(--text-primary); font-size: 18px; font-weight: 800; }
.overview-goals-grid { display: grid; grid-template-columns: 1fr; gap: 12px; overflow-y: auto; min-height: 0; flex: 1; padding-right: 4px; align-content: start; }
.overview-goals-grid .goal-card-full { min-height: 150px; cursor: pointer; }
.overview-goals-empty { flex: 1; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px dashed var(--border-card); border-radius: var(--radius-lg); color: var(--text-secondary); text-align: center; }

/* ── PAGE HEADERS ── */
.page-header { display: flex; align-items: center; margin-bottom: 28px; flex-shrink: 0; }
.back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.back-btn:hover { color: var(--purple-accent); }

/* ── STATS PAGE ── */
.stats-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; flex: 1; min-height: 0; }
.stats-left { display: flex; flex-direction: column; gap: 20px; }
.chart-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 16px; flex: 1.4; }
.pies-row { display: flex; gap: 24px; flex: 1; }
.pie-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 16px; flex: 1; display: flex; align-items: center; justify-content: center; }
.stats-right {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stats-text { font-size: clamp(15px, 1.6vw, 20px); color: var(--text-primary); line-height: 1.6; }
.stats-text p+p { margin-top: 18px; }
.stats-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 15px;
  width: 100%;
  outline: none;
  font-family: var(--font);
  color: var(--text-primary);
  margin-top: 20px;
  transition: all var(--transition-med);
}
.stats-input:focus { border-color: var(--purple-accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }

/* ── SCHEDULE ── */
.schedule-body { flex: 1; min-height: 0; display: flex; gap: 20px; }
.cal-wrap {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.cal-month { font-size: clamp(18px, 2vw, 24px); font-weight: 700; color: var(--text-primary); }
.cal-month span { font-weight: 400; color: var(--text-secondary); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.cal-nav-btn:hover { border-color: var(--border-glow); color: var(--text-primary); }
.cal-today-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font);
  transition: all var(--transition-fast);
}
.cal-today-btn:hover { border-color: var(--border-glow); color: var(--text-primary); }

.cal-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-shrink: 0; background: var(--bg-input); padding: 4px; border-radius: var(--radius-sm); }
.cal-tab {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cal-tab.active { background: var(--purple-accent); color: #fff; }
.cal-tab:hover:not(.active) { color: var(--text-primary); }

.cal-grid-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cal-days-header { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; flex-shrink: 0; }
.cal-day-label { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 4px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.cal-dates { display: grid; grid-template-columns: repeat(7, 1fr); flex: 1; gap: 2px; }
.cal-date {
  border-top: 1px solid var(--border-subtle);
  padding: 6px 8px;
  font-size: clamp(11px, 1.1vw, 13px);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: background var(--transition-fast);
  border-radius: 4px;
}
.cal-date:hover { background: var(--bg-card-hover); }
.cal-date.other-month { opacity: 0.35; }
.cal-date.today .date-num { background: var(--purple-accent); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.date-num { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.cal-date.has-note { background: var(--purple-glow); }
.cal-date.has-note .date-num { color: var(--purple-accent); font-weight: 700; }
.note-dot { width: 5px; height: 5px; background: var(--purple-accent); border-radius: 50%; margin-top: 2px; }
#cal-side { background: var(--bg-card) !important; backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg) !important; }

/* ── FINANCIALS ── */
.fin-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.fin-statement { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 36px 44px; width: min(680px, 100%); display: flex; flex-direction: column; }
.fin-statement-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 28px; }
.fin-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); position: relative; transition: background-color var(--transition-fast); border-radius: 6px; }
.fin-row:last-child { border-bottom: none; }
.fin-row:hover { background-color: var(--bg-card-hover); }
.fin-row.profit-row { margin-top: 8px; border-top: 2px solid var(--purple-accent); border-bottom: none; padding-top: 22px; }
.fin-label { font-size: clamp(14px, 1.5vw, 18px); color: var(--text-secondary); font-weight: 500; }
.fin-value { font-size: clamp(15px, 1.6vw, 20px); font-weight: 700; }
.fin-value.green { color: var(--green); }
.fin-value.red { color: var(--red); }
.fin-value.big { font-size: clamp(18px, 2vw, 26px); font-weight: 800; }
.fin-bar-wrap { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.fin-bar { height: 100%; border-radius: 999px; }
.fin-session-card { position: relative; overflow: hidden; background: #26252d; border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; box-shadow: 0 18px 48px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med); }
.fin-session-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)); pointer-events: none; }
.fin-session-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.18); box-shadow: 0 22px 54px rgba(0,0,0,0.38); }
.fin-session-head, .fin-metric-row, .fin-profit-row { position: relative; z-index: 1; }
.fin-session-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.fin-summary-title { color: var(--text-primary); font-size: clamp(15px,1.45vw,18px); font-weight: 800; letter-spacing: -0.2px; }
.fin-summary-pill { background: rgba(139,92,246,0.2); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.28); border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; white-space: nowrap; }
.fin-metric-row { display: grid; grid-template-columns: minmax(92px, 0.7fr) minmax(120px, 1fr) auto; align-items: center; gap: 14px; padding: 2px 0; }
.fin-metric-label { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.fin-metric-value { font-size: clamp(15px,1.6vw,20px); font-weight: 900; letter-spacing: -0.25px; text-align: right; }
.fin-metric-value.green, .fin-profit-value.green { color: #4ade80; }
.fin-metric-value.red, .fin-profit-value.red { color: #fb7185; }
.fin-progress-track { height: 8px; background: rgba(255,255,255,0.11); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.fin-progress-fill { height: 100%; border-radius: inherit; min-width: 3px; transition: width .4s ease; }
.fin-progress-fill.green { background: linear-gradient(90deg,#34d399,#4ade80); }
.fin-progress-fill.red { background: linear-gradient(90deg,#f43f5e,#fb7185); }
.fin-profit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; margin-top: 2px; }
.fin-profit-label { color: var(--text-primary); font-size: 14px; font-weight: 800; }
.fin-profit-value { font-size: clamp(24px,2.8vw,36px); font-weight: 900; letter-spacing: -0.8px; text-align: right; }
.cal-cell { background: var(--bg-input); border-radius: 4px; aspect-ratio: 1.6; }
.fin-line { background: var(--bg-input); border-radius: 4px; height: clamp(9px, 1.1vh, 14px); }
.fin-lines { display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: center; }
.mkt-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 7px; flex: 1; }
.mkt-cell { background: var(--bg-input); border-radius: 7px; }

/* Financial/marketing tabs */
button[id^="fin-tab-"], button[id^="mkt-tab-"] {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: all var(--transition-fast) !important;
}
button[id^="fin-tab-"].active,
button[id^="mkt-tab-"].active {
  background: var(--purple-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

#financials-page .page-header {
  margin-bottom: 18px;
}

#financials-page .page-header + div,
#marketing-page .page-header + div {
  display: flex !important;
  gap: 4px !important;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 32px !important;
  padding: 6px;
  background: var(--bg-input);
  border: none;
  border-radius: 18px;
  overflow-x: auto;
}

#financials-page button[id^="fin-tab-"],
#marketing-page button[id^="mkt-tab-"] {
  flex: 0 0 auto !important;
  min-height: 0;
  padding: 11px 32px !important;
  font-size: clamp(14px,1.45vw,18px) !important;
  font-weight: 750 !important;
  white-space: nowrap;
}

#financials-page button[id^="fin-tab-"]:hover,
#marketing-page button[id^="mkt-tab-"]:hover {
  color: var(--text-primary) !important;
}

#financials-page button[id^="fin-tab-"].active,
#marketing-page button[id^="mkt-tab-"].active {
  background: var(--purple-accent) !important;
  color: #fff !important;
}

.mkt-report-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card);
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-card);
}

.mkt-report-title {
  color: var(--text-primary) !important;
}

.mkt-report-reset {
  background: var(--bg-input) !important;
  color: var(--purple-accent) !important;
  border: 1px solid var(--border-subtle) !important;
}

.mkt-report-hero,
.mkt-report-hero * {
  color: #fff !important;
}

.mkt-report-hero [style*="color:#4cde80"] {
  color: #4cde80 !important;
}

.mkt-report-hero [style*="color:#e89f3a"] {
  color: #fbbf24 !important;
}

.mkt-report-hero [style*="color:#e8633a"] {
  color: #fb7185 !important;
}

.mkt-report-section {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary) !important;
}

.mkt-report-section-title {
  color: var(--purple-accent) !important;
}

.mkt-report-section-title.green {
  color: #16a34a !important;
}

.mkt-report-text,
.mkt-report-mini-card,
.mkt-report-mini-card * {
  color: var(--text-primary) !important;
}

.mkt-report-mini-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle);
}

.mkt-report-opportunities {
  background: rgba(34,197,94,0.1) !important;
  border-left-color: #16a34a !important;
}

.mkt-loading-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}

.mkt-loading-spinner {
  border-color: rgba(139,92,246,0.18) !important;
  border-top-color: var(--purple-accent) !important;
}

.mkt-loading-copy {
  max-width: 460px;
}

#mkt-loading-text {
  color: var(--text-primary) !important;
}

#mkt-loading-detail {
  color: var(--text-secondary) !important;
  line-height: 1.55;
}

#fin-sessions-col {
  padding: 2px 6px 2px 2px !important;
}

#fin-sessions-col > div,
#fin-placeholder-card {
  background: linear-gradient(180deg, rgba(61,53,112,0.92), rgba(42,35,85,0.9)) !important;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 18px 40px rgba(0,0,0,0.2);
}

#fin-breakdown > div:last-child {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}

#fin-breakdown > div:last-child button {
  background: var(--purple-accent) !important;
  color: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(139,92,246,0.24);
}

#fin-activity > div:first-child button {
  border-radius: 14px !important;
}

#fin-activity > div:last-child,
#fin-forecast > div:not(#fc-empty),
#fc-empty,
#financials-page .ins-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}

#fin-activity > div:last-child,
#fin-forecast > div:not(#fc-empty),
#fc-empty {
  border-radius: 22px !important;
}

#fin-activity table {
  color: var(--text-primary);
}

#fin-activity thead tr {
  background: rgba(139,92,246,0.22) !important;
}

#fin-activity th {
  color: var(--text-primary) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#fin-activity td {
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

#fin-activity tbody tr:hover {
  background: rgba(255,255,255,0.07) !important;
}

#financials-page .ins-card p,
#fin-forecast > div > p:first-child,
.forecast-chart-heading p {
  color: var(--text-primary) !important;
}

.forecast-chart-heading {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
.forecast-chart-heading span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.forecast-line-chart {
  height: 100%;
  min-height: 320px;
  position: relative;
  width: 100%;
}
.forecast-line-chart svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}
.forecast-grid-line {
  stroke: rgba(255,255,255,0.07);
  stroke-width: 1;
}
.forecast-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}
.forecast-confidence-band {
  fill: rgba(52,211,153,0.09);
  stroke: rgba(52,211,153,0.18);
  stroke-width: 1;
}
.forecast-point {
  stroke: rgba(18,18,26,0.96);
  stroke-width: 2.5;
}
.forecast-y-label,
.forecast-end-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
}
.forecast-y-label {
  fill: rgba(255,255,255,0.58);
  text-anchor: end;
}
.forecast-end-label {
  dominant-baseline: middle;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.forecast-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}
.forecast-legend-item {
  align-items: center;
  color: rgba(255,255,255,0.72);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}
.forecast-legend-swatch {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 18px;
}
.forecast-axis-label {
  color: rgba(255,255,255,0.66);
  flex: 1;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.forecast-hover-group .forecast-hover-guide {
  opacity: 0;
  stroke: rgba(255,255,255,0.16);
  stroke-width: 1;
  transition: opacity 0.15s ease;
}
.forecast-hover-hit {
  cursor: crosshair;
  fill: transparent;
  pointer-events: all;
}
.forecast-hover-group:hover .forecast-hover-guide {
  opacity: 1;
}
.forecast-tooltip {
  backdrop-filter: blur(18px);
  background: rgba(18,18,26,0.98);
  border: 1px solid rgba(139,92,246,0.28);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.42);
  color: var(--text-primary);
  font-family: var(--font);
  min-width: 190px;
  opacity: 0;
  padding: 13px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.12s ease;
  z-index: 9999;
}
.forecast-tooltip.show {
  opacity: 1;
}
.forecast-tooltip p {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}
.forecast-tooltip small {
  color: var(--text-secondary);
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  margin: 4px 0 10px;
}
.forecast-tooltip-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 6px;
}
.forecast-tooltip-row span {
  align-items: center;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}
.forecast-tooltip-row i {
  border-radius: 999px;
  display: inline-block;
  height: 7px;
  width: 7px;
}
.forecast-tooltip-row strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.forecast-breakdown-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.forecast-metric-tile {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  min-width: 0;
  padding: 12px 14px;
}
.forecast-metric-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.forecast-metric-value {
  font-size: clamp(15px, 1.45vw, 21px);
  font-weight: 900;
  line-height: 1.1;
  margin-top: 7px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .forecast-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#financials-page .ins-card [style*="color:#111"],
#financials-page [style*="color:#111"] {
  color: var(--text-primary) !important;
}

#financials-page [style*="color:#888"],
#financials-page [style*="color:#999"],
#financials-page [style*="color:#666"] {
  color: var(--text-secondary) !important;
}

#financials-page .ins-slot {
  background: rgba(255,255,255,0.045) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

#financials-page .ins-slot:hover {
  background: rgba(139,92,246,0.14) !important;
  border-color: rgba(139,92,246,0.32) !important;
}

@media (max-width: 900px) {
  #financials-page .page-header + div,
  #marketing-page .page-header + div {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px !important;
    margin-bottom: 28px !important;
  }
  #financials-page button[id^="fin-tab-"],
  #marketing-page button[id^="mkt-tab-"] {
    padding: 10px 22px !important;
  }
  #fin-breakdown {
    flex-direction: column;
    overflow-y: auto !important;
  }
  #fin-breakdown > div {
    width: 100%;
  }
}

/* ── AI PAGE ── */
.ai-page-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ai-chat-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 40px 44px 28px; width: min(700px, 100%); display: flex; flex-direction: column; }
.ai-chat-messages { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 180px; }
.ai-chat-prompt { font-size: clamp(17px, 1.8vw, 22px); font-weight: 500; color: var(--text-secondary); text-align: center; }
.ai-chat-input { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 20px; font-size: 15px; width: 100%; outline: none; font-family: var(--font); color: var(--text-primary); margin-top: 20px; }

/* AI bubbles */
.ai-bubble-assistant { color: var(--text-primary) !important; background: var(--bg-input) !important; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.ai-bubble-assistant * { color: var(--text-primary) !important; }

/* ── SETTINGS ── */
.settings-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 10px; }
.settings-section-title { color: var(--text-primary); font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; margin-bottom: 24px; }
.settings-field { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; max-width: 720px; }
.settings-input { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 20px; font-size: clamp(14px, 1.5vw, 18px); font-family: var(--font); color: var(--text-primary); flex: 1; min-width: 0; outline: none; transition: all var(--transition-med); }
.settings-input:focus { border-color: var(--purple-accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.settings-input[readonly] { cursor: default; }
.settings-input.is-editing { background: rgba(255,255,255,0.1); border-color: rgba(139,92,246,0.58); box-shadow: 0 0 0 3px rgba(139,92,246,0.14); }
.edit-icon-btn { background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.34); border-radius: 14px; color: var(--text-primary); cursor: pointer; flex-shrink: 0; font-family: var(--font); font-size: 14px; font-weight: 800; min-height: 46px; padding: 0 18px; transition: all var(--transition-med); }
.edit-icon-btn:hover:not(:disabled) { background: rgba(139,92,246,0.24); border-color: rgba(139,92,246,0.56); transform: translateY(-1px); }
.edit-icon-btn:disabled { cursor: not-allowed; opacity: 0.42; }
.settings-save-btn { background: linear-gradient(135deg, var(--purple-accent), #7c3aed); border-color: rgba(139,92,246,0.58); color: #fff; }
.settings-cancel-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: var(--text-secondary); }
.settings-saved { color: var(--green); flex-shrink: 0; font-size: 13px; font-weight: 800; opacity: 0; transition: opacity .3s; }
.settings-hustle-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; max-width: 960px; }
.settings-hustle-grid .hustle-tile { border: 1px solid rgba(139,92,246,0.2); min-height: 64px; }
.settings-hustle-grid .hustle-tile.selected { background: var(--purple-deep); border-color: rgba(255,255,255,0.9); box-shadow: 0 0 0 2px rgba(139,92,246,0.22), 0 10px 24px rgba(0,0,0,0.18); }
.settings-custom-row { align-items: center; display: flex; gap: 12px; max-width: 960px; }
.settings-custom-input { background: var(--bg-input) !important; border: 1px solid var(--border-subtle) !important; color: var(--text-primary) !important; flex: 1; min-width: 0; }
.settings-custom-input::placeholder { color: var(--text-muted); }
.settings-industry-saved { margin-top: 8px; }
@media (max-width: 760px) {
  .settings-field,
  .settings-custom-row {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-hustle-grid {
    grid-template-columns: 1fr;
  }
}
.settings-select { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 20px; font-size: clamp(14px, 1.5vw, 18px); font-family: var(--font); color: var(--text-secondary); width: min(380px, 55%); outline: none; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.appearance-row { display: flex; gap: 12px; margin-top: 4px; }
.appear-btn { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 28px; font-size: clamp(14px, 1.5vw, 18px); font-family: var(--font); font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition-med); }
.appear-btn.active { background: var(--purple-accent); border-color: var(--purple-accent); color: #fff; box-shadow: 0 4px 16px rgba(139,92,246,0.3); }
.appear-btn:hover:not(.active) { border-color: var(--border-glow); color: var(--text-primary); }

/* ── HELP PAGE ── */
.help-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding-top: 10px; }
.help-left { display: flex; flex-direction: column; }
.help-section-title { color: var(--text-primary); font-size: clamp(18px, 2vw, 26px); font-weight: 700; margin-bottom: 24px; }
.help-row { display: flex; gap: 16px; margin-bottom: 16px; }
.help-input { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 18px; font-size: clamp(13px, 1.4vw, 16px); font-family: var(--font); color: var(--text-primary); flex: 1; outline: none; transition: all var(--transition-med); }
.help-input:focus { border-color: var(--purple-accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.help-select { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 18px; font-size: clamp(13px, 1.4vw, 16px); font-family: var(--font); color: var(--text-secondary); width: 100%; outline: none; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; margin-bottom: 16px; }
.help-textarea-wrap { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 16px; display: flex; flex-direction: column; transition: all var(--transition-med); }
.help-textarea-wrap:focus-within { border-color: var(--purple-accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.help-textarea { border: none; outline: none; font-family: var(--font); font-size: clamp(13px, 1.4vw, 16px); color: var(--text-primary); resize: none; width: 100%; min-height: 120px; background: transparent; }
.help-textarea::placeholder { color: var(--text-muted); }
.char-count { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: 6px; }
.help-send-btn { background: var(--purple-accent); border: none; border-radius: var(--radius-md); padding: 14px 32px; font-size: clamp(14px, 1.5vw, 17px); font-family: var(--font); font-weight: 600; color: #fff; cursor: pointer; width: fit-content; transition: all var(--transition-med); box-shadow: 0 4px 16px rgba(139,92,246,0.3); }
.help-send-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(139,92,246,0.4); }
.help-right { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; min-height: 340px; }

/* ── LEGAL DOCUMENT PAGES ── */
.legal-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px 0 24px;
}
.legal-doc {
  width: min(980px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: #171620;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 44px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
  color: var(--text-secondary);
}
.legal-doc-header {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.legal-kicker {
  color: var(--purple-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.legal-doc h1 {
  color: var(--text-primary);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.legal-doc h2 {
  color: var(--text-primary);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 28px 0 10px;
}
.legal-doc p {
  color: var(--text-secondary);
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 1.72;
  margin: 0 0 12px;
}
.legal-doc section:last-child p {
  margin-bottom: 0;
}
.help-welcome { font-size: clamp(17px, 1.8vw, 24px); font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.help-chat-input { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 20px; font-size: 15px; width: 100%; outline: none; font-family: var(--font); color: var(--text-primary); margin-top: 20px; }

/* ── UPGRADE ── */
.upgrade-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.upgrade-cards { display: flex; gap: 28px; align-items: stretch; width: 100%; max-width: 860px; }
.plan-card { border-radius: var(--radius-xl); padding: 36px 40px; display: flex; flex-direction: column; flex: 1; border: 1px solid var(--border-card); transition: all var(--transition-med); }
.plan-card.free { background: var(--bg-card); backdrop-filter: var(--glass-blur); }
.plan-card.pro { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.05)); border-color: var(--border-glow); }
.plan-card.pro:hover { box-shadow: 0 8px 32px rgba(139,92,246,0.2); }
.plan-name { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 28px; }
.plan-features { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.plan-feature { font-size: clamp(13px, 1.4vw, 16px); color: var(--text-secondary); display: flex; align-items: flex-start; gap: 10px; }
.plan-feature::before { content: "✓"; color: var(--purple-accent); font-size: 16px; line-height: 1.2; flex-shrink: 0; font-weight: 700; }
.plan-action-area { margin-top: auto; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-start; }
.plan-price { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; color: var(--text-primary); text-align: center; margin: 28px 0 20px; }
.plan-btn { border: none; border-radius: var(--radius-md); padding: 16px 0; font-size: clamp(15px, 1.6vw, 18px); font-family: var(--font); font-weight: 600; cursor: pointer; width: 100%; transition: all var(--transition-med); }
.plan-btn.in-use { background: var(--bg-input); color: var(--text-secondary); cursor: default; border: 1px solid var(--border-subtle); }
.plan-btn.upgrade-now { background: var(--purple-accent); color: #fff; box-shadow: 0 4px 16px rgba(139,92,246,0.3); }
.plan-btn.upgrade-now:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(139,92,246,0.4); }
.plan-action-link { text-align: center; margin-top: 14px; min-height: 18px; }
.plan-action-link button { background: none; border: none; color: var(--purple-accent); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; font-family: var(--font); }
.plan-action-note { text-align: center; color: var(--text-secondary); font-size: 11px; margin-top: 12px; line-height: 1.5; min-height: 34px; }

/* ── GOALS PAGE ── */
.goals-big-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.goals-big-title { font-size: clamp(17px, 1.8vw, 22px); font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
.card-edit-btn { position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer; opacity: 0; transition: opacity var(--transition-fast); padding: 2px; }
.goals-big-card:hover .card-edit-btn { opacity: 0.6; }
.card-edit-btn:hover { opacity: 1 !important; }
.add-goal-btn { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px; font-size: clamp(14px, 1.5vw, 16px); font-family: var(--font); font-weight: 600; color: var(--text-secondary); cursor: pointer; width: 100%; transition: all var(--transition-med); }
.add-goal-btn:hover { border-color: var(--border-glow); color: var(--text-primary); }
.goal-new-slot { border: 1px dashed var(--border-card); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-med); font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--text-muted); }
.goal-new-slot:hover { background: var(--bg-card-hover); border-color: var(--border-glow); }
.goal-item-row { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.goal-item-row:last-of-type { border-bottom: none; }
.goal-item-header { display: flex; align-items: center; justify-content: space-between; }
.goal-item-text { font-size: clamp(14px, 1.5vw, 17px); font-weight: 600; color: var(--text-primary); }
.goal-item-text span { font-weight: 400; color: var(--text-secondary); }
.goal-edit-btn { background: none; border: none; cursor: pointer; padding: 2px; opacity: 0.5; flex-shrink: 0; }
.goal-edit-btn:hover { opacity: 1; }
.goal-bar-track { background: rgba(255,255,255,0.08); border-radius: 999px; height: 8px; overflow: hidden; }
.goal-bar-fill { height: 100%; border-radius: 999px; background: var(--neon-green); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── MODALS ── */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 500; align-items: center; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal-card { background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: var(--radius-xl); padding: 32px 36px 28px; width: min(440px, 88vw); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-modal); position: relative; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 4px; }
.modal-title { font-size: clamp(18px, 2vw, 24px); font-weight: 700; color: var(--text-primary); text-align: center; font-family: var(--font); }
.modal-close { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text-muted); line-height: 1; padding: 4px 8px; transition: color var(--transition-fast); }
.modal-close:hover { color: var(--text-primary); }
.modal-input { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 20px; font-size: clamp(14px, 1.5vw, 17px); font-family: var(--font); color: var(--text-primary); outline: none; width: 100%; transition: all var(--transition-med); }
.modal-input:focus { border-color: var(--purple-accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.modal-input::placeholder { color: var(--text-muted); }
.modal-select { background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 20px; font-size: clamp(14px, 1.5vw, 17px); font-family: var(--font); color: var(--text-secondary); outline: none; width: 100%; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.modal-select option { background: #1e1b2e; color: #fff; }
.modal-btns-row { display: flex; gap: 12px; margin-top: 4px; }
.modal-create-btn { background: var(--purple-accent); border: none; border-radius: var(--radius-md); padding: 16px; font-size: clamp(14px, 1.5vw, 17px); font-family: var(--font); font-weight: 600; color: #fff; cursor: pointer; flex: 1; transition: all var(--transition-med); }
.modal-create-btn:hover { background: #7c3aed; transform: translateY(-1px); }
.modal-create-btn.full { width: 100%; }
.modal-delete-btn { background: var(--red-dim); border: 1px solid rgba(248,113,113,0.3); border-radius: var(--radius-md); padding: 16px; font-size: clamp(14px, 1.5vw, 17px); font-family: var(--font); font-weight: 600; color: var(--red); cursor: pointer; flex: 1; transition: all var(--transition-med); }
.modal-delete-btn:hover { background: rgba(248,113,113,0.25); }

/* Content planner */
.cp-chip-title { color: inherit; }
.cp-pill { color: var(--text-primary) !important; }
.cp-pill.active-pill { color: #fff !important; }

/* Marketing stat analysis */
.stat-analysis-wrap {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}
.stat-analysis-title {
  color: var(--text-primary) !important;
}
.stat-analysis-clear {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text-primary) !important;
  font-weight: 800 !important;
}
.stat-score-card {
  align-items: center;
  background: linear-gradient(135deg, rgba(42,35,85,0.98), rgba(90,80,176,0.82));
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  gap: 18px;
  padding: 18px 22px;
}
.stat-score {
  min-width: 70px;
  text-align: center;
}
.stat-score p {
  color: var(--score-color);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 900;
  line-height: 0.92;
}
.stat-score span {
  color: rgba(255,255,255,0.68);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
}
.stat-score-summary {
  color: var(--text-primary);
  flex: 1;
  font-size: clamp(14px, 1.45vw, 17px);
  font-weight: 700;
  line-height: 1.48;
}
.stat-analysis-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.stat-analysis-card,
.stat-actions-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 18px;
}
.stat-analysis-card-good {
  border-left: 4px solid var(--green);
}
.stat-analysis-card-warn {
  border-left: 4px solid var(--red);
}
.stat-analysis-section-title,
.stat-actions-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.stat-analysis-card-good .stat-analysis-section-title {
  color: var(--green);
}
.stat-analysis-card-warn .stat-analysis-section-title {
  color: var(--red);
}
.stat-actions-title {
  color: var(--purple-accent);
}
.stat-analysis-line {
  color: var(--text-secondary);
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 7px;
  padding-left: 16px;
  position: relative;
}
.stat-analysis-line::before {
  border-radius: 999px;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  top: 0.62em;
  width: 6px;
}
.stat-analysis-card-good .stat-analysis-line::before {
  background: var(--green);
}
.stat-analysis-card-warn .stat-analysis-line::before {
  background: var(--red);
}
.stat-action-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.stat-action-row span {
  align-items: center;
  background: rgba(139,92,246,0.32);
  border: 1px solid rgba(139,92,246,0.34);
  border-radius: 999px;
  color: var(--text-primary);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.stat-action-row p {
  color: var(--text-primary);
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 700;
  line-height: 1.45;
}
body.light .stat-analysis-wrap,
body:not(.dark):not(.light) .stat-analysis-wrap {
  background: #fff !important;
  border-color: rgba(0,0,0,0.08);
}
body.light .stat-analysis-title,
body:not(.dark):not(.light) .stat-analysis-title,
body.light .stat-action-row p,
body:not(.dark):not(.light) .stat-action-row p {
  color: #111 !important;
}
body.light .stat-analysis-card,
body.light .stat-actions-card,
body:not(.dark):not(.light) .stat-analysis-card,
body:not(.dark):not(.light) .stat-actions-card {
  background: #f5f3ff;
  border-color: rgba(0,0,0,0.08);
}
body.light .stat-analysis-line,
body:not(.dark):not(.light) .stat-analysis-line {
  color: #4b4b55;
}
@media (max-width: 760px) {
  .stat-analysis-grid {
    grid-template-columns: 1fr;
  }
}

/* ── NOTIFICATIONS ── */
.notif-badge { position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 3px 9px; font-family: var(--font); display: none; z-index: 2; }
.notif-badge.show { display: block; }
#badge-calendar { width: 12px; height: 12px; padding: 0; background: var(--red); box-shadow: 0 2px 8px rgba(248,113,113,0.4); }

/* ── EMPTY STATES ── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; padding: 20px; text-align: center; }
.empty-state-icon { font-size: 32px; opacity: 0.4; }
.empty-state-symbol {
  align-items: center;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(52,211,153,0.1));
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 18px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  position: relative;
  width: 46px;
}
.empty-state-symbol::before,
.empty-state-symbol::after {
  background: rgba(244,240,255,0.68);
  border-radius: 999px;
  content: "";
  position: absolute;
}
.empty-state-symbol::before {
  height: 3px;
  width: 22px;
}
.empty-state-symbol::after {
  height: 22px;
  width: 3px;
}
.empty-state-symbol.clickable { cursor: pointer; transition: transform var(--transition-med), border-color var(--transition-med), background var(--transition-med); }
.empty-state-symbol.clickable:hover { transform: scale(1.06); border-color: rgba(139,92,246,0.45); background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(52,211,153,0.16)); }
.empty-state-symbol.clickable:active { transform: scale(0.96); }
.empty-state p { color: var(--text-muted); font-size: 13px; font-weight: 500; line-height: 1.5; }
.empty-state-btn { background: var(--purple-accent); border: none; border-radius: var(--radius-md); padding: 10px 22px; font-size: 13px; font-family: var(--font); font-weight: 600; color: #fff; cursor: pointer; margin-top: 4px; transition: all var(--transition-med); }
.empty-state-btn:hover { background: #7c3aed; }

/* ── SESSION EDIT ── */
.session-edit-btn { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); background: none; border: none; cursor: pointer; opacity: 0; transition: opacity var(--transition-fast); padding: 4px; color: var(--purple-mid); }
.fin-row:hover .session-edit-btn { opacity: 0.6; }
.session-edit-btn:hover { opacity: 1 !important; }
.session-edit-btn svg { width: 18px; height: 18px; }

/* ── INSIGHTS ── */
.ins-slot { border-color: var(--border-card) !important; transition: all var(--transition-med); }
.ins-slot:hover { border-color: var(--border-glow) !important; }
.ins-card { background: var(--bg-card) !important; border: 1px solid var(--border-card); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Settings scroll */
#settings-page { overflow-y: auto !important; max-height: 100vh !important; padding-bottom: 60px !important; }
.settings-content, #settings-page > div { overflow-y: visible !important; height: auto !important; }

/* ══════════════════════════════════════════
   GOALS PAGE - REDESIGNED
══════════════════════════════════════════ */
.goals-redesign-container { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; overflow: hidden; }
.goals-top-bar { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.goals-new-btn { background: var(--purple-accent); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: all var(--transition-med); box-shadow: 0 4px 16px rgba(139,92,246,0.3); }
.goals-new-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(139,92,246,0.4); }
.goals-stats-summary { font-size: 13px; color: var(--text-muted); margin: 0; flex-shrink: 0; }
.goals-filter-tabs { display: flex; gap: 4px; background: var(--bg-input); padding: 4px; border-radius: var(--radius-sm); width: fit-content; flex-shrink: 0; }
.goals-filter-tab { background: transparent; color: var(--text-secondary); border: none; padding: 7px 18px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--font); transition: all var(--transition-fast); }
.goals-filter-tab.active { background: var(--purple-accent); color: #fff; }
.goals-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; flex: 1; min-height: 0; overflow-y: auto; align-content: start; padding-right: 4px; }
@media (max-width: 768px) { .goals-cards-grid { grid-template-columns: 1fr; } }

.goal-card-full { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 20px 22px; position: relative; cursor: pointer; transition: all var(--transition-med); display: flex; flex-direction: column; gap: 14px; min-height: 140px; }
.goal-card-full:hover { transform: translateY(-2px); border-color: var(--border-glow); box-shadow: var(--shadow-hover); }
.goal-card-full.completed { opacity: 0.7; }
.goal-done-badge-top { position: absolute; top: 14px; right: 14px; background: var(--green); color: #0c0b14; font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 700; z-index: 2; }
.goal-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.goal-card-info { flex: 1; min-width: 0; }
.goal-category-label { font-size: 11px; font-weight: 700; margin: 0 0 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.goal-card-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-card-status { font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.goal-card-body { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.goal-card-ring { width: 70px; height: 70px; flex-shrink: 0; position: relative; }
.goal-card-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-card-ring .ring-bg-circle { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; }
.goal-card-ring .ring-fill-circle { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.goal-card-ring .ring-percent { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 14px; font-weight: 800; color: var(--text-primary); }
.goal-card-stats { flex: 1; min-width: 0; }
.goal-stat-label-text { font-size: 12px; color: var(--text-muted); margin: 0 0 3px; font-weight: 500; }
.goal-stat-value-text { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.goal-stat-time-text { font-size: 11px; color: var(--text-muted); margin: 0; }
.color-on-track { color: var(--green) !important; }
.color-behind { color: var(--red) !important; }
.color-no-deadline { color: var(--text-muted) !important; }
.cat-revenue { color: var(--green) !important; }
.cat-profit { color: var(--purple-accent) !important; }
.cat-costs { color: var(--red) !important; }
.cat-custom { color: var(--purple-mid) !important; }
.goals-empty-state { grid-column: 1 / -1; background: var(--bg-card); border-radius: var(--radius-lg); padding: 60px 20px; text-align: center; border: 1px dashed var(--border-card); }
.goals-empty-icon-big { font-size: 48px; opacity: 0.3; margin-bottom: 12px; }
.goals-empty-message { font-size: 15px; color: var(--text-secondary); margin: 0 0 16px; }

#goals-cards-grid * { color: var(--text-primary) !important; }
#goals-cards-grid .cat-revenue { color: var(--green) !important; }
#goals-cards-grid .cat-costs { color: var(--red) !important; }
#goals-cards-grid .cat-custom { color: var(--purple-mid) !important; }
#goals-cards-grid .color-on-track { color: var(--green) !important; }
#goals-cards-grid .color-behind { color: var(--red) !important; }
#goals-cards-grid .goal-done-badge-top, #goals-cards-grid .goal-done-badge-top * { color: #0c0b14 !important; }

/* Goal progress rings */
.goal-progress-ring { width: 56px; height: 56px; flex-shrink: 0; position: relative; }
.goal-progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-progress-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 5; }
.goal-progress-ring .ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.goal-progress-ring .ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 13px; font-weight: 700; color: var(--text-primary); }
.goal-status-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.goal-status-badge.on-track { background: var(--green-dim); color: var(--green); }
.goal-status-badge.behind { background: var(--red-dim); color: var(--red); }
.goal-status-badge.no-deadline { background: var(--bg-input); color: var(--text-muted); }
.goal-status-badge.completed { background: var(--green); color: #0c0b14; }
.goal-item-row.with-ring { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg-card); border-radius: 12px; margin-bottom: 8px; transition: all 0.2s; border: 1px solid transparent; }
.goal-item-row.with-ring:hover { background: var(--bg-card-hover); border-color: var(--border-glow); transform: translateX(2px); }
.goal-item-row.with-ring.completed { opacity: 0.6; }

/* ── TABLE ── */
table { background: var(--bg-card) !important; border-radius: var(--radius-md); overflow: hidden; }
th { background: rgba(139,92,246,0.1) !important; border-bottom-color: var(--border-subtle) !important; color: var(--text-primary) !important; }
td { border-bottom-color: var(--border-subtle) !important; color: var(--text-primary) !important; }

/* ── MODULE OPTIONS ── */
.module-modal-backdrop {
  background: rgba(6,5,12,0.84) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  z-index: 99990 !important;
}
.module-modal-card {
  background: #15141f !important;
  border: 1px solid rgba(139,92,246,0.28);
  box-shadow: var(--shadow-modal), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.module-modal-head {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 4px;
}
.module-modal-close {
  color: rgba(244,240,255,0.68) !important;
}
.module-options-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.mod-opt {
  background: rgba(255,255,255,0.045) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  min-height: 134px;
  transition: all var(--transition-med) !important;
}
.mod-opt:hover {
  background: rgba(139,92,246,0.11) !important;
  border-color: rgba(139,92,246,0.36) !important;
  transform: translateY(-1px);
}
.mod-opt.selected {
  background: rgba(139,92,246,0.18) !important;
  border-color: var(--purple-accent) !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12), 0 18px 42px rgba(0,0,0,0.24) !important;
}
.mod-opt p:first-child {
  color: var(--text-primary) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
.mod-opt p:not(:first-child),
.mod-opt span,
.mod-opt text {
  color: var(--text-secondary) !important;
  fill: var(--text-secondary) !important;
}
.module-modal-actions button {
  color: #fff !important;
}
.module-modal-actions button[onclick="applyModule()"] {
  background: var(--purple-accent) !important;
}
.cp-platform-mark {
  align-items: center;
  background: rgba(139,92,246,0.14);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 7px;
  color: var(--purple-accent) !important;
  display: inline-flex;
  font-size: 9px !important;
  font-weight: 900;
  height: 21px;
  justify-content: center;
  letter-spacing: 0.02em;
  min-width: 25px;
  padding: 0 5px;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.animate-in { animation: fadeSlideUp 0.4s ease forwards; }
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.05s; }
.card:nth-child(4) { animation-delay: 0.1s; }
.card:nth-child(5) { animation-delay: 0.15s; }
.card:nth-child(6) { animation-delay: 0.2s; }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 8px rgba(139,92,246,0.2); } 50% { box-shadow: 0 0 16px rgba(139,92,246,0.4); } }

/* ══════════════════════════════════════════
   LIGHT MODE OVERRIDES
   Dark is the default. Light/System use CSS vars.
══════════════════════════════════════════ */
body.dark { background: var(--bg-base); color: var(--text-primary); }
body.dark .dash { background: var(--bg-base); }

body.light, body:not(.dark):not(.light) {
  --bg-base: #f4f2fa;
  --bg-surface: #ffffff;
  --bg-card: rgba(255,255,255,0.8);
  --bg-card-hover: rgba(255,255,255,0.95);
  --bg-input: rgba(0,0,0,0.04);
  --bg-input-focus: rgba(0,0,0,0.06);
  --border-subtle: rgba(0,0,0,0.08);
  --border-card: rgba(0,0,0,0.1);
  --text-primary: #1a1535;
  --text-secondary: rgba(26,21,53,0.6);
  --text-muted: rgba(26,21,53,0.35);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.1), 0 0 20px rgba(139,92,246,0.06);
  --shadow-modal: 0 24px 80px rgba(0,0,0,0.15);
  background: var(--bg-base);
}
body.light .dash, body:not(.dark):not(.light) .dash { background: var(--bg-base); }
body.light .dash::before, body:not(.dark):not(.light) .dash::before { opacity: 0.01; }
body.light .legal-doc, body:not(.dark):not(.light) .legal-doc {
  background: rgba(255,255,255,0.88);
  box-shadow: 0 22px 60px rgba(26,21,53,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Dashboard nav icons light */
body.light .clickable-card svg, body:not(.dark):not(.light) .clickable-card svg { stroke: rgba(26,21,53,0.38) !important; }

/* Inline light surfaces need dark text in light/system mode */
body.light [style*="background:#fff"][style*="color:#fff"],
body.light [style*="background:#fff"] [style*="color:#fff"],
body.light [style*="background:#fff"][style*="color:rgba(255,255,255"],
body.light [style*="background:#fff"] [style*="color:rgba(255,255,255"],
body.light [style*="background:#f0"][style*="color:#fff"],
body.light [style*="background:#f0"] [style*="color:#fff"],
body.light [style*="background:#f0"][style*="color:rgba(255,255,255"],
body.light [style*="background:#f0"] [style*="color:rgba(255,255,255"],
body.light [style*="background:#f5"][style*="color:#fff"],
body.light [style*="background:#f5"] [style*="color:#fff"],
body.light [style*="background:#f5"][style*="color:rgba(255,255,255"],
body.light [style*="background:#f5"] [style*="color:rgba(255,255,255"],
body.light [style*="background:#f9"][style*="color:#fff"],
body.light [style*="background:#f9"] [style*="color:#fff"],
body.light [style*="background:#f9"][style*="color:rgba(255,255,255"],
body.light [style*="background:#f9"] [style*="color:rgba(255,255,255"],
body.light [style*="background:#e0"][style*="color:#fff"],
body.light [style*="background:#e0"] [style*="color:#fff"],
body.light [style*="background:#e0"][style*="color:rgba(255,255,255"],
body.light [style*="background:#e0"] [style*="color:rgba(255,255,255"],
body.light [style*="background:#e8"][style*="color:#fff"],
body.light [style*="background:#e8"] [style*="color:#fff"],
body.light [style*="background:#e8"][style*="color:rgba(255,255,255"],
body.light [style*="background:#e8"] [style*="color:rgba(255,255,255"],
body.light [style*="background:rgba(255,255,255"][style*="color:#fff"],
body.light [style*="background:rgba(255,255,255"] [style*="color:#fff"],
body.light [style*="background:rgba(255,255,255"][style*="color:rgba(255,255,255"],
body.light [style*="background:rgba(255,255,255"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#fff"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#fff"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#fff"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#fff"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f0"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f0"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f0"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f0"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f5"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f5"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f5"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f5"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f9"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f9"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#f9"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#f9"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#e0"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#e0"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#e0"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#e0"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#e8"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#e8"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#e8"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:#e8"] [style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:rgba(255,255,255"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:rgba(255,255,255"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:rgba(255,255,255"][style*="color:rgba(255,255,255"],
body:not(.dark):not(.light) [style*="background:rgba(255,255,255"] [style*="color:rgba(255,255,255"] {
  color: #1a1535 !important;
}

/* Dark action surfaces keep white text inside light/system panels */
body.light button[style*="background:#111"],
body.light button[style*="background:#2a2355"],
body.light button[style*="background:#1a1a2e"],
body.light button[style*="background:linear-gradient"],
body.light [style*="background:#111"][style*="color:#fff"],
body.light [style*="background:#2a2355"][style*="color:#fff"],
body.light [style*="background:#1a1a2e"][style*="color:#fff"],
body.light [style*="background:linear-gradient"][style*="color:#fff"],
body.light [style*="background:#111"] [style*="color:#fff"],
body.light [style*="background:#2a2355"] [style*="color:#fff"],
body.light [style*="background:#1a1a2e"] [style*="color:#fff"],
body.light [style*="background:linear-gradient"] [style*="color:#fff"],
body:not(.dark):not(.light) button[style*="background:#111"],
body:not(.dark):not(.light) button[style*="background:#2a2355"],
body:not(.dark):not(.light) button[style*="background:#1a1a2e"],
body:not(.dark):not(.light) button[style*="background:linear-gradient"],
body:not(.dark):not(.light) [style*="background:#111"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#2a2355"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#1a1a2e"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:linear-gradient"][style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#111"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#2a2355"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:#1a1a2e"] [style*="color:#fff"],
body:not(.dark):not(.light) [style*="background:linear-gradient"] [style*="color:#fff"] {
  color: #fff !important;
}

body.light #financials-page .ins-slot,
body:not(.dark):not(.light) #financials-page .ins-slot {
  background: rgba(255,255,255,0.72) !important;
  border: 2px dashed rgba(26,21,53,0.22) !important;
}

body.light #financials-page .ins-slot p,
body:not(.dark):not(.light) #financials-page .ins-slot p {
  color: rgba(26,21,53,0.62) !important;
}

body.light #financials-page .ins-slot:hover,
body:not(.dark):not(.light) #financials-page .ins-slot:hover {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(139,92,246,0.42) !important;
}

body.light .fin-session-card,
body:not(.dark):not(.light) .fin-session-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(245,243,255,0.88));
  border-color: rgba(139,92,246,0.16);
  box-shadow: 0 16px 40px rgba(26,21,53,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}

body.light .fin-session-card::before,
body:not(.dark):not(.light) .fin-session-card::before {
  background: radial-gradient(circle at 92% 0%, rgba(139,92,246,0.16), transparent 34%);
}

body.light .fin-progress-track,
body:not(.dark):not(.light) .fin-progress-track {
  background: rgba(26,21,53,0.09);
}

body.light .fin-profit-row,
body:not(.dark):not(.light) .fin-profit-row {
  border-top-color: rgba(26,21,53,0.1);
}

body.light .fin-summary-pill,
body:not(.dark):not(.light) .fin-summary-pill {
  background: rgba(139,92,246,0.12);
  color: #6d28d9;
  border-color: rgba(139,92,246,0.2);
}

/* Auth inputs purple in light */
body.light .auth-input, body:not(.dark):not(.light) .auth-input { background: var(--purple-accent); color: #fff; }
body.light .auth-input::placeholder, body:not(.dark):not(.light) .auth-input::placeholder { color: rgba(255,255,255,0.7); }

/* Ring bgs light */
body.light .goal-card-ring .ring-bg-circle, body:not(.dark):not(.light) .goal-card-ring .ring-bg-circle { stroke: rgba(0,0,0,0.08); }
body.light .goal-progress-ring .ring-bg, body:not(.dark):not(.light) .goal-progress-ring .ring-bg { stroke: rgba(0,0,0,0.08); }

/* AI bubbles light */
body.light .ai-bubble-assistant, body:not(.dark):not(.light) .ai-bubble-assistant { background: #f5f3ff !important; color: #1a1535 !important; border-color: rgba(0,0,0,0.08); }
body.light .ai-bubble-assistant *, body:not(.dark):not(.light) .ai-bubble-assistant * { color: #1a1535 !important; }

/* Progress bars light */
body.light .prog-fill, body:not(.dark):not(.light) .prog-fill { background: #16a34a; }
body.light .goal-bar-fill, body:not(.dark):not(.light) .goal-bar-fill { background: #16a34a; }
body.light .prog-track, body:not(.dark):not(.light) .prog-track { background: rgba(0,0,0,0.08); }
body.light .goal-bar-track, body:not(.dark):not(.light) .goal-bar-track { background: rgba(0,0,0,0.08); }
body.light .goal-card-ring .ring-bg-circle, body:not(.dark):not(.light) .goal-card-ring .ring-bg-circle { stroke: rgba(0,0,0,0.08); }
body.light .home-goal-item, body:not(.dark):not(.light) .home-goal-item { background: rgba(255,255,255,0.72); border-color: rgba(26,21,53,0.08); }
body.light .home-goal-track, body:not(.dark):not(.light) .home-goal-track { background: rgba(26,21,53,0.09); }
body.light .home-goal-empty, body:not(.dark):not(.light) .home-goal-empty { border-color: rgba(26,21,53,0.12); }
body.light .overview-goals-panel, body:not(.dark):not(.light) .overview-goals-panel { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.1); }
body.light .overview-goals-empty, body:not(.dark):not(.light) .overview-goals-empty { border-color: rgba(26,21,53,0.12); }

/* ══════════════════════════════════════════
   DARK MODE — INLINE COLOR NUCLEAR FIX
   Override ALL inline dark text colors that
   are invisible on the dark background.
   Only applies when body has .dark class.
══════════════════════════════════════════ */

/* Catch all inline dark text and force light */
body.dark [style*="color:#111"],
body.dark [style*="color:#222"],
body.dark [style*="color:#333"],
body.dark [style*="color:#444"],
body.dark [style*="color:#555"],
body.dark [style*="color:#666"],
body.dark [style*="color:#777"],
body.dark [style*="color:#888"],
body.dark [style*="color:#999"],
body.dark [style*="color:#aaa"],
body.dark [style*="color: #111"],
body.dark [style*="color: #222"],
body.dark [style*="color: #333"],
body.dark [style*="color: #444"],
body.dark [style*="color: #555"],
body.dark [style*="color: #666"],
body.dark [style*="color: #777"],
body.dark [style*="color: #888"],
body.dark [style*="color: #999"],
body.dark [style*="color: #aaa"] {
  color: var(--text-secondary) !important;
}

/* Stronger text (headings, titles, important labels) */
body.dark [style*="color:#111"][style*="font-weight:700"],
body.dark [style*="color:#111"][style*="font-weight:800"],
body.dark [style*="color:#111"][style*="font-weight:600"],
body.dark [style*="color:#222"][style*="font-weight:600"],
body.dark [style*="color:#222"][style*="font-weight:700"] {
  color: var(--text-primary) !important;
}

/* Catch inline dark backgrounds and make them glass */
body.dark [style*="background:#fff"],
body.dark [style*="background: #fff"],
body.dark [style*="background:#f0f0f0"],
body.dark [style*="background:#f5f5f5"],
body.dark [style*="background:#f9f9f9"],
body.dark [style*="background:#e8e8e8"],
body.dark [style*="background:#e0e0e0"],
body.dark [style*="background:#f5f3ff"],
body.dark [style*="background:#f0eeff"],
body.dark [style*="background:#e8e4ff"],
body.dark [style*="background:#d1fae5"],
body.dark [style*="background:#f0fdf4"],
body.dark [style*="background:#c8c8c8"],
body.dark [style*="background:#e8f5e9"] {
  background: var(--bg-input) !important;
}

/* Inline white backgrounds on cards/containers */
body.dark [style*="background:#fff"][style*="border-radius"] {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
}

/* Preserve green/red semantic colors */
body.dark [style*="color:#16a34a"],
body.dark [style*="color:#4caf50"] {
  color: var(--green) !important;
}
body.dark [style*="color:#e8633a"],
body.dark [style*="color:#ff6b6b"],
body.dark [style*="color:#e53935"],
body.dark [style*="color:#ff7070"] {
  color: var(--red) !important;
}

/* Preserve white text on dark buttons */
body.dark [style*="background:#111"][style*="color:#fff"],
body.dark [style*="background:#2a2355"][style*="color:#fff"],
body.dark [style*="background:#16a34a"][style*="color:#fff"],
body.dark [style*="background:#e53935"][style*="color:#fff"],
body.dark [style*="background:#7b75b0"][style*="color:#fff"] {
  color: #fff !important;
}

/* Fix inline borders */
body.dark [style*="border-bottom:1px solid #f0f0f0"],
body.dark [style*="border-bottom: 1px solid #f0f0f0"],
body.dark [style*="border-top:1px solid #f0f0f0"],
body.dark [style*="border-top: 1px solid #f0f0f0"] {
  border-color: var(--border-subtle) !important;
}

/* Fix input text colors in dark mode */
body.dark input[style*="color:#111"],
body.dark input[style*="color:#333"],
body.dark input[style*="color:#888"],
body.dark textarea[style*="color:#333"],
body.dark select[style*="color:#333"],
body.dark select[style*="color:#2a2355"] {
  color: var(--text-primary) !important;
}

/* Fix placeholder colors */
body.dark input::placeholder,
body.dark textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

/* Modal text on dark modals should stay readable */
body.dark [style*="background:#3d3576"] *,
body.dark [style*="background:#3d3570"] * {
  color: var(--text-primary) !important;
}

/* Footer links */
body.dark [style*="color:#7b75b0"] {
  color: var(--purple-accent) !important;
}

/* Fix session modal / edit modal inputs */
body.dark [style*="background:#f5f3ff"][style*="border-radius"] {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
}

/* Session modal inputs - keep light purple background in dark mode */
#sess-revenue,
#sess-costs,
#sess-name {
  background: #f5f3ff !important;
  color: #111 !important;
}

#sess-revenue::placeholder,
#sess-costs::placeholder,
#sess-name::placeholder {
  color: #999 !important;
}

/* Onboarding confirmation card */
body.dark [style*="background:#f5f3ff"][style*="border-radius:16px"] {
  background: var(--bg-card) !important;
}
body.dark [style*="border-bottom:1px solid #e8e4ff"] {
  border-color: var(--border-subtle) !important;
}

/* Tab buttons fix - active vs inactive */
body.dark button[style*="background:#fff"][style*="color:#111"] {
  background: var(--purple-accent) !important;
  color: #fff !important;
}
body.dark button[style*="background:#c8c8c8"][style*="color:#111"] {
  background: var(--bg-input) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-subtle) !important;
}

/* Session edit modal: keep the editor as a solid panel over the activity table */
#session-edit-modal.session-edit-backdrop {
  background: rgba(6, 5, 12, 0.78) !important;
  backdrop-filter: blur(8px);
  z-index: 900 !important;
}

#session-edit-modal .session-edit-card {
  background: #ffffff !important;
  border: 1px solid rgba(26, 21, 53, 0.12) !important;
  box-shadow: 0 28px 90px rgba(6, 5, 12, 0.28) !important;
}

body.dark #session-edit-modal .session-edit-card {
  background: #15141f !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72) !important;
}

body.dark #session-edit-modal input,
body.dark #session-edit-modal select {
  background-color: #232130 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f4f0ff !important;
}

body.dark #session-edit-modal input::placeholder {
  color: rgba(244, 240, 255, 0.58) !important;
}

body.dark #session-edit-modal select option {
  background: #232130;
  color: #f4f0ff;
}

#financials-page .fin-session-card,
body.dark #financials-page .fin-session-card {
  background: #26252d !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

#financials-page .fin-session-card::before,
body.dark #financials-page .fin-session-card::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)) !important;
}

/* Compact signup legal popup */
.legal-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6,5,12,0.74);
  backdrop-filter: blur(8px);
}
.legal-popup-backdrop.open {
  display: flex;
}
.legal-popup-card {
  width: min(620px, 94vw);
  max-height: min(720px, 88vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
  background: #171620;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.06);
}
.legal-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.legal-popup-kicker {
  color: var(--purple-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.legal-popup-header h2 {
  color: #f4f0ff;
  font-size: clamp(22px, 2.7vw, 30px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}
.legal-popup-x {
  background: none;
  border: none;
  color: rgba(244,240,255,0.64);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 4px 0 4px 8px;
}
.legal-popup-body {
  overflow-y: auto;
  padding: 20px 28px 22px;
}
.legal-popup-body h3 {
  color: #f4f0ff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 18px 0 7px;
}
.legal-popup-body h3:first-child {
  margin-top: 0;
}
.legal-popup-body p,
.legal-popup-body li {
  color: rgba(244,240,255,0.72);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.58;
}
.legal-popup-body ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 20px;
  margin: 0 0 12px;
}
.legal-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 18px 28px 26px;
  border-top: 1px solid rgba(255,255,255,0.09);
}
.legal-popup-secondary {
  border: none;
  border-radius: 14px;
  padding: 13px 34px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  min-width: 150px;
}
.legal-popup-secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(244,240,255,0.78);
}

body.light .legal-popup-card,
body:not(.dark):not(.light) .legal-popup-card {
  background: #ffffff;
  border-color: rgba(26,21,53,0.1);
  box-shadow: 0 30px 90px rgba(26,21,53,0.18);
}
body.light .legal-popup-header,
body.light .legal-popup-actions,
body:not(.dark):not(.light) .legal-popup-header,
body:not(.dark):not(.light) .legal-popup-actions {
  border-color: rgba(26,21,53,0.09);
}
body.light .legal-popup-header h2,
body.light .legal-popup-body h3,
body:not(.dark):not(.light) .legal-popup-header h2,
body:not(.dark):not(.light) .legal-popup-body h3 {
  color: #1a1535;
}
body.light .legal-popup-body p,
body.light .legal-popup-body li,
body:not(.dark):not(.light) .legal-popup-body p,
body:not(.dark):not(.light) .legal-popup-body li {
  color: rgba(26,21,53,0.68);
}
body.light .legal-popup-x,
body:not(.dark):not(.light) .legal-popup-x {
  color: rgba(26,21,53,0.52);
}
body.light .legal-popup-secondary,
body:not(.dark):not(.light) .legal-popup-secondary {
  background: rgba(26,21,53,0.06);
  color: rgba(26,21,53,0.72);
}

/* Solid create-session modal */
#session-modal.session-create-backdrop {
  background: rgba(6, 5, 12, 0.84) !important;
  backdrop-filter: blur(8px);
  z-index: 900 !important;
}

#session-modal .session-create-card {
  background: #ffffff !important;
  border: 1px solid rgba(26, 21, 53, 0.1);
  box-shadow: 0 30px 90px rgba(26, 21, 53, 0.24) !important;
}

body.dark #session-modal .session-create-card {
  background: #15141f !important;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.dark #session-modal .session-create-card p[style*="color:#111"] {
  color: #f4f0ff !important;
}

body.dark #session-modal .session-create-card button[style*="background:none"] {
  color: rgba(244, 240, 255, 0.66) !important;
}

body.dark #session-modal #sess-revenue,
body.dark #session-modal #sess-costs,
body.dark #session-modal #sess-name,
body.dark #session-modal #sess-payment {
  background-color: #232130 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f4f0ff !important;
}

body.dark #session-modal #sess-revenue::placeholder,
body.dark #session-modal #sess-costs::placeholder,
body.dark #session-modal #sess-name::placeholder {
  color: rgba(17, 17, 17, 0.42) !important;
}

body.dark #session-modal #sess-payment option {
  background: #232130;
  color: #f4f0ff;
}

/* Schedule sidebar readability in dark mode */
body.dark #cal-side-date {
  color: #f4f0ff !important;
}

body.dark #cal-side-events p {
  color: rgba(244, 240, 255, 0.72) !important;
}

body.dark #cal-event-title,
body.dark #cal-event-start,
body.dark #cal-event-end {
  background: #232130 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f4f0ff !important;
  color-scheme: dark;
}

body.dark #cal-event-title::placeholder,
body.dark #cal-event-start::placeholder,
body.dark #cal-event-end::placeholder {
  color: rgba(244, 240, 255, 0.5) !important;
  opacity: 1 !important;
}

/* Marketing overlays and dark panels need to beat the broad inline-style fixes above. */
.marketing-modal-overlay {
  background: #06050c !important;
  backdrop-filter: none !important;
  z-index: 1200 !important;
}

.marketing-modal-card,
body.dark .marketing-modal-card {
  background: #15141f !important;
  background-color: #15141f !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7) !important;
  color: #f4f0ff !important;
  opacity: 1 !important;
  isolation: isolate;
  position: relative;
}

.marketing-modal-card::before,
body.dark .marketing-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #15141f;
  border-radius: inherit;
  pointer-events: none;
}

.marketing-modal-card p,
.marketing-modal-card label,
.marketing-modal-card span,
body.dark .marketing-modal-card p,
body.dark .marketing-modal-card label,
body.dark .marketing-modal-card span {
  color: #f4f0ff !important;
}

.marketing-modal-card label,
.marketing-modal-card #cp-char-count,
.marketing-modal-card p[style*="color:#888"],
.marketing-modal-card p[style*="color:#666"],
body.dark .marketing-modal-card label,
body.dark .marketing-modal-card #cp-char-count,
body.dark .marketing-modal-card p[style*="color:#888"],
body.dark .marketing-modal-card p[style*="color:#666"] {
  color: rgba(244,240,255,0.68) !important;
}

.marketing-modal-card input,
.marketing-modal-card textarea,
.marketing-modal-card select,
body.dark .marketing-modal-card input,
body.dark .marketing-modal-card textarea,
body.dark .marketing-modal-card select {
  background: #232130 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #f4f0ff !important;
  color-scheme: dark;
}

.marketing-modal-card input::placeholder,
.marketing-modal-card textarea::placeholder {
  color: rgba(244,240,255,0.5) !important;
  opacity: 1 !important;
}

.marketing-modal-card option {
  background: #232130;
  color: #f4f0ff;
}

.marketing-modal-card button[onclick="closeCpModal()"],
.marketing-modal-card button[onclick="closeAiPlanModal()"],
.marketing-modal-card button[onclick="closeClearWeekModal()"],
body.dark .marketing-modal-card button[onclick="closeCpModal()"],
body.dark .marketing-modal-card button[onclick="closeAiPlanModal()"],
body.dark .marketing-modal-card button[onclick="closeClearWeekModal()"] {
  background: #232130 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #f4f0ff !important;
}

.marketing-modal-card button[onclick="saveCpPost()"],
.marketing-modal-card button[onclick="executeAiPlan()"],
.marketing-modal-card button[onclick="confirmClearWeek()"],
.marketing-modal-card #cp-write-btn,
body.dark .marketing-modal-card button[onclick="saveCpPost()"],
body.dark .marketing-modal-card button[onclick="executeAiPlan()"],
body.dark .marketing-modal-card button[onclick="confirmClearWeek()"],
body.dark .marketing-modal-card #cp-write-btn {
  background: var(--purple-accent) !important;
  color: #fff !important;
}

.marketing-modal-card button[onclick="confirmClearWeek()"],
body.dark .marketing-modal-card button[onclick="confirmClearWeek()"] {
  background: #ef4444 !important;
}

body.dark #cp-prev-btn,
body.dark #cp-next-btn,
body.dark .cp-week-next {
  background: #232130 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #c4b5fd !important;
  opacity: 1 !important;
  box-shadow: 0 0 18px rgba(139,92,246,0.18);
}

body.dark #cp-prev-btn[style*="opacity: 0.25"],
body.dark #cp-prev-btn[style*="opacity:0.25"] {
  color: rgba(244,240,255,0.36) !important;
  opacity: 0.45 !important;
  box-shadow: none;
}

body.dark .cp-stat-card {
  background: #15141f !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

body.dark .cp-stat-value-purple {
  color: #a78bfa !important;
  text-shadow: 0 0 18px rgba(139,92,246,0.24);
}

body.dark #mkt-intake,
body.dark #mkt-loading,
body.dark #mkt-report,
body.dark #mkt-stats > div[style*="background:#fff"] {
  background: #15141f !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35) !important;
}

body.dark #mkt-intake input,
body.dark #mkt-stats [style*="background:#f5f3ff"] {
  background: #232130 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #f4f0ff !important;
}

body.dark #mkt-intake input::placeholder,
body.dark #mkt-stats input::placeholder {
  color: rgba(244,240,255,0.5) !important;
  opacity: 1 !important;
}

body.dark #mkt-intake p[style*="color:#111"],
body.dark #mkt-intake label,
body.dark #mkt-stats > div[style*="background:#fff"] p[style*="color:#111"],
body.dark #mkt-stats > div[style*="background:#fff"] p[style*="color:#666"],
body.dark #mkt-stats > div[style*="background:#fff"] span[style*="color:#666"] {
  color: #f4f0ff !important;
}

body.dark #mkt-intake p[style*="color:#888"],
body.dark #mkt-intake span[style*="color:#666"] {
  color: rgba(244,240,255,0.68) !important;
}

body.dark #mkt-stats [style*="color:#4a3f7a"] {
  color: #9f7aea !important;
}

body.dark #mkt-stats input[style*="color:#2a2355"] {
  color: #f4f0ff !important;
}

@media (max-width: 980px) {
  .module-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #financials-page .page-header + div,
  #marketing-page .page-header + div {
    width: 100%;
  }
  #financials-page button[id^="fin-tab-"],
  #marketing-page button[id^="mkt-tab-"] {
    flex: 1 0 auto !important;
    padding: 10px 18px !important;
  }
}

@media (max-width: 760px) {
  .module-modal-backdrop {
    align-items: flex-end !important;
    padding: 12px;
  }
  .module-modal-card {
    border-radius: 22px !important;
    max-height: 88vh !important;
    padding: 22px !important;
    width: 100% !important;
  }
  .module-options-grid {
    grid-template-columns: 1fr !important;
  }
  .mod-opt {
    min-height: 110px;
  }
  #financials-page [style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  #fin-forecast [style*="grid-template-columns:1fr 1fr 1fr 1fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #ins-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    overflow-y: auto;
  }
  .forecast-line-chart {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  #financials-page [style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  #fin-forecast [style*="grid-template-columns:1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .forecast-chart-legend {
    gap: 8px 10px;
  }
  .forecast-axis-label {
    font-size: 10px;
  }
}

/* Mobile app pass */
@media (max-width: 900px) {
  .dash {
    height: 100dvh;
    min-height: 100dvh;
  }

  .page {
    -webkit-overflow-scrolling: touch;
  }

  .dash-page {
    padding: 18px 16px 28px !important;
    gap: 18px;
  }

  .page-header {
    margin-bottom: 8px;
  }

  .back-btn {
    font-size: 20px;
    gap: 8px;
  }

  .title-row {
    min-height: 112px;
    margin-bottom: 4px;
    align-items: flex-start;
  }

  .dash-sel-wrap {
    left: 0;
    top: 0;
    width: calc(100% - 58px);
    transform: none;
  }

  .dash-sel-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    padding: 10px 14px;
  }

  .dash-sel-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dash-sel-popup {
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(env(safe-area-inset-top, 0px) + 72px);
    width: auto;
    max-height: min(64dvh, 520px);
    overflow-y: auto;
    z-index: 1200;
  }

  .user-icon-btn {
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .user-popup {
    right: 0;
    width: min(360px, calc(100vw - 32px));
  }

  .title {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(calc(-50% + 24px));
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
    font-size: clamp(20px, 5.8vw, 28px);
    line-height: 1.15;
  }

  .home-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .home-col { gap: 16px !important; min-height: auto !important; }

  /* Tool cards become a compact row */
  .home-col-right {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  #main-page .card {
    min-height: 184px !important;
  }

  #main-page .card.clickable-card {
    padding: 20px !important;
  }

  /* Profit card: chart left, text right */
  .home-profit-card {
    align-items: center !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    min-height: 200px !important;
    text-align: left;
  }
  .home-profit-card > div:last-child {
    align-items: flex-start;
    padding-left: 14px !important;
    text-align: left;
  }

  .home-nav-card {
    align-items: center !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center;
  }

  /* Sessions feed: cap height so it doesn't dominate the scroll */
  .home-feed-card { min-height: 0 !important; }
  .home-feed-list { max-height: 56vh; }

  .home-profit-visual {
    flex: 0 0 auto;
    height: 160px;
    margin: 0;
    min-width: 0;
    padding-right: 0;
    width: 185px;
  }

  .home-profit-graph {
    height: 100%;
    width: 100%;
    max-width: none;
  }

  .home-goals-card,
  .overview-goals-panel {
    max-height: 240px;
  }

  #main-page > div[style*="padding:24px 0 16px"] {
    flex: 0 0 auto;
    margin-top: 18px;
    padding: 24px 0 calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .stats-body {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    overflow: visible !important;
  }

  .stats-left,
  .stats-right {
    min-height: 520px;
  }

  .schedule-body {
    flex-direction: column !important;
    overflow: visible !important;
  }

  .cal-wrap {
    min-height: 580px;
  }

  #cal-side {
    width: 100% !important;
    min-height: 360px;
  }

  #cal-view-week {
    overflow: hidden !important;
  }

  #cal-week-grid {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  #cal-week-grid > * {
    flex: 0 0 180px;
    min-width: 180px;
    scroll-snap-align: start;
  }

  #cal-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #financials-page > div[style*="display:flex"][style*="margin-bottom"],
  #marketing-page > div[style*="display:flex"][style*="margin-bottom"] {
    gap: 10px !important;
    margin-bottom: 16px !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  #financials-page button[id^="fin-tab-"],
  #marketing-page button[id^="mkt-tab-"] {
    flex: 0 0 auto !important;
    min-width: 150px;
    padding: 13px 16px !important;
    font-size: 14px !important;
  }

  #fin-breakdown {
    flex-direction: column !important;
    gap: 18px !important;
    overflow: visible !important;
  }

  #fin-sessions-col {
    width: 100%;
    max-height: none !important;
    overflow: visible !important;
  }

  #fin-breakdown > div:last-child {
    width: 100%;
    flex: none !important;
  }

  #fin-activity {
    overflow-x: auto;
  }

  /* The table wrapper had inline overflow:hidden, which CLIPPED the wide
     table on mobile instead of letting it scroll. Let it scroll sideways. */
  #fin-activity > div:last-child {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #fin-activity table {
    min-width: 640px;
  }

  /* Tighten the oversized desktop padding so fewer columns get cut off. */
  #fin-activity th,
  #fin-activity tbody tr:not(#fin-activity-empty) td {
    padding: 12px 14px !important;
    font-size: 13px !important;
  }

  /* No sessions yet: don't force the wide table — let the empty state fit
     and center in the viewport instead of overflowing off-screen. */
  #fin-activity table:has(#fin-activity-empty) {
    min-width: 0;
  }
  #fin-activity table:has(#fin-activity-empty) thead {
    display: none;
  }
  #fin-activity-empty td {
    padding: 32px 20px !important;
  }

  #fin-insights,
  #fin-forecast {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  #ins-grid {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    gap: 16px !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  #financials-page .ins-card,
  #financials-page .ins-slot {
    flex: 0 0 auto !important;
    min-height: 210px !important;
    width: 100%;
  }

  #financials-page .ins-slot {
    padding: 22px !important;
  }

  #fin-forecast > div[style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  #mkt-stats div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #fc-bar-chart {
    min-height: 320px;
  }

  .forecast-line-chart {
    min-height: 320px;
  }

  #mkt-intake,
  #mkt-loading,
  #mkt-report,
  #mkt-aiagent,
  #mkt-stats {
    min-height: auto !important;
    overflow: visible !important;
  }

  #cp-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #cp-grid {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    min-height: 480px !important;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  #cp-grid > * {
    flex: 0 0 190px;
    min-width: 190px;
    scroll-snap-align: start;
  }

  #mkt-aiagent > div[style*="justify-content:center"] {
    justify-content: flex-start !important;
    overflow-x: auto;
  }

  #cp-week-label {
    min-width: 180px !important;
    white-space: nowrap;
  }

  #ai-page > div[style*="grid-template-columns:300px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    overflow: visible !important;
  }

  #ai-page > div[style*="grid-template-columns:300px 1fr"] > div {
    min-height: 420px;
  }

  .team-workspace {
    gap: 16px;
    overflow: visible;
  }

  .team-overview {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px !important;
  }

  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    overflow: visible;
  }

  .team-column,
  .team-card {
    min-height: auto !important;
  }

  .team-invite-row {
    grid-template-columns: 1fr !important;
  }

  .team-primary-action,
  .team-secondary-action {
    width: 100%;
    justify-content: center;
  }

  .team-membership-row,
  .team-member-row,
  .team-dashboard-row,
  .team-shared-dashboard-card {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .team-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-card {
    width: min(520px, calc(100vw - 28px));
    padding: 26px 22px !important;
  }

  .what-is-page {
    padding: 18px 14px 28px !important;
  }

  .what-is-grid {
    grid-template-columns: 1fr 1fr;
  }

  .help-body {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    overflow: visible !important;
  }

  .help-left,
  .help-right {
    width: 100%;
  }

  .help-row {
    flex-direction: column;
    gap: 12px;
  }

  .help-send-btn {
    width: 100%;
  }

  .help-right {
    min-height: 420px;
    padding: 22px !important;
  }

  #help-page .help-right > div:last-child {
    flex-wrap: wrap;
  }

  #help-chat-input {
    min-width: 0;
  }

  .upgrade-body {
    align-items: flex-start;
    overflow: visible;
  }

  .upgrade-cards {
    flex-direction: column;
    gap: 18px;
    max-width: none;
  }

  .plan-card {
    padding: 26px 22px;
    min-height: auto;
  }

  .plan-action-area {
    min-height: auto;
  }

  .legal-doc {
    padding: 24px !important;
  }

  .module-modal-backdrop,
  .marketing-modal-overlay,
  #session-modal,
  #rename-modal,
  #site-dialog,
  #guest-auth-gate-modal,
  #upgrade-modal,
  #delete-account-modal {
    padding: 12px !important;
    align-items: center !important;
  }

  .module-modal-card,
  .marketing-modal-card,
  .site-dialog-card,
  .legal-popup-card,
  .upgrade-modal-card,
  #session-modal > div,
  #rename-modal > div,
  #guest-auth-gate-modal > div,
  #delete-account-modal > div {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
  }

  #session-modal .session-create-card {
    padding: 26px 22px !important;
  }

  #session-modal #sess-revenue,
  #session-modal #sess-costs,
  #session-modal #sess-name,
  #session-modal #sess-payment {
    min-height: 58px !important;
    border-radius: 22px !important;
    padding: 14px 18px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 560px) {
  /* Activity log -> stacked, labeled cards on phones (the 7-column table
     doesn't fit; cards read cleanly with no horizontal scrolling).
     The empty state keeps its centered treatment from the 900px rules. */
  #fin-activity thead { display: none !important; }
  #fin-activity > div:last-child:has(#fin-activity-body tr:not(#fin-activity-empty)) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  #fin-activity table:has(#fin-activity-body tr:not(#fin-activity-empty)),
  #fin-activity table:has(#fin-activity-body tr:not(#fin-activity-empty)) tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }
  #fin-activity tbody tr:not(#fin-activity-empty) {
    display: block;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-card) !important;
    border-radius: 14px;
    padding: 8px 16px;
    margin-bottom: 10px;
  }
  #fin-activity tbody tr:not(#fin-activity-empty) td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    gap: 12px;
    text-align: right !important;
    padding: 9px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    color: var(--text-primary) !important;
    font-size: 14px !important;
  }
  #fin-activity tbody tr:not(#fin-activity-empty) td::before {
    content: attr(data-label);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
  #fin-activity tbody tr:not(#fin-activity-empty) td[data-label="Session"] {
    display: block !important;
    text-align: left !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    padding-bottom: 10px !important;
  }
  #fin-activity tbody tr:not(#fin-activity-empty) td[data-label="Session"]::before { content: none; }
  #fin-activity tbody tr:not(#fin-activity-empty) td[data-label="Payment"] { border-bottom: none !important; }
  #fin-activity tbody tr:not(#fin-activity-empty) td[data-label="Edit"] { display: none !important; }

  .dash-page {
    padding: 16px 12px 24px !important;
  }

  .title-row {
    min-height: 124px;
  }

  .title {
    top: 50%;
    transform: translateY(calc(-50% + 24px));
    font-size: 20px;
    line-height: 1.2;
  }

  .dash-sel-wrap {
    width: calc(100% - 52px);
  }

  .dash-sel-btn {
    min-height: 44px;
    font-size: 14px;
  }

  .user-icon-btn {
    width: 44px;
    height: 44px;
  }

  .dash-sel-popup {
    left: 12px;
    right: 12px;
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    border-radius: 18px;
    padding: 10px;
  }

  #main-page .card {
    min-height: 176px !important;
  }

  #main-page .card-title {
    font-size: 16px !important;
  }

  #main-page .card svg:not(.home-profit-graph) {
    width: 42px !important;
    height: 42px !important;
  }

  #main-page .card svg.home-profit-graph {
    width: 100% !important;
    height: 100% !important;
  }

  /* Tool cards: title + icon stay compact on narrow phones */
  .home-col-right { gap: 10px !important; }
  .home-nav-card { min-height: 120px !important; padding: 14px 8px !important; }

  .home-profit-card {
    align-items: center !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    min-height: 190px !important;
    text-align: left;
  }

  .home-profit-card > div:last-child {
    align-items: flex-start;
    padding-left: 12px !important;
    text-align: left;
  }

  .home-profit-visual {
    width: 165px;
    min-width: 0;
    height: 150px;
    margin: 0;
    flex: 0 0 auto;
  }

  .home-goals-card,
  .overview-goals-panel {
    max-height: 240px;
  }

  .stats-left,
  .stats-right {
    min-height: 440px;
  }

  .cal-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .cal-tab {
    flex: 0 0 auto;
  }

  .cal-top {
    flex-direction: column;
    align-items: flex-start;
  }

  #cal-year-grid,
  #fin-forecast > div[style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  #mkt-stats div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  #financials-page button[id^="fin-tab-"],
  #marketing-page button[id^="mkt-tab-"] {
    min-width: 138px;
  }

  #cp-stats-strip {
    grid-template-columns: 1fr !important;
  }

  #cp-grid > *,
  #cal-week-grid > * {
    flex-basis: 168px;
    min-width: 168px;
  }

  .team-card {
    padding: 20px !important;
  }

  .team-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-count-pill {
    align-self: flex-start;
  }

  .auth-title {
    font-size: clamp(36px, 10vw, 48px) !important;
  }

  .auth-subtitle {
    font-size: 15px !important;
  }

  .welcome-info-link {
    margin-top: 16px;
  }

  .what-is-shell {
    gap: 16px;
    padding-bottom: 18px;
  }

  .what-is-hero {
    border-radius: 24px;
    padding: 28px 22px;
    grid-template-columns: 1fr;
  }

  .what-is-preview {
    min-height: 260px;
  }

  .what-is-hero h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .what-is-grid {
    grid-template-columns: 1fr;
  }

  .what-is-feature {
    grid-column: span 1;
    min-height: 176px;
    padding: 20px;
  }

  .what-is-close {
    grid-template-columns: 1fr;
  }

  .what-is-close .auth-btn {
    width: 100%;
    min-width: 0;
  }

  .auth-btn {
    min-height: 56px;
    font-size: 17px !important;
  }

  .module-options-grid {
    grid-template-columns: 1fr !important;
  }

  .marketing-modal-card,
  .module-modal-card,
  #session-modal .session-create-card {
    border-radius: 22px !important;
  }
}
