/* ════════════════════════════════════════════════════════════════
   Exam Management Portal — site.css
   ════════════════════════════════════════════════════════════════ */

:root {
    --em-primary:     #003087;
    --em-primary-lt:  #1a52c7;
    --em-sidebar-bg:  #1e2d3d;
    --em-sidebar-w:   240px;
    --em-topnav-h:    56px;
}

/* ── Base ───────────────────────────────────────────────────────── */
body.em-body { background: #f4f6fb; font-family: 'Segoe UI', sans-serif; }

/* ── Top Nav ────────────────────────────────────────────────────── */
.em-topnav {
    background: var(--em-primary);
    height: var(--em-topnav-h);
    position: sticky; top: 0; z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ── Page wrapper ───────────────────────────────────────────────── */
.em-page-wrapper { min-height: calc(100vh - var(--em-topnav-h)); }

/* ── Sidebar ────────────────────────────────────────────────────── */
.em-sidebar {
    width: var(--em-sidebar-w);
    min-width: var(--em-sidebar-w);
    background: var(--em-sidebar-bg);
    min-height: calc(100vh - var(--em-topnav-h));
    padding: 12px 0;
    overflow-y: auto;
    transition: transform .25s;
    flex-shrink: 0;
}

.em-sidebar-section {
    padding: 14px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b8ab0;
}

.em-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #b0c4de;
    text-decoration: none;
    font-size: 13.5px;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.em-sidebar-link:hover,
.em-sidebar-link.active {
    background: rgba(255,255,255,.08);
    color: #ffffff;
    border-left-color: #4a90d9;
}

.em-sidebar-link i { font-size: 15px; min-width: 18px; }

/* ── Main content ───────────────────────────────────────────────── */
.em-main { max-width: 1400px; }
.em-page-title { font-size: 1.35rem; font-weight: 700; color: #1e2d3d; margin-bottom: .25rem; }

/* ── Auth (login / register) ────────────────────────────────────── */
.em-auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--em-primary) 0%, #1a52c7 100%);
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card { border-radius: .75rem; }

/* ── Tables ──────────────────────────────────────────────────────── */
.em-table-head th {
    background: #f0f4f8;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5a6878;
    border-bottom: 2px solid #e0e7ef;
    padding: 10px 14px;
}

.table td { padding: 10px 14px; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f7f9fc; }

/* ── Stat icon ───────────────────────────────────────────────────── */
.em-stat-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Detail table ────────────────────────────────────────────────── */
.em-detail-table td { padding: 8px 16px; }
.em-detail-table tr:nth-child(odd) { background: #f8fafc; }

/* ── Dropzone ────────────────────────────────────────────────────── */
.em-dropzone {
    border: 2px dashed #c0cfe0;
    border-radius: .6rem;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}
.em-dropzone:hover, .em-dropzone.hover { border-color: var(--em-primary-lt); background: #f0f6ff; }

/* ── Submission status badges ─────────────────────────────────────── */
.badge-submitted    { background: #0d6efd; color: #fff; }
.badge-notsubmitted { background: #6c757d; color: #fff; }
.badge-unlocked     { background: #fd7e14; color: #fff; }

/* ── Mobile sidebar ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .em-sidebar {
        position: fixed;
        top: var(--em-topnav-h);
        left: 0;
        z-index: 1020;
        transform: translateX(-100%);
        height: calc(100% - var(--em-topnav-h));
    }
    .em-sidebar.em-sidebar-open { transform: translateX(0); }
    .em-main { padding: 1rem !important; }
}

/* ── Print (hall tickets) ────────────────────────────────────────── */
@media print {
    .em-topnav, .em-sidebar, .btn, .alert { display: none !important; }
    .em-main { margin: 0 !important; padding: 0 !important; }
}
