/* ============================================================
   TỰ LUYỆN ĐỀ - ĐÁNH GIÁ
============================================================ */

body.assessment-open {
    overflow: hidden;
}


/* ============================================================
   DIALOG
============================================================ */

.assessment-dialog {
    width: min(97vw, 1240px);
    max-width: 1240px;

    max-height: 96dvh;

    padding: 0;

    border: 0;
    border-radius: 28px;

    overflow: hidden;

    color: #153e60;

    background: #ffffff;

    box-shadow:
        0 30px 100px
        rgba(0, 35, 82, 0.40);
}


.assessment-dialog::backdrop {
    background:
        rgba(4, 25, 57, 0.73);

    backdrop-filter:
        blur(7px);
}


.assessment-shell {
    display: flex;

    flex-direction: column;

    max-height: 96dvh;

    background: #fff;
}


/* ============================================================
   HEADER
============================================================ */

.assessment-header {
    position: relative;

    z-index: 20;

    flex: 0 0 auto;

    min-height: 90px;

    padding:
        17px
        88px
        16px
        22px;

    display: flex;

    align-items: center;

    border-bottom:
        1px solid #cceaf4;

    background:
        linear-gradient(
            115deg,
            #e5f8ff 0%,
            #f8efff 48%,
            #fff5c7 100%
        );
}


.assessment-heading {
    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 0;
}


.assessment-heading-icon {
    width: 52px;
    height: 52px;

    flex: 0 0 auto;

    display: grid;

    place-items: center;

    border:
        3px solid
        rgba(255,255,255,.9);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #fff2a1,
            #ffcce7
        );

    font-size: 28px;

    box-shadow:
        0 6px 14px
        rgba(66,72,130,.14);

    transform:
        rotate(-3deg);
}


.assessment-title {
    margin: 0;

    color: #074693;

    font-size:
        clamp(
            23px,
            2.5vw,
            34px
        );

    line-height: 1.2;

    font-weight: 950;

    letter-spacing: -.02em;
}


.assessment-subtitle {
    margin:
        5px 0 0;

    color: #5b7487;

    font-size: 13px;

    line-height: 1.45;
}


/* ============================================================
   CLOSE CHIBI
============================================================ */

.assessment-close {
    position: absolute;

    top: 13px;
    right: 16px;

    z-index: 50;

    width: 58px;
    height: 58px;

    padding: 0;

    display: grid;

    place-items: center;

    border: 0;

    background: transparent;

    cursor: pointer;

    transition:
        transform 150ms ease,
        filter 150ms ease;
}


.assessment-close:hover {
    transform:
        scale(1.1)
        rotate(-5deg);

    filter:
        drop-shadow(
            0 7px 7px
            rgba(170,0,0,.24)
        );
}


.assessment-close:active {
    transform:
        scale(.9)
        rotate(3deg);
}


.assessment-close:focus-visible {
    outline:
        4px solid
        rgba(40,130,255,.30);

    outline-offset: 2px;

    border-radius: 16px;
}


.assessment-close-icon {
    width: 52px;
    height: 52px;

    display: block;

    pointer-events: none;
}


/* ============================================================
   BODY
============================================================ */

.assessment-body {
    position: relative;

    flex: 1;

    min-height: 0;

    padding:
        clamp(
            13px,
            2vw,
            23px
        );

    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;

    scrollbar-gutter: stable;

    background:
        radial-gradient(
            circle at 18px 18px,
            rgba(72,181,239,.10) 2px,
            transparent 2.5px
        ),
        linear-gradient(
            135deg,
            #f4fcff,
            #fffaf1 50%,
            #faf3ff
        );

    background-size:
        38px 38px,
        auto;
}


/* ============================================================
   DASHBOARD
============================================================ */

.assessment-dashboard {
    display: grid;

    gap: 17px;
}


/* ============================================================
   RESULT
============================================================ */

.assessment-result-section {
    position: relative;

    padding:
        clamp(
            15px,
            2.3vw,
            23px
        );

    border:
        2px solid #d8edf5;

    border-radius: 25px;

    background:
        rgba(255,255,255,.95);

    box-shadow:
        0 9px 28px
        rgba(23,84,123,.09);

    overflow: hidden;
}


.assessment-result-section::before {
    content: "⭐";

    position: absolute;

    top: 11px;
    right: 18px;

    font-size: 31px;

    opacity: .65;

    transform: rotate(15deg);
}


.assessment-section-title {
    display: flex;

    align-items: center;

    gap: 11px;

    margin-bottom: 17px;
}


.assessment-section-title > span {
    font-size: 34px;
}


.assessment-section-title h3 {
    margin: 0;

    color: #0d4e8d;

    font-size:
        clamp(
            20px,
            2vw,
            27px
        );

    font-weight: 950;
}


.assessment-section-title p {
    margin:
        3px 0 0;

    color: #728696;

    font-size: 12px;
}


/* ============================================================
   OVERVIEW
============================================================ */

.assessment-result-overview {
    display: flex;

    align-items: center;

    gap: 25px;

    padding:
        15px;

    border-radius: 21px;

    background:
        linear-gradient(
            115deg,
            #f4fbff,
            #fff9e8
        );
}


/* ============================================================
   SCORE RING
============================================================ */

.assessment-score-ring {
    --score: 0;

    width: 164px;
    height: 164px;

    flex: 0 0 auto;

    padding: 10px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        conic-gradient(
            #3eb5f3
            calc(
                var(--score) * 1%
            ),
            #e4edf2 0
        );

    box-shadow:
        0 10px 25px
        rgba(23,99,145,.17);
}


.assessment-score-ring--excellent {
    background:
        conic-gradient(
            #21bf73
            calc(
                var(--score) * 1%
            ),
            #e4edf2 0
        );
}


.assessment-score-ring--medium {
    background:
        conic-gradient(
            #f4ad24
            calc(
                var(--score) * 1%
            ),
            #e4edf2 0
        );
}


.assessment-score-ring--practice {
    background:
        conic-gradient(
            #ee6570
            calc(
                var(--score) * 1%
            ),
            #e4edf2 0
        );
}


.assessment-score-ring-inner {
    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border:
        5px solid #fff;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #fff,
            #f7fbfd
        );

    text-align: center;
}


.assessment-score-mascot {
    font-size: 34px;

    line-height: 1;
}


.assessment-score-ring strong {
    margin-top: 4px;

    color: #0e527e;

    font-size: 32px;

    line-height: 1;
}


.assessment-score-ring small {
    margin-top: 5px;

    color: #728492;

    font-size: 11px;

    font-weight: 900;
}


/* ============================================================
   RESULT COPY
============================================================ */

.assessment-result-copy {
    min-width: 0;
}


.assessment-result-badge {
    display: inline-flex;

    padding:
        6px 11px;

    border-radius: 999px;

    background: #fff1a7;

    color: #805d00;

    font-size: 12px;

    font-weight: 950;
}


.assessment-result-copy h4 {
    margin:
        9px 0 2px;

    color: #124c79;

    font-size:
        clamp(
            22px,
            2.4vw,
            31px
        );
}


.assessment-result-copy p {
    margin:
        3px 0 11px;

    color: #657d8d;
}


.assessment-result-mini {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}


.assessment-result-mini span {
    padding:
        6px 9px;

    border:
        1px solid #d8e8ef;

    border-radius: 11px;

    background: #fff;

    color: #5c7485;

    font-size: 11px;
}


/* ============================================================
   LEVEL CARDS
============================================================ */

.assessment-level-grid {
    margin-top: 16px;

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0,1fr)
        );

    gap: 10px;
}


.assessment-level-card {
    min-height: 112px;

    padding: 12px;

    display: grid;

    place-items: center;

    border:
        1px solid #d9e9f0;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #fff,
            #f3faff
        );

    text-align: center;
}


.assessment-level-card > span {
    font-size: 27px;
}


.assessment-level-card strong {
    color: #275a7d;

    font-size: 13px;
}


.assessment-level-card b {
    color: #126ab0;

    font-size: 24px;
}


.assessment-level-card small {
    color: #8294a1;

    font-size: 10px;
}


/* ============================================================
   SKILL ENERGY
============================================================ */

.assessment-skill-panel {
    margin-top: 17px;

    padding:
        15px;

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            #f9fdff,
            #fffef8
        );

    border:
        1px solid #deebf1;
}


.assessment-skill-panel h4 {
    margin:
        0 0 14px;

    color: #245375;
}


.assessment-energy-list {
    display: grid;

    gap: 14px;
}


.assessment-energy-head {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 7px;

    color: #325c78;

    font-size: 12px;
}


.assessment-energy-head strong {
    font-size: 13px;
}


.assessment-energy-track {
    height: 27px;

    padding: 3px;

    border:
        1px solid #d8e4eb;

    border-radius: 999px;

    background: #e9eef2;

    box-shadow:
        inset 0 2px 5px
        rgba(0,0,0,.06);
}


.assessment-energy-fill {
    position: relative;

    width:
        max(
            18px,
            var(--energy-value)
        );

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #63d7ff,
            #438ff1
        );

    transition:
        width 600ms ease;
}


.assessment-energy--excellent
.assessment-energy-fill {
    background:
        linear-gradient(
            90deg,
            #78e7a5,
            #18b66b
        );
}


.assessment-energy--medium
.assessment-energy-fill {
    background:
        linear-gradient(
            90deg,
            #ffe46d,
            #f4a62a
        );
}


.assessment-energy--practice
.assessment-energy-fill {
    background:
        linear-gradient(
            90deg,
            #ffaaa0,
            #ea5967
        );
}


.assessment-energy-mascot {
    position: absolute;

    top: 50%;
    right: -13px;

    transform:
        translateY(-54%);

    font-size: 27px;

    filter:
        drop-shadow(
            0 2px 2px
            rgba(0,0,0,.13)
        );
}


.assessment-energy > small {
    display: block;

    margin-top: 5px;

    color: #82939f;

    font-size: 10px;
}


/* ============================================================
   EMPTY RESULT
============================================================ */

.assessment-first-time {
    padding:
        24px 16px;

    border:
        2px dashed #cbe3ec;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #f4fbff,
            #fffdf3
        );

    text-align: center;

    color: #647e90;
}


.assessment-first-time-mascots {
    margin-bottom: 8px;

    font-size: 42px;

    letter-spacing: 5px;
}


.assessment-first-time strong {
    display: block;

    color: #155181;

    font-size: 18px;
}


/* ============================================================
   START PANEL
============================================================ */

.assessment-start-panel {
    position: relative;

    padding:
        19px;

    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        auto;

    align-items: center;

    gap: 18px;

    border:
        2px solid #f1d774;

    border-radius: 23px;

    background:
        linear-gradient(
            115deg,
            #fffef3,
            #fff4c7
        );

    overflow: hidden;
}


.assessment-start-decoration {
    position: absolute;

    top: 6px;
    right: 14px;

    font-size: 30px;

    opacity: .55;
}


.assessment-kicker {
    color: #d34d87;

    font-size: 12px;

    font-weight: 950;
}


.assessment-start-panel h3 {
    margin:
        5px 0;

    color: #805d00;

    font-size:
        clamp(
            18px,
            2vw,
            24px
        );
}


.assessment-start-panel p {
    margin:
        3px 0 9px;

    color: #776f55;

    font-size: 12px;
}


.assessment-type-badges {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}


.assessment-type-badges span {
    padding:
        4px 8px;

    border:
        1px solid
        rgba(185,149,41,.20);

    border-radius: 999px;

    background:
        rgba(255,255,255,.65);

    color: #756127;

    font-size: 10px;

    font-weight: 800;
}


/* ============================================================
   BUTTONS
============================================================ */

.assessment-btn {
    min-height: 45px;

    padding:
        9px 17px;

    border:
        2px solid #d4e4ec;

    border-radius: 15px;

    background:
        linear-gradient(
            #fff,
            #f6fafc
        );

    color: #285571;

    font-family: inherit;

    font-size: 13px;

    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 3px 0
        rgba(40,88,121,.08);

    transition:
        transform 140ms ease,
        box-shadow 140ms ease;
}


.assessment-btn:hover:not(:disabled) {
    transform:
        translateY(-2px);

    box-shadow:
        0 7px 14px
        rgba(32,94,135,.13);
}


.assessment-btn:active:not(:disabled) {
    transform:
        translateY(1px);
}


.assessment-btn:disabled {
    opacity: .42;

    cursor: default;
}


.assessment-btn--primary {
    border-color: #258dd7;

    background:
        linear-gradient(
            145deg,
            #50c9ff,
            #2389df
        );

    color: #fff;
}


.assessment-btn--submit {
    border-color: #0fa866;

    background:
        linear-gradient(
            145deg,
            #4cdb8f,
            #0fa766
        );

    color: #fff;
}


.assessment-start-button {
    min-width: 165px;

    font-size: 14px;
}


/* ============================================================
   QUESTION SCREEN
============================================================ */

.assessment-question-screen {
    width: min(100%, 980px);

    margin: 0 auto;
}


.assessment-question-toolbar {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 7px;
}


.assessment-question-toolbar > span {
    padding:
        6px 10px;

    border:
        1px solid #d9e7ee;

    border-radius: 999px;

    background: #fff;

    color: #527087;

    font-size: 11px;

    font-weight: 850;
}


.assessment-question-count strong {
    color: #0d70bb;

    font-size: 15px;
}


.assessment-question-level[
    data-level="Nhận biết"
] {
    background: #eefaff;
}


.assessment-question-level[
    data-level="Thông hiểu"
] {
    background: #fff9df;
}


.assessment-question-level[
    data-level="Vận dụng"
] {
    background: #fff0f8;
}


.assessment-timer {
    margin-left: auto;
}


.assessment-timer.is-warning {
    color: #d64040;

    background: #fff0f0;

    animation:
        assessmentTimerPulse
        .8s
        ease-in-out
        infinite alternate;
}


@keyframes assessmentTimerPulse {

    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }

}


/* ============================================================
   PROGRESS
============================================================ */

.assessment-progress {
    margin:
        10px 0 16px;

    display: flex;

    align-items: center;

    gap: 10px;
}


.assessment-progress-track {
    flex: 1;

    height: 11px;

    overflow: hidden;

    border-radius: 999px;

    background: #e4edf2;
}


.assessment-progress-fill {
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #50d5ff,
            #6477f3,
            #ef6ca9
        );

    transition:
        width 250ms ease;
}


.assessment-progress small {
    flex: 0 0 auto;

    color: #778e9d;

    font-size: 10px;
}


/* ============================================================
   QUESTION CARD
============================================================ */

.assessment-question-card {
    position: relative;

    padding:
        clamp(
            16px,
            2.5vw,
            27px
        );

    border:
        2px solid #d8eaf2;

    border-radius: 24px;

    background: #fff;

    box-shadow:
        0 9px 26px
        rgba(25,91,132,.09);
}


.assessment-skill-tag {
    display: inline-flex;

    padding:
        5px 9px;

    border-radius: 999px;

    background: #eff9ff;

    color: #2972a2;

    font-size: 10px;

    font-weight: 900;
}


.assessment-question-card h3 {
    margin:
        15px 0 20px;

    color: #183f5f;

    font-size:
        clamp(
            18px,
            2.15vw,
            25px
        );

    line-height: 1.55;

    font-weight: 850;
}


/* ============================================================
   CHOICE
============================================================ */

.assessment-choice-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap: 10px;
}


.assessment-choice {
    position: relative;

    min-height: 59px;

    padding:
        10px 12px;

    display: flex;

    align-items: center;

    gap: 11px;

    border:
        2px solid #dceaf0;

    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            #fff,
            #f9fcfe
        );

    cursor: pointer;

    transition:
        border-color 130ms ease,
        background 130ms ease,
        transform 130ms ease;
}


.assessment-choice:hover {
    border-color: #68b7e7;

    transform:
        translateY(-1px);
}


.assessment-choice.is-selected {
    border-color: #268fd8;

    background: #edf9ff;

    box-shadow:
        inset 0 0 0 1px
        #9fd7f6;
}


.assessment-choice input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.assessment-choice-key {
    width: 37px;
    height: 37px;

    flex: 0 0 auto;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            #dff4ff,
            #c9eaff
        );

    color: #116aa7;

    font-weight: 950;
}


.assessment-choice.is-selected
.assessment-choice-key {
    background:
        linear-gradient(
            145deg,
            #55c7ff,
            #278edb
        );

    color: #fff;
}


.assessment-choice-text {
    color: #34566d;

    line-height: 1.5;
}


/* ============================================================
   FILL
============================================================ */

.assessment-fill-box {
    display: grid;

    gap: 8px;

    color: #315b77;

    font-size: 12px;

    font-weight: 900;
}


.assessment-fill-box input {
    width: 100%;

    min-height: 54px;

    padding:
        10px 14px;

    border:
        2px solid #cee4ed;

    border-radius: 15px;

    outline: 0;

    background: #fbfeff;

    color: #173f5f;

    font: inherit;

    font-size: 18px;

    transition:
        border-color 130ms ease,
        box-shadow 130ms ease;
}


.assessment-fill-box input:focus {
    border-color: #389fe1;

    box-shadow:
        0 0 0 4px
        rgba(56,159,225,.12);
}


/* ============================================================
   ORDER
============================================================ */

.assessment-order-help,
.assessment-dnd-help {
    margin-bottom: 11px;

    padding:
        8px 11px;

    border:
        1px dashed #c5dee9;

    border-radius: 13px;

    background: #f5fbfe;

    color: #627d8e;

    font-size: 11px;

    line-height: 1.5;
}


.assessment-dnd-help span {
    display: block;

    margin-top: 3px;

    color: #8997a1;

    font-size: 10px;
}


.assessment-order-list {
    display: grid;

    gap: 9px;
}


.assessment-order-item {
    min-height: 58px;

    padding: 8px;

    display: grid;

    grid-template-columns:
        36px
        25px
        minmax(0,1fr)
        auto;

    align-items: center;

    gap: 8px;

    border:
        2px solid #d9e8ef;

    border-radius: 15px;

    background: #fbfeff;

    cursor: grab;
}


.assessment-order-item:active {
    cursor: grabbing;
}


.assessment-order-number {
    width: 32px;
    height: 32px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #f4d7ff;

    color: #743c90;

    font-weight: 950;
}


.assessment-order-grip {
    color: #9cafba;

    font-size: 17px;
}


.assessment-order-item strong {
    color: #365a72;

    line-height: 1.45;
}


.assessment-order-actions {
    display: flex;

    gap: 4px;
}


.assessment-order-actions button {
    width: 35px;
    height: 35px;

    border:
        1px solid #cadde6;

    border-radius: 10px;

    background: #fff;

    color: #3f6a84;

    font-size: 18px;

    cursor: pointer;
}


/* ============================================================
   DND
============================================================ */

.assessment-dnd-bank {
    padding: 12px;

    border:
        2px dashed #bbdce9;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #f5fcff,
            #fbf8ff
        );
}


.assessment-dnd-bank > strong {
    display: block;

    margin-bottom: 9px;

    color: #48718b;

    font-size: 11px;
}


.assessment-dnd-bank-items,
.assessment-single-drag-options {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}


.assessment-dnd-chip {
    min-height: 39px;

    padding:
        7px 11px;

    border:
        2px solid #c9e1ec;

    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            #fff,
            #edfaff
        );

    color: #315e79;

    font-family: inherit;

    font-size: 12px;

    font-weight: 800;

    cursor: grab;

    box-shadow:
        0 3px 7px
        rgba(31,93,130,.08);

    transition:
        transform 120ms ease,
        border-color 120ms ease;
}


.assessment-dnd-chip:hover {
    transform:
        translateY(-1px);

    border-color: #5fb6e5;
}


.assessment-dnd-chip.is-selected {
    border-color: #df64a2;

    background: #fff0f8;
}


.assessment-dnd-chip.is-placed {
    cursor: pointer;

    background: #effff6;

    border-color: #7fd5a5;
}


.assessment-dnd-chip.is-placed span {
    margin-left: 5px;

    color: #77a78a;
}


.assessment-dnd-complete {
    color: #4a9971;

    font-size: 11px;

    font-weight: 850;
}


/* ============================================================
   TARGETS
============================================================ */

.assessment-target-grid {
    margin-top: 12px;

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap: 10px;
}


.assessment-target-zone {
    min-height: 116px;

    padding: 11px;

    border:
        2px dashed #c6dce7;

    border-radius: 17px;

    background:
        rgba(255,255,255,.75);

    transition:
        border-color 130ms ease,
        background 130ms ease;
}


.assessment-target-zone.can-receive {
    border-color: #4db7eb;

    background: #effaff;
}


.assessment-target-label {
    display: block;

    margin-bottom: 10px;

    color: #285b78;

    font-size: 12px;

    line-height: 1.45;
}


.assessment-target-items {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}


.assessment-target-placeholder {
    color: #a1adb5;

    font-size: 10px;
}


/* ============================================================
   SINGLE DROP
============================================================ */

.assessment-single-drag-options {
    margin-bottom: 13px;
}


.assessment-single-dropzone {
    min-height: 76px;

    padding: 13px;

    display: grid;

    place-items: center;

    border:
        3px dashed #aed6e7;

    border-radius: 18px;

    background: #f5fcff;

    color: #8197a6;

    font-weight: 850;

    text-align: center;
}


.assessment-single-dropzone.has-answer {
    border-style: solid;

    border-color: #5bc796;

    background: #effff6;

    color: #2c7751;
}


/* ============================================================
   QUESTION NAV
============================================================ */

.assessment-question-nav {
    margin-top: 16px;

    display: grid;

    grid-template-columns:
        auto
        minmax(0,1fr)
        auto;

    align-items: center;

    gap: 10px;
}


.assessment-question-dots {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 5px;
}


.assessment-dot {
    width: 30px;
    height: 30px;

    padding: 0;

    border:
        1px solid #ccdfe8;

    border-radius: 9px;

    background: #fff;

    color: #607a8b;

    font-size: 10px;

    font-weight: 900;

    cursor: pointer;
}


.assessment-dot.is-answered {
    border-color: #64c997;

    background: #effff6;

    color: #287450;
}


.assessment-dot.is-current {
    border-color: #338ed8;

    background: #338ed8;

    color: #fff;
}


/* ============================================================
   SUBMIT WARNING
============================================================ */

.assessment-submit-warning {
    margin-top: 12px;

    padding: 10px 13px;

    border:
        1px solid #efc45f;

    border-radius: 14px;

    background: #fff8d9;

    color: #85671a;

    font-size: 11px;

    text-align: center;
}


/* ============================================================
   QUESTION WARNING
============================================================ */

.assessment-question-warning {
    padding: 13px;

    border:
        1px solid #efc362;

    border-radius: 14px;

    background: #fff8dd;

    color: #7d661f;

    line-height: 1.6;

    font-size: 12px;
}


/* ============================================================
   FINISH
============================================================ */

.assessment-finish {
    width: min(100%, 920px);

    margin: 0 auto;
}


.assessment-celebration {
    margin-bottom: 8px;

    text-align: center;

    font-size: 28px;

    letter-spacing: 9px;
}


.assessment-finish-hero {
    padding:
        23px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 23px;

    border:
        4px solid #fff;

    border-radius: 25px;

    color: #fff;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            #38b8f2,
            #337be3
        );

    box-shadow:
        0 13px 30px
        rgba(24,83,139,.19);
}


.assessment-finish-hero--excellent {
    background:
        linear-gradient(
            145deg,
            #42d48c,
            #13a969
        );
}


.assessment-finish-hero--medium {
    background:
        linear-gradient(
            145deg,
            #ffd459,
            #ef9e20
        );
}


.assessment-finish-hero--practice {
    background:
        linear-gradient(
            145deg,
            #ff9583,
            #e95a68
        );
}


.assessment-finish-mascot {
    font-size: 75px;

    filter:
        drop-shadow(
            0 5px 4px
            rgba(0,0,0,.12)
        );
}


.assessment-finish-hero span {
    font-weight: 950;
}


.assessment-finish-hero h3 {
    margin:
        5px 0 1px;

    font-size: 27px;
}


.assessment-finish-hero strong {
    display: block;

    font-size: 42px;
}


.assessment-finish-hero p {
    margin:
        4px 0 0;

    opacity: .95;
}


.assessment-finish-actions {
    margin:
        14px 0;

    display: flex;

    justify-content: center;

    gap: 9px;

    flex-wrap: wrap;
}


/* ============================================================
   REVIEW
============================================================ */

.assessment-review {
    padding: 17px;

    border:
        2px solid #d8eaf2;

    border-radius: 21px;

    background: #fff;
}


.assessment-review h3 {
    margin:
        0 0 12px;

    color: #285777;
}


.assessment-review-list {
    display: grid;

    gap: 9px;
}


.assessment-review-item {
    padding: 10px;

    display: grid;

    grid-template-columns:
        38px
        minmax(0,1fr);

    gap: 9px;

    border:
        1px solid #e1eaf0;

    border-radius: 14px;

    background: #fafcfd;
}


.assessment-review-number {
    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #ffe0e5;

    color: #c44559;

    font-weight: 950;
}


.assessment-review-item strong {
    color: #385c73;

    font-size: 12px;

    line-height: 1.5;
}


.assessment-review-item p {
    margin:
        5px 0 0;

    color: #778a97;

    font-size: 11px;

    line-height: 1.5;
}


.assessment-review-item b {
    color: #2a7952;
}


.assessment-perfect {
    padding: 25px;

    border:
        2px dashed #6acb98;

    border-radius: 20px;

    background: #effff7;

    color: #317854;

    font-size: 18px;

    font-weight: 900;

    text-align: center;
}


/* ============================================================
   LOADING
============================================================ */

.assessment-loading {
    min-height: 360px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    color: #657f91;
}


.assessment-loading-mascot {
    font-size: 68px;

    animation:
        assessmentBounce
        .85s
        ease-in-out
        infinite alternate;
}


@keyframes assessmentBounce {

    from {
        transform:
            translateY(0)
            rotate(-3deg);
    }

    to {
        transform:
            translateY(-9px)
            rotate(3deg);
    }

}


.assessment-loading-dots {
    display: flex;

    gap: 6px;

    margin: 11px 0;
}


.assessment-loading-dots span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #47a9e1;

    animation:
        assessmentDot
        .8s
        ease-in-out
        infinite alternate;
}


.assessment-loading-dots span:nth-child(2) {
    animation-delay: .15s;
}


.assessment-loading-dots span:nth-child(3) {
    animation-delay: .30s;
}


@keyframes assessmentDot {

    from {
        opacity: .3;

        transform: scale(.75);
    }

    to {
        opacity: 1;

        transform: scale(1.15);
    }

}


/* ============================================================
   ERROR
============================================================ */

.assessment-error-card {
    width: min(100%, 700px);

    margin:
        25px auto;

    padding: 27px;

    border:
        2px dashed #e1c269;

    border-radius: 22px;

    background: #fffdf4;

    color: #73673f;

    text-align: center;
}


.assessment-error-icon {
    font-size: 47px;
}


.assessment-error-card h3 {
    color: #7a5d00;
}


.assessment-error-help {
    margin:
        14px 0;

    padding: 11px;

    border-radius: 13px;

    background: #fff;

    text-align: left;
}


.assessment-error-help code {
    color: #12669e;
}


/* ============================================================
   SOURCE WARNING
============================================================ */

.assessment-source-warning {
    padding: 10px 13px;

    border:
        1px solid #ebcc70;

    border-radius: 14px;

    background: #fff9df;

    color: #766426;

    font-size: 11px;
}


.assessment-source-warning summary {
    cursor: pointer;

    font-weight: 900;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 800px) {

    .assessment-choice-grid {
        grid-template-columns:
            1fr;
    }


    .assessment-target-grid {
        grid-template-columns:
            1fr;
    }


    .assessment-question-nav {
        grid-template-columns:
            1fr 1fr;
    }


    .assessment-question-dots {
        grid-column:
            1 / -1;

        grid-row:
            1;
    }


    .assessment-result-overview {
        flex-direction: column;

        text-align: center;
    }


    .assessment-result-mini {
        justify-content: center;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

    .assessment-dialog {
        width: 97vw;

        max-height: 97dvh;

        border-radius: 20px;
    }


    .assessment-shell {
        max-height: 97dvh;
    }


    .assessment-header {
        min-height: 75px;

        padding:
            12px
            65px
            11px
            12px;
    }


    .assessment-heading {
        gap: 8px;
    }


    .assessment-heading-icon {
        width: 40px;
        height: 40px;

        border-radius: 13px;

        font-size: 22px;
    }


    .assessment-title {
        font-size: 20px;
    }


    .assessment-subtitle {
        margin-top: 2px;

        font-size: 10px;
    }


    .assessment-close {
        top: 7px;
        right: 6px;

        width: 51px;
        height: 51px;
    }


    .assessment-close-icon {
        width: 45px;
        height: 45px;
    }


    .assessment-body {
        padding: 8px;
    }


    .assessment-result-section,
    .assessment-question-card {
        border-radius: 18px;
    }


    .assessment-level-grid {
        grid-template-columns:
            1fr;
    }


    .assessment-level-card {
        min-height: 72px;

        grid-template-columns:
            auto
            1fr
            auto
            auto;

        justify-items: start;

        gap: 9px;
    }


    .assessment-score-ring {
        width: 140px;
        height: 140px;
    }


    .assessment-start-panel {
        grid-template-columns:
            1fr;
    }


    .assessment-start-button {
        width: 100%;
    }


    .assessment-question-toolbar {
        gap: 5px;
    }


    .assessment-timer {
        margin-left: 0;
    }


    .assessment-progress {
        flex-direction: column;

        align-items: stretch;
    }


    .assessment-progress small {
        text-align: right;
    }


    .assessment-order-item {
        grid-template-columns:
            32px
            minmax(0,1fr)
            auto;
    }


    .assessment-order-grip {
        display: none;
    }


    .assessment-finish-hero {
        flex-direction: column;

        gap: 5px;
    }


    .assessment-finish-mascot {
        font-size: 61px;
    }

}


/* ============================================================
   VERY SMALL
============================================================ */

@media (max-width: 410px) {

    .assessment-heading-icon {
        display: none;
    }


    .assessment-question-nav {
        grid-template-columns:
            1fr;
    }


    .assessment-question-dots {
        grid-column:
            1;

        grid-row:
            auto;
    }


    .assessment-btn {
        width: 100%;
    }


    .assessment-dnd-chip {
        width: 100%;
    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (
    prefers-reduced-motion:
    reduce
) {

    .assessment-loading-mascot,
    .assessment-loading-dots span,
    .assessment-timer.is-warning {
        animation: none !important;
    }


    .assessment-btn,
    .assessment-close,
    .assessment-choice,
    .assessment-energy-fill,
    .assessment-progress-fill {
        transition: none !important;
    }

}

/* ============================================================
   PHIẾU HỌC TẬP ONLINE
   BỔ SUNG GIAO DIỆN SAU KHI GỘP ASSESSMENT → WORKSHEETS
============================================================ */


/* ============================================================
   ONLINE PANEL
============================================================ */

.assessment-online-panel {
    border-color: #79ccef;

    background:
        linear-gradient(
            125deg,
            #edfaff 0%,
            #f4fcff 42%,
            #fff9df 100%
        );

    box-shadow:
        0 10px 30px
        rgba(32, 132, 190, 0.10);
}


.assessment-online-panel::before {
    content: "🌐";

    position: absolute;

    right: 60px;
    bottom: -12px;

    font-size: 69px;

    opacity: 0.055;

    transform:
        rotate(-12deg);

    pointer-events: none;
}


/* ============================================================
   OFFLINE SECTION
============================================================ */

.assessment-offline-section {
    position: relative;

    padding:
        clamp(
            15px,
            2.3vw,
            23px
        );

    border:
        2px solid #e7dca9;

    border-radius: 25px;

    background:
        linear-gradient(
            135deg,
            #fffef8,
            #fff9e6
        );

    box-shadow:
        0 9px 28px
        rgba(111, 91, 30, 0.08);

    overflow: hidden;
}


.assessment-offline-section::after {
    content: "📄";

    position: absolute;

    right: 17px;
    top: 14px;

    font-size: 43px;

    opacity: 0.10;

    transform:
        rotate(8deg);

    pointer-events: none;
}


/* ============================================================
   OFFLINE NOTE
============================================================ */

.assessment-offline-note {
    margin-bottom: 15px;

    padding:
        10px
        13px;

    border:
        1px dashed #dfc972;

    border-radius: 14px;

    background:
        rgba(255,255,255,.72);

    color: #79672e;

    font-size: 11px;

    font-weight: 700;

    line-height: 1.65;
}


/* ============================================================
   OFFLINE LIST
============================================================ */

.assessment-offline-list {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 10px;
}


/* ============================================================
   OFFLINE CARD
============================================================ */

.assessment-offline-card {
    min-width: 0;

    min-height: 92px;

    padding: 12px;

    display: grid;

    grid-template-columns:
        46px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 11px;

    border:
        1px solid #e8ddb2;

    border-radius: 17px;

    background:
        rgba(255,255,255,.94);

    box-shadow:
        0 4px 12px
        rgba(88, 73, 27, .06);

    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease;
}


.assessment-offline-card:hover {
    transform:
        translateY(-2px);

    border-color: #d7ba54;

    box-shadow:
        0 8px 19px
        rgba(88, 73, 27, .10);
}


/* ============================================================
   PDF ICON
============================================================ */

.assessment-offline-icon {
    width: 46px;
    height: 46px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #fff4d2,
            #ffe3a2
        );

    font-size: 25px;

    box-shadow:
        inset 0 0 0 1px
        rgba(202, 153, 34, .15);
}


/* ============================================================
   INFO
============================================================ */

.assessment-offline-info {
    min-width: 0;

    display: grid;

    gap: 5px;
}


.assessment-offline-info strong {
    overflow: hidden;

    color: #65531c;

    font-size: 13px;

    line-height: 1.42;

    text-overflow: ellipsis;
}


.assessment-offline-info span {
    color: #93845a;

    font-size: 10px;

    line-height: 1.5;
}


/* ============================================================
   DOWNLOAD BUTTON
============================================================ */

.assessment-btn--download {
    flex: 0 0 auto;

    min-height: 40px;

    padding:
        8px
        12px;

    border-color: #e5ad1e;

    background:
        linear-gradient(
            145deg,
            #ffc941,
            #f39a00
        );

    color: #ffffff;

    text-decoration: none;

    white-space: nowrap;

    box-shadow:
        0 4px 0
        rgba(172, 104, 0, .13);
}


.assessment-btn--download:hover {
    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            #ffd35d,
            #f5a510
        );
}


.assessment-btn--disabled {
    border-color: #d8dde0;

    background: #edf0f2;

    color: #98a1a7;

    cursor: not-allowed;

    box-shadow: none;
}


/* ============================================================
   RESULT EMPTY
============================================================ */

.assessment-result-section--empty {
    border-style: dashed;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.96),
            #f7fcff
        );
}


/* ============================================================
   ONLINE / OFFLINE SEPARATOR
============================================================ */

.assessment-offline-section {
    margin-top: 4px;
}


.assessment-offline-section
.assessment-section-title h3 {
    color: #765d13;
}


.assessment-offline-section
.assessment-section-title p {
    color: #958352;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 900px) {

    .assessment-offline-list {
        grid-template-columns:
            1fr;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

    .assessment-online-panel::before {
        display: none;
    }


    .assessment-offline-section {
        padding: 13px;

        border-radius: 19px;
    }


    .assessment-offline-card {
        grid-template-columns:
            42px
            minmax(0, 1fr);

        gap: 9px;
    }


    .assessment-offline-icon {
        width: 42px;
        height: 42px;

        border-radius: 12px;

        font-size: 22px;
    }


    .assessment-offline-card
    .assessment-btn--download,
    .assessment-offline-card
    .assessment-btn--disabled {
        grid-column:
            1 / -1;

        width: 100%;

        justify-self: stretch;

        text-align: center;
    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (
    prefers-reduced-motion:
    reduce
) {

    .assessment-offline-card {
        transition: none !important;
    }

}