/* ==========================================================
   ASTROLITE â€” SAAS REDESIGN
   Professional Light/Dark Mode Design System
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================
   1. CSS VARIABLES â€” LIGHT MODE (DEFAULT)
   ========================================================== */
:root {
    /* Backgrounds */
    --bg-base:        #f8fafc;
    --bg-surface:     #ffffff;
    --bg-elevated:    #f1f5f9;
    --bg-sidebar:     #ffffff;
    --bg-header:      rgba(255,255,255,0.95);

    /* Borders */
    --border:         rgba(0,0,0,0.08);
    --border-strong:  rgba(0,0,0,0.14);
    --border-focus:   #6366f1;

    /* Accent â€” Indigo */
    --accent:         #6366f1;
    --accent-hover:   #4f52d6;
    --accent-muted:   rgba(99,102,241,0.10);
    --accent-text:    #4338ca;

    /* Text */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-tertiary:  #94a3b8;
    --text-inverse:   #ffffff;

    /* Semantic */
    --success:        #16a34a;
    --success-bg:     rgba(22,163,74,0.10);
    --warning:        #d97706;
    --warning-bg:     rgba(217,119,6,0.10);
    --danger:         #dc2626;
    --danger-bg:      rgba(220,38,38,0.10);
    --info:           #0284c7;
    --info-bg:        rgba(2,132,199,0.10);

    /* Gold â€” Vedic highlight (subdued) */
    --gold-accent:    #b45309;
    --gold-muted:     rgba(180,83,9,0.12);

    /* Shadows */
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-card:    0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.12);

    /* Radii */
    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      14px;
    --radius-xl:      18px;
    --radius-full:    9999px;

    /* Layout */
    --header-height:  60px;
    --sidebar-width:  260px;

    /* Fonts */
    --font-main:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition:     all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ==========================================================
   2. CSS VARIABLES â€” DARK MODE OVERRIDES
   ========================================================== */
[data-theme="dark"] {
    --bg-base:        #0d0f14;
    --bg-surface:     #141720;
    --bg-elevated:    #1c2030;
    --bg-sidebar:     #0f1117;
    --bg-header:      rgba(13,15,20,0.97);

    --border:         rgba(255,255,255,0.07);
    --border-strong:  rgba(255,255,255,0.12);

    --accent:         #818cf8;
    --accent-hover:   #a5b4fc;
    --accent-muted:   rgba(129,140,248,0.12);
    --accent-text:    #a5b4fc;

    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary:  #475569;
    --text-inverse:   #0f172a;

    --success:        #22c55e;
    --success-bg:     rgba(34,197,94,0.12);
    --warning:        #f59e0b;
    --warning-bg:     rgba(245,158,11,0.12);
    --danger:         #ef4444;
    --danger-bg:      rgba(239,68,68,0.12);
    --info:           #38bdf8;
    --info-bg:        rgba(56,189,248,0.12);

    --gold-accent:    #f59e0b;
    --gold-muted:     rgba(245,158,11,0.12);

    --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
    --shadow-card:    0 1px 3px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.5);
}

/* ==========================================================
   3. RESET & BASE
   ========================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-base);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ==========================================================
   4. GALAXY BACKGROUND â€” COMPLETELY HIDDEN & DISABLED
   ========================================================== */
.galaxy-container,
.space-background,
.stars-layer,
.stars-optimized,
.nebula-layer,
.nebula-optimized,
.twinkling,
.solar-system {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    animation: none !important;
}

/* ==========================================================
   5. APP HEADER
   ========================================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-strong);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 16px;
}

/* Logo */
.logo-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.logo .logo-accent {
    color: var(--accent);
}

.tagline {
    display: none;
}

/* Hamburger menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover { background: var(--bg-elevated); }

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Header right actions group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme toggle button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
}

/* ==========================================================
   6. SIDEBAR NAVIGATION
   ========================================================== */
.sidebar-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-menu {
    padding: 16px 0 40px;
}

.nav-divider {
    padding: 16px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.nav-divider:first-child {
    border-top: none;
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-left-color: var(--border-strong);
}

.nav-item.active {
    background: var(--accent-muted);
    color: var(--accent-text);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-icon {
    font-size: 15px;
    min-width: 20px;
    text-align: center;
    opacity: 0.8;
}

/* Scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* Mobile overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 850;
    display: none;
    backdrop-filter: blur(2px);
}
.mobile-overlay.active { display: block; }

/* ==========================================================
   7. MAIN CONTENT AREA
   ========================================================== */
.app-container {
    margin-top: var(--header-height);
    margin-left: auto;
    margin-right: auto;
    padding: 28px 28px 60px;
    min-height: calc(100vh - var(--header-height));
    max-width: 1400px;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 10;
}

/* When sidebar is visible on desktop */
.sidebar-nav:not([style*="display: none"]) ~ .mobile-overlay ~ .app-container {
    margin-left: var(--sidebar-width);
    margin-right: 0;
}

/* Trust Banner */
.trust-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--accent-muted);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.trust-icon { font-size: 20px; }

.trust-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-text);
    margin-bottom: 2px;
}

.trust-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================
   8. CONTENT SECTIONS
   ========================================================== */
.content-section { display: none; }
.content-section.active { display: block; }

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

.section-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================
   9. PROFESSIONAL LOADING OVERLAY
   ========================================================== */
.astro-loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.astro-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.astro-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    max-width: 340px;
    padding: 0 24px;
}

.astro-loader-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.astro-loader-logo span { color: var(--accent); }

/* Orbital ring spinner */
.astro-spinner {
    position: relative;
    width: 72px;
    height: 72px;
}

.astro-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.astro-spinner-ring:nth-child(1) {
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.astro-spinner-ring:nth-child(2) {
    inset: 8px;
    border-right-color: var(--warning);
    animation: spin 1.5s linear infinite reverse;
}

.astro-spinner-ring:nth-child(3) {
    inset: 18px;
    border-bottom-color: var(--success);
    animation: spin 2s linear infinite;
}

.astro-loader-dot {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%       { opacity: 0.8; transform: scale(1.1); }
}

.astro-loader-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.astro-loader-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Progress bar */
.astro-progress-bar {
    width: 220px;
    height: 3px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.astro-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--warning));
    border-radius: var(--radius-full);
    animation: progress-fill 3s ease-in-out infinite;
    transform-origin: left;
}

@keyframes progress-fill {
    0%   { width: 0%; }
    60%  { width: 85%; }
    100% { width: 100%; }
}

.astro-loader-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.astro-loader-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.astro-loader-step.done { color: var(--success); }
.astro-loader-step.active { color: var(--text-primary); font-weight: 500; }

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-strong);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.astro-loader-step.done .step-dot { background: var(--success); }
.astro-loader-step.active .step-dot {
    background: var(--accent);
    animation: pulse-dot 1s ease-in-out infinite;
}

/* ==========================================================
   10. SCROLLBAR
   ========================================================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ==========================================================
   11. FORM SECTION
   ========================================================== */
.form-section {
    max-width: 960px;
    margin: 0 auto 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 0;
    text-align: left;
    letter-spacing: 0;
    text-transform: none;
}

.form-title::after { display: none; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width { grid-column: span 2; }

label {
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select {
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-muted);
    background: var(--bg-surface);
}

input::placeholder { color: var(--text-tertiary); }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Autocomplete dropdown */
.autocomplete-wrapper { position: relative; }

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-md);
}

.suggestions-dropdown.active { display: block; }

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
}

.suggestion-item:hover { background: var(--bg-elevated); }
.suggestion-item:last-child { border-bottom: none; }
.city-name { font-weight: 600; }
.city-details { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 13px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
    transform: translateY(-1px);
}

.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 15px; }

/* Secondary Button */
.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent-text);
}

/* ==========================================================
   12. DASHBOARD GRID
   ========================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.full-width { grid-column: 1 / -1; }

/* ==========================================================
   13. CARDS
   ========================================================== */
.card,
.parchment-texture,
.analysis-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    color: var(--text-primary);
}

/* Remove old mandala pseudo-elements */
.card::before, .card::after,
.parchment-texture::before, .parchment-texture::after,
.analysis-card::before, .analysis-card::after {
    display: none !important;
    content: none !important;
}

.card:hover, .analysis-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

/* Card headings */
.card h4,
.form-title,
.analysis-header h3,
.analysis-header h4 {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card h4::after,
.analysis-header h3::after,
.analysis-header h4::after { display: none; }

/* Info rows inside cards */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.info-row:last-child { border-bottom: none; }
.info-row .label { font-weight: 500; color: var(--text-secondary); }
.info-row .value { color: var(--text-primary); font-weight: 600; text-align: right; }

/* Card body (content sections inside cards) */
.card-body,
.analysis-card .card-body {
    background: var(--bg-elevated);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    color: var(--text-primary);
}

.card-body p, .card-body li,
.card-body h5, .card-body span,
.card-body div { color: var(--text-primary) !important; }

/* Analysis header */
.analysis-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.analysis-icon { font-size: 20px; }

/* ==========================================================
   14. CHART TABS & KUNDLI CHART
   ========================================================== */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.chart-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.chart-wrapper h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.chart-wrapper h4::after { display: none; }

.chart-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.chart-container { display: none; }
.chart-container.active { display: block; }
.chart-container-sm { position: relative; margin: 0 auto; }

.kundli-chart {
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* SVG chart lines & text â€” light mode */
.kundli-chart rect {
    fill: none;
    stroke: rgba(99,102,241,0.25);
    stroke-width: 1.5;
}

.kundli-chart line {
    stroke: rgba(99,102,241,0.20);
    stroke-width: 1;
}

.rashi-num {
    fill: var(--accent-text);
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 700;
    text-anchor: middle;
}

.planet-text {
    fill: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
}

[data-theme="dark"] .rashi-num { fill: #a5b4fc; }
[data-theme="dark"] .planet-text { fill: #94a3b8; }
[data-theme="dark"] .kundli-chart rect { stroke: rgba(129,140,248,0.3); }
[data-theme="dark"] .kundli-chart line { stroke: rgba(129,140,248,0.2); }

/* Chart selector dropdown */
.chart-selector-enhanced {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    font-family: var(--font-main) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

/* ==========================================================
   15. PLANETARY TABLE
   ========================================================== */
.table-responsive { overflow-x: auto; }

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.compact-table th {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
}

.compact-table td {
    padding: 10px 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.compact-table tr:last-child td { border-bottom: none; }
.compact-table tr:hover td { background: var(--bg-elevated); }

/* ==========================================================
   16. DOMAIN SCORE CARDS (HIGHLIGHTS)
   ========================================================== */
.highlights-section { margin: 24px 0; }

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.highlight-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.highlight-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.highlight-icon { font-size: 36px; margin-bottom: 12px; }

.highlight-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: center;
}

.highlight-card h4::after { display: none; }

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 12px;
    margin: 10px 0;
}

.status-badge.is-manglik {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.status-badge.not-manglik {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.highlight-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 8px 0;
    line-height: 1.5;
}

.compact-list { list-style: none; padding: 0; text-align: left; }

.compact-list li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-primary);
}

.compact-list li:last-child { border-bottom: none; }

/* Logic buttons */
.logic-btn, .logic-btn-small {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
    transition: var(--transition);
}

.logic-btn:hover, .logic-btn-small:hover {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent-text);
}

.reason-box {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ==========================================================
   17. DASHA TIMELINE
   ========================================================== */
.timeline-list { padding: 0; }

.dasha-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.dasha-card.current-dasha {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-muted);
}

.dasha-header {
    padding: 14px 18px;
    background: var(--bg-elevated);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.dasha-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dasha-title strong { color: var(--accent-text); font-size: 15px; }

.current-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dasha-period { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.expand-icon { transition: transform 0.25s ease; color: var(--text-tertiary); font-size: 14px; }

.dasha-body {
    padding: 18px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

.dasha-body p, .dasha-body li,
.dasha-body h5, .dasha-body span { color: var(--text-primary) !important; }

.dasha-meaning h4 { color: var(--accent-text); margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.dasha-meaning p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }

.antardasha-section { margin-top: 18px; }
.antardasha-section h5 {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.antardasha-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.antardasha-table th {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.antardasha-table td {
    padding: 8px 10px;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
}

.antardasha-table tr.current-antardasha { background: var(--accent-muted); }

/* ==========================================================
   18. PREDICTION LISTS
   ========================================================== */
.prediction-list { list-style: none; padding: 0; }

.prediction-list li {
    background: var(--bg-surface);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.prediction-list li:hover { box-shadow: var(--shadow-card); border-color: var(--border-strong); }
.prediction-list li p, .prediction-list li strong,
.prediction-list li span { color: var(--text-primary) !important; }
.pred-text { font-size: 14px; color: var(--text-primary); line-height: 1.7; margin-bottom: 8px; }

/* ==========================================================
   19. EXPORT
   ========================================================== */
.export-section { text-align: center; margin: 32px 0; }

.export-pdf-btn, .export-comprehensive-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}

.export-pdf-btn:hover, .export-comprehensive-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.export-pdf-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ==========================================================
   20. NARRATIVE SECTIONS
   ========================================================== */
.narrative-section {
    margin-bottom: 14px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    line-height: 1.75;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.narrative-section:hover { border-left-color: var(--accent-text); }

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.narrative-section strong { color: var(--text-primary); font-weight: 600; }
.narrative-section em { color: var(--gold-accent); font-style: italic; }
.narrative-section ul { list-style: none; padding-left: 0; margin: 10px 0; }
.narrative-section li::before { content: "·"; color: var(--accent); font-weight: bold; display: inline-block; width: 1em; margin-right: 6px; }

.executive-summary {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.summary-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }

.confidence-badge {
    padding: 5px 14px;
    background: var(--accent-muted);
    color: var(--accent-text);
    border: 1px solid var(--accent);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* ==========================================================
   21. YOGA / WINDOW CARDS
   ========================================================== */
.yogas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }

.yoga-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.yoga-card:hover { border-color: var(--gold-accent); background: var(--gold-muted); }
.yoga-name { color: var(--gold-accent); font-weight: 600; margin-bottom: 4px; display: block; font-size: 13px; }
.yoga-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.timeline-grid { display: flex; flex-direction: column; gap: 10px; }

.window-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-elevated);
    border-left: 3px solid var(--success);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    border-left-width: 3px;
    transition: var(--transition);
}

.window-card:hover { background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.window-left { flex: 1; }
.window-date { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.window-age { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }
.window-right { text-align: right; max-width: 50%; }

.window-score .score-badge {
    background: var(--success);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 11px;
    display: inline-block;
    margin-bottom: 4px;
}

.window-reasons { font-size: 11px; color: var(--gold-accent); margin-top: 4px; line-height: 1.4; }

.classical-analysis-section h4, .career-paths-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yoga-item { margin: 10px 0; padding-left: 14px; border-left: 2px solid var(--border-strong); }
.yoga-item strong { display: block; color: var(--text-primary); font-size: 13px; margin-bottom: 4px; font-weight: 600; }

.classical-quote {
    margin: 6px 0 0;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--gold-accent);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.career-category strong { color: var(--accent-text); font-size: 13px; }

/* ==========================================================
   22. DRISHTI LIST
   ========================================================== */
.drishti-list { font-size: 13px; }

.drishti-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--accent);
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
}

.drishti-item strong { color: var(--accent-text); }

/* ==========================================================
   23. UTILITIES
   ========================================================== */
.hidden { display: none !important; }
.desktop-only { display: block; }
.mobile-only { display: none; }
.view-mode-toggle { display: flex; align-items: center; }

.loading-spinner, .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}

.ai-loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.inline-alert {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: var(--danger);
    font-weight: 500;
    font-size: 13px;
    display: none;
    text-align: center;
}
.inline-alert.active { display: block; }

.ai-generate-section { text-align: center; padding: 32px 0; }
.ai-generate-btn { width: auto !important; padding: 13px 32px; }

.ai-disclaimer {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.6;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.comprehensive-section-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.number-circle {
    width: 110px;
    height: 110px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--accent-muted);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 700;
    color: var(--accent-text);
}

.card-title { font-size: 15px; color: var(--accent-text); font-weight: 600; margin-bottom: 8px; }
.card-text { color: var(--text-secondary); line-height: 1.7; font-size: 13px; }

.chip {
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: var(--accent-muted);
    border: 1px solid var(--accent);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 500;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.guidance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.guidance-item {
    background: var(--bg-elevated);
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.guidance-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

/* ==========================================================
   24. RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
    .app-container { padding: 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .form-group.full-width { grid-column: span 2; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
    .logo { font-size: 18px; }

    .sidebar-nav {
        position: fixed;
        left: 0;
        top: var(--header-height);
        transform: translateX(-100%);
        z-index: 900;
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        display: block !important;
    }
    .sidebar-nav.active { transform: translateX(0); box-shadow: var(--shadow-lg); }

    .app-container { margin-left: 0 !important; margin-right: 0 !important; padding: 16px; }
    .form-section { padding: 18px 14px; }
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .form-group.full-width { grid-column: 1; }
    .card, .analysis-card { padding: 16px; margin-bottom: 14px; }
    .charts-row { grid-template-columns: 1fr; gap: 14px; }
    .highlights-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 20px; }
    .trust-banner { flex-direction: column; text-align: center; padding: 14px; }
    .window-card { flex-direction: column; align-items: flex-start; }
    .window-right { text-align: left; margin-top: 8px; max-width: 100%; }
    .yogas-grid { grid-template-columns: 1fr; }
    .antardasha-table th, .antardasha-table td { padding: 7px 8px; font-size: 11px; }
    .prediction-list li { padding: 13px; margin-bottom: 10px; }
}

@media (max-width: 480px) {
    :root { --header-height: 56px; }
    .logo { font-size: 16px; }
    .section-title { font-size: 18px; }
    input, select { padding: 9px 11px; }
    .btn-primary { padding: 12px 20px; font-size: 13px; }
}

