:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --secondary-color: #34a853;
    --background: #ffffff;
    --surface: #f8f9fa;
    --surface-variant: #e8eaed;
    --on-background: #202124;
    --on-surface: #5f6368;
    --border: #dadce0;
    --error: #d93025;
    --success: #1e8e3e;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --text: #202124;
    --text-primary: #202124;
    --text-secondary: #5f6368;
}

[data-theme="dark"] {
    --primary-color: #8ab4f8;
    --primary-dark: #669df6;
    --secondary-color: #81c995;
    --background: #202124;
    --surface: #292a2d;
    --surface-variant: #3c4043;
    --on-background: #e8eaed;
    --on-surface: #9aa0a6;
    --border: #5f6368;
    --error: #f28b82;
    --success: #81c995;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --text: #e8eaed;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--on-background);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dark modern background with depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 20% 80%, rgba(20, 30, 48, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(28, 25, 45, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(15, 23, 42, 0.6) 0%, transparent 40%),
        linear-gradient(135deg, #0a0e1a 0%, #0f1419 50%, #050810 100%);
    pointer-events: none;
}

/* Floating orbs with subtle glow */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(147, 51, 234, 0.02) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.015) 0%, transparent 30%);
    animation: floatingOrbs 20s ease-in-out infinite;
    pointer-events: none;
}

/* Animated gradient mesh overlay */
.shimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    background: 
        linear-gradient(125deg, transparent 0%, rgba(59, 130, 246, 0.05) 50%, transparent 100%),
        linear-gradient(215deg, transparent 0%, rgba(147, 51, 234, 0.04) 50%, transparent 100%);
    animation: meshFlow 15s ease-in-out infinite alternate;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    animation: gridShift 30s linear infinite;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 60%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    animation: pulseGlow 12s ease-in-out infinite;
}

/* Light theme adjustments */
[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(20, 30, 48, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(28, 25, 45, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(15, 23, 42, 0.6) 0%, transparent 40%),
        linear-gradient(135deg, #0a0e1a 0%, #0f1419 50%, #050810 100%);
}

[data-theme="light"] body::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(219, 234, 254, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(243, 232, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(209, 250, 229, 0.4) 0%, transparent 40%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

[data-theme="light"] body::after {
    background: 
        radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(147, 51, 234, 0.06) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 30%);
}

[data-theme="light"] .shimmer {
    opacity: 0.3;
    background: 
        linear-gradient(125deg, transparent 0%, rgba(59, 130, 246, 0.08) 50%, transparent 100%),
        linear-gradient(215deg, transparent 0%, rgba(147, 51, 234, 0.06) 50%, transparent 100%);
}

[data-theme="light"] .shimmer::after {
    background: 
        radial-gradient(ellipse at 30% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(236, 72, 153, 0.06) 0%, transparent 50%);
}

/* Animations */
@keyframes floatingOrbs {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(3%, -4%) scale(1.1);
    }
    66% {
        transform: translate(-2%, 3%) scale(0.95);
    }
}

@keyframes meshFlow {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(2%, -2%) rotate(0.5deg);
    }
}

@keyframes gridShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(4px, 4px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1rem;
    color: var(--on-surface);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--on-surface);
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    position: relative;
    top: 0.15em;
    user-select: none;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem;
}

.login-card {
    background: var(--background);
    border-radius: 24px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 8px 32px var(--shadow);
    animation: slideUp 0.4s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .material-symbols-outlined {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--on-surface);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(138, 99, 210, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: rgba(138, 99, 210, 0.6);
    box-shadow: 0 0 0 4px rgba(138, 99, 210, 0.15);
}

.password-input-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.password-input-container input {
    width: 100%;
    padding-right: 3rem;
    margin-bottom: 0;
}

.password-input-container .toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: auto;
}

.password-input-container .toggle-password:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1);
    box-shadow: none;
}

.password-input-container .toggle-password .material-symbols-outlined {
    font-size: 1.25rem;
}

.login-form button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.login-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
    min-height: 1.25rem;
}

.teacher-login-link {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.teacher-login-link a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.teacher-login-link a:hover {
    color: var(--primary-dark);
}

/* Navigation Bar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 8px var(--shadow);
    min-height: 40px;
}

[data-theme="dark"] .navbar {
    background: #1a1a1c;
    border-bottom: 1px solid #2a2a2c;
}

/* Global Exam Timer in Navbar (shown when Paper 1 exam active) */
.nav-center-timer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-center-timer .timer-section {
    height: 32px;
    min-width: 120px;
}

.nav-center-timer .timer-compact {
    font-size: 0.95rem;
}

.nav-center-timer .timer-compact:hover {
    opacity: 0.8;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    position: relative;
    padding: 0.2rem 0.65rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(138, 99, 210, 0.08), rgba(100, 149, 237, 0.08));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(138, 99, 210, 0.15);
    transition: all 0.3s ease;
}

.nav-brand:hover {
    background: linear-gradient(135deg, rgba(138, 99, 210, 0.15), rgba(100, 149, 237, 0.15));
    border-color: rgba(138, 99, 210, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(138, 99, 210, 0.2);
}

.nav-brand span:not(.material-symbols-outlined) {
    color: #2c3e50;
    font-weight: 800;
    letter-spacing: -0.02em;
}

[data-theme="light"] .nav-brand {
    border-color: rgba(138, 99, 210, 0.2);
}

[data-theme="light"] .nav-brand:hover {
    border-color: rgba(138, 99, 210, 0.35);
}

[data-theme="light"] .nav-brand span:not(.material-symbols-outlined) {
    color: #2c3e50;
}

[data-theme="dark"] .nav-brand {
    background: rgba(40, 42, 45, 0.6);
    border-color: rgba(70, 72, 75, 0.4);
}

[data-theme="dark"] .nav-brand:hover {
    background: rgba(50, 52, 55, 0.7);
    border-color: rgba(80, 82, 85, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-brand span:not(.material-symbols-outlined) {
    color: #e8eaf0;
}

.nav-brand .material-symbols-outlined {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #8a63d2 0%, #6495ed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    filter: drop-shadow(0 2px 4px rgba(138, 99, 210, 0.3));
}

[data-theme="dark"] .nav-brand .material-symbols-outlined {
    filter: drop-shadow(0 2px 4px rgba(138, 99, 210, 0.4));
}

.nav-brand .school-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(138, 99, 210, 0.3));
}

[data-theme="dark"] .nav-brand .school-logo {
    filter: drop-shadow(0 2px 4px rgba(138, 99, 210, 0.4)) brightness(1.1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Username Display */
#userName {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

#userName::before {
    content: '\e7fd'; /* Material Symbol for 'person' */
    font-family: 'Material Symbols Outlined';
    font-size: 1rem;
    color: var(--primary-color);
}

#userName:hover {
    background: var(--surface-variant);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #userName:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


/* Praise Points Banner Strip */
.praise-points-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.25);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.praise-points-banner:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 193, 7, 0.22));
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

.praise-points-banner .material-symbols-outlined {
    font-size: 1.75rem;
    color: #e6c200;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

[data-theme="light"] .praise-points-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 193, 7, 0.12));
    border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="light"] .praise-points-banner:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 193, 7, 0.18));
    border-color: rgba(255, 193, 7, 0.45);
}

[data-theme="light"] .praise-points-banner .material-symbols-outlined {
    color: #b8860b;
    filter: drop-shadow(0 0 2px rgba(184, 134, 11, 0.25));
}

[data-theme="light"] .banner-points {
    background: linear-gradient(135deg, #b8860b, #cc9a1c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner-points {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e6c200, #f4d03f);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.banner-description {
    font-size: 0.85rem;
    color: var(--on-surface);
    opacity: 0.75;
}

[data-theme="light"] .banner-description {
    color: #5f6368;
}

[data-theme="dark"] .banner-description {
    color: #b8b8b8;
}

.theme-toggle,
.logout-btn,
.teacher-dashboard-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--on-background);
}

.teacher-dashboard-btn {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #744fa8, #667eea);
    color: white;
    border: none;
}

.teacher-dashboard-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(116, 79, 168, 0.3);
}

.theme-toggle:hover,
.logout-btn:hover {
    background: var(--surface-variant);
    transform: scale(1.05);
}

/* Container Layout */
.container {
    display: flex;
    min-height: calc(100vh - 52px);
    margin-top: 52px; /* Account for fixed navbar */
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    overflow-y: visible;
    position: sticky;
    top: 0;
    min-height: calc(100vh - 52px);
    height: auto;
    align-self: flex-start;
}

[data-theme="dark"] .sidebar {
    background: #1a1a1c;
    border-right: 1px solid #2a2a2c;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--on-surface);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 .material-symbols-outlined {
    font-size: 1.25rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--on-background);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9375rem;
}

.sidebar a .material-symbols-outlined {
    flex-shrink: 0;
    font-size: 1rem;
}

.sidebar a:hover {
    background: var(--surface-variant);
    transform: translateX(4px);
}

.sidebar a.no-sidebar-hover:hover {
    background: transparent;
    transform: none;
}

.sidebar a.active {
    background: var(--primary-color);
    color: white;
}

.sidebar a.active .material-symbols-outlined {
    color: white;
}

[data-theme="dark"] .sidebar a.active {
    background: var(--primary-color);
    color: #202124;
    font-weight: 600;
}

[data-theme="dark"] .sidebar a.active .material-symbols-outlined {
    color: #202124;
}

.sidebar-collapsible {
    margin-bottom: 0.5rem;
}

.sidebar-collapsible-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-collapsible-header > a {
    flex: 1;
    margin-bottom: 0;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    background: var(--surface-variant);
    color: var(--text-primary);
    outline: none;
}

.sidebar-collapse-btn .material-symbols-outlined {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.sidebar-collapse-btn[aria-expanded="false"] .material-symbols-outlined {
    transform: rotate(180deg);
}

/* Sidebar subsections */
.sidebar-subsection {
    margin-left: 16px;
    border-left: 2px solid var(--border);
    padding-left: 12px;
    margin-bottom: 8px;
}

.sidebar-subsection a {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.sidebar-subsection a:hover {
    background: var(--surface-variant);
}

.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;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 280px; /* Account for fixed sidebar */
    width: calc(100% - 280px); /* Ensure proper width calculation */
}

/* Home page specific - remove margin since sidebar is minimal */
.home-page .main-content {
    margin-left: 0;
    width: 100%;
}

/* Exam practice mode - full width, no sidebar */
.exam-practice-mode .main-content {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 1400px;
}

/* Main Content - Default Padding for Other Pages */
.main-content:not(:has(.accolade-requirements)) {
    padding: 2rem;
}

/* Main Dashboard Layout - Two Column */
.main-content:has(.accolade-requirements) {
    padding: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.welcome-section {
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.stat-card .material-symbols-outlined {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--on-surface);
    margin: 0;
}

/* Quick Links - Right Sidebar Column */
.quick-links {
    margin-bottom: 0;
}

.quick-links h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.quick-links-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-link-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    color: var(--on-background);
    transition: all 0.3s ease;
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-hover);
    border-color: var(--primary-color);
}

.quick-link-card .material-symbols-outlined {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.quick-link-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.quick-link-card p {
    font-size: 0.75rem;
    color: var(--on-surface);
    margin: 0;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 16px var(--shadow);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .theme-toggle,
    .logout-btn,
    .notification,
    .no-print,
    .breadcrumb-print-btn {
        display: none !important;
    }

    .main-content {
        padding: 0;
        max-width: 100%;
    }

    body {
        background: white;
        color: black;
    }

    .stat-card,
    .quick-link-card {
        break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 52px;
        height: calc(100vh - 52px);
        z-index: 99;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .container {
        flex-direction: column;
    }

    .main-content:has(.accolade-requirements) {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* News check icon styling */
.news-check-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.news-check-icon.read {
    color: #4caf50 !important;
    font-weight: 600;
}

/* Accolade Requirements Section */
.accolade-requirements {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.accolade-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.accolade-header .material-symbols-outlined {
    font-size: 2rem;
    color: #ffd700;
    animation: sparkle 2s ease-in-out infinite;
}

[data-theme="light"] .accolade-header .material-symbols-outlined {
    color: #d97706;
}

.accolade-header h2 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .accolade-header h2 {
    background: linear-gradient(135deg, #b45309, #d97706, #b45309);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accolade-description {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.requirement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative; /* For badge positioning */
}

.requirement-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.requirement-card .completion-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.requirement-card .completion-badge .material-symbols-outlined {
    font-size: 1.5rem;
    color: #4CAF50 !important;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.requirement-card .material-symbols-outlined {
    font-size: 1.75rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    display: block;
}

.requirement-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.requirement-card .progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.requirement-card .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.6s ease;
    width: 0%;
}

.requirement-card .progress-text {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.requirement-card .requirement-detail {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.requirement-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.praise-points-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 237, 78, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.praise-points-badge .material-symbols-outlined {
    font-size: 1.8rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .accolade-requirements {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .requirement-card {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .requirement-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Light mode adjustments */
[data-theme="light"] .accolade-requirements {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .requirement-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .requirement-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.4);
}

/* ── Duration pill — reusable across all card types ── */
.duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(156, 39, 176, 0.08);
    color: var(--logo-purple);
    border: 1px solid rgba(156, 39, 176, 0.12);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.duration-pill .material-symbols-outlined {
    font-size: 0.8rem;
}
[data-theme="dark"] .duration-pill {
    background: rgba(156, 39, 176, 0.14);
    border-color: rgba(156, 39, 176, 0.18);
}

/* Responsive adjustments for praise points banner */
@media (max-width: 1200px) {
    .praise-points-banner {
        padding: 0.4rem 1rem;
        gap: 0.5rem;
    }
    
    .banner-points {
        font-size: 0.95rem;
    }
    
    .banner-description {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .praise-points-banner {
        display: none;
    }
}

/* Scroll to Top/Bottom Buttons */
.scroll-to-top,
.scroll-to-bottom {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top {
    top: 80px;
}

.scroll-to-bottom {
    bottom: 1.5rem;
}

.scroll-to-top.visible,
.scroll-to-bottom.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover,
.scroll-to-bottom:hover {
    background: var(--primary-dark);
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.scroll-to-top:active,
.scroll-to-bottom:active {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scroll-to-top .material-symbols-outlined,
.scroll-to-bottom .material-symbols-outlined {
    font-size: 24px;
}

[data-theme="dark"] .scroll-to-top,
[data-theme="dark"] .scroll-to-bottom {
    background: #5e9cff;
}

[data-theme="dark"] .scroll-to-top:hover,
[data-theme="dark"] .scroll-to-bottom:hover {
    background: #7db3ff;
}

@media (max-width: 768px) {
    .scroll-to-top,
    .scroll-to-bottom {
        width: 44px;
        height: 44px;
    }
    
    .scroll-to-top {
        top: 78px;
    }
    
    .scroll-to-bottom {
        bottom: 1rem;
    }
}

/* Theory Page Instructions Notification */
.theory-instructions-notification {
    position: fixed;
    bottom: 2rem;
    right: -400px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    z-index: 1001;
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.theory-instructions-notification.show {
    right: 2rem;
}

.theory-instructions-notification .material-symbols-outlined {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
    color: white;
}

.theory-instructions-content {
    flex: 1;
}

.theory-instructions-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.theory-instructions-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.theory-instructions-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    opacity: 0.9;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.theory-instructions-close:hover {
    opacity: 1;
}

.theory-instructions-close .material-symbols-outlined {
    font-size: 20px;
    margin: 0;
}

[data-theme="dark"] .theory-instructions-notification {
    background: linear-gradient(135deg, #5e9cff, #4a8ae8);
}

@media (max-width: 768px) {
    .theory-instructions-notification {
        right: -100%;
        max-width: calc(100% - 2rem);
        bottom: 1rem;
    }
    
    .theory-instructions-notification.show {
        right: 1rem;
    }
}

/* ============================================
   HOME PAGE - TERM SELECTION (Compact Design)
   ============================================ */

.home-page-header {
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    background: linear-gradient(135deg, #f8f3ff 0%, #f0f7ff 50%, #fff5f7 100%);
    padding: 2rem 1rem 1rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(138, 99, 210, 0.1);
}

.home-page-header h1 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.home-page-header h1 .material-symbols-outlined {
    display: none;
}

.home-page-header p {
    color: #5a6c7d;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.home-page-header p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    max-width: 600px;
    height: 3px;
    background: linear-gradient(90deg, #8a63d2 0%, #6495ed 40%, #ff6b81 70%, transparent 100%);
    border-radius: 2px;
}

/* Dark theme overrides for header */
[data-theme="dark"] .home-page-header {
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .home-page-header h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .home-page-header h1 .material-symbols-outlined {
    display: none;
}

[data-theme="dark"] .home-page-header p {
    color: var(--text-secondary);
}

[data-theme="dark"] .home-page-header p::after {
    background: linear-gradient(90deg, #8a63d2 0%, #6495ed 40%, #ff6b81 70%, transparent 100%);
}

/* Year Sections */
.year-section {
    margin-bottom: 1.25rem;
}

.year-section:last-child {
    margin-bottom: 0;
}

.year-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--on-background);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.year-heading .material-symbols-outlined {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* Term Grid - 6 columns for compact layout */
.term-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

/* Term Cards - Compact Design */
.term-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    min-height: 100px;
}

.term-card.active-term {
    border-color: var(--primary-color);
    background: var(--surface);
}

.term-card.active-term:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.term-card.locked-term {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-variant);
}

.term-card.locked-term:hover {
    transform: none;
}

/* Term Card Header */
.term-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.term-card-header .material-symbols-outlined {
    font-size: 1.8rem;
    font-variation-settings: 'FILL' 1;
}

.term-card.active-term .term-card-header .material-symbols-outlined {
    color: var(--primary-color);
}

.term-card.locked-term .term-card-header .material-symbols-outlined {
    color: var(--on-surface);
}

.term-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--on-background);
}

/* Term Description */
.term-description {
    font-size: 0.8rem;
    color: var(--on-surface);
    margin: 0;
    line-height: 1.3;
    flex-grow: 1;
}

/* Term Badge */
.term-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.term-badge.in-progress {
    background: rgba(26, 115, 232, 0.15);
    color: var(--primary-color);
}

.term-badge.locked {
    background: rgba(128, 128, 128, 0.15);
    color: var(--on-surface);
}

/* Term Stats Mini */
.term-stats-mini {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--on-surface);
    margin-top: 0.5rem;
}

.term-stats-mini span {
    display: block;
}

.term-stats-mini strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Term Card Completion Badge — matches Paper 1 question-badge-complete */
.term-card .completion-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0E9C6E;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(138, 99, 210, 0.12);
    animation: completionPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="dark"] .term-card .completion-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.term-card .completion-badge .material-symbols-outlined {
    color: white;
    font-size: 1.5rem;
    font-variation-settings: 'FILL' 1, 'wght' 700;
    position: relative;
    top: -1px;
}

@keyframes completionPop {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    70%  { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Combined term card spanning 2 columns */
.term-card.combined-term {
    grid-column: span 2;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .term-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .term-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .term-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   HOME PAGE HEADER WITH ACTIONS
   =================================== */

.home-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.header-content h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Progress Actions Compact (Top Right) */
.progress-actions-compact {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.progress-action-btn-compact {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-action-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.progress-action-btn-compact.save-btn {
    border-color: var(--success);
}

.progress-action-btn-compact.save-btn:hover {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.progress-action-btn-compact.save-btn .material-symbols-outlined {
    color: var(--success);
}

.progress-action-btn-compact.save-btn:hover .material-symbols-outlined {
    color: white;
}

.progress-action-btn-compact.restore-btn {
    border-color: #ea4335;
}

.progress-action-btn-compact.restore-btn:hover {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.progress-action-btn-compact.restore-btn .material-symbols-outlined {
    color: #ea4335;
}

.progress-action-btn-compact.restore-btn:hover .material-symbols-outlined {
    color: white;
}

.progress-action-btn-compact .material-symbols-outlined {
    font-size: 1.5rem;
}

/* ===================================
   PROGRESS MANAGEMENT SECTION (OLD - REMOVED)
   =================================== */

/* ===================================
   COOKIE CONSENT BANNER (REDESIGNED)
   =================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 3px solid var(--primary-color);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px var(--shadow);
    z-index: 10000;
    display: flex;
    justify-content: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

.cookie-consent-icon .material-symbols-outlined {
    font-size: 3rem;
    color: var(--primary-color);
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cookie-consent-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.cookie-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(217, 48, 37, 0.1);
    border-left: 3px solid var(--error);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
}

.cookie-warning .material-symbols-outlined {
    color: var(--error);
    font-size: 1.25rem;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-learn-btn {
    background: var(--surface-variant);
    color: var(--text-primary);
    border: 2px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cookie-learn-btn:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.cookie-accept-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cookie-accept-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ===================================
   PROGRESS DATA NOTIFICATION (BOTTOM RIGHT)
   =================================== */

.progress-data-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.notification-header .material-symbols-outlined:first-child {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.notification-header strong {
    flex: 1;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: var(--error);
    transform: rotate(90deg);
}

.notification-close .material-symbols-outlined {
    font-size: 1.25rem;
}

.progress-data-notification p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.notification-learn-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.notification-learn-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.notification-learn-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* ===================================
   STORAGE INFO MODAL UPDATES
   =================================== */

.list-icon {
    font-size: 1.1rem !important;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.storage-info-section .list-icon.material-symbols-outlined {
    flex-shrink: 0;
}

.backup-reminder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
}

.backup-reminder .material-symbols-outlined {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ===================================
   RESPONSIVE UPDATES
   =================================== */

@media (max-width: 1024px) {
    .home-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .progress-actions-compact {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-icon {
        display: none;
    }
    
    .cookie-consent-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-learn-btn,
    .cookie-accept-btn {
        width: 100%;
        justify-content: center;
    }
    
    .progress-data-notification {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-width: none;
    }
    
    .progress-actions-compact {
        flex-direction: column;
    }
    
    .progress-action-btn-compact {
        justify-content: center;
    }
}

/* Remove old progress-management-section styles since we moved it */
.progress-management-section {
    display: none;
}

/* ===================================
   PROGRESS MANAGEMENT SECTION
   =================================== */

.progress-management-section {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-variant) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px var(--shadow);
}

.progress-info-card {
    background: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.progress-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.progress-info-header .material-symbols-outlined {
    font-size: 2rem;
    color: var(--primary-color);
}

.progress-info-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.progress-info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.learn-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.learn-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.learn-more-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Progress Actions */
.progress-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.progress-action-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.progress-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-hover);
    border-color: var(--primary-color);
}

.progress-action-btn .material-symbols-outlined {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.progress-action-btn.save-btn .material-symbols-outlined {
    color: var(--success);
}

.progress-action-btn.restore-btn .material-symbols-outlined {
    color: var(--primary-color);
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.btn-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===================================
   COOKIE CONSENT BANNER
   =================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-variant) 100%);
    border-top: 3px solid var(--primary-color);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px var(--shadow);
    z-index: 10000;
    display: flex;
    justify-content: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

.cookie-consent-icon .material-symbols-outlined {
    font-size: 3rem;
    color: #8B4513;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cookie-consent-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.cookie-warning {
    background: rgba(217, 48, 37, 0.1);
    border-left: 3px solid var(--error);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
}

.cookie-accept-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-accept-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ===================================
   STORAGE INFO MODAL
   =================================== */

.storage-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.storage-modal-content {
    background: var(--surface);
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.06);
    animation: slideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.storage-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
    color: var(--text-secondary);
}

.storage-modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.storage-modal-close .material-symbols-outlined {
    font-size: 1.2rem;
}

.storage-modal-header {
    padding: 2rem 2rem 1.5rem;
    border-radius: 20px 20px 0 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.storage-modal-header .material-symbols-outlined {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--logo-purple, #8a63d2);
}

.storage-modal-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.storage-modal-body {
    padding: 1.75rem 2rem;
}

.storage-info-section {
    background: var(--surface-variant);
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-left: none;
}

.storage-info-section:last-child {
    margin-bottom: 0;
}

.storage-info-section h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.storage-info-section h3 .material-symbols-outlined {
    font-size: 1.3rem;
    color: var(--logo-purple, #8a63d2);
}

.storage-info-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
}

.storage-info-section p:last-child {
    margin-bottom: 0;
}

.storage-info-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.storage-info-section li {
    padding: 0.4rem 0 0.4rem 1.4rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.88rem;
}

.storage-info-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0.4rem;
    color: var(--logo-purple, #8a63d2);
    font-weight: bold;
}

/* Override for list-icon items — use icon instead of triangle */
.storage-info-section li:has(.list-icon) {
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.storage-info-section li:has(.list-icon)::before {
    display: none;
}

.storage-info-section code {
    background: var(--background);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    color: var(--logo-purple, #8a63d2);
    border: 1px solid var(--border);
}

.warning-section {
    border-color: var(--error);
    background: rgba(217, 48, 37, 0.05);
}

.warning-section h3 .material-symbols-outlined {
    color: var(--error);
}

.storage-modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.storage-modal-btn {
    background: linear-gradient(135deg, var(--logo-purple, #8a63d2) 0%, #6495ed 100%);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(138, 99, 210, 0.3);
}

.storage-modal-btn:hover {
    box-shadow: 0 6px 24px rgba(138, 99, 210, 0.4);
    transform: translateY(-1px);
}

.storage-modal-btn:active {
    transform: translateY(0);
}

/* ===================================
   PROGRESS NOTIFICATIONS
   =================================== */

.progress-notification {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: #0E9C6E;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 6px 20px rgba(14, 156, 110, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    z-index: 10002;
    font-size: 0.9375rem;
    font-weight: 600;
    max-width: 400px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.progress-notification.success {
    background: #0E9C6E;
    color: white;
}

.progress-notification.error {
    background: #D93025;
    color: white;
}

/* Responsive for cookie banner and notifications */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-icon {
        display: none;
    }
    
    .progress-notification {
        top: 1rem;
        max-width: calc(100% - 2rem);
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
    }
    
    .storage-modal {
        padding: 1rem;
    }
    
    .storage-modal-body {
        padding: 1.5rem;
    }
    
    .progress-actions {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb Navigation */
.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    font-size: 0.875rem;
    width: calc(100% - 3rem);
}

.breadcrumbs a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #93c5fd;
}

.breadcrumbs .material-symbols-outlined {
    font-size: 1rem;
    top: 0;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-weight: 400;
}

.current-page {
    color: var(--text-primary);
    font-weight: 600;
    flex: 1 1 0;
    min-width: 0;
}

.breadcrumb-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    margin-right: 0.25rem;
    border-radius: 6px;
    color: var(--text-secondary) !important;
    transition: color 0.2s ease, background 0.2s ease;
}

.breadcrumb-back-btn:hover {
    color: var(--text-primary) !important;
    background: var(--surface-variant);
}

.breadcrumb-back-btn .material-symbols-outlined {
    font-size: 1.2rem;
}

.breadcrumb-print-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.breadcrumb-print-btn:first-of-type {
    /* margin-left handled by #breadcrumbActions wrapper */
}

.breadcrumb-print-btn:hover {
    color: var(--text-primary);
    background: var(--surface-variant);
}

.breadcrumb-print-btn .material-symbols-outlined {
    font-size: 1.15rem;
    position: relative;
    top: -3px;
}

/* Login page specific overrides - logo-inspired colors */
body.login-page {
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1b3d 25%, #1e2645 50%, #2a3550 75%, #1a0f2e 100%) !important;
    background-color: #1a0f2e !important;
    /* Force override of CSS variable that was showing light theme background */
    --background: #1a0f2e !important;
}

body.login-page::before,
body.login-page::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

html:has(body.login-page) {
    background: #1a0f2e !important;
}

/* Login card with logo colors on top border */
body.login-page .login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #7a52b8 0%,      /* Darker purple */
        #5480d3 33%,     /* Darker blue */
        #e55a6f 66%,     /* Darker pink */
        #7a52b8 100%);   /* Back to darker purple */
    background-size: 200% 100%;
    animation: gradientShift 8s ease infinite;
    opacity: 0.85;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Softer button for login page */
body.login-page #loginBtn {
    background: linear-gradient(135deg, #6495ed 0%, #5a7fd8 100%) !important;
    box-shadow: 0 4px 12px rgba(100, 149, 237, 0.3) !important;
}

body.login-page #loginBtn:hover {
    background: linear-gradient(135deg, #7aa5f7 0%, #6a8fe6 100%) !important;
    box-shadow: 0 6px 16px rgba(100, 149, 237, 0.4) !important;
    transform: translateY(-2px);
}

body.login-page #loginBtn:active {
    background: linear-gradient(135deg, #5480d3 0%, #4a6fc4 100%) !important;
    box-shadow: 0 2px 6px rgba(100, 149, 237, 0.3) !important;
    transform: translateY(0);
}

/* Light theme inputs for login page */
body.login-page:not([data-theme="dark"]) .login-form input,
body.login-page:not([data-theme="dark"]) .login-form input[type="text"],
body.login-page:not([data-theme="dark"]) .login-form input[type="password"] {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(138, 99, 210, 0.2) !important;
    color: #2c3e50 !important;
}

body.login-page:not([data-theme="dark"]) .login-form input:focus {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(138, 99, 210, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(138, 99, 210, 0.1) !important;
}

body.login-page:not([data-theme="dark"]) input::placeholder {
    color: rgba(44, 62, 80, 0.5) !important;
}

body.login-page:not([data-theme="dark"]) input:-webkit-autofill,
body.login-page:not([data-theme="dark"]) input:-webkit-autofill:hover,
body.login-page:not([data-theme="dark"]) input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2c3e50 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    border: 2px solid rgba(138, 99, 210, 0.2) !important;
}

/* Dark theme inputs - FORCE dark always */
[data-theme="dark"] body.login-page .login-form input,
[data-theme="dark"] body.login-page .login-form input[type="text"],
[data-theme="dark"] body.login-page .login-form input[type="password"],
body.login-page[data-theme="dark"] .login-form input {
    background: rgba(45, 50, 65, 0.6) !important;
    border: 2px solid rgba(138, 99, 210, 0.3) !important;
    color: #e8eaed !important;
}

[data-theme="dark"] body.login-page .login-form input:focus,
body.login-page[data-theme="dark"] .login-form input:focus {
    background: rgba(45, 50, 65, 0.8) !important;
    border-color: rgba(138, 99, 210, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(138, 99, 210, 0.15) !important;
}

[data-theme="dark"] body.login-page input::placeholder,
body.login-page[data-theme="dark"] input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Dark theme autofill override - prevent white background on autofill */
[data-theme="dark"] body.login-page .login-form input:-webkit-autofill,
[data-theme="dark"] body.login-page .login-form input:-webkit-autofill:hover,
[data-theme="dark"] body.login-page .login-form input:-webkit-autofill:focus,
[data-theme="dark"] body.login-page .login-form input:-webkit-autofill:active,
body.login-page[data-theme="dark"] .login-form input:-webkit-autofill,
body.login-page[data-theme="dark"] .login-form input:-webkit-autofill:hover,
body.login-page[data-theme="dark"] .login-form input:-webkit-autofill:focus,
body.login-page[data-theme="dark"] .login-form input:-webkit-autofill:active {
    -webkit-text-fill-color: #e8eaed !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(45, 50, 65, 0.6) inset !important;
    box-shadow: 0 0 0 1000px rgba(45, 50, 65, 0.6) inset !important;
    border: 2px solid rgba(138, 99, 210, 0.3) !important;
    transition: background-color 5000s ease-in-out 0s;
}


