@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

/* =====================================================
   WEBSITE BRAND MATCH
===================================================== */

html,
body,
button,
input,
select,
textarea {
    font-family: "Montserrat", Arial, sans-serif !important;
}

body {
    font-size: 14px;
    font-weight: 400;
}

.app-header {
    min-height: 108px;
    padding: 10px 24px !important;
    background: #ffffff;
}

    .app-header .app-brand {
        width: auto !important;
        min-width: 300px;
        padding: 0 !important;
    }

        .app-header .app-brand > a {
            display: inline-flex;
            align-items: center;
        }

        .app-header .app-brand .logo {
            width: 285px !important;
            max-width: none !important;
            height: auto !important;
            max-height: 86px !important;
            object-fit: contain;
        }

.learning-dashboard-v2 {
    font-family: "Montserrat", Arial, sans-serif;
}

.dashboard-welcome-copy h1 {
    font-size: 40px;
    font-weight: 700;
}

.dashboard-welcome-copy p {
    font-size: 15px;
    font-weight: 400;
}

.dashboard-v2-card h2 {
    font-size: 20px;
    font-weight: 700;
}

.study-choice-copy h3 {
    font-size: 15px;
    font-weight: 700;
}

.study-choice-copy p,
.focus-heading p,
.focus-area-label,
.recent-activity-grid td {
    font-size: 12px;
}

.dashboard-v2-action,
.practice-weak-areas-button,
.activity-action-button {
    font-family: "Montserrat", Arial, sans-serif !important;
    font-weight: 700;
}

@media (max-width: 991px) {
    .app-header {
        min-height: 92px;
        padding: 8px 18px !important;
    }

        .app-header .app-brand {
            min-width: 230px;
        }

            .app-header .app-brand .logo {
                width: 220px !important;
                max-height: 70px !important;
            }
}

@media (max-width: 575px) {
    .app-header {
        min-height: 78px;
        padding: 8px 12px !important;
    }

        .app-header .app-brand {
            min-width: 0;
        }

            .app-header .app-brand .logo {
                width: 175px !important;
                max-width: 100% !important;
                max-height: 58px !important;
            }

    .dashboard-welcome-copy h1 {
        font-size: 28px;
    }
}

/* =====================================================
   LEARNING DASHBOARD V2
===================================================== */

.learning-dashboard-v2 {
    --dashboard-navy: #062f70;
    --dashboard-navy-deep: #04255b;
    --dashboard-blue: #0569ef;
    --dashboard-blue-dark: #0058d5;
    --dashboard-orange: #ff7a00;
    --dashboard-orange-dark: #ed6900;
    --dashboard-text: #08255d;
    --dashboard-muted: #5f7089;
    --dashboard-border: #dfe6ef;
    --dashboard-surface: #ffffff;
    --dashboard-bg: #f5f8fc;
    color: var(--dashboard-text);
    background: var(--dashboard-bg);
    font-family: "Montserrat", Arial, sans-serif;
}

    .learning-dashboard-v2 *,
    .learning-dashboard-v2 *::before,
    .learning-dashboard-v2 *::after {
        box-sizing: border-box;
    }

.dashboard-welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    min-height: 150px;
    padding: 30px clamp(24px, 4vw, 64px);
    color: #ffffff;
    background: linear-gradient( 110deg, var(--dashboard-navy-deep) 0%, #063b83 58%, var(--dashboard-navy) 100% );
}

.dashboard-welcome-copy {
    min-width: 0;
}

    .dashboard-welcome-copy h1 {
        margin: 0 0 8px;
        color: #ffffff;
        font-size: clamp(28px, 2.5vw, 40px);
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -0.7px;
    }

    .dashboard-welcome-copy p {
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: 15px;
        line-height: 1.5;
    }

.dashboard-access-summary {
    flex: 0 1 560px;
    min-width: 360px;
}

.access-days {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

    .access-days > span:first-child {
        color: #ffffff;
        font-size: 36px;
        font-weight: 700;
        line-height: 1;
    }

    .access-days > span:last-child {
        color: rgba(255, 255, 255, 0.9);
        font-size: 15px;
        font-weight: 600;
    }

.access-progress-row {
    display: grid;
    grid-template-columns: max-content minmax(170px, 1fr) 44px;
    align-items: center;
    gap: 16px;
    color: #ffffff;
    font-size: 14px;
}

    .access-progress-row > span {
        white-space: nowrap;
    }

        .access-progress-row > strong,
        .access-progress-row > span:last-child {
            color: #ffffff;
            font-weight: 700;
            text-align: right;
        }

.access-progress-track {
    height: 10px;
    overflow: hidden;
    background: rgba(0, 14, 49, 0.58);
    border-radius: 999px;
}

    .access-progress-track > span {
        display: block;
        width: 0;
        height: 100%;
        background: linear-gradient(90deg, #0873ff, #188cf7);
        border-radius: inherit;
        transition: width 0.35s ease;
    }

.dashboard-content-shell {
    width: 100%;
    padding: 24px clamp(18px, 2.6vw, 44px) 40px;
}

.dashboard-primary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
}

.dashboard-v2-card {
    min-width: 0;
    background: var(--dashboard-surface);
    border: 1px solid var(--dashboard-border);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(22, 52, 90, 0.07);
}

    .dashboard-v2-card h2 {
        margin: 0;
        color: var(--dashboard-text);
        font-size: 20px;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: -0.25px;
    }

.performance-card-v2,
.study-card-v2,
.focus-card-v2 {
    min-height: 410px;
    padding: 22px;
}

.performance-card-v2 {
    display: flex;
    flex-direction: column;
}

.overall-score-ring {
    --score: 0;
    position: relative;
    width: 190px;
    height: 190px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin: 20px auto 16px;
    border-radius: 50%;
    background: conic-gradient( from -90deg, var(--dashboard-orange) calc(var(--score) * 1%), #e5e9ef 0 );
}

    .overall-score-ring::before {
        content: "";
        position: absolute;
        inset: 14px;
        background: #ffffff;
        border-radius: 50%;
    }

.score-ring-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .score-ring-center > span:first-child {
        color: var(--dashboard-orange);
        font-size: 43px;
        font-weight: 800;
        line-height: 1;
    }

    .score-ring-center > span:last-child {
        margin-top: 7px;
        color: var(--dashboard-text);
        font-size: 14px;
        font-weight: 800;
    }

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: auto;
}

.performance-metric {
    min-width: 0;
    padding: 16px 11px 4px;
    text-align: center;
    border-right: 1px solid var(--dashboard-border);
}

    .performance-metric:last-child {
        border-right: 0;
    }

    .performance-metric > span:first-child,
    .performance-metric > strong {
        display: block;
        color: var(--dashboard-text);
        font-size: 30px;
        font-weight: 800;
        line-height: 1.1;
    }

    .performance-metric > span:last-child {
        display: block;
        margin-top: 8px;
        color: var(--dashboard-text);
        font-size: 12px;
        font-weight: 650;
        line-height: 1.35;
    }

.study-card-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .study-card-v2 > h2 {
        margin-bottom: 2px;
    }

.study-choice {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    padding: 13px 15px;
    border: 1px solid #d9e4f2;
    border-radius: 12px;
}

.study-choice-practice {
    background: #f7fbff;
}

.study-choice-exam {
    background: #fffaf4;
    border-color: #f2dfcb;
}

.study-choice-copy {
    margin: 0 16px 10px;
}

    .study-choice-copy h3 {
        margin: 0 0 3px;
        color: var(--dashboard-text);
        font-size: 15px;
        font-weight: 700;
    }

    .study-choice-copy p {
        margin: 0;
        color: var(--dashboard-text);
        font-size: 12px;
        line-height: 1.4;
    }

.dashboard-v2-select {
    width: 100% !important;
    height: 39px;
    padding: 7px 13px !important;
    color: var(--dashboard-text) !important;
    background: #ffffff !important;
    border: 1px solid #cfd9e6 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font: inherit;
    font-size: 13px;
    appearance: none;
    -webkit-appearance: none;
}

    .dashboard-v2-select:focus {
        border-color: var(--dashboard-blue) !important;
        outline: 3px solid rgba(5, 105, 239, 0.13);
    }

.dashboard-v2-action {
    width: 100%;
    min-height: 39px;
    margin-top: 10px;
    padding: 9px 16px;
    color: #ffffff !important;
    border: 0;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: filter 0.18s ease;
}

    .dashboard-v2-action:hover,
    .dashboard-v2-action:focus {
        color: #ffffff !important;
        filter: brightness(0.94);
    }

.practice-action {
    background: linear-gradient(90deg, var(--dashboard-blue), #0878ef) !important;
}

.exam-action {
    background: linear-gradient(90deg, var(--dashboard-orange), #ff8e00) !important;
}

.focus-card-v2 {
    display: flex;
    flex-direction: column;
}

.focus-heading {
    margin-bottom: 8px;
}

    .focus-heading p {
        margin: 5px 0 0;
        color: var(--dashboard-text);
        font-size: 12px;
        line-height: 1.4;
    }

.focus-areas-grid {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse;
    background: transparent !important;
}

    .focus-areas-grid tbody,
    .focus-areas-grid tr,
    .focus-areas-grid td {
        width: 100%;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }

.focus-area-item {
    padding: 6px 0;
}

.focus-area-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 6px;
    color: var(--dashboard-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
}

    .focus-area-label > span {
        min-width: 0;
    }

    .focus-area-label strong {
        flex: 0 0 auto;
        font-size: 13px;
    }

.focus-progress-track {
    height: 6px;
    overflow: hidden;
    background: #e6e9ee;
    border-radius: 999px;
}

    .focus-progress-track > span {
        display: block;
        width: 0;
        height: 100%;
        background: linear-gradient(90deg, var(--dashboard-blue), #0879ef);
        border-radius: inherit;
    }

.practice-weak-areas-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin-top: auto;
    padding: 8px 14px;
    color: var(--dashboard-blue) !important;
    background: #ffffff;
    border: 1.5px solid var(--dashboard-blue);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
}

    .practice-weak-areas-button:hover,
    .practice-weak-areas-button:focus {
        color: #ffffff !important;
        background: var(--dashboard-blue);
    }

.dashboard-v2-loading {
    margin-top: 18px;
    padding: 12px 16px;
    color: var(--dashboard-text);
    background: #edf6ff;
    border: 1px solid #cde5ff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.recent-activity-card {
    margin-top: 18px;
    padding: 16px 20px 20px;
}

    .recent-activity-card > h2 {
        margin: 0 0 8px 4px;
    }

.recent-activity-table-wrap {
    overflow: hidden;
    border: 1px solid var(--dashboard-border);
    border-radius: 10px;
}

.recent-activity-grid {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff !important;
}

    .recent-activity-grid tr {
        background: #ffffff !important;
        border-bottom: 1px solid var(--dashboard-border);
    }

        .recent-activity-grid tr:last-child {
            border-bottom: 0;
        }

    .recent-activity-grid td {
        height: 49px;
        padding: 8px 14px !important;
        color: var(--dashboard-text);
        background: transparent !important;
        border: 0 !important;
        font-size: 12px;
        vertical-align: middle;
    }

.recent-activity-name {
    display: block;
    overflow: hidden;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.activity-progress {
    color: #0666de;
    background: #eaf3ff;
}

.activity-passed {
    color: #18794e;
    background: #e4f6ec;
}

.activity-warning,
.activity-low {
    color: #ef3038;
    background: #ffe9ea;
}

.recent-activity-date {
    display: block;
    color: var(--dashboard-muted);
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
}

.recent-activity-actions {
    display: grid;
    grid-template-columns: repeat(2, 92px);
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 192px;
    margin: 0 auto;
}

.activity-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

.continue-action {
    grid-column: 1 / -1;
    color: #ffffff !important;
    background: var(--dashboard-blue);
    border: 1px solid var(--dashboard-blue);
}

.results-action {
    color: #0666de !important;
    background: #eef6ff;
    border: 1px solid #b8d8ff;
}

.check-answers-action {
    color: #1769aa !important;
    background: #ffffff;
    border: 1px solid #9dccf7;
}

.retake-action {
    color: #d86600 !important;
    background: #fff6eb;
    border: 1px solid #ffbd72;
}

.continue-action:hover,
.continue-action:focus {
    color: #ffffff !important;
    background: var(--dashboard-blue-dark);
}

.results-action:hover,
.results-action:focus {
    color: var(--dashboard-blue-dark) !important;
    background: #dcecff;
}

.retake-action:hover,
.retake-action:focus {
    color: #c75c00 !important;
    background: #ffe7ca;
}

.dashboard-v2-empty {
    padding: 26px 18px;
    text-align: center;
}

    .dashboard-v2-empty h3 {
        margin: 0 0 6px;
        color: var(--dashboard-text);
        font-size: 15px;
        font-weight: 800;
    }

    .dashboard-v2-empty p {
        margin: 0;
        color: var(--dashboard-muted);
        font-size: 12px;
    }

.dashboard-v2-error {
    display: block;
    margin-top: 16px;
    padding: 12px 15px;
    color: #a6212a;
    background: #fff0f1;
    border: 1px solid #ffcdd1;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 650;
}

@media (max-width: 1199px) {
    .dashboard-primary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .focus-card-v2 {
        grid-column: 1 / -1;
        min-height: auto;
    }

    .focus-areas-grid tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
    }

    .focus-areas-grid tr {
        display: block;
    }

    .focus-areas-grid td {
        display: block;
    }

    .practice-weak-areas-button {
        margin-top: 12px;
    }
}

@media (max-width: 767px) {
    .dashboard-welcome-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 28px 20px;
    }

    .dashboard-access-summary {
        flex-basis: auto;
        min-width: 0;
    }

    .dashboard-primary-grid {
        grid-template-columns: 1fr;
    }

    .performance-card-v2,
    .study-card-v2,
    .focus-card-v2 {
        min-height: 0;
    }

    .focus-card-v2 {
        grid-column: auto;
    }

    .focus-areas-grid tbody {
        display: table-row-group;
    }

    .focus-areas-grid tr {
        display: table-row;
    }

    .focus-areas-grid td {
        display: table-cell;
    }

    .recent-activity-table-wrap {
        overflow: visible;
        border: 0;
    }

    .recent-activity-grid,
    .recent-activity-grid tbody {
        display: block;
        width: 100% !important;
        background: transparent !important;
    }

        .recent-activity-grid tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 11px 16px;
            margin-bottom: 12px;
            padding: 15px;
            border: 1px solid var(--dashboard-border);
            border-radius: 11px;
            box-shadow: 0 4px 13px rgba(22, 52, 90, 0.05);
        }

        .recent-activity-grid td {
            display: block;
            width: auto !important;
            height: auto;
            padding: 0 !important;
        }

            .recent-activity-grid td:nth-child(1) {
                grid-column: 1 / -1;
            }

            .recent-activity-grid td:nth-child(2) {
                grid-column: 1;
            }

            .recent-activity-grid td:nth-child(3) {
                grid-column: 2;
            }

            .recent-activity-grid td:nth-child(4) {
                grid-column: 1 / -1;
            }

    .recent-activity-name {
        white-space: normal;
    }

    .recent-activity-date {
        text-align: right;
    }

    .recent-activity-actions {
        padding-top: 3px;
    }
}

@media (max-width: 520px) {
    .dashboard-content-shell {
        padding: 16px 12px 28px;
    }

    .dashboard-welcome-copy h1 {
        font-size: 27px;
    }

    .access-progress-row {
        grid-template-columns: 1fr 42px;
        gap: 10px;
    }

        .access-progress-row > span:first-child {
            grid-column: 1 / -1;
        }

    .performance-card-v2,
    .study-card-v2,
    .focus-card-v2 {
        padding: 18px;
    }

    .overall-score-ring {
        width: 170px;
        height: 170px;
    }

    .performance-metric {
        padding-inline: 6px;
    }

        .performance-metric > span:first-child,
        .performance-metric > strong {
            font-size: 25px;
        }

        .performance-metric > span:last-child {
            font-size: 10px;
        }

    .recent-activity-card {
        padding: 16px 12px;
    }

    .recent-activity-grid tr {
        grid-template-columns: 1fr;
    }

    .recent-activity-grid td:nth-child(1),
    .recent-activity-grid td:nth-child(2),
    .recent-activity-grid td:nth-child(3),
    .recent-activity-grid td:nth-child(4) {
        grid-column: 1;
    }

    .recent-activity-date {
        text-align: left;
    }

    .recent-activity-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .activity-action-button {
        width: 100%;
    }
}

.app-header .app-brand .logo {
    display: block;
    width: 285px !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain;
    image-rendering: auto;
    transform: none !important;
}

.account-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

@media (max-width: 991px) {
    .recent-activity-grid td:nth-child(1) {
        width: 20%;
    }

    .recent-activity-grid td:nth-child(2) {
        width: 34%;
    }

    .recent-activity-grid td:nth-child(3) {
        width: 16%;
    }

    .recent-activity-grid td:nth-child(4) {
        width: 30%;
    }
}

@media (max-width: 767px) {
    .recent-activity-table-wrap {
        overflow: visible;
        border: 0;
    }

    .recent-activity-grid,
    .recent-activity-grid tbody {
        display: block;
        width: 100% !important;
    }

        .recent-activity-grid tr {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px 16px;
            margin-bottom: 12px;
            padding: 16px;
            border: 1px solid #d9e2ec;
            border-radius: 11px;
        }

        .recent-activity-grid td {
            display: block;
            width: auto !important;
            height: auto;
            padding: 0 !important;
        }

            .recent-activity-grid td:nth-child(1) {
                grid-column: 1 / -1;
            }

            .recent-activity-grid td:nth-child(2) {
                grid-column: 1;
            }

            .recent-activity-grid td:nth-child(3) {
                grid-column: 2;
            }

            .recent-activity-grid td:nth-child(4) {
                grid-column: 1 / -1;
            }

    .recent-activity-actions {
        max-width: none;
    }
}

@media (max-width: 520px) {
    .recent-activity-grid tr {
        grid-template-columns: 1fr;
    }

    .recent-activity-grid td:nth-child(1),
    .recent-activity-grid td:nth-child(2),
    .recent-activity-grid td:nth-child(3),
    .recent-activity-grid td:nth-child(4) {
        grid-column: 1;
    }

    .recent-activity-actions {
        grid-template-columns: 1fr;
    }

        .recent-activity-actions .retake-action {
            grid-column: 1;
        }
}

/* =====================================================
   RECENT ACTIVITY — FINAL CORRECTION
===================================================== */

.recent-activity-grid {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse;
    table-layout: fixed;
}

    /* Date */
    .recent-activity-grid td:nth-child(1) {
        width: 20%;
    }

    /* Practice or exam name */
    .recent-activity-grid td:nth-child(2) {
        width: 40%;
    }

    /* Score */
    .recent-activity-grid td:nth-child(3) {
        width: 14%;
        text-align: center;
    }

    /* Action buttons */
    .recent-activity-grid td:nth-child(4) {
        width: 26%;
        padding: 10px 16px !important;
    }

.recent-activity-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(105px, 1fr)) !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    max-width: 250px;
    margin: 0 auto;
}

.activity-action-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px;
    padding: 8px 10px !important;
    border-radius: 7px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

/* Retake fills the complete second row */
.recent-activity-actions .retake-action {
    grid-column: 1 / -1;
}

/* Button colors */

.results-action {
    color: #0666de !important;
    background: #eef6ff !important;
    border: 1px solid #b8d8ff !important;
}

.check-answers-action {
    color: #1769aa !important;
    background: #ffffff !important;
    border: 1px solid #9dccf7 !important;
}

.retake-action {
    color: #d86600 !important;
    background: #fff6eb !important;
    border: 1px solid #ffbd72 !important;
}

.results-action:hover,
.results-action:focus,
.check-answers-action:hover,
.check-answers-action:focus {
    color: #0058b8 !important;
    background: #e1f0ff !important;
}

.retake-action:hover,
.retake-action:focus {
    color: #c75c00 !important;
    background: #ffe7ca !important;
}

/*
   Keep every desktop Recent Activity row the same height.
   Completed sessions use two button lines, so the single
   Continue button row must reserve the same vertical space.
*/
@media (min-width: 768px) {
    .recent-activity-grid tr,
    .recent-activity-grid td {
        height: 100px !important;
    }
}
