/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #CCD0CF;
    --bg-secondary: #9BA8AB;
    --glass-bg: rgba(255, 255, 255, 0.28);
    --glass-bg-hover: rgba(255, 255, 255, 0.42);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-border-glow: rgba(255, 255, 255, 0.65);
    
    --accent-blue: #11212D;
    --accent-blue-rgb: 17, 33, 45;
    --accent-indigo: #06141B;
    --accent-glow: 0 0 15px rgba(17, 33, 45, 0.2);
    
    --text-primary: #06141B;
    --text-secondary: #253745;
    --text-muted: #4A5C6A;
    
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 33, 45, 0.2) transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(17, 33, 45, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-glow);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Premium Liquid Background Blobs */
.bg-blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(155, 168, 171, 0.7) 0%, rgba(204, 208, 207, 0) 70%);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: 15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 92, 106, 0.6) 0%, rgba(17, 33, 45, 0) 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(17, 33, 45, 0.3) 0%, rgba(155, 168, 171, 0) 70%);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(50px, -70px) scale(1.15) rotate(120deg);
    }
    66% {
        transform: translate(-40px, 50px) scale(0.9) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(360deg);
    }
}

/* App Containers */
#app {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* Liquid Glass Cards & Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04), inset 0 8px 32px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: var(--glass-border-glow);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.08), inset 0 8px 32px 0 rgba(255, 255, 255, 0.4);
    background: var(--glass-bg-hover);
}

.glass-panel.interactive:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-glow);
    box-shadow: var(--accent-glow), 0 15px 35px -5px rgba(0, 0, 0, 0.08), inset 0 8px 32px 0 rgba(255, 255, 255, 0.4);
}

/* Sidebar Navigation */
#sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-blue) 30%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
}

.user-info-sidebar {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    gap: 0.5rem;
}

.profile-pic i {
    font-size: 3rem;
    color: var(--accent-blue);
    background: var(--glass-bg);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.profile-details .name {
    font-size: 1rem;
    font-weight: 600;
    display: block;
}

.profile-details .role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.role-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    border: 1px solid var(--glass-border-glow);
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 180, 216, 0.1);
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    position: relative;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transform: translateX(4px);
}

.nav-btn.active {
    color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.06), inset 0 0 10px rgba(255, 255, 255, 0.1);
    font-weight: 600;
    padding-left: 1.5rem;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 25%;
    bottom: 25%;
    width: 4px;
    border-radius: 4px;
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(17, 33, 45, 0.6);
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 4px rgba(17, 33, 45, 0.4);
    }
    100% {
        box-shadow: 0 0 12px rgba(17, 33, 45, 0.8);
    }
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.w-100 { width: 100%; justify-content: center; }

/* Mobile Header & Responsiveness */
.main-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }
    .mobile-only {
        display: flex !important;
    }
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 999;
        height: 100vh;
    }
    #sidebar.open {
        transform: translateX(0);
    }
    .mobile-header {
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--glass-border);
        position: sticky;
        top: 0;
        z-index: 40;
    }
    .btn-icon {
        background: none;
        border: none;
        font-size: 1.25rem;
        color: var(--text-primary);
        cursor: pointer;
    }
}

/* Authentication Page */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
}

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

.auth-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

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

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, select {
    width: 100%;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus, select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.15);
    background: rgba(255, 255, 255, 0.75);
}

select option {
    background: #ffffff;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--accent-glow);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 0 25px rgba(0, 180, 216, 0.5);
}

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

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--text-secondary);
    box-shadow: none;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

.auth-toggle-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-toggle-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-toggle-link a:hover {
    text-decoration: underline;
}

/* Dashboard Views Layout */
.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.view-title h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.view-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

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

/* Routine & Events Section */
.section-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    border-left: 3px solid var(--accent-blue);
    padding-left: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Countdown list */
.countdown-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.countdown-card {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.countdown-card:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.countdown-card .info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
    font-family: 'Space Grotesk', sans-serif;
}

.countdown-card .info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-box {
    background: rgba(17, 33, 45, 0.05);
    border: 1px solid rgba(17, 33, 45, 0.15);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timer-box.days {
    background: rgba(74, 92, 106, 0.08);
    border-color: rgba(74, 92, 106, 0.2);
}

.timer-box.urgent {
    background: rgba(255, 69, 58, 0.12);
    border-color: rgba(255, 69, 58, 0.35);
    color: #b91c1c;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 8px rgba(255, 69, 58, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.1); }
    100% { box-shadow: 0 0 20px rgba(255, 69, 58, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.1); }
}

.timer-val {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.timer-unit {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Routine Table styling */
.routine-table-container {
    overflow-x: auto;
    width: 100%;
}

.routine-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.routine-table th, .routine-table td {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.routine-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', sans-serif;
}

.routine-table tbody tr {
    transition: background-color 0.2s ease;
}

.routine-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.routine-table td {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.routine-day-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(17, 33, 45, 0.08);
    border: 1px solid rgba(17, 33, 45, 0.18);
    color: var(--accent-blue);
    display: inline-block;
    letter-spacing: 0.5px;
}

.routine-time {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

/* Performance Visualizer (SVG charts) */
.perf-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.perf-stat-card {
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.perf-stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.perf-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.perf-stat-title h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-blue);
    font-family: 'Space Grotesk', sans-serif;
}

.perf-stat-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.percentile-radial {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.percentile-radial circle {
    fill: none;
    stroke-width: 6;
}

.percentile-radial .bg {
    stroke: rgba(17, 33, 45, 0.05);
}

.percentile-radial .progress {
    stroke: var(--accent-blue);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-in-out;
    filter: drop-shadow(0 0 3px rgba(17, 33, 45, 0.25));
}

.percentile-text {
    position: absolute;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-blue);
}

.perf-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.05);
}

.metric-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.metric-val {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
}

.metric-val.score {
    color: var(--accent-blue);
}

/* Resource sharing list */
.resource-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.note-title {
    font-weight: 600;
    font-size: 1.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tag-list {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.tag.exam {
    background: rgba(0, 180, 216, 0.1);
    border-color: rgba(0, 180, 216, 0.2);
    color: var(--accent-blue);
}

.note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Exam Forms & Exam taking UI */
.exam-creator-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-block {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    position: relative;
}

.question-block .btn-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.9rem;
}

.exam-taking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.exam-timer-fixed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
}

.exam-question-item {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.exam-question-item h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.mcq-options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mcq-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
}

.mcq-option-label:hover {
    background: var(--glass-bg-hover);
    border-color: var(--text-secondary);
}

.mcq-option-label input[type="radio"] {
    accent-color: var(--accent-blue);
    width: 18px;
    height: 18px;
}

.mcq-option-label.selected {
    border-color: var(--accent-blue);
    background: rgba(0, 180, 216, 0.08);
}

/* History Audit Logs Panel */
.audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.audit-log-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--accent-indigo);
    font-size: 0.88rem;
}

.audit-log-item.CREATE {
    border-left-color: var(--success);
}
.audit-log-item.DELETE {
    border-left-color: var(--danger);
}
.audit-log-item.UPDATE {
    border-left-color: var(--warning);
}

.audit-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.audit-desc {
    font-weight: 500;
}

/* Slot Detector visualizer */
.slots-container {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.slot-pill {
    padding: 1rem;
    text-align: center;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s;
}

.slot-pill:hover {
    background: rgba(16, 185, 129, 0.15);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.no-slots {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Floating Notification */
#notification-host {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    min-width: 280px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Split-Screen responsive layout for Landing & Auth */
.landing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 100px);
}

.split-screen-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    height: 680px;
    border-radius: 30px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 70px -15px rgba(6, 20, 27, 0.25);
    margin: auto;
}

.split-side-content {
    width: 50%;
    background: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.split-side-animation {
    width: 50%;
    background: linear-gradient(135deg, #11212D 0%, #06141B 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid var(--glass-border);
}

/* Fluid morphing liquid glass animation */
.fluid-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: plus-lighter;
    filter: blur(50px);
    animation: morph 15s infinite alternate ease-in-out;
    opacity: 0.75;
}

.fluid-blob-1 {
    width: 380px;
    height: 380px;
    top: -50px;
    left: -50px;
    background: radial-gradient(circle, rgba(74, 92, 106, 0.45) 0%, rgba(37, 55, 69, 0) 70%);
    animation-duration: 14s;
}

.fluid-blob-2 {
    width: 320px;
    height: 320px;
    bottom: -30px;
    right: -30px;
    background: radial-gradient(circle, rgba(204, 208, 207, 0.35) 0%, rgba(17, 33, 45, 0) 70%);
    animation-duration: 18s;
    animation-delay: -4s;
}

.fluid-blob-3 {
    width: 250px;
    height: 250px;
    top: 40%;
    right: 25%;
    background: radial-gradient(circle, rgba(155, 168, 171, 0.4) 0%, rgba(6, 20, 27, 0) 70%);
    animation-duration: 22s;
    animation-delay: -8s;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
        transform: translate(30px, -20px) rotate(120deg) scale(1.08);
    }
    66% {
        border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
        transform: translate(-30px, 40px) rotate(240deg) scale(0.95);
    }
    100% {
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@media (max-width: 900px) {
    .split-screen-container {
        flex-direction: column;
        height: auto;
        max-height: none;
        max-width: 440px;
        margin: 1.5rem auto;
    }
    .split-side-content {
        width: 100%;
        padding: 2.5rem 1.8rem;
    }
    .split-side-animation {
        display: none;
    }
}

/* --- STUDENT VIEW ENHANCEMENTS AND PREMIUM GLASSMORPHIC UI --- */

/* Tabs Control Header */
.premium-tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    backdrop-filter: blur(20px);
}

.premium-tab-group {
    display: flex;
    gap: 0.5rem;
}

.tab-trigger {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.tab-trigger.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(17, 33, 45, 0.25);
}

/* Timeline View (Today's Classes) */
.timeline-list {
    position: relative;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(17, 33, 45, 0.15);
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(17, 33, 45, 0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.2);
    background: var(--accent-blue);
    box-shadow: 0 0 0 6px rgba(17, 33, 45, 0.2);
}

.timeline-card {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.timeline-card:hover {
    background: rgba(255, 255, 255, 0.38);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateX(4px);
}

.timeline-time {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.95rem;
}

.timeline-subject {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-details {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.25rem;
}

/* Glass Schedule Grid (Weekly) */
.glass-routine-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.5rem;
    text-align: center;
}

.glass-routine-grid th {
    background: rgba(17, 33, 45, 0.1);
    color: var(--accent-blue);
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(17, 33, 45, 0.05);
}

.glass-routine-grid td {
    padding: 0;
    vertical-align: top;
    min-width: 120px;
}

.glass-routine-grid .time-col-header {
    background: rgba(17, 33, 45, 0.08);
    color: var(--accent-blue);
    width: 80px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.glass-routine-grid .time-cell {
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.routine-cell-item {
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.6rem 0.5rem;
    margin-bottom: 0.4rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.routine-cell-item:hover {
    background: rgba(255, 255, 255, 0.45);
    border-color: var(--glass-border-glow);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.routine-cell-item.ct-slot {
    background: rgba(255, 159, 10, 0.15);
    border-color: rgba(255, 159, 10, 0.45);
}
.routine-cell-item.ct-slot:hover {
    background: rgba(255, 159, 10, 0.25);
}

.routine-cell-item.exam-slot {
    background: rgba(255, 69, 58, 0.15);
    border-color: rgba(255, 69, 58, 0.45);
}
.routine-cell-item.exam-slot:hover {
    background: rgba(255, 69, 58, 0.25);
}

.routine-cell-course {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-blue);
}

.routine-cell-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.25;
}

/* Monthly Calendar View */
.monthly-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.calendar-day-header {
    text-align: center;
    font-weight: 700;
    color: var(--accent-blue);
    padding: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.calendar-day-box {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-height: 85px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.calendar-day-box:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: var(--glass-border-glow);
    transform: translateY(-1px);
}

.calendar-day-box.today {
    background: rgba(17, 33, 45, 0.08);
    border-color: var(--accent-blue);
    box-shadow: inset 0 0 5px rgba(17, 33, 45, 0.1);
}

.calendar-day-box.outside {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day-number {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-height: 48px;
    overflow: hidden;
}

.calendar-mini-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
    color: #ffffff;
}

.calendar-mini-badge.class { background: var(--accent-blue); }
.calendar-mini-badge.ct { background: var(--warning); color: #000000; }
.calendar-mini-badge.exam { background: var(--danger); }

/* Resource Reactions Styles */
.resource-reactions-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
}

.rx-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--glass-border);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rx-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    transform: scale(1.05);
}

.rx-btn:active {
    transform: scale(0.9);
}

.rx-btn.active.like-btn {
    background: rgba(48, 209, 88, 0.18);
    border-color: rgba(48, 209, 88, 0.4);
    color: #1e8235;
}

.rx-btn.active.dislike-btn {
    background: rgba(255, 69, 58, 0.18);
    border-color: rgba(255, 69, 58, 0.4);
    color: #b91c1c;
}

/* Floating Live Timer overlay */
.floating-exam-timer {
    position: fixed;
    top: 5rem;
    right: 2.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    z-index: 100;
    animation: slideIn 0.3s ease;
}

.floating-exam-timer .timer-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--danger);
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -1px;
}

.floating-exam-timer .timer-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Comparative Bar Charts (Performance Analytics) */
.performance-analytics-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    padding: 1.25rem;
    text-align: center;
}

.kpi-card h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.kpi-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-blue);
    font-family: 'Space Grotesk', sans-serif;
}

.comparative-chart-panel {
    padding: 1.75rem;
}

.comparison-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comparison-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-title h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.comparison-title p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.comparison-bars-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.8rem 1rem;
    border-radius: 12px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 70px;
}

.bar-track {
    flex-grow: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.bar-fill.user { background: var(--accent-blue); }
.bar-fill.avg { background: var(--bg-secondary); }
.bar-fill.max { background: var(--success); }

.bar-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    width: 45px;
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
}

/* Premium Soft Glass Profile Card */
.profile-showcase-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 850px) {
    .profile-showcase-container {
        grid-template-columns: 1fr;
    }
}

.premium-profile-card {
    padding: 2.2rem 1.8rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 24px rgba(17, 33, 45, 0.15);
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(17, 33, 45, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-placeholder i {
    font-size: 4rem;
    color: var(--accent-blue);
}

.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.profile-avatar-wrapper:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-edit-overlay i {
    color: #ffffff;
    font-size: 1.5rem;
}

.profile-avatar-wrapper input[type="file"] {
    display: none;
}

.profile-card-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-card-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.profile-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.profile-kpi-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.75rem;
    border-radius: 14px;
    text-align: center;
    margin-top: 0.5rem;
}

.profile-kpi-box {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.profile-kpi-box:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.profile-kpi-box .lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-kpi-box .val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.sensitive-field-indicator {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--warning);
    background: rgba(255, 159, 10, 0.1);
    border: 1px solid rgba(255, 159, 10, 0.25);
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 0.4rem;
    display: inline-block;
    vertical-align: middle;
}


/* --- STUDENT DASHBOARD ADDITIONAL PREMIUM STYLES --- */

/* Timeline for Today's Classes */
.timeline-list {
    position: relative;
    padding-left: 2rem;
    margin-top: 1rem;
}
.timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-blue) 0%, var(--glass-border) 100%);
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(17, 33, 45, 0.4);
    z-index: 2;
}

/* Calendar Grids */
.schedule-weekly-grid::-webkit-scrollbar {
    height: 8px;
}
.schedule-weekly-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}
.calendar-day-cell {
    transition: all 0.3s ease;
}
.calendar-day-cell:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.4) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Reactions */
.rx-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.rx-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}
.rx-btn.like-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #059669;
}
.rx-btn.like-btn.active i { color: #10b981; }
.rx-btn.dislike-btn.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #b91c1c;
}
.rx-btn.dislike-btn.active i { color: #ef4444; }

/* Profile Premium Card */
.profile-showcase-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .profile-showcase-container { grid-template-columns: 1fr; }
}
.premium-profile-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
}
.profile-avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), 0 0 0 4px rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}
.profile-avatar-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15), 0 0 0 6px rgba(255,255,255,0.6);
}
.profile-avatar-image, .profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar-placeholder {
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent-blue);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    transition: all 0.2s ease;
}
.profile-avatar-wrapper:hover .avatar-edit-overlay {
    transform: scale(1.1);
    background: var(--accent-indigo);
}
#avatar-file-input { display: none; }
.profile-card-name { font-size: 1.5rem; font-weight: 800; font-family: 'Space Grotesk', sans-serif; }
.profile-card-role { font-size: 0.95rem; color: var(--text-secondary); margin-top: -0.5rem; }
.profile-pills-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.profile-kpi-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}
.profile-kpi-box {
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 1rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-kpi-box .lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
.profile-kpi-box .val { font-size: 1rem; font-weight: 700; color: var(--accent-blue); font-family: 'Space Grotesk', sans-serif; }
.sensitive-field-indicator {
    font-size: 0.7rem;
    color: var(--danger);
    background: rgba(255, 69, 58, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* MCQ Quiz Styles */
.mcq-options-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}
.mcq-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.4);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.mcq-option-label:hover {
    background: rgba(255,255,255,0.6);
}
.mcq-option-label input[type="radio"] {
    accent-color: var(--accent-blue);
    transform: scale(1.2);
}
.mcq-option-label.selected {
    background: rgba(17, 33, 45, 0.05);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 15px rgba(17, 33, 45, 0.05);
}
.exam-taking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}
.exam-timer-fixed {
    position: sticky;
    top: 100px;
    background: var(--accent-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(17, 33, 45, 0.3);
    z-index: 10;
    animation: pulseGlow 2s infinite alternate;
}
.exam-question-item {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* --- ADDITIONAL MOBILE RESPONSIVENESS OVERRIDES --- */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 600px) {
    /* Auto-collapse grid columns to 1 column for forms and nested content */
    div[style*="display:grid"], 
    div[style*="display: grid"], 
    form[style*="display:grid"], 
    form[style*="display: grid"],
    #form-create-routine,
    #form-schedule-detected-ct {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .form-group {
        grid-column: 1 / -1 !important;
    }
    
    /* Stack countdown cards vertically to prevent text/timer overlap */
    .countdown-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .countdown-timer {
        align-self: flex-start !important;
    }
}

/* --- Subdomain Simulator Styles --- */
#subdomain-simulator-bar {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100000;
}

.subdomain-bar {
    background: rgba(17, 33, 45, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.5rem;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.subdomain-bar-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}

.subdomain-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #9BA8AB;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.subdomain-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.subdomain-select:hover, .subdomain-select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.subdomain-select option {
    background: #11212D;
    color: #fff;
}

/* --- University Grid / Cards (Landing Page) --- */
.uni-directory {
    margin-top: 1.5rem;
    text-align: left;
}

.uni-directory-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(17, 33, 45, 0.1);
    padding-bottom: 0.4rem;
}

.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.uni-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.uni-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.uni-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.uni-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.uni-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-indigo);
    line-height: 1.25;
}

/* Master Admin / Uni Admin Tabs Custom Styling */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.admin-tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.admin-tab-btn.active {
    background: var(--accent-blue);
    color: #fff;
}

.admin-setup-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Modal Backdrop and Content Positioning */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45); /* translucent overlay using theme dark color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensure it is above everything (including sidebars and headers) */
    backdrop-filter: blur(12px); /* Premium blur effect */
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.25s ease-out;
}

.modal-backdrop .modal-content {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


