:root {
    --green: #176f63;
    --green-dark: #0f554b;
    --ink: #17202a;
    --muted: #6c757d;
    --line: #e7ebef;
    --page: #f6f8fa;
}

body {
    background: var(--page);
    color: var(--ink);
}

.landing-page,
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.landing-card,
.auth-card {
    width: min(100%, 520px);
    padding: 34px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(23, 32, 42, .10);
    text-align: center;
}

.auth-card {
    text-align: left;
    max-width: 430px;
}

.auth-card h1,
.landing-card h1 {
    margin-bottom: 12px;
    font-weight: 800;
}

.app-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

.app-sidebar {
    background: #111820;
    color: #fff;
    padding: 22px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: var(--green);
    font-weight: 800;
}

.brand-box small {
    display: block;
    color: #b8c2cc;
}

.app-sidebar .nav-link {
    color: #dfe7ef;
    border-radius: 8px;
    padding: 11px 12px;
}

.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.app-main {
    padding: 28px;
}

.page-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
}

.page-title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.page-title span {
    color: var(--muted);
}

.stat-box {
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(23, 32, 42, .07);
}

.stat-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-box strong {
    font-size: 34px;
}

.btn-success {
    --bs-btn-bg: var(--green);
    --bs-btn-border-color: var(--green);
    --bs-btn-hover-bg: var(--green-dark);
    --bs-btn-hover-border-color: var(--green-dark);
}

.exam-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    background: var(--page);
}

.exam-header,
.exam-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.exam-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    justify-content: flex-end;
}

.exam-header small {
    display: block;
    color: var(--muted);
}

.timer-pill {
    min-width: 155px;
    padding: 9px 14px;
    border-radius: 9px;
    background: #111820;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.timer-pill.warning {
    background: #c98218;
}

.timer-pill.danger {
    background: #b53d2f;
}

.timer-pill span {
    font-size: 12px;
}

.timer-pill strong {
    font-size: 24px;
}

.exam-progress {
    height: 8px;
    background: #dfe4ea;
}

.exam-progress div {
    width: 100%;
    height: 100%;
    background: var(--green);
    transition: width .25s linear;
}

.exam-question {
    display: none;
    padding: 28px;
}

.exam-question.active {
    display: grid;
    place-items: center;
}

.question-box {
    width: min(100%, 900px);
    padding: 28px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 15px 38px rgba(23, 32, 42, .08);
}

.question-box h2 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 22px;
}

.options-grid {
    display: grid;
    gap: 12px;
}

.option-tile {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
}

.option-tile input {
    display: none;
}

.option-tile span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef2f5;
}

.option-tile:has(input:checked) {
    border-color: var(--green);
    background: rgba(23, 111, 99, .08);
}

.exam-question.locked .option-tile {
    cursor: not-allowed;
    opacity: .75;
}

.exam-question.locked .option-tile:has(input:checked) {
    border-color: var(--green);
    background: rgba(23, 111, 99, .12);
}

.result-hero {
    padding: 24px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(23, 32, 42, .07);
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .app-main,
    .exam-question {
        padding: 16px;
    }

    .page-title,
    .exam-header,
    .exam-footer {
        align-items: stretch;
        flex-direction: column;
    }
}
