/* Copyright (c) 2026 Peakora. All rights reserved. Licensed under the MIT License; see NOTICE and LICENSE. */
/* ---------------------------------------------------
   PEAKORA ASSISTANT & DASHBOARD — EMOTIONAL LUXURY WELLNESS THEME
   Deep Midnight Canvas, Warm Terracotta/Amber Glow, Centered Cards
--------------------------------------------------- */

* {
  box-sizing: border-box;
}

:root {
  --theme-bg: #0c0a15;
  --theme-card-bg: #151122;
  --theme-card-border: rgba(255, 255, 255, 0.08);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #a0aec0;
  --theme-heading: #ffffff;
  --theme-accent: #f4a261;
  --theme-accent-glow: rgba(224, 122, 95, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #e07a5f 0%, #f4a261 50%, #a78bfa 100%);
  --theme-card-glow: rgba(224, 122, 95, 0.18);
  --theme-card-glow-hover: rgba(224, 122, 95, 0.38);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--theme-bg);
  background-image: radial-gradient(circle at top, #1a152e 0%, #0c0a15 60%, #08060e 100%);
  color: var(--theme-text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.35s ease, color 0.35s ease;
}

.assistant-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* MAIN ASSISTANT CARD CONTAINER */
.assistant-card {
  background: var(--theme-card-bg);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 28px 26px 24px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.8), 0 0 32px var(--theme-card-glow);
  border: 1px solid var(--theme-card-border);
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.assistant-card:hover {
  border-color: rgba(224, 122, 95, 0.35);
  box-shadow: 0 28px 60px -10px rgba(0,0,0,0.9), 0 0 45px var(--theme-card-glow-hover);
}

/* ---------------------------------------------------
   HEADER + BRANDING
--------------------------------------------------- */

.assistant-header {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--theme-primary-grad);
  box-shadow: 0 0 16px var(--theme-accent-glow);
}

.brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 13px;
  color: var(--theme-text-muted);
  margin-top: 4px;
}

/* ---------------------------------------------------
   PROGRESS BAR
--------------------------------------------------- */

.assistant-progress {
  margin-bottom: 20px;
  width: 100%;
}

.progress-label {
  font-size: 12px;
  color: var(--theme-text-muted);
  margin-bottom: 6px;
  text-align: center;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--theme-primary-grad);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px var(--theme-accent-glow);
}

/* ---------------------------------------------------
   STEP BODY & TYPOGRAPHY
--------------------------------------------------- */

.assistant-body {
  min-height: 260px;
  padding-top: 6px;
  text-align: center;
}

.step {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

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

.step-centered {
  text-align: center;
}

.step h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--theme-heading);
  margin-top: 0;
  margin-bottom: 12px;
  text-align: center;
}

.step h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--theme-heading);
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

.step p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--theme-text-muted);
  margin: 8px 0;
  text-align: center;
}

/* ---------------------------------------------------
   INPUTS & FORM FIELDS
--------------------------------------------------- */

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 15px;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
  text-align: center;
}

.input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 16px var(--theme-accent-glow);
  background: rgba(255, 255, 255, 0.08);
}

select.input {
  background: #181226 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  min-height: 48px !important;
  cursor: pointer;
}

select.input option {
  background-color: #151122 !important;
  color: #ffffff !important;
  padding: 10px;
}

.input-error {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

/* ---------------------------------------------------
   BUTTONS
--------------------------------------------------- */

.actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  justify-content: center;
}

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

.btn {
  border-radius: 999px;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: var(--theme-primary-grad);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--theme-accent-glow);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--theme-accent-glow);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--theme-text-muted);
}

.btn.ghost:hover {
  border-color: var(--theme-accent);
  color: #ffffff;
}

.btn:active {
  transform: translateY(1px);
}

/* ---------------------------------------------------
   FOOTER
--------------------------------------------------- */

.assistant-footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--theme-text-muted);
  text-align: center;
}

/* ---------------------------------------------------
   CARDS (DASHBOARD & TOOLS)
--------------------------------------------------- */

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(224, 122, 95, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6), 0 0 20px var(--theme-card-glow);
}

/* Today's Anchor card highlighted */
.card:first-of-type {
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.15), rgba(244, 162, 97, 0.1));
  border-color: rgba(224, 122, 95, 0.35);
}

.card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.card h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--theme-accent);
  box-shadow: 0 0 10px var(--theme-accent);
  display: inline-block;
}

.card ul {
  padding-left: 0;
  list-style-type: none;
  margin: 12px 0;
  text-align: center;
}

.card li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--theme-text-muted);
}

/* ---------------------------------------------------
   NOTES & LISTS
--------------------------------------------------- */

.soft-note {
  color: var(--theme-text-muted);
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.tiny-note {
  font-size: 12px;
  color: var(--theme-text-muted);
  margin-top: 10px;
  line-height: 1.5;
  text-align: center;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}

.options.vertical {
  flex-direction: column;
  align-items: stretch;
}

/* ---------------------------------------------------
   BREATH RESET & LOADER
--------------------------------------------------- */

.loader {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--theme-accent);
  margin: 20px auto 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.breath-circle {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  margin: 20px auto;
  background: var(--theme-primary-grad);
  box-shadow: 0 0 32px var(--theme-accent-glow);
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0% { transform: scale(0.9); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 48px var(--theme-accent-glow); }
  100% { transform: scale(0.9); opacity: 0.85; }
}

/* ---------------------------------------------------
   MOOD BUBBLE CANVAS
--------------------------------------------------- */

.mood-bubble-canvas {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--theme-card-border);
  padding: 10px 6px 4px;
  box-sizing: border-box;
}

.mood-river-svg { overflow: visible; }
.mood-river-pt { cursor: pointer; transition: transform 0.2s ease; transform-box: fill-box; transform-origin: center; }
.mood-river-pt:hover circle:nth-child(1),
.mood-river-pt:focus circle:nth-child(1) { filter: drop-shadow(0 0 6px currentColor); }
.mood-river-pt:focus { outline: none; }
.mood-river-pt:hover { transform: scale(1.25); }

.mood-empty {
  padding: 18px 14px;
  text-align: center;
}
.mood-sample-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--theme-accent, #f4a261);
  background: rgba(244, 162, 97, 0.12);
  border: 1px solid rgba(244, 162, 97, 0.25);
  margin-bottom: 10px;
}
.mood-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.mood-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-text-muted, #a0aec0);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.mood-stat-chip em {
  font-style: normal;
  font-weight: 800;
  color: var(--theme-text-main, #f8fafc);
}
.mood-stat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mood-family-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}
.mood-family-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--theme-text-muted, #a0aec0);
}
.mood-family-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#mood-summary-text {
  font-size: 13px;
  color: var(--theme-text-muted);
  margin-top: 8px;
  line-height: 1.5;
  text-align: center;
}

/* Mood Balance equilibrium card */
.mood-balance-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.mood-balance-seg { height: 100%; transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.mood-balance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  justify-content: center;
}
.mood-balance-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--theme-text-muted);
}
.mood-balance-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.mood-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------
   POP-UP MODAL SYSTEM (LUXURY DARK UNIFIED STYLING)
--------------------------------------------------- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 6, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

#dodo-checkout-modal {
  z-index: 10000 !important;
}

#legal-modal {
  z-index: 20000 !important;
}

.modal-card, .peakora-popup-card, .peakora-modal-standard {
  background: var(--theme-card-bg) !important;
  color: var(--theme-text-main) !important;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 40px var(--theme-card-glow) !important;
  border: 1px solid var(--theme-card-border) !important;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.peakora-modal-standard h1,
.peakora-modal-standard h2,
.peakora-modal-standard h3,
.peakora-modal-standard h4 {
  color: var(--theme-heading, #ffffff) !important;
}

.modal-close, .modal-close-btn, .peakora-popup-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.25s ease;
  z-index: 10;
}

.modal-close:hover, .modal-close-btn:hover, .peakora-popup-close:hover {
  background: var(--theme-primary-grad);
  color: #ffffff !important;
  border-color: transparent;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 4px 16px var(--theme-accent-glow);
}

.peakora-popup-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--theme-card-border);
  text-align: center;
}

.peakora-popup-title {
  margin: 0 0 4px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
}

.peakora-popup-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-accent);
  display: block;
  text-align: center;
}

.peakora-popup-iframe {
  width: 100%;
  height: 60vh;
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  background: #0c0a15;
}

/* ---------------------------------------------------
   THEME VARIATIONS (PEAKORA+ LUXURY PALETTES)
--------------------------------------------------- */

/* 🌅 SUNRISE (Default - Warm Amber) */
body[data-theme="sunrise"], [data-theme="sunrise"] {
  --theme-bg: #0c0a15;
  --theme-card-bg: #151122;
  --theme-card-border: rgba(224, 122, 95, 0.25);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #a0aec0;
  --theme-heading: #ffffff;
  --theme-accent: #f4a261;
  --theme-accent-glow: rgba(224, 122, 95, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #e07a5f, #f4a261, #a78bfa);
  --theme-card-glow: rgba(224, 122, 95, 0.2);
  --theme-card-glow-hover: rgba(224, 122, 95, 0.4);
}

/* 🌿 SAGE (Bamboo & Emerald Mint - Calm State) */
body[data-theme="sage"], [data-theme="sage"] {
  --theme-bg: #08140e;
  --theme-card-bg: #112218;
  --theme-card-border: rgba(52, 211, 153, 0.25);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #a7f3d0;
  --theme-heading: #ffffff;
  --theme-accent: #34d399;
  --theme-accent-glow: rgba(52, 211, 153, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #34d399, #10b981, #f59e0b);
  --theme-card-glow: rgba(52, 211, 153, 0.2);
  --theme-card-glow-hover: rgba(52, 211, 153, 0.4);
}

/* 🔮 AMETHYST (Soft Lavender & Amethyst Violet - Anxious State) */
body[data-theme="amethyst"], [data-theme="amethyst"] {
  --theme-bg: #140d21;
  --theme-card-bg: #1d1230;
  --theme-card-border: rgba(192, 132, 252, 0.25);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #e9d5ff;
  --theme-heading: #ffffff;
  --theme-accent: #c084fc;
  --theme-accent-glow: rgba(192, 132, 252, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #c084fc, #a855f7, #ec4899);
  --theme-card-glow: rgba(192, 132, 252, 0.2);
  --theme-card-glow-hover: rgba(192, 132, 252, 0.4);
}

/* 🌙 TWILIGHT (Midnight Blue & Indigo - Sleepy State) */
body[data-theme="twilight"], [data-theme="twilight"] {
  --theme-bg: #0b0f24;
  --theme-card-bg: #121835;
  --theme-card-border: rgba(129, 140, 248, 0.25);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #c7d2fe;
  --theme-heading: #ffffff;
  --theme-accent: #818cf8;
  --theme-accent-glow: rgba(129, 140, 248, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #818cf8, #4f46e5, #38bdf8);
  --theme-card-glow: rgba(129, 140, 248, 0.2);
  --theme-card-glow-hover: rgba(129, 140, 248, 0.4);
}

/* ⚡ SOLAR (Solar Flare Gold & Amber - Energized State) */
body[data-theme="solar"], [data-theme="solar"] {
  --theme-bg: #1a1506;
  --theme-card-bg: #282008;
  --theme-card-border: rgba(250, 204, 21, 0.3);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #fef08a;
  --theme-heading: #ffffff;
  --theme-accent: #facc15;
  --theme-accent-glow: rgba(250, 204, 21, 0.4);
  --theme-primary-grad: linear-gradient(135deg, #facc15, #eab308, #f97316);
  --theme-card-glow: rgba(250, 204, 21, 0.22);
  --theme-card-glow-hover: rgba(250, 204, 21, 0.45);
}

/* 🌇 SUNSET (Velvet Coral Rose & Pink - Joyful State) */
body[data-theme="sunset"], [data-theme="sunset"] {
  --theme-bg: #180a14;
  --theme-card-bg: #261121;
  --theme-card-border: rgba(251, 113, 133, 0.25);
  --theme-text-main: #f8fafc;
  --theme-text-muted: #fecdd3;
  --theme-heading: #ffffff;
  --theme-accent: #fb7185;
  --theme-accent-glow: rgba(251, 113, 133, 0.35);
  --theme-primary-grad: linear-gradient(135deg, #f43f5e, #fb7185, #f4a261);
  --theme-card-glow: rgba(251, 113, 133, 0.2);
  --theme-card-glow-hover: rgba(251, 113, 133, 0.4);
}

.theme-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}

.theme-chip.active {
  background: var(--theme-primary-grad) !important;
  border-color: transparent !important;
  box-shadow: 0 0 16px var(--theme-accent-glow) !important;
  font-weight: 800 !important;
}

/* ---------------------------------------------------
   FULL REBUILT DASHBOARD LAYOUT (SCREENSHOTS 1 & 2)
--------------------------------------------------- */

/* DASHBOARD MODE ADAPTIVE LAYOUT OVERRIDES */
.assistant-shell.is-dashboard-mode {
  padding: 24px 16px;
  align-items: flex-start;
  width: 100%;
}

.assistant-card.is-dashboard-mode {
  max-width: 1440px !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-align: left !important;
}

.assistant-card.is-dashboard-mode .assistant-body {
  padding: 0 !important;
  min-height: auto !important;
  text-align: left !important;
  width: 100% !important;
}

.assistant-card.dashboard-wide {
  max-width: 1440px !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden;
  background: rgba(18, 14, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(224, 122, 95, 0.22);
  border-radius: var(--radius-lg);
}

.dash-container {
  display: flex;
  min-height: 760px;
  width: 100%;
}

/* SIDEBAR NAVIGATION */
.dash-sidebar {
  width: 230px;
  background: rgba(12, 9, 21, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  text-align: left;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-left: 8px;
}

.dash-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--theme-accent-glow);
}

/* Mobile top bar + drawer overlay: hidden on desktop, shown <=900px. */
.dash-mobile-bar { display: none; }
.dash-drawer-overlay { display: none; }

/* ===== PWA INSTALL BANNER ===== */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(21, 17, 34, 0.96);
  border: 1px solid var(--theme-card-border, rgba(255,255,255,0.1));
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 24px var(--theme-card-glow, rgba(224,122,95,0.2));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: installSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes installSlideUp {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.pwa-install-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--theme-accent-glow, rgba(224,122,95,0.35));
}
.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.pwa-install-text strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #ffffff;
}
.pwa-install-text span {
  font-size: 12px;
  color: var(--theme-text-muted, #a0aec0);
  overflow-wrap: break-word;
}
.pwa-install-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: var(--theme-primary-grad);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-install-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 380px) {
  .pwa-install-text span { display: none; }
}

.dash-brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.dash-brand-sub {
  font-size: 10px;
  color: var(--theme-text-muted);
  letter-spacing: 0.02em;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--theme-text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  width: 100%;
}

.dash-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.dash-nav-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.25), rgba(244, 162, 97, 0.15));
  border: 1px solid rgba(244, 162, 97, 0.4);
  box-shadow: 0 4px 16px rgba(224, 122, 95, 0.2);
  font-weight: 700;
  position: relative;
}

.dash-nav-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--theme-accent);
  box-shadow: 0 0 10px var(--theme-accent);
}

.dash-nav-btn svg {
  flex-shrink: 0;
}

/* MAIN DASHBOARD CONTENT AREA */
.dash-content {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  text-align: left;
}

.dash-welcome {
  margin-bottom: 24px;
}

.dash-welcome-h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
  align-items: stretch;
}

.dash-grid-equal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
  align-items: stretch;
}

/* GLASS CARD STYLING */
.dash-card {
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 30px var(--theme-card-glow);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
}

.dash-card:hover {
  border-color: var(--theme-card-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 40px var(--theme-card-glow-hover);
}

.dash-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--theme-heading, #ffffff);
  letter-spacing: 0.03em;
  margin: 0 0 4px 0;
}

.dash-card-sub {
  font-size: 13px;
  color: var(--theme-text-muted);
  margin: 0 0 16px 0;
}

.dash-card > p:first-of-type,
.dash-card > p {
  margin-top: 0;
}

/* Spacing utility used by stacked sections */
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

/* MOOD CHECK-IN EMOJIS */
.mood-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.mood-btn-icon {
  width: 32px;
  height: 32px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.25s ease;
}

.mood-btn-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--theme-text-muted);
  text-transform: lowercase;
}

.mood-btn:hover .mood-btn-icon {
  background: transparent !important;
  border-color: transparent !important;
  transform: scale(1.18);
  filter: drop-shadow(0 0 6px var(--theme-accent));
}

.mood-btn.active .mood-btn-icon {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 10px var(--theme-accent));
  transform: scale(1.22);
}

.mood-btn.active .mood-btn-label {
  color: #ffffff;
  font-weight: 700;
}

/* TIMELINE ARC GRAPHIC (SCREENSHOT 1) */
.timeline-arc-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  margin-top: 10px;
}

.timeline-arc-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.timeline-nodes-row {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  padding: 0 12px;
}

.timeline-node-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease;
}

.timeline-node-item:hover {
  transform: translateY(-2px);
}

.node-day-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--theme-text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid #1a152e;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}

.node-desc {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
}

.timeline-node-item.active .node-dot {
  background: var(--theme-accent);
  box-shadow: 0 0 12px var(--theme-accent);
  transform: scale(1.4);
}

.timeline-node-item.active-glow {
  background: rgba(244, 162, 97, 0.15);
  border: 1.5px solid var(--theme-accent);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(244, 162, 97, 0.4);
  z-index: 5;
  transform: translateY(-8px);
}

.timeline-node-item.active-glow .node-dot {
  background: #ffffff;
  box-shadow: 0 0 14px #ffffff, 0 0 20px var(--theme-accent);
}

/* FLOATING TIMELINE POPOVER CARD */
.timeline-popover {
  position: absolute;
  top: 95px;
  left: 0;
  width: 220px;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-accent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 16px var(--theme-card-glow);
  z-index: 10;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.timeline-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--theme-accent);
}

.popover-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-accent);
  letter-spacing: 0.08em;
}

.popover-text {
  font-size: 12px;
  color: var(--theme-text-main);
  line-height: 1.5;
}

.popover-hint {
  font-size: 10px;
  color: var(--theme-text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* PROGRESS CARD WITH MULTI-COLOR GRADIENT BAR */
.progress-bar-container {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 12px 0 16px 0;
  position: relative;
}

.progress-bar-fill-gradient {
  height: 100%;
  width: 71.4%;
  background: linear-gradient(90deg, #f4a261 0%, #e07a5f 40%, #a78bfa 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(244, 162, 97, 0.6);
  transition: width 0.5s ease;
}

.progress-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.progress-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  color: var(--theme-text-muted);
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* DAILY INTENTION CARDS */
.intention-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.intention-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.intention-card-h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.intention-card-desc {
  font-size: 12px;
  color: var(--theme-text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.btn-pill-amber {
  background: var(--theme-accent);
  color: #120e1e;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-pill-amber:hover {
  background: #ffffff;
  box-shadow: 0 0 16px rgba(244, 162, 97, 0.8);
  transform: translateY(-2px);
}

/* ---------------------------------------------------
   SCREENSHOT 2: BREATHING & SOUNDSCAPES STUDIO
--------------------------------------------------- */

.soundscape-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--theme-text-muted);
}

.soundscape-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soundscape-brand-icon {
  width: 18px;
  height: 18px;
  background: var(--theme-primary-grad);
  border-radius: 50%;
}

.breathing-ring-outer {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-ring-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #f4a261, #a78bfa, #e07a5f, #f4a261);
  mask: radial-gradient(transparent 68%, #000 70%);
  -webkit-mask: radial-gradient(transparent 68%, #000 70%);
  box-shadow: 0 0 30px rgba(244, 162, 97, 0.5);
  animation: rotateConic 12s linear infinite;
}

@keyframes rotateConic {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.breathing-center-info {
  text-align: center;
  z-index: 2;
}

.breathing-action-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.breathing-time-rem {
  font-size: 12px;
  color: var(--theme-text-muted);
  margin-top: 4px;
}

.audio-wave-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
}

.audio-wave-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.audio-wave-canvas-svg {
  width: 100%;
  height: 50px;
}

.solfeggio-toggle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.solfeggio-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.solfeggio-item:hover {
  border-color: rgba(244, 162, 97, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.solfeggio-item.active {
  background: rgba(244, 162, 97, 0.15);
  border-color: var(--theme-accent);
  box-shadow: 0 0 16px rgba(244, 162, 97, 0.3);
}

.solfeggio-switch {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 6px auto;
  position: relative;
  transition: all 0.25s ease;
}

.solfeggio-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  transition: all 0.25s ease;
}

.solfeggio-item.active .solfeggio-switch {
  background: var(--theme-accent);
}

.solfeggio-item.active .solfeggio-switch::after {
  transform: translateX(12px);
}

.solfeggio-freq {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.solfeggio-desc {
  font-size: 10px;
  color: var(--theme-text-muted);
}

/* LIVE WAVE CANVAS, BREATH RING PULSE & ANALYTICS ANIMATION */
.audio-wave-canvas {
  width: 100%;
  height: 50px;
  display: block;
}

.breathing-ring-outer {
  cursor: pointer;
}

.breathing-ring-outer:hover .breathing-ring-circle {
  box-shadow: 0 0 42px rgba(244, 162, 97, 0.7);
}

.breathing-ring-pulse {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(244,162,97,0.22), rgba(167,139,250,0.10) 60%, transparent 75%);
  transition: transform 1s ease-in-out;
  transform: scale(1);
  z-index: 1;
  pointer-events: none;
}

.analytics-bar {
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  animation: analyticsGlow 2.4s ease-in-out infinite;
}

@keyframes analyticsGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.analytics-grow {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: analyticsGrow 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes analyticsGrow {
  from { transform: scaleY(0.05); opacity: 0.2; }
  to { transform: scaleY(1); opacity: 0.9; }
}

.ambient-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.ambient-card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all 0.25s ease;
}

.ambient-card-item.active {
  border-color: var(--theme-accent);
  background: rgba(244, 162, 97, 0.1);
  box-shadow: 0 0 16px rgba(244, 162, 97, 0.2);
}

.ambient-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ambient-info {
  flex: 1;
}

.ambient-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.ambient-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ambient-slider {
  flex: 1;
  accent-color: var(--theme-accent);
  cursor: pointer;
  height: 4px;
}

.ambient-pct {
  font-size: 11px;
  color: var(--theme-text-muted);
  width: 28px;
  text-align: right;
}

@media (max-width: 1100px) {
  .dash-content {
    padding: 24px 28px;
  }
  .dash-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .assistant-shell.is-dashboard-mode {
    padding: 8px 4px;
  }
  .dash-container {
    flex-direction: column;
    min-height: auto;
  }
  /* Narrow viewport (desktop zoom or small tablet): sidebar stays visible as a
     horizontal scrollable tab bar on top, so every tab remains reachable.
     The hamburger drawer is reserved for real phones (<=520px) below. */
  .dash-mobile-bar {
    display: none;
  }
  .dash-drawer-overlay {
    display: none;
  }
  .dash-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 9, 21, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .dash-brand {
    margin-bottom: 0;
    flex-shrink: 0;
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
  .dash-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    width: auto;
    flex: 1;
  }
  .dash-nav-btn {
    width: auto;
    flex-shrink: 0;
    justify-content: center;
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .dash-grid-2, .dash-grid-equal {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .solfeggio-toggle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Real phones: horizontal bar is too cramped, so switch to the off-canvas
   hamburger drawer. Tabs live behind the hamburger and open on tap. */
@media (max-width: 520px) {
  .dash-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 9, 21, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .dash-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
  }
  .dash-mobile-title {
    flex: 1;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.05em;
  }
  .dash-mobile-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }
  .dash-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 14, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .dash-drawer-overlay.dash-drawer-overlay-show {
    display: block;
    opacity: 1;
  }
  .dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 82vw;
    flex-direction: column;
    align-items: stretch;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding: 22px 16px;
    background: rgba(12, 9, 21, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .dash-sidebar.dash-drawer-open {
    transform: translateX(0);
  }
  .dash-brand {
    margin-bottom: 24px;
    padding-right: 0;
    border-right: none;
  }
  .dash-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    flex: none;
  }
  .dash-nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 14px;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .assistant-shell.is-dashboard-mode {
    padding: 6px;
  }
  .dash-content {
    padding: 16px 12px;
  }
  .dash-welcome-h1 {
    font-size: 20px;
  }
  /* Drawer buttons stay full-width and readable on small screens. */
  .dash-nav-btn {
    padding: 12px 14px;
    font-size: 14px;
  }
  .dash-nav-btn svg {
    width: 18px;
    height: 18px;
  }
  .timeline-arc-wrap {
    height: auto;
    min-height: 120px;
  }
  .timeline-nodes-row {
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 12px;
    justify-content: flex-start;
  }
  .timeline-node-item {
    flex-shrink: 0;
  }
  .mood-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .intention-grid {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE PADDING FOR ONBOARDING CARDS */
@media (max-width: 480px) {
  .assistant-shell:not(.is-dashboard-mode) {
    padding: 20px 14px;
  }
  .assistant-card:not(.is-dashboard-mode) {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }
}

/* ===== MOBILE CARD TIGHTENING (dashboard) ===== */
@media (max-width: 600px) {
  .dash-card { padding: 16px 14px; }
  .dash-grid-2, .dash-grid-equal { gap: 14px; }
  /* Ensure all card text wraps inside the card and never overflows edges. */
  .dash-card,
  .dash-card * {
    max-width: 100%;
  }
  .dash-card h1,
  .dash-card h2,
  .dash-card h3,
  .dash-card p,
  .dash-card span,
  .dash-card li {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

@media (max-width: 400px) {
  .dash-card { padding: 14px 12px; }
}

/* GENTLE TOOLKIT 2-LINE CHOICE TILES */
.toolkit-choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #ffffff;
}

.toolkit-choice-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--theme-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.toolkit-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
}

.toolkit-btn-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.toolkit-btn-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.toolkit-btn-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolkit-pill-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244, 162, 97, 0.15);
  color: var(--theme-accent, #f4a261);
  border: 1px solid rgba(244, 162, 97, 0.3);
  white-space: nowrap;
}

.toolkit-btn-row2 {
  font-size: 11px;
  color: var(--theme-text-muted);
  line-height: 1.35;
}

/* EXCITING PLAN SECTION CHOICE TILES */
.plan-choice-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
  position: relative;
}

.plan-choice-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--theme-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px var(--theme-card-glow);
}

.plan-choice-btn.is-today {
  border: 1.5px solid var(--theme-accent, #f4a261);
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.12) 0%, rgba(224, 122, 95, 0.06) 100%);
  box-shadow: 0 0 20px rgba(244, 162, 97, 0.2);
}

.plan-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-choice-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.plan-choice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.plan-choice-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.plan-choice-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(244, 162, 97, 0.15);
  color: var(--theme-accent, #f4a261);
  border: 1px solid rgba(244, 162, 97, 0.3);
  white-space: nowrap;
}

.plan-choice-pill.active-pill {
  background: var(--theme-primary-grad);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 10px var(--theme-accent-glow);
}

.plan-choice-action {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}

.plan-choice-quote {
  font-size: 11px;
  color: var(--theme-text-muted);
  font-style: italic;
  line-height: 1.35;
}

/* ===== MOBILE TIGHTENING + OVERFLOW SAFETY =====
   Keeps onboarding cards and dashboard cards compact on phones and
   guarantees no text or edges clip horizontally. Layers on top of the
   existing 1100/900/600/520/480/400 breakpoints above. */
@media (max-width: 600px) {
  /* Onboarding step headings: 26px is too tall on a 360px screen. */
  .step h1 { font-size: 21px; line-height: 1.2; }
  .step h2 { font-size: 17px; }
  .step p  { font-size: 14px; line-height: 1.55; }

  /* Dashboard welcome heading. */
  .dash-welcome-h1 { font-size: 19px; }

  /* The centered onboarding card already shrinks at 480px; tighten further. */
  .assistant-shell:not(.is-dashboard-mode) { padding: 12px 10px; }
  .assistant-card:not(.is-dashboard-mode) { padding: 20px 16px; border-radius: var(--radius-md); }

  /* Modals: reduce padding so the card fits a short viewport without scroll. */
  .peakora-modal-standard,
  .modal-card,
  .peakora-popup-card { padding: 22px 16px !important; }

  /* Hard overflow guard for every dashboard card and its children. */
  .dash-card,
  .dash-card * { max-width: 100%; }
  .dash-card h1,
  .dash-card h2,
  .dash-card h3,
  .dash-card h4,
  .dash-card p,
  .dash-card span,
  .dash-card li,
  .dash-card td,
  .dash-card th {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* Tables/grids inside cards must not push past the card width. */
  .dash-card table { width: 100%; table-layout: fixed; }
  .dash-card pre,
  .dash-card code { white-space: pre-wrap; word-break: break-word; }

  /* Fixed-width chips/badges shrink to content and wrap. */
  .dash-card .badge,
  .dash-card .chip { white-space: normal; }
}

@media (max-width: 380px) {
  .step h1 { font-size: 19px; }
  .step h2 { font-size: 16px; }
  .step p  { font-size: 13px; }
  .assistant-shell:not(.is-dashboard-mode) { padding: 8px 8px; }
  .assistant-card:not(.is-dashboard-mode) { padding: 18px 14px; }
  .dash-welcome-h1 { font-size: 17px; }
}

/* ===== TIMELINE MOBILE OVERFLOW FIX (7-Day Reset Plan Timeline) =====
   On phones the 7 day nodes + labels can clip the card edges. Make the row
   scroll horizontally, shrink each node, cap label width, and constrain the
   popover so it never spills past the card. */
@media (max-width: 600px) {
  .timeline-arc-wrap { min-height: 116px; }
  .timeline-nodes-row {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 4px 8px;
  }
  .timeline-node-item { flex-shrink: 0; }
  .node-desc { max-width: 44px; font-size: 10px; }
  .node-day-label { font-size: 9px; }
  /* The active node grows with padding; keep it inside the row width. */
  .timeline-node-item.active-glow { padding: 6px 8px; transform: translateY(-4px); }
  /* Popover: cap width to the card and let text wrap, never overflow right. */
  .timeline-popover {
    width: min(220px, 86vw);
    max-width: 100%;
    left: 0;
    right: auto;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* The card itself must clip its children rather than widen the page. */
  .dash-card { overflow-x: hidden; }
}
@media (max-width: 380px) {
  .node-desc { max-width: 38px; font-size: 9px; }
  .timeline-popover { width: min(190px, 84vw); }
}
