﻿:root {
    --exam-navy: #0a2a66;
    --exam-blue: #126fd6;
    --exam-orange: #f28a00;
    --exam-cyan: #22b8cf;
    --exam-ink: #15233a;
    --exam-muted: #65748b;
    --exam-line: #dce5f0;
    --exam-bg: #f4f7fb;
}

body {
    background: var(--exam-bg);
}

.app-header {
    min-height: 82px;
}

.app-brand {
    display: flex;
    width: 100%;
    align-items: center;
}

.exam-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.exam-brand-logo {
    display: block;
    width: auto;
    max-width: 230px;
    height: 48px;
    object-fit: contain;
}

.exam-app-container {
    padding: 24px;
}

.exam-page {
    max-width: 1180px;
    margin: 0 auto;
}

.exam-card {
    overflow: hidden;
    border: 1px solid var(--exam-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(10, 42, 102, .09);
}

.exam-header {
    padding: 24px 30px 20px;
    color: #fff;
    background: linear-gradient(120deg, #08285f 0%, #104b91 100%);
}

.exam-heading-row,
.exam-progress-row,
.exam-actions,
.exam-nav-actions {
    display: flex;
    align-items: center;
}

.exam-heading-row,
.exam-progress-row,
.exam-actions {
    justify-content: space-between;
    gap: 20px;
}

.exam-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #a9d8ff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.exam-title {
    display: block;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.exam-timer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.exam-progress-row {
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid rgba(255,255,255,.18);
}

.exam-question-number {
    font-size: 1rem;
    font-weight: 700;
}

.exam-status {
    color: #bdeeff;
    font-size: .92rem;
    font-weight: 600;
}

.exam-content {
    padding: 32px 30px 26px;
}

.exam-question {
    margin-bottom: 25px;
    color: var(--exam-ink);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.7;
}

.exam-page .exam-options {
    display: grid;
    gap: 12px;
}

.exam-page .exam-option {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 13px 17px;
    border: 1px solid var(--exam-line);
    border-radius: 11px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

    .exam-page .exam-option:hover {
        border-color: #80b6ea;
        background: #f8fbff;
        box-shadow: 0 4px 14px rgba(18, 111, 214, .08);
    }

    .exam-page .exam-option:has(input:checked) {
        border-color: var(--exam-blue);
        background: #eef6ff;
        box-shadow: 0 0 0 2px rgba(18,111,214,.1);
    }

    .exam-page .exam-option img {
        width: 24px;
        height: 24px;
        margin-right: 9px;
        object-fit: contain;
    }

    .exam-page .exam-option .custom-radio {
        display: inline-flex;
        margin-right: 10px;
    }

    .exam-page .exam-option input[type="radio"] {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--exam-blue);
        cursor: pointer;
    }

.exam-page .exam-option-text {
    flex: 1;
    color: #26364d;
    font-size: .97rem;
    line-height: 1.55;
    cursor: pointer;
}

.exam-result {
    display: block;
    margin: 22px 0 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.exam-info {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 11px;
}

.exam-hint {
    border: 1px solid #bfeaf1;
    background: #f0fbfd;
}

.exam-explanation {
    border: 1px solid #cbdcf3;
    background: #f3f7fd;
}

.exam-info-icon {
    color: var(--exam-cyan);
    font-size: 1.35rem;
}

.exam-info h3 {
    margin: 0 0 5px;
    color: var(--exam-navy);
    font-size: 1rem;
    font-weight: 700;
}

.exam-info span {
    color: #40516a;
    line-height: 1.55;
}

.exam-actions {
    padding: 18px 30px;
    border-top: 1px solid var(--exam-line);
    background: #f8fafc;
}

.exam-nav-actions {
    align-items:center;
    gap: 9px;
}

.exam-btn {
    min-height: 42px;
    padding: 9px 17px;
    border: 0;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
}

.exam-btn-save {
    color: #fff;
    border: 1px solid #a9dce5;
    background: #0a316b;
}

exam-btn-save:hover {
    background: #d43d3d;
}

.exam-btn-secondary {
    color: var(--exam-navy);
    border: 1px solid #c9d5e5;
    background: #fff;
}

.exam-btn-primary {
    color: #fff;
    background: var(--exam-blue);
}

.exam-btn-submit {
    color: #fff;
    background: var(--exam-orange);
}

.exam-btn:hover {
    color: #fff;
    background-color: #104b91;
}

.exam-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    color: #d9efff;
}

    .exam-loading .spinner-border {
        width: 1.25rem;
        height: 1.25rem;
    }

.exam-question-jump-list {
    display: none;
}

@media (max-width: 767.98px) {
    .app-header {
        min-height: 76px;
    }

    .app-brand {
        justify-content: center;
        padding: 10px 14px !important;
    }

    .exam-brand-logo {
        max-width: min(210px, 72vw);
        height: 42px;
    }

    .exam-app-container {
        padding: 12px;
    }

    .exam-header,
    .exam-content,
    .exam-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .exam-heading-row,
    .exam-progress-row,
    .exam-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .exam-timer {
        align-self: flex-start;
    }

    .exam-status {
        text-align: left;
    }

    .exam-nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .exam-btn-save,
    .exam-btn-submit {
        width: 100%;
    }

    .exam-btn-submit {
        grid-column: 1 / -1;
    }
}

/* =====================================================
   PRACTICE RESULTS
===================================================== */

.result-panel {
    width: 100%;
    padding: 35px 18px;
}

.result-card {
    position: relative;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 36, 62, 0.08);
}

/* Header */

.result-header {
    padding: 35px 30px 22px;
    text-align: center;
    background: radial-gradient( circle at top right, rgba(41, 119, 192, 0.11), transparent 38% ), linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    color: #ffffff;
    font-size: 22px;
    background: linear-gradient(135deg, #112d4e, #2977c0);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(41, 119, 192, 0.22);
}

.result-eyebrow,
.theme-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #2977c0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.result-title {
    margin: 0;
    color: #142b49;
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 700;
    line-height: 1.3;
}

.result-subtitle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* Score circle */

.result-score-section {
    display: flex;
    justify-content: center;
    padding: 8px 20px 28px;
}

.result-score-circle {
    position: relative;
    width: 165px;
    height: 165px;
    background: transparent !important;
    border-radius: 50%;
    box-shadow: 0 12px 28px rgba(15, 45, 78, 0.12);
}

.result-score-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-background,
.score-ring-progress {
    fill: none;
    stroke-width: 8;
}

.score-ring-background {
    stroke: #e6edf5;
}

.score-ring-progress {
    stroke: #2977c0;
    stroke-linecap: butt;
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 0.6s ease;
}

.result-score-inner {
    position: absolute;
    inset: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
    background: #ffffff;
    border-radius: 50%;
}

.score-caption {
    margin-bottom: 7px;
    color: #748399;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.result-score {
    color: #142b49;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

/* Result statistics */

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 30px 35px;
}

.result-stat {
    display: flex;
    align-items: center;
    min-height: 90px;
    padding: 17px;
    text-align: left;
    border: 1px solid;
    border-radius: 13px;
}

.result-stat-icon {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 12px;
    font-size: 21px;
    font-weight: 700;
    border-radius: 11px;
}

.result-stat-content {
    min-width: 0;
}

.result-stat-title {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.result-stat-value {
    display: block;
    color: #243b53;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.result-stat-correct {
    background: #f0fdf6;
    border-color: #bbebce;
}

    .result-stat-correct .result-stat-icon {
        color: #168653;
        background: #d9f8e7;
    }

    .result-stat-correct .result-stat-title {
        color: #168653;
    }

.result-stat-incorrect {
    background: #fff5f5;
    border-color: #ffd0d0;
}

    .result-stat-incorrect .result-stat-icon {
        color: #d43d3d;
        background: #ffe2e2;
    }

    .result-stat-incorrect .result-stat-title {
        color: #d43d3d;
    }

.result-stat-omitted {
    background: #f8fafc;
    border-color: #dce4ed;
}

    .result-stat-omitted .result-stat-icon {
        color: #64748b;
        background: #e8edf3;
    }

    .result-stat-omitted .result-stat-title {
        color: #64748b;
    }

/* Performance table */

.theme-performance {
    margin: 0 30px 30px;
    overflow: hidden;
    border: 1px solid #dfe7f0;
    border-radius: 14px;
}

.theme-performance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    background: #f7faff;
    border-bottom: 1px solid #e3eaf2;
}

    .theme-performance-header h3 {
        margin: 0;
        color: #142b49;
        font-size: 18px;
        font-weight: 700;
    }

    .theme-performance-header > i {
        color: #2977c0;
        font-size: 24px;
    }

.theme-table-header {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 165px 130px;
    padding: 11px 18px;
    color: #748399;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    background: #f6f8fb;
    border-bottom: 1px solid #e8edf3;
}

    .theme-table-header span:nth-child(2),
    .theme-table-header span:nth-child(3) {
        text-align: center;
    }

/* Match the GridView columns with the header */
.theme-table td:first-child {
    width: auto;
}

.theme-table td:nth-child(2) {
    width: 165px;
    text-align: center;
}

.theme-table td:nth-child(3) {
    width: 130px;
    text-align: center;
}
.theme-name {
    font-weight: 600;
}

.theme-questions {
    display: inline-block;
    min-width: 35px;
    padding: 5px 9px;
    color: #41556d;
    font-weight: 700;
    background: #edf2f7;
    border-radius: 20px;
}

.theme-percentage {
    display: inline-block;
    min-width: 58px;
    padding: 5px 10px;
    color: #1769aa;
    font-weight: 800;
    background: #e8f3fc;
    border-radius: 20px;
}

/* Button */

.result-actions {
    padding: 23px 30px 28px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e5ebf2;
}

.result-close-button {
    min-width: 220px;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #142f50, #245b91);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 7px 16px rgba(20, 47, 80, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .result-close-button:hover,
    .result-close-button:focus {
        color: #ffffff;
        background: linear-gradient(135deg, #18395f, #2970ae);
        box-shadow: 0 10px 22px rgba(20, 47, 80, 0.26);
        transform: translateY(-1px);
    }

    .result-close-button:active {
        transform: translateY(0);
    }

/* Loading overlay */

.result-loading {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #142b49;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(3px);
}

/* Responsive */

@media (max-width: 767px) {
    .result-panel {
        padding: 18px 10px;
    }

    .result-card {
        border-radius: 14px;
    }

    .result-header {
        padding: 28px 18px 20px;
    }

    .result-score-circle {
        width: 145px;
        height: 145px;
    }

    .result-summary {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 18px 25px;
    }

    .result-stat {
        min-height: 75px;
    }

    .theme-performance {
        margin: 0 18px 22px;
    }

    ..theme-table-header {
        grid-template-columns: minmax(180px, 1fr) 140px 110px;
        min-width: 530px;
    }

    .theme-table {
        min-width: 530px;
    }

        .theme-table td:nth-child(2) {
            width: 140px;
        }

        .theme-table td:nth-child(3) {
            width: 110px;
        }
}

    .result-actions {
        padding: 20px 18px;
    }

    .result-close-button {
        width: 100%;
        min-width: 0;
    }
}
/* Center Exam Simulator bottom buttons */
.exam-footer,
.question-navigation,
.navigation-buttons,
.action-buttons,
.card-footer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
@media (max-width: 576px) {
    .exam-footer,
    .question-navigation,
    .navigation-buttons,
    .action-buttons,
    .card-footer {
        flex-direction: column;
    }

        .exam-footer .btn,
        .question-navigation .btn,
        .navigation-buttons .btn,
        .action-buttons .btn,
        .card-footer .btn {
            width: 100%;
        }
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(3px);
}

    .page-loading-overlay.is-visible {
        display: flex;
    }

.page-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 34px;
    color: #16365c;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(22, 54, 92, 0.16);
}

    .page-loading-content .spinner-border {
        width: 2.25rem;
        height: 2.25rem;
    }
/* Neutral result card */

.answer-feedback-card {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    margin-top: 22px;
    padding: 16px 18px;
    color: #334e68;
    background: #f5f7fa;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
}

.answer-feedback-icon {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #e7edf4;
    border-radius: 11px;
    font-size: 20px;
}

.answer-feedback-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.answer-feedback-title {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.answer-feedback-message {
    color: #334e68;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
}

/* Correct colors */

.answer-feedback-card.answer-correct
.answer-feedback-icon,
.answer-feedback-card.answer-correct
.answer-feedback-title {
    color: #078746;
}

/* Incorrect colors */

.answer-feedback-card.answer-incorrect
.answer-feedback-icon,
.answer-feedback-card.answer-incorrect
.answer-feedback-title {
    color: #dc3545;
}

/* Omitted colors */

.answer-feedback-card.answer-omitted
.answer-feedback-icon,
.answer-feedback-card.answer-omitted
.answer-feedback-title {
    color: #64748b;
}

/* Incorrect answer box */

.exam-page .exam-option.answer-incorrect {
    background: #fff5f5;
    border: 2px solid #dc3545;
    box-shadow: none;
}

    .exam-page .exam-option.answer-incorrect
    .exam-option-text {
        color: #b4232f;
        font-weight: 600;
    }

    .exam-page .exam-option.answer-incorrect
    input[type="radio"] {
        opacity: 1;
        accent-color: #dc3545;
    }

/* Correct answer box */

.exam-page .exam-option.answer-correct {
    background: #f2fbf5;
    border: 2px solid #28a745;
    box-shadow: none;
}

    .exam-page .exam-option.answer-correct
    .exam-option-text {
        color: #16803b;
        font-weight: 600;
    }

    .exam-page .exam-option.answer-correct
    input[type="radio"] {
        opacity: 1;
        accent-color: #28a745;
    }

.result-letter {
    font-weight: 800;
}

.result-letter-correct {
    color: #078746;
}

.result-letter-incorrect {
    color: #dc3545;
}

.exam-page .exam-option.answer-correct .exam-option-text {
    color: #087c35 !important;
    font-weight: 600;
}

.exam-page .exam-option.answer-incorrect .exam-option-text {
    color: #c82333 !important;
    font-weight: 600;
}

/* Performance table alignment */

.theme-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.theme-table-header {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 165px 130px;
    width: 100%;
    padding: 12px 18px;
    color: #748399;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    background: #f6f8fb;
    border-bottom: 1px solid #e8edf3;
    box-sizing: border-box;
}

    .theme-table-header span:nth-child(2),
    .theme-table-header span:nth-child(3) {
        text-align: center;
    }

/* Force GridView to fill the container */

.theme-table {
    width: 100% !important;
    min-width: 545px;
    margin: 0 !important;
    border-spacing: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

    .theme-table tbody,
    .theme-table tr {
        width: 100%;
    }

    .theme-table td {
        padding: 13px 18px !important;
        color: #334e68;
        font-size: 13px;
        vertical-align: middle;
        background: #ffffff;
        border: 0 !important;
        border-bottom: 1px solid #edf1f5 !important;
        box-sizing: border-box;
    }

    .theme-table tr:last-child td {
        border-bottom: 0 !important;
    }

    /* Theme column */

    .theme-table td:nth-child(1) {
        width: auto;
        text-align: left;
    }

    /* Correct answers column */

    .theme-table td:nth-child(2) {
        width: 165px;
        text-align: center;
    }

    /* Performance column */

    .theme-table td:nth-child(3) {
        width: 130px;
        text-align: center;
    }

.theme-name {
    font-weight: 400 !important;
}

.theme-questions {
    display: inline-block;
    min-width: 72px;
    padding: 6px 10px;
    color: #41556d;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    background: #edf2f7;
    border-radius: 20px;
}

.theme-percentage {
    display: inline-block;
    min-width: 58px;
    padding: 6px 10px;
    color: #1769aa;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    background: #e8f3fc;
    border-radius: 20px;
}

@media (max-width: 767px) {
    .theme-table-header,
    .theme-table {
        min-width: 545px;
    }

    .theme-table-header {
        grid-template-columns: minmax(250px, 1fr) 165px 130px;
    }
}

.back-to-results-button {
    color: #ffffff;
    background: #126fd6;
    border: 1px solid #126fd6;
}

    .back-to-results-button:hover,
    .back-to-results-button:focus {
        color: #ffffff;
        background: #0d5fb9;
        border-color: #0d5fb9;
    }

@media (max-width: 575px) {
    .result-actions {
        flex-direction: column;
    }

    .result-action-button {
        width: 100%;
    }
}

.result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
}

.result-action-button {
    min-width: 175px;
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Review answers */

.result-review-button {
    color: #ffffff;
    background: #126fd6;
    border: 1px solid #126fd6;
}

    .result-review-button:hover,
    .result-review-button:focus {
        color: #ffffff;
        background: #0d5fb9;
        border-color: #0d5fb9;
    }

/* Dashboard */

.result-dashboard-button {
    color: #1769aa;
    background: #edf6ff;
    border: 1px solid #b9daf7;
}

    .result-dashboard-button:hover,
    .result-dashboard-button:focus {
        color: #12588f;
        background: #e2f1ff;
        border-color: #94c6ef;
    }

/* Back to results from question review */

.back-to-results-button {
    color: #ffffff;
    background: #126fd6;
    border: 1px solid #126fd6;
}

    .back-to-results-button:hover,
    .back-to-results-button:focus {
        color: #ffffff;
        background: #0d5fb9;
        border-color: #0d5fb9;
    }

@media (max-width: 575px) {
    .result-actions {
        flex-direction: column;
    }

    .result-action-button {
        width: 100%;
    }
}

.result-score-circle {
    --score-angle: 0deg;
    background-color: #e6edf5 !important;
    background-image: conic-gradient( #2977c0 0deg, #2977c0 var(--score-angle), #e6edf5 var(--score-angle), #e6edf5 360deg ) !important;
    background-repeat: no-repeat !important;
}