:root {
    --navy: #10243a;
    --blue: #1769aa;
    --gold: #f4b942;
    --bg: #f3f6fa;
    --ink: #182536;
    --muted: #627184;
    --line: #dfe6ee
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5
}

.topbar {
    height: 68px;
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(22px, calc((100% - 1120px)/2));
    gap: 20px
}

.brand {
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px
}

.brand span {
    color: var(--gold)
}

.topnote {
    font-size: 13px;
    color: #d6e0ec
}

.container {
    max-width: 1120px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: calc(100vh - 140px)
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 22px
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px #10243a0a
}

.narrow {
    max-width: 480px;
    margin: 45px auto
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px
}

.stat {
    padding: 20px;
    border-radius: 12px;
    background: #eaf3fc;
    border: 1px solid #d8e8f8
}

.stat strong {
    font-size: 28px;
    display: block;
    color: var(--blue)
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--navy)
}

h1 {
    font-size: 28px
}

label {
    display: block;
    font-weight: 700;
    margin: 13px 0 5px
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #fff
}

textarea {
    min-height: 90px
}

button,
.btn {
    border: 0;
    background: var(--blue);
    color: white;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-size: 14px
}

button:hover,
.btn:hover {
    filter: brightness(.94)
}

.btn.secondary {
    background: #e8edf3;
    color: var(--navy)
}

.btn.danger {
    background: #b42318
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 14px 0
}

.tablewrap {
    overflow: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    background: white
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle
}

th {
    background: #f5f8fb;
    color: var(--navy)
}

.muted {
    color: var(--muted)
}

.alert {
    padding: 12px 15px;
    background: #fff4d6;
    border: 1px solid #f2d58c;
    border-radius: 8px;
    margin: 14px 0
}

.success {
    background: #e8f8ef;
    border-color: #b5e2c7
}

.student-photo {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    background: #e8edf3
}

.exam-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center
}

.timer {
    font-size: 24px;
    font-weight: 800;
    color: #b42318;
    font-variant-numeric: tabular-nums
}

.question {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 15px 0
}

.option {
    font-weight: 400;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 9px 0
}

.option input {
    width: auto;
    margin-top: 5px
}

.hero {
    padding: 34px;
    background: linear-gradient(120deg, #10243a, #1769aa);
    border-radius: 16px;
    color: white;
    margin-bottom: 22px
}

.hero h1 {
    color: white
}

.pill {
    display: inline-block;
    background: #e7f5ec;
    color: #166534;
    padding: 4px 9px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: bold
}

@media(max-width:650px) {
    .topbar {
        padding: 0 16px
    }

    .topnote {
        display: none
    }

    .container {
        margin: 18px auto;
        padding: 0 12px
    }

    .card {
        padding: 17px
    }

    .exam-item {
        display: block
    }

    .timer {
        margin: 10px 0
    }
}