/* =============================================================================
   vedtara.css — Consolidated Design System (Vedtara)
   Merged from: 00-tokens, 01-base, 02-components, 03-data-viz, 04-layout
   With typography overhaul and sidebar navigation applied.
   ============================================================================= */


/* ═══════════════════════════════════
   SECTION: TOKENS
   ═══════════════════════════════════ */

/* --- Google Fonts -------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Reset --------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Body font-size (typography overhaul) -------------------------------- */
body {
  font-size: var(--text-base);
  line-height: 1.6;
}

/* ==========================================================================
   DARK THEME (default)
   ========================================================================== */
body.dk {
  /* --- Font stacks ------------------------------------------------------- */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* --- Type scale (typography overhaul) ---------------------------------- */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 26px;
  --text-3xl: 32px;

  /* --- Surfaces ---------------------------------------------------------- */
  --bg:               #0e0e1a;
  --card-bg:          rgba(28, 28, 40, 0.60);
  --card-border:      rgba(232, 228, 217, 0.10);
  --card-hover-border: rgba(45, 212, 191, 0.20);
  --card-radius:      10px;

  /* --- Brand ------------------------------------------------------------- */
  --cta:              #0D9488;
  --cta-hover:        #0F766E;
  --accent-bright:    #2DD4BF;
  --venus:            #D4CFC4;

  /* --- Text -------------------------------------------------------------- */
  --text-1:           #E8E4D9;
  --text-2:           rgba(232, 228, 217, 0.65);
  --text-3:           rgba(232, 228, 217, 0.40);

  /* --- Borders ----------------------------------------------------------- */
  --border:           rgba(232, 228, 217, 0.08);
  --border-strong:    rgba(232, 228, 217, 0.14);

  /* --- Data viz ---------------------------------------------------------- */
  --bar-track:        rgba(232, 228, 217, 0.08);
  --bar-fill:         linear-gradient(90deg, #0D9488, #D4CFC4);

  /* --- Icons ------------------------------------------------------------- */
  --icon-bg:          rgba(212, 207, 196, 0.14);
  --icon-color:       #D4CFC4;

  /* --- Buttons ----------------------------------------------------------- */
  --btn-bg:           linear-gradient(135deg, #0D9488, #0F766E);
  --btn-text:         #FFFFFF;
  --btn-glow:         rgba(13, 148, 136, 0.30);

  /* --- Semantic colors --------------------------------------------------- */
  --favorable:        #34D399;
  --caution:          #FBBF24;
  --challenging:      #F87171;
  --indigo:           #818CF8;

  /* --- Navigation -------------------------------------------------------- */
  --nav-bg:           rgba(28, 28, 40, 0.70);
  --nav-active-bg:    rgba(45, 212, 191, 0.12);

  /* --- UI chrome --------------------------------------------------------- */
  --badge-bg:         rgba(255, 255, 255, 0.08);
  --input-bg:         rgba(232, 228, 217, 0.06);
  --toggle-off-bg:    rgba(232, 228, 217, 0.16);
  --dropdown-bg:      rgba(28, 28, 40, 0.95);
  --dropdown-hover:   rgba(45, 212, 191, 0.08);

  /* --- Domain colors ----------------------------------------------------- */
  --career:           #3B82F6;
  --wealth:           #FFC42D;
  --relationships:    #F472B6;
  --health:           #34D399;
  --spirituality:     #A855F7;
  --education:        #818CF8;
  --family:           #FB923C;

  /* --- Graha colors ------------------------------------------------------ */
  --graha-sun:        #F0A030;
  --graha-moon:       #78B8D0;
  --graha-mars:       #E85040;
  --graha-mercury:    #48B868;
  --graha-jupiter:    #E8B848;
  --graha-venus:      #D868B0;
  --graha-saturn:     #5878C8;
  --graha-rahu:       #9878C0;
  --graha-ketu:       #C88850;
}

/* ==========================================================================
   LIGHT THEME
   ========================================================================== */
body.lt {
  /* --- Font stacks ------------------------------------------------------- */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* --- Type scale (typography overhaul) ---------------------------------- */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 26px;
  --text-3xl: 32px;

  /* --- Surfaces ---------------------------------------------------------- */
  --bg:               #F5FAFB;
  --card-bg:          rgba(255, 255, 255, 0.68);
  --card-border:      rgba(0, 0, 0, 0.08);
  --card-hover-border: rgba(13, 148, 136, 0.20);
  --card-radius:      10px;

  /* --- Brand ------------------------------------------------------------- */
  --cta:              #0D9488;
  --cta-hover:        #0F766E;
  --accent-bright:    #5EEAD4;
  --venus:            #EBF5F5;

  /* --- Text -------------------------------------------------------------- */
  --text-1:           #0A1A1C;
  --text-2:           #2A4548;
  --text-3:           #5A7A7E;

  /* --- Borders ----------------------------------------------------------- */
  --border:           rgba(10, 26, 28, 0.06);
  --border-strong:    rgba(10, 26, 28, 0.12);

  /* --- Data viz ---------------------------------------------------------- */
  --bar-track:        rgba(10, 26, 28, 0.06);
  --bar-fill:         linear-gradient(90deg, #0D9488, #5EEAD4);

  /* --- Icons ------------------------------------------------------------- */
  --icon-bg:          rgba(13, 148, 136, 0.08);
  --icon-color:       #0D9488;

  /* --- Buttons ----------------------------------------------------------- */
  --btn-bg:           linear-gradient(135deg, #0D9488, #0F766E);
  --btn-text:         #FFFFFF;
  --btn-glow:         rgba(13, 148, 136, 0.20);

  /* --- Semantic colors --------------------------------------------------- */
  --favorable:        #059669;
  --caution:          #D97706;
  --challenging:      #DC2626;
  --indigo:           #4F46E5;

  /* --- Navigation -------------------------------------------------------- */
  --nav-bg:           rgba(255, 255, 255, 0.80);
  --nav-active-bg:    rgba(13, 148, 136, 0.08);

  /* --- UI chrome --------------------------------------------------------- */
  --badge-bg:         rgba(0, 0, 0, 0.06);
  --input-bg:         #FFFFFF;
  --toggle-off-bg:    rgba(10, 26, 28, 0.12);
  --dropdown-bg:      rgba(255, 255, 255, 0.95);
  --dropdown-hover:   rgba(13, 148, 136, 0.06);

  /* --- Domain colors ----------------------------------------------------- */
  --career:           #2563EB;
  --wealth:           #D97706;
  --relationships:    #DB2777;
  --health:           #059669;
  --spirituality:     #7C3AED;
  --education:        #4F46E5;
  --family:           #EA580C;

  /* --- Graha colors ------------------------------------------------------ */
  --graha-sun:        #D88A18;
  --graha-moon:       #4A90A8;
  --graha-mars:       #D03828;
  --graha-mercury:    #2E9E50;
  --graha-jupiter:    #C89828;
  --graha-venus:      #B84890;
  --graha-saturn:     #3858A8;
  --graha-rahu:       #7858A0;
  --graha-ketu:       #A86830;
}


/* ═══════════════════════════════════
   SECTION: BASE
   ═══════════════════════════════════ */

/* --- Body ---------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Headings ------------------------------------------------------------ */
h1, h2, h3, h4,
.logo,
.serif {
  font-family: var(--font-heading);
}

/* --- Type scale (typography overhaul) ------------------------------------ */
h1 {
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.3;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1.3;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 500;
  font-family: var(--font-body);
  line-height: 1.4;
}

/* --- Prose elements (typography overhaul) -------------------------------- */
p {
  line-height: 1.6;
}

td {
  line-height: 1.5;
}

/* --- Monospace ----------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
}

/* --- Links --------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Focus --------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.20);
}

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Screen reader only -------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Utilities ----------------------------------------------------------- */
.text-center {
  text-align: center;
}

/* --- Images -------------------------------------------------------------- */
img {
  max-width: 100%;
  display: block;
}


/* ═══════════════════════════════════
   SECTION: COMPONENTS
   ═══════════════════════════════════ */


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 8px 14px;
  font-size: var(--text-sm);
  border-radius: 6px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 10px;
}

/* --- CTA (primary) ------------------------------------------------------- */
body.dk .btn-cta {
  background: linear-gradient(135deg, #0D9488, #0F766E);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.30);
}
body.dk .btn-cta:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}

body.lt .btn-cta {
  background: linear-gradient(135deg, #0D9488, #0F766E);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.20);
}
body.lt .btn-cta:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

/* --- CTA Venus ----------------------------------------------------------- */
body.dk .btn-cta-venus {
  background: linear-gradient(135deg, #D4CFC4, #B8B0A0);
  color: #050510;
  box-shadow: 0 4px 12px rgba(212, 207, 196, 0.20);
}
body.dk .btn-cta-venus:hover {
  box-shadow: 0 6px 20px rgba(212, 207, 196, 0.35);
  transform: translateY(-1px);
}

body.lt .btn-cta-venus {
  background: linear-gradient(135deg, #0A1A1C, #2A4548);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(10, 26, 28, 0.15);
}
body.lt .btn-cta-venus:hover {
  box-shadow: 0 6px 20px rgba(10, 26, 28, 0.25);
  transform: translateY(-1px);
}

/* --- Ghost --------------------------------------------------------------- */
body.dk .btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
body.dk .btn-ghost:hover {
  border-color: var(--text-3);
  color: var(--text-1);
}

body.lt .btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
body.lt .btn-ghost:hover {
  border-color: var(--text-3);
  color: var(--text-1);
}

/* --- Ghost teal ---------------------------------------------------------- */
body.dk .btn-ghost-teal {
  background: transparent;
  color: var(--cta);
  border: 1px solid rgba(13, 148, 136, 0.25);
}
body.dk .btn-ghost-teal:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: var(--cta);
}

body.lt .btn-ghost-teal {
  background: transparent;
  color: var(--cta);
  border: 1px solid rgba(13, 148, 136, 0.25);
}
body.lt .btn-ghost-teal:hover {
  background: rgba(13, 148, 136, 0.06);
  border-color: var(--cta);
}

/* --- Soft ---------------------------------------------------------------- */
body.dk .btn-soft {
  background: rgba(13, 148, 136, 0.10);
  color: var(--accent-bright);
  border: none;
}
body.dk .btn-soft:hover {
  background: rgba(13, 148, 136, 0.18);
}

body.lt .btn-soft {
  background: rgba(13, 148, 136, 0.08);
  color: var(--cta);
  border: none;
}
body.lt .btn-soft:hover {
  background: rgba(13, 148, 136, 0.14);
}

/* --- Success ------------------------------------------------------------- */
body.dk .btn-success {
  background: rgba(52, 211, 153, 0.12);
  color: var(--favorable);
  border: none;
}
body.dk .btn-success:hover {
  background: rgba(52, 211, 153, 0.20);
}

body.lt .btn-success {
  background: rgba(5, 150, 105, 0.08);
  color: var(--favorable);
  border: none;
}
body.lt .btn-success:hover {
  background: rgba(5, 150, 105, 0.14);
}

/* --- Warning ------------------------------------------------------------- */
body.dk .btn-warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--caution);
  border: none;
}
body.dk .btn-warning:hover {
  background: rgba(251, 191, 36, 0.20);
}

body.lt .btn-warning {
  background: rgba(217, 119, 6, 0.08);
  color: var(--caution);
  border: none;
}
body.lt .btn-warning:hover {
  background: rgba(217, 119, 6, 0.14);
}

/* --- Danger -------------------------------------------------------------- */
body.dk .btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--challenging);
  border: none;
}
body.dk .btn-danger:hover {
  background: rgba(248, 113, 113, 0.20);
}

body.lt .btn-danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--challenging);
  border: none;
}
body.lt .btn-danger:hover {
  background: rgba(220, 38, 38, 0.14);
}

/* --- Disabled ------------------------------------------------------------ */
.btn-disabled,
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}


/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
}

.badge-pill {
  border-radius: 99px;
}

/* --- Teal ---------------------------------------------------------------- */
body.dk .badge-teal { background: rgba(13, 148, 136, 0.12); color: var(--accent-bright); }
body.lt .badge-teal { background: rgba(13, 148, 136, 0.08); color: var(--cta); }

/* --- Favorable ----------------------------------------------------------- */
body.dk .badge-favorable { background: rgba(52, 211, 153, 0.12); color: var(--favorable); }
body.lt .badge-favorable { background: rgba(5, 150, 105, 0.08); color: var(--favorable); }

/* --- Caution ------------------------------------------------------------- */
body.dk .badge-caution { background: rgba(251, 191, 36, 0.12); color: var(--caution); }
body.lt .badge-caution { background: rgba(217, 119, 6, 0.08); color: var(--caution); }

/* --- Challenging --------------------------------------------------------- */
body.dk .badge-challenging { background: rgba(248, 113, 113, 0.12); color: var(--challenging); }
body.lt .badge-challenging { background: rgba(220, 38, 38, 0.08); color: var(--challenging); }

/* --- Indigo -------------------------------------------------------------- */
body.dk .badge-indigo { background: rgba(129, 140, 248, 0.12); color: var(--indigo); }
body.lt .badge-indigo { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }

/* --- Venus --------------------------------------------------------------- */
body.dk .badge-venus { background: rgba(212, 207, 196, 0.10); color: var(--venus); }
body.lt .badge-venus { background: rgba(10, 26, 28, 0.05); color: var(--text-2); }

/* --- Neutral ------------------------------------------------------------- */
body.dk .badge-neutral { background: var(--badge-bg); color: var(--text-2); }
body.lt .badge-neutral { background: var(--badge-bg); color: var(--text-2); }

/* --- Risk-level badges --------------------------------------------------- */
body.dk .badge-high { background: rgba(248, 113, 113, 0.15); color: var(--challenging); }
body.lt .badge-high { background: rgba(220, 38, 38, 0.10); color: var(--challenging); }

body.dk .badge-elevated { background: rgba(251, 191, 36, 0.15); color: var(--caution); }
body.lt .badge-elevated { background: rgba(217, 119, 6, 0.10); color: var(--caution); }

body.dk .badge-moderate { background: rgba(129, 140, 248, 0.12); color: var(--indigo); }
body.lt .badge-moderate { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }

body.dk .badge-low { background: rgba(52, 211, 153, 0.12); color: var(--favorable); }
body.lt .badge-low { background: rgba(5, 150, 105, 0.08); color: var(--favorable); }


/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.5;
  border-left: 3px solid transparent;
}

.alert-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

/* --- Info ---------------------------------------------------------------- */
body.dk .alert-info {
  background: rgba(13, 148, 136, 0.10);
  border-left-color: var(--cta);
  color: var(--text-2);
}
body.lt .alert-info {
  background: rgba(13, 148, 136, 0.04);
  border-left-color: var(--cta);
  color: var(--text-2);
}

/* --- Success ------------------------------------------------------------- */
body.dk .alert-success {
  background: rgba(52, 211, 153, 0.10);
  border-left-color: var(--favorable);
  color: var(--text-2);
}
body.lt .alert-success {
  background: rgba(5, 150, 105, 0.04);
  border-left-color: var(--favorable);
  color: var(--text-2);
}

/* --- Warning ------------------------------------------------------------- */
body.dk .alert-warning {
  background: rgba(251, 191, 36, 0.10);
  border-left-color: var(--caution);
  color: var(--text-2);
}
body.lt .alert-warning {
  background: rgba(217, 119, 6, 0.04);
  border-left-color: var(--caution);
  color: var(--text-2);
}

/* --- Danger -------------------------------------------------------------- */
body.dk .alert-danger {
  background: rgba(248, 113, 113, 0.10);
  border-left-color: var(--challenging);
  color: var(--text-2);
}
body.lt .alert-danger {
  background: rgba(220, 38, 38, 0.04);
  border-left-color: var(--challenging);
  color: var(--text-2);
}

/* --- Venus --------------------------------------------------------------- */
body.dk .alert-venus {
  background: rgba(212, 207, 196, 0.08);
  border-left-color: var(--venus);
  color: var(--text-2);
}
body.lt .alert-venus {
  background: rgba(10, 26, 28, 0.03);
  border-left-color: var(--text-2);
  color: var(--text-2);
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius, 10px);
  padding: 20px;
}

.card:hover {
  border-color: var(--card-hover-border);
}

.card-title {
  font-size: var(--text-xs);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
  font-weight: 500;
  line-height: 1;
}

/* --- Score card ---------------------------------------------------------- */
.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
}

/* --- Skeleton loading ---------------------------------------------------- */
.card-skeleton {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius, 10px);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.card-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Premium card -------------------------------------------------------- */
.premium-card {
  background: var(--card-bg);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: var(--card-radius, 10px);
  padding: 16px;
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.06);
}

/* --- Error card ---------------------------------------------------------- */
.error-card {
  background: var(--card-bg);
  border: 1px solid rgba(248, 113, 113, 0.15);
  border-radius: var(--card-radius, 10px);
  padding: 16px;
  color: var(--challenging);
}


/* ==========================================================================
   FORMS
   ========================================================================== */

/* --- Input field --------------------------------------------------------- */
.input-field {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.dk .input-field {
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
}
body.dk .input-field::placeholder { color: var(--text-3); }
body.dk .input-field:focus {
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

body.lt .input-field {
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
}
body.lt .input-field::placeholder { color: var(--text-3); }
body.lt .input-field:focus {
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* --- Input error --------------------------------------------------------- */
.input-field-error {
  border-color: var(--challenging) !important;
}
.input-field-error:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
}

.input-error-text {
  font-size: 11px;
  color: var(--challenging);
  margin-top: 4px;
}

/* --- Input label --------------------------------------------------------- */
.input-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

/* --- Toggle -------------------------------------------------------------- */
.toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s;
}

.toggle-off {
  background: var(--toggle-off-bg);
}

.toggle-on {
  background: var(--cta);
}

.toggle-on::after {
  transform: translateX(16px);
}

/* --- Segmented control --------------------------------------------------- */
.segmented {
  display: inline-flex;
  border-radius: 8px;
  background: var(--badge-bg);
  padding: 2px;
  gap: 2px;
}

.segmented-item {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: transparent;
  font-family: var(--font-body);
}

.segmented-item:hover {
  color: var(--text-2);
}

.segmented-item.active {
  background: var(--nav-active-bg);
  color: var(--cta);
}


/* ==========================================================================
   SCORE RINGS
   ========================================================================== */

.score-ring {
  position: relative;
  width: 72px;
  height: 72px;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring .bg-ring {
  fill: none;
  stroke: var(--bar-track);
  stroke-width: 4;
}

.score-ring .fg-ring {
  fill: none;
  stroke: var(--ring-color, var(--cta));
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.score-ring .value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 300;
  color: var(--text-1);
}

.score-label {
  font-size: var(--text-xs);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}


/* ==========================================================================
   PROGRESS BARS
   ========================================================================== */

.progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bar-track);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--cta), var(--accent-bright));
  transition: width 0.4s ease;
}


/* ==========================================================================
   SPINNERS
   ========================================================================== */

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--cta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinner-sm {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

.spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 3px;
}


/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
  font-size: var(--text-sm);
  color: var(--text-3);
  padding: 10px 20px;
}

.breadcrumb a {
  color: var(--text-3);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--cta);
  text-decoration: none;
}

.breadcrumb .sep {
  margin: 0 6px;
}


/* ═══════════════════════════════════
   SECTION: DATA-VIZ
   ═══════════════════════════════════ */


/* ==========================================================================
   DOMAIN ROWS
   Horizontal labeled progress bars for life-domain scores.
   ========================================================================== */

.domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.domain-row:last-child {
  margin-bottom: 0;
}

.domain-label {
  font-size: var(--text-sm);
  color: var(--text-2);
  min-width: 72px;
  text-align: right;
}

.domain-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bar-track);
  overflow: hidden;
}

.domain-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.domain-val {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  min-width: 22px;
  text-align: right;
}


/* ==========================================================================
   MINI SCORE BARS
   Compact inline bars for table cells and tight layouts.
   ========================================================================== */

.mini-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.mini-bar {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.mini-bar-val {
  font-size: 11px;
  color: var(--text-3);
  min-width: 18px;
  text-align: right;
}


/* ==========================================================================
   GRAHA DOTS
   Small colored circles for planet identification.
   ========================================================================== */

.graha-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gc);
  flex-shrink: 0;
}

.graha-sun     { --gc: var(--graha-sun); }
.graha-moon    { --gc: var(--graha-moon); }
.graha-mars    { --gc: var(--graha-mars); }
.graha-mercury { --gc: var(--graha-mercury); }
.graha-jupiter { --gc: var(--graha-jupiter); }
.graha-venus   { --gc: var(--graha-venus); }
.graha-saturn  { --gc: var(--graha-saturn); }
.graha-rahu    { --gc: var(--graha-rahu); }
.graha-ketu    { --gc: var(--graha-ketu); }


/* ==========================================================================
   YOGA PILLS
   Inline tag-style labels for yoga indicators.
   ========================================================================== */

.yoga-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.yoga-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--badge-bg);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.yoga-pill.positive {
  border-color: rgba(52, 211, 153, 0.15);
  color: var(--favorable);
}

.yoga-pill.negative {
  border-color: rgba(248, 113, 113, 0.12);
  color: var(--challenging);
}

.yoga-pill.indigo {
  border-color: rgba(129, 140, 248, 0.15);
  color: var(--indigo);
}

.yoga-pill.more {
  color: var(--text-3);
  font-style: italic;
  border-style: dashed;
}


/* ==========================================================================
   ASHTAKAVARGA CELLS
   Grid cells for benefic-point heatmap tables.
   ========================================================================== */

.av-cell {
  width: 36px;
  height: 28px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.av-strong {
  background: rgba(52, 211, 153, 0.15);
  color: var(--favorable);
}

.av-favorable {
  background: rgba(45, 212, 191, 0.10);
  color: var(--accent-bright);
}

.av-neutral {
  background: var(--bar-track);
  color: var(--text-3);
}

.av-weak {
  background: rgba(248, 113, 113, 0.10);
  color: var(--challenging);
}


/* ==========================================================================
   TIMELINE SEGMENTS
   Horizontal dasha timeline bars with past/active/future states.
   ========================================================================== */

.tl-bar {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
}

.tl-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-2);
  transition: all 0.15s;
}

.tl-seg.past {
  opacity: 0.35;
}

.tl-seg.active {
  border: 2px solid var(--cta);
  border-radius: 4px;
  box-shadow: inset 0 0 8px rgba(13, 148, 136, 0.15);
}

.tl-seg.future {
  opacity: 0.25;
}

.tl-labels {
  display: flex;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--text-3);
}


/* ==========================================================================
   VERTICAL BARS
   Column-style bars for period comparison charts.
   ========================================================================== */

.vbar-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}

.vbar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--accent-bright);
  opacity: 0.35;
  transition: opacity 0.2s;
}

.vbar.current {
  opacity: 1;
  background: var(--cta);
  border: 2px solid var(--cta);
}

.vbar-label {
  font-size: var(--text-xs);
  color: var(--text-3);
  text-align: center;
  margin-top: 6px;
}


/* ==========================================================================
   AGE RANGE
   Track-and-window visualization for age-based spans.
   ========================================================================== */

.age-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bar-track);
  position: relative;
}

.age-window {
  position: absolute;
  height: 100%;
  background: var(--cta);
  border-radius: 4px;
  opacity: 0.6;
}

.age-marker {
  position: absolute;
  width: 2px;
  height: 16px;
  top: -4px;
  background: var(--cta);
  border-radius: 1px;
}


/* ==========================================================================
   HORA ROWS
   Time-slot rows with favorability border indicators.
   ========================================================================== */

.hora-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}

.hora-row.favorable {
  border-left-color: var(--favorable);
}

.hora-row.challenging {
  border-left-color: var(--challenging);
}

.hora-row.neutral {
  border-left-color: var(--cta);
}

.hora-row.rahu-kala {
  background: rgba(248, 113, 113, 0.04);
  border-left-color: var(--challenging);
}


/* ==========================================================================
   STRENGTH ITEMS
   Left-bordered text items for favorable/challenging indicators.
   ========================================================================== */

.strength-item {
  padding: 6px 0 6px 10px;
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.4;
}

.strength-item.favorable {
  border-left: 2px solid var(--favorable);
}

.strength-item.challenging {
  border-left: 2px solid var(--challenging);
}


/* ═══════════════════════════════════
   SECTION: LAYOUT
   ═══════════════════════════════════ */


/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--card-bg) 80%, transparent);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-right: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow-y: auto;
  padding: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 1px;
  text-decoration: none;
}
.sidebar-logo span { color: var(--cta); }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

/* Collapsible section group */
.sidebar-group { margin-bottom: 4px; }

.sidebar-section {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  padding: 16px 16px 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-section:hover { color: var(--text-1); }
.sidebar-group:first-child .sidebar-section { padding-top: 8px; }

.sidebar-chevron {
  font-size: 12px;
  color: var(--text-2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}
.sidebar-group.collapsed .sidebar-chevron {
  transform: rotate(-90deg);
}

.sidebar-links {
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 1;
}
.sidebar-group.collapsed .sidebar-links {
  max-height: 0;
  opacity: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 36px;
  margin: 1px 8px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.sidebar-link:hover {
  background: color-mix(in srgb, var(--cta) 6%, transparent);
  color: var(--text-1);
  text-decoration: none;
  border-left-color: transparent;
}
.sidebar-link.active {
  color: var(--cta);
  background: color-mix(in srgb, var(--cta) 12%, transparent);
  border-left-color: transparent;
  font-weight: 500;
  box-shadow: 0 0 12px color-mix(in srgb, var(--cta) 15%, transparent),
              inset 0 0 0 1px color-mix(in srgb, var(--cta) 10%, transparent);
}

/* Nav link icons (inline SVG) */
.sidebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon svg {
  width: 16px;
  height: 16px;
}
.sidebar-link:hover .sidebar-icon {
  opacity: 0.7;
  transform: scale(1.1);
}
.sidebar-link.active .sidebar-icon {
  opacity: 1;
  color: var(--cta);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

/* Profile switcher */
.profile-switcher {
  position: relative;
  border-top: 1px solid var(--border);
}
.profile-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
}
.profile-switcher-trigger:hover { background: color-mix(in srgb, var(--cta) 6%, transparent); }
.profile-switcher-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.profile-switcher-name { flex: 1; font-weight: 500; }
.profile-switcher-asc { font-size: 11px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.profile-switcher-chevron { font-size: 11px; color: var(--text-3); transition: transform 0.2s; }
.profile-switcher.open .profile-switcher-chevron { transform: rotate(180deg); }

/* Profile dropdown */
.profile-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  margin-bottom: 4px;
  padding: 8px 0;
  z-index: 30;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.15);
  max-height: 360px;
  overflow-y: auto;
}
.profile-switcher.open .profile-dropdown { display: block; }

.profile-dropdown-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  padding: 8px 14px 4px;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.profile-dropdown-item:hover { background: var(--nav-active-bg); color: var(--text-1); }
.profile-dropdown-item.active { color: var(--cta); font-weight: 500; }
.profile-dropdown-item .check { width: 16px; font-size: 12px; color: var(--cta); }
.profile-dropdown-item .check:empty { width: 16px; }
.profile-dropdown-item .pd-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.profile-dropdown-item .pd-name { flex: 1; }
.profile-dropdown-item .pd-asc { font-size: 11px; color: var(--text-3); }

.profile-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.profile-dropdown-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  text-decoration: none;
}
.profile-dropdown-action:hover { background: var(--nav-active-bg); color: var(--cta); text-decoration: none; }
.profile-dropdown-action .action-icon { font-size: 14px; width: 20px; text-align: center; }

/* Comparison bar */
.comparison-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--nav-active-bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-1);
}
.comparison-bar.active { display: flex; }
.comparison-bar .cb-label { color: var(--text-3); font-size: 12px; }
.comparison-bar .cb-profile {
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.comparison-bar .cb-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600; color: #fff;
}
.comparison-bar .cb-vs { color: var(--text-3); font-size: 11px; }
.comparison-bar .cb-select {
  padding: 5px 12px; border-radius: 6px; font-size: 12px;
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; font-family: var(--font-body);
}
.comparison-bar .cb-actions { margin-left: auto; display: flex; gap: 8px; }
.comparison-bar .cb-exit {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; color: var(--text-3); cursor: pointer;
  font-family: var(--font-body);
}
.comparison-bar .cb-exit:hover { border-color: var(--challenging); color: var(--challenging); }

/* Topbar profile context */
.topbar-profile-ctx {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

.sidebar-cta {
  display: block;
  width: 100%;
  padding: 9px 16px;
  background: color-mix(in srgb, var(--cta) 10%, transparent);
  color: var(--cta);
  border: 1px solid color-mix(in srgb, var(--cta) 20%, transparent);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-cta:hover {
  background: color-mix(in srgb, var(--cta) 18%, transparent);
  border-color: color-mix(in srgb, var(--cta) 35%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--cta) 12%, transparent);
  text-decoration: none;
}

/* --- Sidebar collapse toggle --------------------------------------------- */
.sidebar-collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-3);
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}
.sidebar-collapse-btn:hover {
  color: var(--text-1);
  background: var(--nav-active-bg);
}
.sidebar-collapse-icon svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section header icon (visible in both modes) */
.sidebar-section-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.5;
  display: flex;
  align-items: center;
}
.sidebar-section-icon svg { width: 16px; height: 16px; }
.sidebar-section-label { flex: 1; }

/* Flyout menu (hidden in expanded mode) */
.sidebar-flyout {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 180px;
  background: color-mix(in srgb, var(--card-bg) 95%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid color-mix(in srgb, var(--border-strong) 60%, transparent);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  z-index: 40;
  margin-left: 4px;
}
.sidebar-flyout-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  padding: 6px 12px 4px;
}
.sidebar-flyout-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 4px;
  margin: 1px 4px;
  transition: all 0.15s;
}
.sidebar-flyout-link:hover {
  background: color-mix(in srgb, var(--cta) 8%, transparent);
  color: var(--text-1);
  text-decoration: none;
}
.sidebar-flyout-link.active {
  color: var(--cta);
  font-weight: 500;
  background: color-mix(in srgb, var(--cta) 10%, transparent);
}
.sidebar-flyout-link .sidebar-icon {
  opacity: 0.5;
}
.sidebar-flyout-link.active .sidebar-icon,
.sidebar-flyout-link:hover .sidebar-icon {
  opacity: 1;
}

/* --- Sidebar COLLAPSED (rail) mode --------------------------------------- */
.sidebar-collapsed .sidebar {
  width: 56px;
}
.sidebar-collapsed .main-content {
  margin-left: 56px;
}

/* Hide text elements in rail mode */
.sidebar-collapsed .sidebar-logo span,
.sidebar-collapsed .sidebar-section-label,
.sidebar-collapsed .sidebar-chevron,
.sidebar-collapsed .sidebar-links,
.sidebar-collapsed .profile-switcher-name,
.sidebar-collapsed .profile-switcher-chevron,
.sidebar-collapsed .sidebar-cta {
  display: none;
}

/* Logo shows just "V" */
.sidebar-collapsed .sidebar-logo {
  font-size: 18px;
}

/* Collapse button rotates */
.sidebar-collapsed .sidebar-collapse-icon svg {
  transform: rotate(180deg);
}

/* Section headers become icon-only clickable items */
.sidebar-collapsed .sidebar-section {
  justify-content: center;
  padding: 10px 0;
}
.sidebar-collapsed .sidebar-section-icon {
  opacity: 0.6;
}
.sidebar-collapsed .sidebar-section:hover .sidebar-section-icon {
  opacity: 1;
}

/* Sidebar group is relatively positioned for flyout */
.sidebar-collapsed .sidebar-group {
  position: relative;
}

/* Show flyout on hover in collapsed mode */
.sidebar-collapsed .sidebar-group:hover .sidebar-flyout {
  display: block;
}

/* Active section indicator in rail mode */
.sidebar-collapsed .sidebar-group.has-active .sidebar-section-icon {
  opacity: 1;
  color: var(--cta);
}

/* Profile in rail mode — just avatar */
.sidebar-collapsed .profile-switcher-trigger {
  justify-content: center;
  padding: 10px 0;
}
.sidebar-collapsed .profile-switcher-avatar {
  width: 28px;
  height: 28px;
}

/* Footer in rail mode — just + icon */
.sidebar-collapsed .sidebar-footer {
  padding: 8px 4px;
  text-align: center;
}
.sidebar-collapsed .sidebar-footer::after {
  content: '+';
  display: block;
  font-size: 18px;
  color: var(--cta);
  cursor: pointer;
}
.sidebar-collapsed .sidebar-footer a {
  font-size: 0;      /* hide text */
  padding: 0;
  border: none;
  background: none;
}

/* Header layout in rail mode */
.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 12px 4px 8px;
}
.sidebar-collapsed .sidebar-collapse-btn {
  position: absolute;
  top: 12px;
  right: 4px;
}

/* Smooth transition for sidebar width */
.sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-content {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Main content area --------------------------------------------------- */
.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

/* --- Top bar (always visible, spans content area) ------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(12px);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-1);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-user {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1;
}
.hamburger:hover { border-color: var(--cta); }

/* --- Sidebar overlay for mobile ------------------------------------------ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 19;
}
.sidebar-open .sidebar-overlay { display: block; }


/* ==========================================================================
   THEME TOGGLE
   ========================================================================== */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--cta);
}


/* ==========================================================================
   LANDING NAV
   Simpler top bar for landing / public pages.
   ========================================================================== */

.std-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.std-nav .logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: 1px;
}

.std-nav .nav-links {
  display: flex;
  gap: 20px;
}

.std-nav .nav-links a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.std-nav .nav-links a.active {
  color: var(--cta);
  border-bottom-color: var(--cta);
}


/* ==========================================================================
   DASHBOARD GRID
   Two-column card layout with full-width option.
   ========================================================================== */

.dash-body {
  padding: 16px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-grid .full {
  grid-column: 1 / -1;
}


/* ==========================================================================
   IDENTITY CARD
   Profile header with name, archetype, meta, score ring, badges.
   ========================================================================== */

.identity {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.identity-main {
  flex: 1;
}

.identity-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: 6px;
}

.identity-archetype {
  font-size: 13px;
  color: var(--cta);
  font-style: italic;
  font-family: var(--font-heading);
  margin-bottom: 12px;
}

.identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
}

.identity-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.identity-meta .label {
  color: var(--text-3);
}

.identity-badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.identity-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.identity-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--text-2);
}

.identity-stats .stat-val {
  font-weight: 600;
  color: var(--text-1);
  margin-right: 3px;
}


/* ==========================================================================
   PAGE SHELL
   Centered content container for inner pages.
   ========================================================================== */

.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
}


/* ==========================================================================
   SECTION LABEL
   All-caps micro heading for card sections.
   ========================================================================== */

.section-label {
  font-size: var(--text-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-3);
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Tablet (<=960px) ---------------------------------------------------- */
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  body.dk .sidebar { background: color-mix(in srgb, #1a1a2e 94%, transparent); }
  body.lt .sidebar { background: color-mix(in srgb, #f5f5f5 94%, transparent); }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-link, .sidebar-icon, .sidebar-links,
  .sidebar-cta, .sidebar-chevron,
  .profile-switcher-trigger {
    transition: none !important;
  }
}

/* --- Mobile (<=560px) ---------------------------------------------------- */
@media (max-width: 560px) {
  .dash-body { padding: 12px; }
  .dash-grid { gap: 12px; }
  .page-shell { padding: 12px 16px; }
  .identity { flex-direction: column; }
  .identity-right { flex-direction: row; align-items: center; }
  .identity-meta { gap: 8px; }
}
