/* Shared Light/Dark theming for auth, dashboard, billing, admin and utility pages */
:root {
    --bg-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --surface: #ffffff;
    --surface-alt: #f8f9ff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

body.dark-mode {
    --bg-main: linear-gradient(135deg, #0b1220 0%, #111827 100%);
    --surface: #111827;
    --surface-alt: #1f2937;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #374151;
}

body.dark-mode,
body.dark-mode .container,
body.dark-mode .card,
body.dark-mode .feature-card,
body.dark-mode .progress-section,
body.dark-mode .chart-card,
body.dark-mode .summary-card,
body.dark-mode .session-item,
body.dark-mode .stat-card,
body.dark-mode .meta,
body.dark-mode table,
body.dark-mode th,
body.dark-mode td,
body.dark-mode .flash,
body.dark-mode .kpi,
body.dark-mode .pill,
body.dark-mode .no-data,
body.dark-mode .session-row,
body.dark-mode .gap-item,
body.dark-mode .strength-tag {
    color: var(--text-main) !important;
}

body.dark-mode {
    background: var(--bg-main) !important;
}

body.dark-mode .container,
body.dark-mode .card,
body.dark-mode .feature-card,
body.dark-mode .progress-section,
body.dark-mode .chart-card,
body.dark-mode .summary-card,
body.dark-mode .session-item,
body.dark-mode .stat-card,
body.dark-mode .meta,
body.dark-mode .kpi,
body.dark-mode .session-row,
body.dark-mode .gap-item,
body.dark-mode .google-btn,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode table,
body.dark-mode th,
body.dark-mode td {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

body.dark-mode .summary-card,
body.dark-mode .progress-section,
body.dark-mode .kpi,
body.dark-mode th {
    background: var(--surface-alt) !important;
}

body.dark-mode .subtitle,
body.dark-mode .footer,
body.dark-mode .muted,
body.dark-mode .session-date,
body.dark-mode .session-summary,
body.dark-mode .gap-desc,
body.dark-mode .card-label,
body.dark-mode .sub,
body.dark-mode .welcome p,
body.dark-mode .text p {
    color: var(--text-muted) !important;
}

.global-theme-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 9999;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 999px;
    background: rgba(255,255,255,.24);
    color: #fff;
    width: 38px;
    height: 38px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.global-theme-toggle.in-header {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(102,126,234,.45);
    background: linear-gradient(135deg, rgba(79,70,229,.28), rgba(99,102,241,.24));
    color: #dbeafe;
}

.global-theme-toggle.in-header:hover {
    background: rgba(51,65,85,.95);
    color: #fff;
}

body.dark-mode .global-theme-toggle {
    border-color: #475569;
    background: rgba(15, 23, 42, 0.8);
}

body.dark-mode .global-theme-toggle.in-header {
    border-color: #4f46e5;
    background: linear-gradient(135deg, rgba(79,70,229,.35), rgba(30,64,175,.35));
    color: #e0e7ff;
}
