@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Modern & Professional */
    --primary: #0b4ea2;
    --primary-hover: #083c82;
    --primary-soft: #eef4ff;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #e31b23;

    --sidebar-width: 260px;
    --top-nav-height: 70px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-900);
    overflow-x: hidden;
}

/* --- LAYOUT --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--slate-900);
}

.sidebar-logo img {
    height: 32px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--slate-600);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-item i {
    font-size: 1.25rem;
    opacity: 0.7;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

.top-navbar {
    height: var(--top-nav-height);
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.search-bar {
    max-width: 400px;
    width: 100%;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-300);
}

.search-bar input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.dashboard-container {
    padding: 32px;
    max-width: 1200px;
}

/* --- PREMIUM BLUE HERO --- */
.hero-glass {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.hero-glass h4 {
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.hero-glass p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-accents {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary);
    filter: blur(60px);
    opacity: 0.1;
    pointer-events: none;
}

/* --- PREMIUM CARD SYSTEM --- */
.card-premium {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-premium:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.card-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--slate-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-description {
    font-size: 0.875rem;
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specific Card Layouts */
.assignment-card {
    border: 1px solid var(--slate-200);
}

.material-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--slate-50) 100%);
}

/* Helper Components */
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* --- STATS ITEMS --- */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--slate-600);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* --- TABLES --- */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-premium th {
    background: var(--slate-50);
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-600);
    font-weight: 600;
    border-bottom: 1px solid var(--slate-200);
}

.table-premium td {
    padding: 16px;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.9375rem;
}

/* --- UTILITIES --- */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    color: #fff;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-submitted {
    background: #d1fae5;
    color: #065f46;
}

.badge-success-premium {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #10b981 !important;
    opacity: 1 !important;
}

.badge-success-branded {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    opacity: 1 !important;
    font-weight: 700;
}

/* --- ASSIGNMENT CARD & PREMIUM COMPONENTS --- */
.assignment-description {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem;
}

.border-dashed {
    border-style: dashed !important;
}

.badge-premium {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.badge-hero {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.hero-glass .card-header-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.badge-blue {
    background: transparent;
    border: 1.5px solid var(--primary-soft);
    color: var(--primary);
}

.badge-green {
    background: #ecfdf5;
    color: #10b981;
}

.badge-orange {
    background: #fff7ed;
    color: #f59e0b;
}

.bg-slate-50 {
    background-color: var(--slate-50) !important;
}

/* RECENT ACTIVITY TIMELINE */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}

.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

/* --- LOADER --- */
#pageLoader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-custom {
    width: 40px;
    height: 40px;
    border: 3px solid var(--slate-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- LOGIN PAGE STYLES --- */
.login-wrapper {
    background-color: var(--slate-50);
}

.login-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05) !important;
}

.login-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-soft) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-sm);
}

.login-input {
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-radius: 12px !important;
    padding: 12px 16px 12px 48px !important;
    transition: var(--transition) !important;
}

.login-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.login-icon-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    z-index: 10;
}

/* --- SIDEBAR BACKDROP (MOBILE) --- */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .sidebar {
        width: 92px;
        transform: translateX(-100%);
        z-index: 1050;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar .sidebar-logo {
        display: none !important;
    }

    .sidebar-nav {
        padding: 52px 8px 24px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .sidebar .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 4px;
        gap: 6px;
        text-align: center;
        border-radius: 14px;
        margin-bottom: 0;
        transition: all 0.2s ease;
    }

    .sidebar .nav-item span {
        display: block !important;
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.15;
        letter-spacing: -0.01em;
        max-width: 80px;
        text-align: center;
        word-break: break-word;
    }

    .sidebar .nav-item i,
    .sidebar .nav-item svg {
        margin: 0 auto !important;
        width: 22px;
        height: 22px;
        opacity: 0.85;
    }

    .sidebar .nav-item.active i,
    .sidebar .nav-item.active svg {
        opacity: 1;
    }

    .sidebar .p-3 {
        padding: 12px 8px 28px !important;
    }

    .sidebar #logoutBtn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 4px;
        gap: 6px;
        text-align: center;
        border-radius: 14px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}


/* --- Cohort & Org Badges for Student Dashboard --- */
.badge-cohort-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-cohort-4 {
    background: rgba(11, 78, 162, 0.1);
    color: #0b4ea2;
    border: 1px solid rgba(11, 78, 162, 0.25);
}

.badge-cohort-5 {
    background: rgba(126, 34, 206, 0.1);
    color: #7e22ce;
    border: 1px solid rgba(126, 34, 206, 0.25);
}

.badge-hero-cohort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-hero-cohort .hero-dot-c4 {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 8px #60a5fa;
}

.badge-hero-cohort .hero-dot-c5 {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c084fc;
    box-shadow: 0 0 8px #c084fc;
}

.cohort-switcher-nav {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    display: inline-flex;
    gap: 4px;
}

.cohort-switcher-nav .cohort-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.cohort-switcher-nav .cohort-btn.active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- COHORT SELECTION OVERLAY & CARDS --- */
.cohort-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.cohort-selection-card-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 3rem 2.5rem;
    max-width: 860px;
    width: 100%;
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(226, 232, 240, 0.9);
    position: relative;
    animation: cohortModalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cohortModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cohort-picker-card {
    border-radius: 20px;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    background: #ffffff;
    border: 2px solid #e2e8f0 !important;
    position: relative;
    overflow: hidden;
}

.cohort-picker-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 20px 40px -10px rgba(11, 78, 162, 0.18) !important;
}

.cohort-picker-card.card-active {
    border-color: var(--primary) !important;
    background: #f8fafc;
    box-shadow: 0 10px 25px -5px rgba(11, 78, 162, 0.12) !important;
}

.cohort-picker-card.card-c5:hover {
    border-color: #7e22ce !important;
    box-shadow: 0 20px 40px -10px rgba(126, 34, 206, 0.2) !important;
}

.cohort-picker-card.card-c5.card-active {
    border-color: #7e22ce !important;
}

.picker-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   EXAM PORTAL & ASSESSMENT STYLES
   ========================================================================== */

/* --- ANTI-COPY & PROCTOR INTEGRITY FOR EXAM PORTAL --- */
#pane-exam,
#pane-exam *,
#examInstructionModal,
#examInstructionModal *,
#examPrevResultModal,
#examPrevResultModal * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

#pane-exam button,
#pane-exam input,
#pane-exam a,
#pane-exam .btn,
#pane-exam .exam-option-card,
#pane-exam .exam-card-item,
#examInstructionModal button,
#examInstructionModal input,
#examInstructionModal a,
#examInstructionModal .btn,
#examPrevResultModal button,
#examPrevResultModal .btn {
    pointer-events: auto !important;
    cursor: pointer;
}

.exam-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(11, 78, 162, 0.08);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(11, 78, 162, 0.15);
    transition: all 0.3s ease;
}

.exam-timer-pill.timer-warning {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}

.exam-timer-pill.timer-danger {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    animation: timerPulse 0.9s infinite alternate;
}

@keyframes timerPulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
    }
}

.exam-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.exam-option-card:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 78, 162, 0.08);
}

.exam-option-card.selected {
    border-color: var(--primary) !important;
    background: rgba(11, 78, 162, 0.05) !important;
    box-shadow: 0 0 0 2px var(--primary) inset, 0 6px 16px rgba(11, 78, 162, 0.15) !important;
}

.exam-option-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.exam-option-card.selected .exam-option-badge {
    background: var(--primary);
    color: #ffffff;
}

.exam-option-text {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

.exam-option-card.selected .exam-option-text {
    font-weight: 600;
    color: #0f172a;
}

/* --- Exam Catalog Card Styles --- */
.exam-card-item {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.exam-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(11, 78, 162, 0.09);
    border-color: #cbd5e1;
}

.exam-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exam-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

/* --- Professional Exam Instruction Modal Styles --- */
.exam-modal-dialog {
    max-width: 780px;
}

.exam-modal-content {
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.exam-modal-header {
    background: linear-gradient(135deg, #0b4ea2 0%, #1e40af 60%, #312e81 100%);
    color: #ffffff;
    padding: 28px 32px 24px;
    position: relative;
    border-bottom: 0;
}

.exam-modal-header .btn-close-white-custom {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    opacity: 0.9;
    padding: 8px;
    transition: background 0.2s ease;
}

.exam-modal-header .btn-close-white-custom:hover {
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.exam-candidate-strip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    font-size: 0.775rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.exam-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

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

.exam-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.exam-stat-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.exam-stat-card .stat-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.exam-stat-card .stat-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.exam-stat-card .stat-desc {
    font-size: 0.725rem;
    color: #64748b;
    margin-top: 3px;
    font-weight: 500;
}

.exam-rules-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.exam-rule-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.exam-rule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.exam-rule-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #eff6ff;
    color: #0b4ea2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.exam-rule-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.exam-rule-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0;
}

.exam-pledge-box {
    background: linear-gradient(to right, rgba(11, 78, 162, 0.04), rgba(126, 34, 206, 0.04));
    border: 1.5px solid rgba(11, 78, 162, 0.2);
    border-radius: 18px;
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.exam-pledge-box:hover {
    border-color: var(--primary);
    background: rgba(11, 78, 162, 0.05);
}

/* --- Professional Exam Result & Score Report Styles --- */
.exam-report-container {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    text-align: left;
}

.exam-report-header {
    padding: 32px 36px 28px;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #0b4ea2 0%, #1e40af 60%, #312e81 100%);
    color: #ffffff;
    transition: background 0.3s ease;
}

.exam-report-header.report-passed {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #0f766e 100%);
}

.exam-report-header.report-failed {
    background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%);
}

.exam-report-body {
    padding: 36px;
    background: #ffffff;
}

@media (max-width: 640px) {
    .exam-report-header, .exam-report-body {
        padding: 24px 20px;
    }
}

.exam-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    margin-bottom: 28px;
}

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

.exam-meta-item .meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 3px;
}

.exam-meta-item .meta-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exam-score-hero-card {
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.3s ease;
}

.exam-score-hero-card.passed-card {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.exam-score-hero-card.failed-card {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
    border-color: rgba(239, 68, 68, 0.25);
}

.exam-big-score {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 12px;
}

.exam-big-score.passed-score {
    color: #059669;
}

.exam-big-score.failed-score {
    color: #dc2626;
}

.exam-benchmark-bar-wrap {
    max-width: 540px;
    margin: 20px auto 0;
}

.exam-benchmark-track {
    position: relative;
    height: 14px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: visible;
    margin-top: 24px;
}

.exam-benchmark-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.exam-benchmark-marker {
    position: absolute;
    top: -5px;
    left: 60%;
    width: 2px;
    height: 24px;
    background: #0f172a;
    transform: translateX(-50%);
    z-index: 2;
}

.exam-benchmark-marker-label {
    position: absolute;
    top: -24px;
    left: 60%;
    transform: translateX(-50%);
    font-size: 0.675rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    background: #ffffff;
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.exam-analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

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

.exam-analytic-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 16px;
    text-align: center;
}

.exam-analytic-box .box-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 6px;
}

.exam-analytic-box .box-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.exam-analytic-box .box-sub {
    font-size: 0.725rem;
    color: #64748b;
    margin-top: 4px;
}

.exam-feedback-card {
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.exam-feedback-card.feedback-passed {
    background: rgba(16, 185, 129, 0.06);
    border: 1.5px solid rgba(16, 185, 129, 0.25);
}

.exam-feedback-card.feedback-failed {
    background: rgba(239, 68, 68, 0.05);
    border: 1.5px solid rgba(239, 68, 68, 0.2);
}

.exam-feedback-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-passed .exam-feedback-icon {
    background: #d1fae5;
    color: #059669;
}

.feedback-failed .exam-feedback-icon {
    background: #fee2e2;
    color: #dc2626;
}

.exam-feedback-content h6 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.exam-feedback-content p {
    font-size: 0.825rem;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.55;
}

/* --- Congratulations Next Stage Banner & Animations --- */
.congrats-stage-banner {
    position: relative;
    background: linear-gradient(135deg, #111827 0%, #312e81 48%, #6d28d9 72%, #d97706 100%);
    background-size: 220% 220%;
    animation: congratsGradientShimmer 8s ease infinite;
    border-radius: 24px;
    padding: 1.65rem 1.85rem;
    border: 1px solid rgba(253, 224, 71, 0.32);
    box-shadow: 0 18px 42px -12px rgba(49, 46, 129, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
}

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

.congrats-ambient-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: congratsGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes congratsGlowPulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.85; }
}

.congrats-trophy-box {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: congratsFloat 3s ease-in-out infinite;
}

@keyframes congratsFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.congrats-trophy-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    animation: congratsTrophyPulseRing 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

@keyframes congratsTrophyPulseRing {
    0% { transform: scale(0.9); opacity: 0.8; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(1.2); opacity: 0; }
}

.congrats-trophy-icon {
    width: 30px;
    height: 30px;
    color: #fef08a;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.congrats-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.congrats-desc {
    max-width: 680px;
    line-height: 1.55;
}

/* Ensure Confetti Canvas is ALWAYS on top of the modal and covers screen */
canvas[style*="position: fixed"],
.confetti-canvas-top {
    z-index: 999999 !important;
    pointer-events: none !important;
}

/* Stage 3 advancement modal */
.congrats-pro-modal .stage3-modal-content {
    border-radius: 28px !important;
    border: 1px solid rgba(129, 140, 248, 0.35) !important;
    box-shadow: 0 28px 70px -18px rgba(49, 46, 129, 0.48) !important;
    background: linear-gradient(145deg, #ffffff 0%, #f5f3ff 55%, #fff7ed 100%) !important;
    overflow: hidden;
}

.congrats-pro-modal .stage3-modal-content::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -120px;
    top: -120px;
    background: rgba(245, 158, 11, 0.12);
}

.stage3-modal-kicker {
    color: #6d28d9;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.stage3-modal-title { color: #1e1b4b; }
.stage3-modal-subtitle { color: #6d28d9; }
.stage3-modal-message { color: #64748b; line-height: 1.65; }

.stage3-score-pill {
    color: #312e81;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: 0 8px 20px rgba(49, 46, 129, 0.08);
}

.stage3-score-pill span { color: #64748b; font-size: 0.825rem; }
.stage3-score-pill strong { font-size: 0.95rem; }

.congrats-badge-icon-wrap {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #312e81 0%, #7c3aed 58%, #d97706 100%);
    border: 2px solid #fef3c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px -6px rgba(109, 40, 217, 0.38);
    margin-bottom: 1rem;
}

.congrats-badge-icon-wrap i { color: #ffffff; }
.congrats-glow-ring {
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 2px dashed rgba(109, 40, 217, 0.45);
    animation: rotateCongratsRing 14s linear infinite;
}

@keyframes rotateCongratsRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- NEXT STEP (STAGE 2) PORTAL & QUILL STYLING --- */
.nextstage-avatar-container {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    position: relative;
    padding: 4px;
    background: #ffffff;
    border: 2px solid var(--slate-200);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12);
    transition: var(--transition);
}

.nextstage-avatar-container:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.nextstage-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    display: block;
}

.nextstage-avatar-upload-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(11, 78, 162, 0.35);
    transition: var(--transition);
}

.nextstage-avatar-upload-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.08);
    color: #ffffff;
}

/* Quill Snow Editor Modernization */
#quillToolbarContainer.ql-toolbar.ql-snow {
    border: 1px solid var(--slate-200) !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    background: #f8fafc !important;
    padding: 10px 14px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

#researchQuillEditor.ql-container.ql-snow {
    border: 1px solid var(--slate-200) !important;
    border-top: none !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    background: #ffffff !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 0.975rem !important;
    transition: border-color 0.2s ease;
}

#researchQuillEditor.ql-container.ql-snow:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(11, 78, 162, 0.08);
}

#researchQuillEditor .ql-editor {
    min-height: 280px;
    padding: 18px 20px;
    line-height: 1.75;
    color: var(--slate-800);
}

#researchQuillEditor .ql-editor.ql-blank::before {
    font-style: normal;
    color: #94a3b8;
    left: 20px;
    right: 20px;
    line-height: 1.75;
}

#researchQuillEditor .ql-editor h1,
#researchQuillEditor .ql-editor h2,
#researchQuillEditor .ql-editor h3 {
    font-weight: 700;
    color: var(--slate-900);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

#researchQuillEditor .ql-editor pre.ql-syntax {
    background-color: #0f172a;
    color: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
}

#researchQuillEditor .ql-editor blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 14px;
    color: #475569;
    font-style: italic;
}

/* --- STAGE 2 COMPACT & REFINED TYPOGRAPHY (SMALLER TEXTS ALL THROUGH) --- */
#pane-nextstage {
    font-size: 0.8125rem;
}

#pane-nextstage .hero-glass h2 {
    font-size: 1.25rem !important;
    letter-spacing: -0.01em;
}

#pane-nextstage .hero-glass p {
    font-size: 0.775rem !important;
}

#pane-nextstage .card-premium {
    padding: 30px 32px !important;
    border-radius: 20px !important;
}

#pane-nextstage .card-premium h5 {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

#pane-nextstage .form-label {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    color: var(--slate-700) !important;
}

#pane-nextstage p.text-muted,
#pane-nextstage .card-premium p.text-muted {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
}

#pane-nextstage .form-text {
    font-size: 0.725rem !important;
    line-height: 1.4 !important;
    color: #64748b !important;
}

#pane-nextstage .form-control {
    font-size: 0.8125rem !important;
    padding: 0.52rem 0.85rem !important;
    min-height: 42px;
    border-color: #e2e8f0;
    border-radius: 10px;
}

#pane-nextstage .input-group .form-control {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

#pane-nextstage .input-group-text {
    padding: 0.52rem 0.85rem !important;
    font-size: 0.8125rem !important;
    border-color: #e2e8f0;
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

#pane-nextstage .btn-sm {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.9rem !important;
}

#pane-nextstage #btnSaveResearchDraft {
    font-size: 0.8125rem !important;
    padding: 0.55rem 1.4rem !important;
}

#pane-nextstage #btnSubmitResearchProject {
    font-size: 0.825rem !important;
    padding: 0.6rem 1.75rem !important;
}

#pane-nextstage .badge {
    font-size: 0.68rem !important;
}

#pane-nextstage .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 78, 162, 0.08);
}

/* Placeholders: small text and faint */
#pane-nextstage input::placeholder,
#pane-nextstage textarea::placeholder,
#pane-nextstage .form-control::placeholder,
.form-control::placeholder {
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 0.65 !important;
}

#pane-nextstage input::-webkit-input-placeholder,
#pane-nextstage .form-control::-webkit-input-placeholder,
.form-control::-webkit-input-placeholder {
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 0.65 !important;
}

/* Quill Editor font sizing */
#researchQuillEditor.ql-container.ql-snow {
    font-size: 0.825rem !important;
}

#researchQuillEditor .ql-editor {
    min-height: 250px;
    padding: 14px 16px;
    font-size: 0.825rem !important;
    line-height: 1.65;
}

#researchQuillEditor .ql-editor.ql-blank::before {
    font-style: normal !important;
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    left: 16px;
    right: 16px;
    line-height: 1.65;
}

#quillToolbarContainer.ql-toolbar.ql-snow {
    padding: 5px 8px !important;
}

#quillToolbarContainer.ql-toolbar.ql-snow .ql-picker-label {
    font-size: 0.78rem !important;
}

#quillWordCount {
    font-size: 0.725rem !important;
}

/* Locked Non-Editable Stage 2 Form */
#pane-nextstage .form-control:disabled {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
    cursor: default !important;
    opacity: 0.95 !important;
}

#pane-nextstage #researchQuillEditor.ql-container.ql-disabled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

#pane-nextstage #researchQuillEditor.ql-container.ql-disabled .ql-editor {
    color: #1e293b;
    cursor: default;
}

/* RESEARCH SUBMISSION SUCCESS POPUP MODAL (MODERN & COMPACT) */
#researchSuccessModal .modal-content {
    border-radius: 26px !important;
    border: none !important;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
    background: #ffffff;
    overflow: hidden;
}

#researchSuccessModal .success-icon-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.18) 100%);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
    margin-bottom: 1.25rem;
    animation: successPulse 2s infinite ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3); }
    50% { transform: scale(1.04); box-shadow: 0 14px 28px -3px rgba(16, 185, 129, 0.45); }
    100% { transform: scale(1); box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3); }
}