.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Keep DataTables headers stable with Hyper styles: hide generated order glyph container. */
table.dataTable thead .dt-column-order {
    display: none !important;
}

table.dataTable thead .dt-column-title {
    display: inline !important;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===== Cards slider ===== */
.cards-slider {
    position: relative;
}

.cards-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.25rem 1rem 0.25rem;
    -webkit-overflow-scrolling: touch;
}

    .cards-slider-track::-webkit-scrollbar {
        height: 8px;
    }

    .cards-slider-track::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }

    .cards-slider-track::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }

.cards-slider-item {
    flex: 0 0 320px;
    max-width: 320px;
    scroll-snap-align: start;
}

.cards-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

    .cards-slider-btn:hover {
        background: #f5f5f5;
        transform: translateY(-50%) scale(1.05);
    }

    .cards-slider-btn.prev {
        left: -8px;
    }

    .cards-slider-btn.next {
        right: -8px;
    }

.curso-card {
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .curso-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }

.curso-card-header {
    height: 90px;
    background: linear-gradient(135deg, #6f86ff 0%, #4254c5 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    position: relative;
}

    .curso-card-header .curso-card-icon {
        font-size: 2.4rem;
    }

    .curso-card-header .curso-card-clave {
        position: absolute;
        top: 8px;
        right: 10px;
        background: rgba(255, 255, 255, 0.25);
        font-size: 0.7rem;
        padding: 2px 8px;
        border-radius: 10px;
        letter-spacing: 0.5px;
    }

.curso-card-inactive .curso-card-header {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
}

/* ===== Evaluaciones: tablero de emparejamiento ===== */
.exam-match-board {
    border: 1px solid rgba(49, 58, 70, 0.12);
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 1rem;
}

.exam-match-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.exam-match-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1rem, 6vw, 5rem);
}

.exam-match-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.exam-match-lines line {
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 3px rgba(49, 58, 70, 0.2));
}

.exam-match-lines circle {
    stroke: #ffffff;
    stroke-width: 2;
}

.exam-match-column {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exam-match-column-title {
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exam-match-card {
    border: 1px solid rgba(49, 58, 70, 0.14);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.75rem;
    box-shadow: 0 8px 20px rgba(49, 58, 70, 0.05);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.exam-match-card:hover,
.exam-match-card:focus-visible {
    border-color: var(--match-color, rgba(59, 130, 246, 0.5));
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--match-color, #3b82f6) 18%, transparent), 0 12px 26px rgba(49, 58, 70, 0.09);
    outline: 0;
    transform: translateY(-1px);
}

.exam-match-card.is-selected {
    border-color: var(--match-color, #3b82f6);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--match-color, #3b82f6) 18%, transparent), 0 12px 26px rgba(49, 58, 70, 0.12);
    transform: translateY(-1px);
}

.exam-match-card.is-linked {
    border-color: var(--match-color, rgba(59, 130, 246, 0.45));
}

.exam-match-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 0.65rem;
    background: #f1f5f9;
    color: #313a46;
    padding: 0.65rem 0.75rem;
    font-weight: 700;
}

.exam-match-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    margin-top: 0.6rem;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.45rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-match-media > div {
    width: 100%;
}

.exam-match-media img {
    width: 100%;
    max-height: 170px !important;
    object-fit: contain;
    background: #ffffff;
}

.exam-match-media audio,
.exam-match-media video {
    width: 100%;
}

.exam-match-card.is-selected .exam-match-media,
.exam-match-card.is-linked .exam-match-media {
    border-color: var(--match-color, #3b82f6);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--match-color, #3b82f6) 26%, transparent);
}

.exam-match-card.is-selected .exam-match-media img,
.exam-match-card.is-linked .exam-match-media img {
    border-color: var(--match-color, #3b82f6) !important;
}

.exam-match-status {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #ffffff;
    color: #6c757d;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    text-transform: uppercase;
}

.exam-match-card.is-selected .exam-match-status,
.exam-match-card.is-linked .exam-match-status {
    background: var(--match-color, #3b82f6);
    color: #ffffff;
}

@media (max-width: 767.98px) {
    .exam-match-stage {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.75rem;
    }

    .exam-match-board {
        padding: 0.75rem;
    }

    .exam-match-card {
        padding: 0.5rem;
    }

    .exam-match-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.5rem;
    }

    .exam-match-media {
        min-height: 92px;
    }

    .exam-match-media img {
        max-height: 120px !important;
    }

    .exam-match-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

.exam-fill-inline {
    color: #1f2d3d;
    font-size: 1.05rem;
    line-height: 2.4;
    white-space: pre-wrap;
}

.exam-fill-text {
    white-space: pre-wrap;
}

.exam-fill-input {
    background: transparent;
    border: 0;
    border-bottom: 2px solid #6c757d;
    border-radius: 0;
    color: #1f2d3d;
    display: inline-block;
    font-weight: 700;
    margin: 0 0.25rem;
    min-height: 2rem;
    padding: 0.05rem 0.25rem;
    text-align: center;
    vertical-align: baseline;
}

.exam-fill-input:focus {
    border-bottom-color: var(--ct-primary);
    box-shadow: 0 0.25rem 0 -0.15rem rgba(var(--ct-primary-rgb), 0.2);
    outline: 0;
}

.exam-fill-input::placeholder {
    color: #adb5bd;
}

@media (max-width: 575.98px) {
    .exam-fill-inline {
        font-size: 1rem;
        line-height: 2.6;
    }

    .exam-fill-input {
        max-width: 100%;
    }
}

.public-eval-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(114, 124, 245, 0.16), transparent 28%),
        linear-gradient(135deg, #f5f7ff 0%, #ffffff 48%, #eef4ff 100%);
    padding: clamp(1rem, 3vw, 2.5rem);
}

.public-eval-card {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(31, 45, 61, 0.12);
    padding: clamp(1rem, 3vw, 2rem);
}

.public-eval-header {
    margin-bottom: 1rem;
}

.public-eval-success-icon {
    font-size: 4rem;
}

/* ===== Evaluaciones: resultados ===== */
.results-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at 8% 18%, rgba(114, 124, 245, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f6f8ff 100%);
    box-shadow: 0 12px 34px rgba(49, 58, 70, 0.06);
    padding: 1.25rem;
}

.results-eyebrow {
    display: inline-flex;
    margin-bottom: 0.35rem;
    color: #727cf5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.results-metric-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(49, 58, 70, 0.05);
    padding: 1rem;
}

.results-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    font-size: 1.35rem;
}

.results-metric-value {
    color: #313a46;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.results-panel {
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 1rem;
    box-shadow: 0 12px 34px rgba(49, 58, 70, 0.05);
}

.results-table-wrap {
    border-top: 1px solid rgba(49, 58, 70, 0.08);
}

.results-list-table thead th {
    background: #f8fafc;
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-list-table tbody tr {
    transition: background-color 0.15s ease;
}

.results-list-table tbody tr:hover {
    background: #f8fafc;
}

.results-eval-card {
    width: 100%;
    border: 1px solid rgba(49, 58, 70, 0.1);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem;
    text-align: left;
    box-shadow: 0 8px 20px rgba(49, 58, 70, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.results-eval-card:hover,
.results-eval-card:focus-visible,
.results-eval-card.is-active {
    border-color: #727cf5;
    box-shadow: 0 14px 30px rgba(114, 124, 245, 0.14);
    outline: 0;
    transform: translateY(-1px);
}

.results-progress {
    height: 0.45rem;
    border-radius: 999px;
    background: #edf1f7;
}

.results-eval-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: #6c757d;
    font-size: 0.78rem;
}

.results-score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-weight: 800;
    white-space: nowrap;
}

.results-score-chip.is-high {
    background: #d1fae5;
    color: #047857;
}

.results-score-chip.is-mid {
    background: #fff3cd;
    color: #9a6a00;
}

.results-score-chip.is-low {
    background: #fee2e2;
    color: #b91c1c;
}

.results-score-chip.is-empty {
    background: #eef2f7;
    color: #6c757d;
}

.results-detail-placeholder,
.results-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18rem;
    flex-direction: column;
    text-align: center;
}

.results-detail-placeholder i,
.results-empty-state i {
    color: #adb5bd;
    font-size: 2.6rem;
}

.results-detail-stat {
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.results-modal .modal-dialog {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.results-modal-content {
    border: 0;
    border-radius: 1.1rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    overflow: hidden;
}

.results-modal-content .modal-header {
    background:
        radial-gradient(circle at 8% 18%, rgba(114, 124, 245, 0.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.results-attempts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.results-attempt-item {
    border: 1px solid rgba(49, 58, 70, 0.08) !important;
    border-radius: 1rem !important;
    overflow: hidden;
}

.results-attempt-header {
    gap: 0.85rem;
    background: #ffffff !important;
    box-shadow: none !important;
}

.results-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #727cf5 0%, #39afd1 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.results-answer-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(49, 58, 70, 0.08);
    border-radius: 0.85rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.results-answer-score {
    flex: 0 0 7.5rem;
}

@media (max-width: 767.98px) {
    .results-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .results-answer-card {
        flex-direction: column;
    }

    .results-answer-score {
        flex-basis: auto;
        text-align: left !important;
    }
}
