/* ========================================
   GGSIPU Result Fetch - Formal & Sophisticated Design
   Color Palette: White (#FFFFFF) & Navy Blue (#1a365d)
   ======================================== */

/* Dark Mode Variables & Overrides */
[data-theme="dark"] {
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f8fafc;
    --white: #1e293b;
    --navy: #3b82f6;
    --navy-dark: #020617;
    --navy-light: #1d4ed8;
}

[data-theme="dark"] .card {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .summary-item {
    background: #0f172a !important;
}

[data-theme="dark"] .summary-item.highlight {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
}

[data-theme="dark"] .tab-btn {
    color: #94a3b8 !important;
}

[data-theme="dark"] .tab-btn.active {
    background: #3b82f6 !important;
    color: #fff !important;
}

[data-theme="dark"] .modern-table th {
    background: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .modern-table td {
    color: #cbd5e1 !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    padding: 0;
    margin-right: 12px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

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

:root {
    /* Primary Colors */
    --navy-dark: #0f172a;
    --navy: #1a365d;
    --navy-light: #2d4a6f;
    --navy-lighter: #3d5a80;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;

    /* Accent */
    --accent-blue: #3b82f6;
    --accent-light: #60a5fa;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow:
        0 1px 3px 0 rgba(15, 23, 42, 0.1), 0 1px 2px -1px rgba(15, 23, 42, 0.1);
    --shadow-md:
        0 4px 6px -1px rgba(15, 23, 42, 0.1),
        0 2px 4px -2px rgba(15, 23, 42, 0.1);
    --shadow-lg:
        0 10px 15px -3px rgba(15, 23, 42, 0.1),
        0 4px 6px -4px rgba(15, 23, 42, 0.1);
    --shadow-xl:
        0 20px 25px -5px rgba(15, 23, 42, 0.1),
        0 8px 10px -6px rgba(15, 23, 42, 0.1);

    /* Typography */
    --font-family:
        "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Oxygen",
        "Ubuntu", sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f8fafc;
    --white: #1e293b;
    --navy: #3b82f6;
    --navy-dark: #020617;
    --navy-light: #1d4ed8;
}

[data-theme="dark"] .card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .summary-item {
    background: #0f172a;
}

[data-theme="dark"] .summary-item.highlight {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

[data-theme="dark"] .tab-btn {
    color: #94a3b8;
}

[data-theme="dark"] .tab-btn.active {
    background: #3b82f6;
    color: #fff;
}

[data-theme="dark"] .chart-wrapper {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modern-table th {
    background: #0f172a;
    color: #f8fafc;
}

[data-theme="dark"] .modern-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg,
            var(--gray-50) 0%,
            var(--gray-100) 100%);
    min-height: 100vh;
    color: var(--gray-700);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    /* To stack ticker and content */
}

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-container {
    flex: 1;
    /* Take all remaining height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4) var(--spacing-4) var(--spacing-12) var(--spacing-4);
    background: 
        radial-gradient(rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px),
        linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    background-size: 28px 28px, 100% 100%;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-8);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-4);
    box-shadow: var(--shadow-lg);
}

.login-logo svg {
    width: 32px;
    height: 32px;
    color: var(--navy);
}

.login-header h1 {
    color: var(--white);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--spacing-2);
    letter-spacing: -0.025em;
}

.login-header p {
    color: var(--gray-300);
    font-size: var(--font-size-sm);
}

.login-card {
    position: relative;
    background: rgba(15, 23, 42, 0.8);
    /* Match core theme */
    border-radius: var(--radius-xl);
    padding: var(--spacing-8) var(--spacing-8) var(--spacing-10) var(--spacing-8);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    /* Hide the rotating element outside the rounded box */
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle base border */
}

/* Glowing Rotating Bezel Animation Core */
.login-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            transparent 80deg,
            #3b82f6 120deg,
            /* Electric Blue */
            #60a5fa 160deg,
            /* Light Cyan-Blue */
            transparent 200deg,
            transparent 360deg);
    animation: rotate-bezel 6s linear infinite;
    z-index: -2;
}

/* Internal "mask" to make the content sit on top and the border appear thin */
.login-card::after {
    content: "";
    position: absolute;
    inset: 2px;
    /* This defines the thickness of the bezel */
    background: #1a2b4b;
    /* Solid dark color to cover the center rotation */
    border-radius: calc(var(--radius-xl) - 2px);
    z-index: -1;
}

@keyframes rotate-bezel {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: var(--spacing-5);
    position: relative;
    z-index: 1;
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    /* White text for dark mode */
    margin-bottom: var(--spacing-2);
}

.form-input {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    font-size: var(--font-size-base);
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    transition: var(--transition);
    outline: none;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.btn-password-toggle {
    position: absolute;
    right: var(--spacing-2);
    padding: var(--spacing-2);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
    outline: none;
}

.btn-password-toggle:hover {
    color: var(--navy);
    background: var(--gray-100);
}

.btn-password-toggle:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.btn-password-toggle svg {
    width: 20px;
    height: 20px;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.captcha-container {
    display: flex;
    gap: var(--spacing-3);
    align-items: stretch;
}

.captcha-image {
    flex: 1;
    min-height: 50px;
    max-height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.captcha-image.clickable {
    cursor: pointer;
}

.captcha-image.clickable.has-placeholder {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(30, 58, 138, 0.15) 100%);
    border: 1px dashed rgba(59, 130, 246, 0.6);
    animation: blue-pulse-glow 2s infinite ease-in-out;
}

.captcha-image.clickable.has-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(153, 27, 27, 0.12) 100%);
    border: 1px dashed rgba(239, 68, 68, 0.6);
    animation: red-pulse-glow 2s infinite ease-in-out;
}

.captcha-image.clickable:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3b82f6;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}

.captcha-image.clickable.has-placeholder:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(30, 58, 138, 0.22) 100%);
    border-color: #60a5fa;
}

.captcha-image.clickable.has-error:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(153, 27, 27, 0.2) 100%);
    border-color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

.captcha-image.clickable:active {
    transform: scale(0.97);
}

.captcha-image.clickable:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45);
}

.captcha-placeholder {
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: all 0.25s ease;
    width: 100%;
    height: 100%;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.captcha-placeholder svg {
    color: #60a5fa;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
    animation: float-icon 2s infinite ease-in-out;
}

.captcha-image.clickable:hover .captcha-placeholder {
    color: #ffffff;
    transform: scale(1.03);
}

.captcha-image.clickable:hover .captcha-placeholder svg {
    color: #ffffff;
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.5));
}

@keyframes blue-pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
        border-color: rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(59, 130, 246, 0.25);
        border-color: rgba(96, 165, 250, 0.9);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(30, 58, 138, 0.22) 100%);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        border-color: rgba(59, 130, 246, 0.5);
    }
}

@keyframes red-pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(239, 68, 68, 0.25);
        border-color: rgba(248, 113, 113, 0.9);
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(153, 27, 27, 0.18) 100%);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        border-color: rgba(239, 68, 68, 0.5);
    }
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.placeholder-icon {
    opacity: 0.8;
}

.captcha-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-1);
    padding: var(--spacing-2);
    color: var(--gray-400);
    font-size: var(--font-size-xs);
}

.captcha-loader .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    color: #60a5fa;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.captcha-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn-reload {
    padding: var(--spacing-3) var(--spacing-4);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.btn-reload:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-reload svg {
    width: 20px;
    height: 20px;
}

.btn-reload.spinning svg {
    animation: spin 1s linear infinite;
    color: var(--accent-light);
}

.btn-fetch-captcha {
    padding: var(--spacing-2) var(--spacing-4);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-fetch-captcha:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary {
    width: 100%;
    padding: var(--spacing-4);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

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

.status-message {
    text-align: center;
    position: absolute;
    bottom: var(--spacing-2);
    left: 0;
    right: 0;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.status-message.error {
    color: #dc2626;
}

.status-message.loading {
    color: var(--navy);
}

/* ========================================
   DASHBOARD PAGE STYLES
   ======================================== */

.dashboard {
    min-height: 100vh;
    background: var(--gray-50);
}

/* Header */
.dashboard-header {
    background: var(--navy);
    color: var(--white);
    padding: var(--spacing-4) var(--spacing-6);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-4);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.header-logo {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo svg {
    width: 24px;
    height: 24px;
    color: var(--navy);
}

.header-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-subtitle {
    font-size: var(--font-size-xs);
    color: var(--gray-300);
    display: none;
}

@media (min-width: 640px) {
    .header-subtitle {
        display: block;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.print-btn {
    padding: var(--spacing-2) var(--spacing-4);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a365d;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.print-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    animation: none;
}

.print-btn:active {
    transform: translateY(0) scale(1);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.7);
    }
}

.logout-btn {
    padding: var(--spacing-2) var(--spacing-4);
    background: var(--accent-blue);
    /* A nice blue color for the button */
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

/* Main Content */
.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-6);
}

@media (max-width: 640px) {
    .dashboard-main {
        padding: var(--spacing-4);
    }
}

/* Student Profile Card - Compact */
.profile-card {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-4);
    overflow: hidden;
    color: var(--white);
}

.profile-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-3) var(--spacing-4);
    gap: var(--spacing-4);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    flex: 1;
    min-width: 0;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.profile-subtitle {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.profile-details {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.profile-detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.detail-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.detail-value {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .profile-content {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-3);
        gap: var(--spacing-2);
    }

    .profile-details {
        width: 100%;
        gap: var(--spacing-2);
    }

    .profile-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-1);
    }
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    /* Allow items to wrap */
    gap: var(--spacing-1);
    background: var(--white);
    padding: var(--spacing-1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-6);
    justify-content: flex-start;
    /* Align buttons to the start of the container */
}

.tab-btn {
    flex: 1 1 auto;
    /* Allow to grow and shrink with initial auto sizing */
    padding: var(--spacing-3) var(--spacing-5);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: inherit;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
    /* Center the text in the button */
    max-width: 150px;
    /* Set a reasonable maximum width in pixels to prevent them from becoming too wide on very large screens */
}

.tab-btn:hover {
    color: var(--navy);
    background: var(--gray-50);
}

.tab-btn.active {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.latest-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    vertical-align: middle;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.4);
}

.tab-btn.active .latest-badge {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-6);
    overflow: hidden;
}

.card-header {
    padding: var(--spacing-5) var(--spacing-6);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-4);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--navy-dark);
    margin: 0;
}

.card-body {
    padding: var(--spacing-6);
}

@media (max-width: 640px) {

    .card-header,
    .card-body {
        padding: var(--spacing-4);
    }
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-4);
}

.summary-item {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-4);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--navy);
}

.summary-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-1);
}

.summary-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--navy-dark);
}

.summary-item.highlight {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-left: none;
}

.summary-item.highlight .summary-label {
    color: var(--gray-300);
}

.summary-item.highlight .summary-value {
    color: var(--white);
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
}

.chart-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.chart-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--navy-dark);
    margin-bottom: var(--spacing-4);
    text-align: center;
}

.performance-chart {
    width: 100% !important;
    height: 300px !important;
}

/* Subject Visualization Styles */
.subjects-visualization {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-2);
}

@media (max-width: 768px) {
    .subjects-visualization {
        grid-template-columns: 1fr;
    }
}

.subject-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-3);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    max-height: 180px;
    overflow: hidden;
}

/* Removed hover effect for compact design */

.subject-header {
    margin-bottom: var(--spacing-2);
}

.subject-title {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--navy-dark);
    margin: 0 0 var(--spacing-1) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.subject-code {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 500;
    margin: 0;
}

.subject-type-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theory-badge {
    background: var(--navy-light);
    color: white;
}

.lab-badge {
    background: #10b981;
    color: white;
}

.extras-badge {
    background: #f59e0b;
    color: white;
}

.marks-container {
    margin-bottom: var(--spacing-2);
}

.marks-row {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-1);
}

.marks-label {
    width: 60px;
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 500;
}

.marks-bar-container {
    flex: 1;
    height: 12px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin: 0 var(--spacing-1);
}

.marks-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.internal-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.external-bar {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.total-bar {
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
}

.marks-value {
    width: 30px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    color: var(--navy-dark);
}

.grade-display {
    text-align: center;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--font-size-base);
}

.grade-excellent {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.grade-good {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.grade-average {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.grade-below-average {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.no-data-message {
    text-align: center;
    padding: var(--spacing-6);
    color: var(--gray-500);
    font-style: italic;
}

/* Toggle Switch */
.toggle-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-4);
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--navy);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-container+.table-container {
    margin-top: var(--spacing-6);
    padding-top: var(--spacing-6);
    border-top: 1px solid var(--gray-100);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    table-layout: fixed;
    margin: 0;
}

/* Ensure consistent alignment and equal spacing for all table cells */
table td,
table th {
    vertical-align: middle;
}

thead {
    background: var(--navy);
}

th {
    padding-top: var(--spacing-4);
    padding-bottom: var(--spacing-4);
    padding-left: var(--spacing-3);
    padding-right: var(--spacing-3);
    text-align: left;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

/* Right-align numeric columns for overall result tables */
table#resultBreakdownTable th:nth-child(2),
table#resultBreakdownTable th:nth-child(3),
table#resultBreakdownTable th:nth-child(4),
table#yearwiseResultTable th:nth-child(2),
table#yearwiseResultTable th:nth-child(3),
table#yearwiseResultTable th:nth-child(4) {
    text-align: right;
}

th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

td {
    padding-top: var(--spacing-4);
    padding-bottom: var(--spacing-4);
    padding-left: var(--spacing-3);
    padding-right: var(--spacing-3);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

/* Right-align numeric columns in overall result tables */
table#resultBreakdownTable td:nth-child(2),
table#resultBreakdownTable td:nth-child(3),
table#resultBreakdownTable td:nth-child(4),
table#yearwiseResultTable td:nth-child(2),
table#yearwiseResultTable td:nth-child(3),
table#yearwiseResultTable td:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Semester subject tables - equal spacing with balanced widths */
table.modern-table {
    table-layout: fixed;
}

/* Paper Code column */
table.modern-table th:nth-child(1),
table.modern-table td:nth-child(1) {
    width: 14%;
}

/* Subject Name column - wider for content */
table.modern-table th:nth-child(2),
table.modern-table td:nth-child(2) {
    width: 26%;
}

/* Numeric columns - equal width for consistent spacing */
table.modern-table th:nth-child(3),
table.modern-table td:nth-child(3),
table.modern-table th:nth-child(4),
table.modern-table td:nth-child(4),
table.modern-table th:nth-child(5),
table.modern-table td:nth-child(5),
table.modern-table th:nth-child(6),
table.modern-table td:nth-child(6) {
    text-align: right;
    width: 13%;
}

/* Grade column */
table.modern-table th:nth-child(7),
table.modern-table td:nth-child(7) {
    text-align: center;
    width: 11%;
}

table.modern-table td:nth-child(3),
table.modern-table td:nth-child(4),
table.modern-table td:nth-child(5),
table.modern-table td:nth-child(6) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

table.modern-table td:nth-child(7) {
    text-align: center;
    font-weight: 600;
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-md);
}

tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-md) 0;
}

/* Balanced column widths for overall result tables - ensures equal spacing */
table#resultBreakdownTable th:nth-child(1),
table#resultBreakdownTable td:nth-child(1),
table#yearwiseResultTable th:nth-child(1),
table#yearwiseResultTable td:nth-child(1) {
    width: 20%;
}

table#resultBreakdownTable th:nth-child(2),
table#resultBreakdownTable td:nth-child(2),
table#yearwiseResultTable th:nth-child(2),
table#yearwiseResultTable td:nth-child(2) {
    width: 26.67%;
}

table#resultBreakdownTable th:nth-child(3),
table#resultBreakdownTable td:nth-child(3),
table#yearwiseResultTable th:nth-child(3),
table#yearwiseResultTable td:nth-child(3) {
    width: 26.67%;
}

table#resultBreakdownTable th:nth-child(4),
table#resultBreakdownTable td:nth-child(4),
table#yearwiseResultTable th:nth-child(4),
table#yearwiseResultTable td:nth-child(4) {
    width: 26.66%;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toggle-controls {
        width: 100%;
    }

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

    th,
    td {
        padding: var(--spacing-3) var(--spacing-4);
        font-size: var(--font-size-xs);
    }

    /* Maintain alignment on mobile */
    table#resultBreakdownTable td:nth-child(2),
    table#resultBreakdownTable td:nth-child(3),
    table#resultBreakdownTable td:nth-child(4),
    table#yearwiseResultTable td:nth-child(2),
    table#yearwiseResultTable td:nth-child(3),
    table#yearwiseResultTable td:nth-child(4),
    table.modern-table td:nth-child(3),
    table.modern-table td:nth-child(4),
    table.modern-table td:nth-child(5),
    table.modern-table td:nth-child(6) {
        text-align: right;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    .dashboard-header,
    .tabs-nav,
    .toggle-controls {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
        break-inside: avoid;
    }
}

/* Navigation & Footer Styles for AdSense Compliance */
.site-header {
    background: var(--navy);
    padding: var(--spacing-4) 0;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-4);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.nav-links a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: white;
}

.site-footer {
    background: var(--navy-dark);
    color: var(--gray-400);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1000px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: var(--font-size-xs);
}

/* FAQ Styles */
.faq-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.faq-answer {
    color: var(--gray-600);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        /* Hide top nav links on mobile for simplicity, keep footer links */
    }
}

/* ========================================
   PROGRAM TICKER STYLES - BOXED FORMAT
   ======================================== */

.program-ticker-container {
    width: 100%;
    background: var(--navy-dark);
    /* Solid navy to blend into the top of the login container */
    overflow: hidden;
    padding: 10px 0;
    /* Reduced height from 18px */
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1001;
}

.program-ticker-wrapper {
    display: flex;
    white-space: nowrap;
    animation: ticker-scrolling 20s linear infinite;
    gap: 18px;
    /* Tighter gap */
    /* Space between boxes */
    padding: 0 9px;
}

.program-ticker-wrapper:hover {
    animation-play-state: paused;
}

.program-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 16px;
    /* Reduced vertical and horizontal padding */
    font-size: 0.72rem;
    /* Slightly smaller text */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.04);
    border: 1.2px solid rgba(255, 255, 255, 0.12);
    /* Distinct box border as requested */
    border-radius: 8px;
    /* Slightly sharper corners */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.program-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

/* Remove dot separator since we have boxed chips now */
.program-item::after {
    display: none;
}

@keyframes ticker-scrolling {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Mismatch Alert Styles */
.mismatch-alert {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-6);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .mismatch-alert {
    background-color: rgba(69, 39, 0, 0.3);
    border-color: #92400e;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.alert-icon {
    color: #d97706;
    flex-shrink: 0;
}

[data-theme="dark"] .alert-icon {
    color: #fbbf24;
}

.alert-text {
    flex: 1;
}

.alert-text p {
    font-size: var(--font-size-sm);
    color: #92400e;
    margin-bottom: var(--spacing-1);
    font-weight: 500;
}

[data-theme="dark"] .alert-text p {
    color: #fde68a;
}

.alert-link {
    font-size: var(--font-size-base);
    color: #b45309;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: var(--transition);
}

.alert-link:hover {
    color: #92400e;
}

[data-theme="dark"] .alert-link {
    color: #fbbf24;
}

[data-theme="dark"] .alert-link:hover {
    color: #f59e0b;
}

/* ========================================
   HEADER & UPDATES STYLES
   ======================================== */

.main-header {
    background: var(--navy-dark);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1002;
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-logo-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.header-logo-link svg {
    width: 28px;
    height: 28px;
    color: var(--accent-light);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-grow: 1;
    justify-content: center;
}

.header-nav a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: var(--transition);
    line-height: 1;
}

.header-nav a:hover {
    color: white;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Premium Internals Pill */
.header-extra {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.internals-nav-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    position: relative;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.internals-nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

.internals-nav-pill:active {
    transform: translateY(0);
}

.internals-nav-pill .new-badge {
    position: absolute;
    top: -10px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
    border: 1.5px solid var(--navy-dark);
}

.pill-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.pill-label {
    opacity: 0.9;
    font-size: 0.85rem;
    font-weight: 500;
}

.pill-title {
    font-size: 0.85rem;
    font-weight: 700;
}


/* Updates Section */
.updates-section {
    padding: 40px 0;
    background: var(--white);
}

[data-theme="dark"] .updates-section {
    background: var(--navy-dark);
}

.updates-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 10px;
}

[data-theme="dark"] .section-header h2 {
    color: white;
}

.section-header p {
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.updates-grid {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .updates-grid {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.notices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.notices-table th {
    background: var(--gray-50);
    text-align: left;
    padding: 12px 20px;
    color: var(--navy);
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .notices-table th {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.notice-row {
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

[data-theme="dark"] .notice-row {
    border-color: rgba(255, 255, 255, 0.05);
}

.notice-row:last-child {
    border-bottom: none;
}

.notice-row:hover {
    background: var(--gray-50);
}

[data-theme="dark"] .notice-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notice-row td {
    padding: 14px 20px;
    vertical-align: middle;
}

.notice-date {
    color: var(--accent-blue);
    font-weight: 600;
    white-space: nowrap;
    width: 120px;
}

.notice-subject {
    color: var(--navy);
    line-height: 1.4;
}

[data-theme="dark"] .notice-subject {
    color: var(--gray-300);
}

.notice-action {
    text-align: right;
    width: 100px;
}

.btn-view-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.btn-view-notice:hover {
    background: var(--accent-blue);
    color: white;
}

@media (max-width: 768px) {
    .notices-table thead {
        display: none;
    }

    .notice-row {
        display: block;
        padding: 15px;
    }

    .notice-row td {
        display: block;
        padding: 5px 0;
        width: 100%;
        text-align: left;
    }

    .notice-action {
        text-align: left;
        margin-top: 10px;
    }
}

.educational-section {
    padding: 60px 0;
    margin-top: 40px;
    background: var(--gray-50);
}

[data-theme="dark"] .educational-section {
    background: var(--navy-dark);
}

.edu-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

.edu-content-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .edu-content-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.edu-content-card h2 {
    color: var(--navy);
    margin-bottom: 24px;
    font-size: 1.75rem;
}

[data-theme="dark"] .edu-content-card h2 {
    color: white;
}

.edu-content-card h3 {
    color: var(--navy-light);
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

[data-theme="dark"] .edu-content-card h3 {
    color: var(--accent-light);
}

.edu-content-card p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--gray-700);
}

[data-theme="dark"] .edu-content-card p {
    color: var(--gray-400);
}

.edu-steps {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.edu-steps li {
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-blue);
    font-size: 0.95rem;
    color: var(--navy);
}

[data-theme="dark"] .edu-steps li {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray-300);
}

.grade-table-container {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

[data-theme="dark"] .grade-table-container {
    border-color: rgba(255, 255, 255, 0.1);
}

.grade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.grade-table th,
.grade-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .grade-table th,
[data-theme="dark"] .grade-table td {
    border-color: rgba(255, 255, 255, 0.1);
}

.grade-table th {
    background: var(--gray-50);
    color: var(--navy);
    font-weight: 700;
    white-space: nowrap;
}

[data-theme="dark"] .grade-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

@media (max-width: 600px) {
    .grade-table {
        min-width: 450px;
    }
    .grade-table th,
    .grade-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

.percentage-box {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 32px;
    text-align: center;
}

.percentage-box h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.percentage-box p {
    margin: 0;
    color: #ffffff;
    opacity: 1;
    font-weight: 500;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--navy-dark);
    color: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-content {
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-content a {
    color: var(--accent-light);
    text-decoration: underline;
}

.btn-cookie-accept {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 12px;
        justify-content: space-between;
        gap: 0;
    }

    .header-logo-link span {
        font-size: 1.1rem;
    }

    .header-logo-link svg {
        width: 24px;
        height: 24px;
    }

    .header-extra {
        margin-left: auto;
        margin-right: 6px;
    }

    .internals-nav-pill {
        padding: 8px 18px;
        font-size: 0.7rem;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

    .pill-text {
        flex-direction: row;
        align-items: center;
        gap: 5px;
        line-height: 1;
    }

    .pill-label {
        font-size: 0.75rem;
        text-transform: none;
        letter-spacing: normal;
        margin-bottom: 0;
    }

    .pill-title {
        font-size: 0.75rem;
    }

    .internals-nav-pill .new-badge {
        top: -10px;
        right: -6px;
        padding: 2px 8px;
        font-size: 0.6rem;
        border-width: 1.5px;
    }

    .header-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navy-dark);
        padding: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 8px;
        z-index: 1001;
        backdrop-filter: blur(15px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    .header-nav.active {
        display: flex;
        animation: slideInDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-nav a {
        font-size: 1.1rem;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.03);
    }

    .header-nav a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-toggle {
        display: block;
        transition: transform 0.3s ease;
    }

    .mobile-menu-toggle.open {
        transform: rotate(90deg);
        color: var(--accent-light);
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}