:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --ink: #1f2937;
    --muted: #64748b;
    --primary: #0f4c81;
    --primary-dark: #0b365c;
    --accent: #d4af37;
    --border: #dbe4ef;
    --success: #12805c;
    --danger: #b42318;
    --warning: #9a6700;
    --shadow: 0 18px 45px rgba(15, 76, 129, .12);
    --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 28px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; min-height: 92vh; }
.hero-card, .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card { padding: 42px; }
.login-card { padding: 30px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--primary); letter-spacing: .06em; margin-bottom: 20px; }
.logo-mark { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 14px; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.04em; }
h2 { margin: 0 0 18px; font-size: 28px; }
h3 { margin: 0 0 12px; }
p { color: var(--muted); line-height: 1.7; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge { border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; background: #f8fbff; color: var(--primary-dark); font-weight: 700; font-size: 13px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 7px; color: #334155; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15, 76, 129, .14); border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; cursor: pointer; font-size: 15px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-secondary { background: #eaf1f8; color: var(--primary-dark); }
.btn-danger { background: #fee4e2; color: var(--danger); }
.btn-success { background: #d1fadf; color: var(--success); }
.btn-block { width: 100%; }
.help { color: var(--muted); font-size: 13px; margin-top: 8px; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid var(--border); background: #fff; }
.alert-success { border-color: #abefc6; background: #ecfdf3; color: var(--success); }
.alert-danger { border-color: #fecdca; background: #fef3f2; color: var(--danger); }
.alert-warning { border-color: #fedf89; background: #fffaeb; color: var(--warning); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: rgba(243, 246, 251, .9); backdrop-filter: blur(10px); padding: 16px 0; margin-bottom: 20px; }
.exam-title { font-weight: 900; color: var(--primary-dark); }
.timer { background: #111827; color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 900; letter-spacing: .08em; }
.progress-wrap { height: 10px; background: #dbe4ef; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.question-card { padding: 24px; margin-bottom: 18px; }
.question-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.q-no { font-weight: 900; color: var(--primary); }
.subject-pill { font-size: 12px; font-weight: 800; color: var(--primary-dark); background: #eaf1f8; border-radius: 999px; padding: 7px 11px; white-space: nowrap; }
.question-text { font-weight: 800; line-height: 1.5; margin-bottom: 14px; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin: 10px 0; background: #fbfdff; cursor: pointer; }
.option:hover { border-color: var(--primary); }
.option input { width: auto; margin-top: 3px; }
.actions-sticky { position: sticky; bottom: 0; background: rgba(243, 246, 251, .95); padding: 16px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.result-card { max-width: 720px; margin: 40px auto; padding: 36px; text-align: center; }
.result-status { font-size: 54px; font-weight: 900; letter-spacing: -.04em; }
.status-pass { color: var(--success); }
.status-fail { color: var(--danger); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.stat { background: #f8fbff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: 26px; margin-bottom: 4px; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: #0b1f36; color: #fff; padding: 28px; }
.brand { font-weight: 900; font-size: 26px; line-height: 1; margin-bottom: 34px; }
.brand span { font-size: 13px; color: #b7c9df; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a { color: #d8e8f9; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { padding: 30px; overflow-x: auto; }
.admin-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.kpi { padding: 22px; }
.kpi span { color: var(--muted); font-weight: 700; }
.kpi b { display: block; font-size: 34px; margin-top: 8px; }
.table-card { padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: #334155; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; background: #f8fbff; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small { font-size: 13px; color: var(--muted); }
.search-row { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.review-correct { color: var(--success); font-weight: 900; }
.review-wrong { color: var(--danger); font-weight: 900; }
@media (max-width: 900px) {
    .hero, .grid-3, .grid-2, .admin-layout, .stats-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .admin-main, .page-shell { padding: 18px; }
    .hero-card { padding: 28px; }
    .question-head, .topbar, .actions-sticky, .admin-top { flex-direction: column; align-items: stretch; }
    .search-row { grid-template-columns: 1fr; }
}

.result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
input[type="file"] { padding: 10px; background: #fbfdff; }

/* Printable A4 result report */
.print-body { background: #eaf1f8; color: #111827; }
.print-toolbar { max-width: 1120px; margin: 18px auto; display: flex; justify-content: flex-end; gap: 10px; padding: 0 12px; }
.print-page { width: 210mm; min-height: 297mm; margin: 20px auto; padding: 14mm; background: #fff; box-shadow: 0 10px 35px rgba(15, 76, 129, .16); font-size: 11px; }
.print-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #0f4c81; padding-bottom: 12px; margin-bottom: 14px; }
.print-header h1 { font-size: 24px; margin: 4px 0; letter-spacing: -.02em; }
.print-header p { margin: 0; color: #64748b; }
.print-brand { font-weight: 900; color: #0f4c81; letter-spacing: .08em; }
.print-status { font-size: 28px; font-weight: 900; padding: 8px 14px; border-radius: 10px; border: 1px solid #dbe4ef; }
.print-pass { color: #12805c; background: #ecfdf3; }
.print-fail { color: #b42318; background: #fef3f2; }
.print-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.print-summary-grid div { border: 1px solid #dbe4ef; border-radius: 8px; padding: 8px; background: #f8fbff; }
.print-summary-grid span { display: block; color: #64748b; font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.print-summary-grid b { display: block; margin-top: 3px; font-size: 12px; }
.print-section { margin-top: 14px; page-break-inside: auto; }
.print-section h2 { font-size: 16px; margin: 0 0 8px; color: #0b365c; }
.print-info-table, .print-question-table { width: 100%; border-collapse: collapse; }
.print-info-table th, .print-info-table td, .print-question-table th, .print-question-table td { border: 1px solid #dbe4ef; padding: 6px; vertical-align: top; }
.print-info-table th, .print-question-table th { background: #f1f5f9; color: #334155; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.print-question-table td { font-size: 10px; line-height: 1.35; }
.print-correct { color: #12805c; font-weight: 900; }
.print-wrong { color: #b42318; font-weight: 900; }

@page { size: A4; margin: 10mm; }
@media print {
    body.print-body { background: #fff; }
    .no-print, .print-toolbar { display: none !important; }
    .print-page { width: auto; min-height: auto; margin: 0; padding: 0; box-shadow: none; font-size: 10px; }
    .print-header { margin-bottom: 10px; }
    .print-header h1 { font-size: 20px; }
    .print-status { font-size: 22px; }
    .print-summary-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .print-summary-grid div { padding: 5px; }
    .print-info-table th, .print-info-table td, .print-question-table th, .print-question-table td { padding: 4px; }
    .print-question-table tr { page-break-inside: avoid; }
}

/* Hired confirmation animation on student result page */
.hired-celebration { position: relative; overflow: hidden; max-width: 760px; margin: 28px auto 18px; padding: 32px 24px; background: linear-gradient(135deg, #ecfdf3, #eff6ff); border: 1px solid #bbf7d0; border-radius: 22px; text-align: center; box-shadow: 0 18px 45px rgba(18,128,92,.15); }
.hired-celebration h1 { margin: 18px 0 6px; font-size: 38px; color: #12805c; letter-spacing: -.04em; }
.hired-celebration h2 { margin: 0 0 10px; font-size: 30px; color: #0f4c81; }
.hired-celebration p { color: #334155; }
.confetti { position: absolute; width: 12px; height: 22px; border-radius: 4px; opacity: .85; animation: confettiFloat 2.8s ease-in-out infinite; }
.confetti.c1 { left: 10%; top: 18%; background: #12805c; animation-delay: 0s; }
.confetti.c2 { left: 22%; top: 68%; background: #0f4c81; animation-delay: .4s; }
.confetti.c3 { right: 16%; top: 20%; background: #f59e0b; animation-delay: .8s; }
.confetti.c4 { right: 8%; top: 66%; background: #ef4444; animation-delay: 1.2s; }
@keyframes confettiFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(22deg); } }

/* DSA GLOBAL logo branding */
.logo { gap: 12px; }
.brand-logo { width: 72px; max-height: 44px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.logo .brand-logo + span { display: inline-block; }
.brand-with-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.brand-with-logo img { width: 74px; max-height: 48px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.brand-with-logo div { line-height: 1; }
.print-brand-row { display: flex; align-items: center; gap: 10px; }
.print-brand-row img { width: 74px; max-height: 46px; object-fit: contain; }
@media (max-width: 600px) { .brand-logo { width: 62px; } .brand-with-logo img { width: 58px; } }

/* Premium admin interface update */
.premium-admin-body {
    background:
        radial-gradient(circle at top left, rgba(234, 88, 12, .09), transparent 30%),
        radial-gradient(circle at top right, rgba(37, 99, 235, .13), transparent 34%),
        #eef3fb;
}
.premium-admin-layout {
    grid-template-columns: 285px 1fr;
    background: transparent;
}
.premium-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 22px;
    background: linear-gradient(180deg, #071a33 0%, #0b2b58 55%, #071a33 100%);
    box-shadow: 16px 0 50px rgba(7, 26, 51, .22);
    border-right: 1px solid rgba(255,255,255,.10);
}
.premium-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 18% 8%, rgba(239, 89, 28, .24), transparent 30%);
}
.premium-sidebar > * { position: relative; z-index: 1; }
.premium-brand {
    padding: 14px;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.premium-brand div { color: #fff; letter-spacing: .01em; }
.premium-brand span { color: #b9d5ff; }
.premium-nav { gap: 10px; }
.premium-nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    color: #d9e8ff;
    border: 1px solid transparent;
    border-radius: 16px;
    font-weight: 800;
    letter-spacing: .01em;
    transition: all .18s ease;
}
.premium-nav a:hover,
.premium-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    border-color: rgba(255,255,255,.16);
    transform: translateX(3px);
}
.premium-nav a.active::before {
    content: "";
    width: 5px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f05a24, #ffb55c);
    position: absolute;
    left: -9px;
}
.premium-admin-main {
    padding: 32px;
}
.premium-admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 16px 18px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(219, 228, 239, .85);
    border-radius: 22px;
    box-shadow: 0 14px 35px rgba(15, 76, 129, .08);
    backdrop-filter: blur(14px);
}
.premium-admin-bar strong {
    display: block;
    font-size: 18px;
    color: #0b1f36;
}
.premium-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #f05a24;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.premium-admin-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #0f4c81;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(15, 76, 129, .22);
}
.premium-admin-main .admin-top {
    padding: 6px 2px 10px;
    margin-bottom: 18px;
}
.premium-admin-main .admin-top h1 {
    color: #071a33;
    font-size: clamp(34px, 4vw, 58px);
    letter-spacing: -.055em;
}
.premium-admin-main .admin-top p {
    margin-top: 8px;
    color: #64748b;
    font-weight: 600;
}
.premium-admin-main .card {
    border: 1px solid rgba(209, 222, 238, .9);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.91));
    box-shadow: 0 18px 45px rgba(15, 76, 129, .11);
}
.premium-admin-main .kpi {
    position: relative;
    overflow: hidden;
    padding: 24px;
}
.premium-admin-main .kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -36px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(15, 76, 129, .12), rgba(240, 90, 36, .12));
}
.premium-admin-main .kpi span {
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.premium-admin-main .kpi b {
    color: #0b1f36;
    font-size: 38px;
    letter-spacing: -.04em;
}
.premium-admin-main .table-card {
    padding: 24px;
}
.premium-admin-main .table-card h2 {
    color: #0b1f36;
    font-size: 28px;
    letter-spacing: -.04em;
}
.premium-admin-main table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
}
.premium-admin-main th {
    background: linear-gradient(180deg, #f8fbff, #eef5ff);
    color: #0b365c;
    font-weight: 900;
}
.premium-admin-main td {
    background: rgba(255,255,255,.78);
}
.premium-admin-main tr:hover td {
    background: #fbfdff;
}
.premium-admin-main .btn {
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 76, 129, .12);
}
.premium-admin-main .btn-primary {
    background: linear-gradient(135deg, #0b2b58, #0f4c81 55%, #f05a24);
}
.premium-admin-main .btn-secondary {
    background: #eef5ff;
    color: #0b365c;
}
.admin-login-premium .card,
.login-card {
    border-radius: 26px;
}
@media (max-width: 900px) {
    .premium-admin-layout { grid-template-columns: 1fr; }
    .premium-sidebar { position: static; height: auto; }
    .premium-admin-main { padding: 18px; }
    .premium-admin-bar { flex-direction: column; align-items: flex-start; }
}
