:root {
    --cbt-primary: #0d47a1;
    --cbt-primary-dark: #093275;
    --cbt-primary-soft: #eef4ff;
    --cbt-bg: #f4f6f9;
    --cbt-border: #dce3ec;
}

body {
    background-color: var(--cbt-bg);
    color: #1e293b;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[x-cloak] {
    display: none !important;
}

/* Navbar & Sticky Topbar */
.cbt-navbar {
    background: linear-gradient(135deg, var(--cbt-primary-dark), var(--cbt-primary));
}

.cbt-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: #ffffff;
    border-bottom: 1px solid var(--cbt-border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Timer Pill */
.timer-pill {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    background-color: var(--cbt-primary-soft);
    color: var(--cbt-primary);
    border: 1px solid #c7dafc;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.timer-pill.timer-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffe69c;
}

.timer-pill.timer-danger {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
    animation: timerPulse 1.2s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .timer-pill.timer-danger {
        animation: none;
    }
}

/* Question Area */
.question-card {
    border: 1px solid var(--cbt-border);
    border-radius: 0.75rem;
}

.question-text {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #0f172a;
    white-space: pre-line;
}

/* Clickable Option Cards */
.option-card {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.875rem 1rem;
    border: 1.5px solid #d7dee8;
    border-radius: 0.65rem;
    background-color: #ffffff;
    color: #1e293b;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.option-card:hover {
    border-color: #6ea8fe;
    background-color: #f8fbff;
}

.option-card:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.4);
    outline-offset: 2px;
}

.option-card.selected {
    border-color: #0d6efd;
    background-color: #eef5ff;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.option-badge {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background-color: #eef2f6;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.option-card.selected .option-badge {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.option-text {
    line-height: 1.55;
    font-size: 0.985rem;
    padding-top: 0.15rem;
}

/* Question Navigation Grid Sidebar */
.nav-sidebar-sticky {
    position: sticky;
    top: 88px;
}

.question-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 4px;
}

.nav-btn {
    position: relative;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
    border-radius: 0.45rem;
}

.nav-btn.is-active {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.55);
    z-index: 1;
}

.nav-btn.has-answer-dot::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #198754;
    border: 1px solid #ffffff;
}

/* Dashboard Cards */
.package-card {
    border: 1px solid var(--cbt-border);
    border-radius: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #b6c8e4;
}

.stat-card {
    border: 1px solid var(--cbt-border);
    border-radius: 0.75rem;
}

/* Result & Review Page */
.review-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 0.55rem;
    background-color: #ffffff;
    font-size: 0.95rem;
}

.review-option.is-correct {
    border-color: #198754;
    background-color: #e9f7ef;
}

.review-option.is-wrong-chosen {
    border-color: #dc3545;
    background-color: #fdf0f1;
}

.review-option.is-tkp-chosen {
    border-color: #0d6efd;
    background-color: #eef5ff;
}

.explanation-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--cbt-primary);
    border-radius: 0.4rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
}

@media (max-width: 991.98px) {
    .nav-sidebar-sticky {
        position: static;
    }

    .question-nav-grid {
        max-height: 240px;
    }
}
