﻿body.gobarito-corrige-page {
    --corrige-top-offset: calc(var(--gobarito-topbar-height) + 14px);
    font-family: Arial, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
    height: 100vh;
    overflow: hidden;
    padding-top: var(--corrige-top-offset);
}

.corrige-page {
    --corrige-sidebar-width: 272px;
    width: min(1440px, calc(100% - 28px));
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--corrige-sidebar-width) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
    transition: grid-template-columns 0.22s ease;
}

.corrige-page.is-sidebar-collapsed {
    --corrige-sidebar-width: 54px;
}

.corrige-sidebar,
.corrige-viewer-panel,
.corrige-modal-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.corrige-sidebar {
    position: sticky;
    top: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.corrige-sidebar-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 10px;
    background: #ffffff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.corrige-sidebar-toggle i {
    font-size: 1.08rem;
    line-height: 1;
}

.corrige-sidebar-toggle:hover,
.corrige-sidebar-toggle:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(11, 94, 215, 0.28);
    background: #eef4ff;
    color: #0b4fb3;
}

.corrige-page.is-sidebar-collapsed .corrige-sidebar {
    align-items: center;
    padding: 10px;
    gap: 0;
}

.corrige-page.is-sidebar-collapsed .corrige-sidebar > :not(.corrige-actions) {
    display: none !important;
}

.corrige-page.is-sidebar-collapsed .corrige-actions > :not(.corrige-sidebar-toggle) {
    display: none !important;
}

.corrige-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.corrige-page.is-sidebar-collapsed .corrige-actions {
    justify-content: center;
    gap: 0;
}

.corrige-action-btn,
.corrige-modal-btn {
    height: 34px;
    border: 1px solid transparent;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.corrige-action-btn i {
    font-size: 1rem;
    line-height: 1;
}

.corrige-action-btn-icon {
    width: 34px;
    min-width: 34px;
    padding: 0;
    flex: 0 0 auto;
}

.corrige-action-btn:hover,
.corrige-modal-btn:hover {
    transform: translateY(-1px);
}

.corrige-action-btn:disabled,
.corrige-modal-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.corrige-action-btn-primary,
.corrige-modal-btn-primary {
    background: linear-gradient(135deg, #0b5ed7, #2563eb);
    color: #fff;
    box-shadow: 0 14px 30px rgba(11, 94, 215, 0.25);
}

.corrige-action-btn-secondary {
    background: #f8fbff;
    border-color: rgba(11, 94, 215, 0.14);
    color: #0b4fb3;
}

.corrige-status {
    position: fixed;
    top: calc(var(--gobarito-topbar-height) + 14px);
    right: 18px;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    z-index: 2147483647;
    isolation: isolate;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    border: 1px solid transparent;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.corrige-status.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.corrige-status[data-state="loading"] {
    background: #eef4ff;
    border-color: #c7dafd;
    color: #0b4fb3;
}

.corrige-status[data-state="success"] {
    background: #ecfdf3;
    border-color: #b7efc8;
    color: #15803d;
}

.corrige-status[data-state="error"] {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.corrige-status[data-state="idle"] {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.corrige-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.corrige-list-header h2 {
    margin: 0;
    font-size: 0.88rem;
    color: #334155;
}

.corrige-list-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.corrige-list-count strong {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b5ed7, #2a73e8);
    color: #fff;
    font-size: 0.7rem;
    box-shadow: 0 6px 14px rgba(11, 94, 215, 0.16);
}

.corrige-list-empty {
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

.corrige-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.corrige-sidebar-footer {
    flex: 0 0 auto;
    padding-top: 2px;
}

.corrige-clear-cache-btn {
    width: 100%;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.corrige-clear-cache-btn:hover {
    transform: translateY(-1px);
    background: #fff5f5;
    border-color: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
}

.corrige-clear-cache-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.corrige-list-item {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    padding: 8px 9px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.corrige-list-item:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.28);
    outline-offset: 2px;
}

.corrige-list-item:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 94, 215, 0.24);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.corrige-list-item.is-active {
    background: linear-gradient(180deg, #f9fbff, #eef4ff);
    border-color: rgba(11, 94, 215, 0.24);
    box-shadow: 0 14px 34px rgba(11, 94, 215, 0.12);
}

.corrige-list-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.corrige-list-item-code {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.corrige-list-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.corrige-list-delete-btn {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    padding: 0;
    opacity: 0.92;
}

.corrige-list-delete-btn:hover {
    transform: translateY(-1px);
    background: transparent;
    color: #b91c1c;
    opacity: 1;
}

.corrige-list-delete-btn:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.28);
    outline-offset: 2px;
}

.corrige-list-delete-btn i {
    pointer-events: none;
}

.corrige-list-item-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.15;
    min-width: 0;
}

.corrige-list-item-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corrige-viewer-panel {
    padding: 18px;
    position: sticky;
    top: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.corrige-results-empty {
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.45;
}

.corrige-results-empty strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.corrige-result-meta {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
}

.corrige-result-meta strong {
    color: #0f172a;
}

.corrige-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.corrige-viewer-head h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.corrige-viewer-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.4;
}

.corrige-gabarito-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.corrige-gabarito-action-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.corrige-gabarito-action-btn i {
    font-size: 1rem;
    line-height: 1;
}

.corrige-gabarito-action-btn:hover,
.corrige-gabarito-action-btn:focus-visible {
    border-color: rgba(11, 94, 215, 0.28);
    background: #eef4ff;
    color: #0b4fb3;
}

.corrige-viewer-tabs-shell {
    flex: 0 0 auto;
    margin: -4px -4px 8px;
    padding: 0;
}

.corrige-viewer-tabs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: thin;
}

.corrige-viewer-tab-btn {
    height: 34px;
    min-width: max-content;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 0 14px;
    background: transparent;
    color: #587395;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

.corrige-viewer-tab-btn:hover {
    transform: translateY(-1px);
    color: #23426e;
    background: transparent;
    border-bottom-color: rgba(11, 94, 215, 0.18);
}

.corrige-viewer-tab-btn.is-active {
    background: transparent;
    color: #0047b3;
    border-color: transparent;
    border-bottom-color: #0b5ed7;
    box-shadow: none;
}

.corrige-viewer-tab-panels {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.corrige-viewer-tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.corrige-viewer-tab-panel[hidden] {
    display: none !important;
}

.corrige-viewer-tab-placeholder {
    min-height: 0;
}

.corrige-viewer-placeholder-card {
    width: 100%;
    height: 100%;
    padding: 28px 24px;
    border-radius: 20px;
    border: 1px solid rgba(11, 94, 215, 0.10);
    background:
        radial-gradient(circle at top left, rgba(42, 115, 232, 0.10), transparent 28%),
        linear-gradient(180deg, #fbfdff, #f2f7ff);
    box-shadow: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.corrige-viewer-placeholder-card strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 1.02rem;
}

.corrige-viewer-placeholder-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.corrige-gabarito-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
}

.corrige-gabarito-layout.is-info-open {
    grid-template-columns: minmax(0, 1fr) 310px;
}

.corrige-gabarito-main {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.corrige-gabarito-info-column {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    background:
        radial-gradient(circle at top left, rgba(42, 115, 232, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fbff, #eef4ff);
    overflow: hidden;
}

.corrige-gabarito-info-column[hidden] {
    display: none !important;
}

.corrige-gabarito-info-column .corrige-results-empty {
    margin: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.corrige-viewer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.corrige-viewer-tools-overlay {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.corrige-zoom-readout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 50%;
    background: rgba(248, 251, 255, 0.92);
    color: #35507f;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.corrige-zoom-readout strong {
    color: #0b4fb3;
    min-width: 0;
    text-align: center;
    font-size: 0.64rem;
    line-height: 1;
}

.corrige-viewer-tool-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #0b4fb3;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.corrige-viewer-tool-btn i {
    font-size: 1rem;
    line-height: 1;
}

.corrige-viewer-tool-btn:hover {
    transform: translateY(-1px);
    background: #f8fbff;
}

.corrige-viewer-tool-btn.is-active {
    background: linear-gradient(135deg, #0b5ed7, #2563eb);
    color: #fff;
    border-color: rgba(11, 94, 215, 0.35);
    box-shadow: 0 10px 22px rgba(11, 94, 215, 0.2);
}

.corrige-viewer-tool-btn.is-active:hover {
    background: linear-gradient(135deg, #0a55c4, #1f5fdc);
}

.corrige-viewer-stage {
    min-height: 0;
    flex: 1 1 auto;
    border-radius: 20px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    background:
        radial-gradient(circle at top left, rgba(42, 115, 232, 0.1), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    position: relative;
}

.corrige-viewer-viewport {
    position: absolute;
    inset: 12px;
    overflow: hidden;
    border-radius: 16px;
    cursor: grab;
    touch-action: none;
}

.corrige-viewer-viewport.is-dragging {
    cursor: grabbing;
}

#canvasOutput {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    transform-origin: center center;
    user-select: none;
}

.corrige-viewer-empty {
    max-width: 420px;
    text-align: center;
    color: #64748b;
    line-height: 1.5;
}

.corrige-viewer-empty strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
    color: #0f172a;
}

.results-panel {
    text-align: left;
    background: rgba(255, 255, 255, 0.92);
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.results-panel h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 0.96rem;
}

.detected-code {
    font-size: 1.08rem;
    color: #0b4fb3;
    font-weight: 800;
    margin-bottom: 12px;
}

#rectList {
    color: #334155;
    font-size: 0.84rem;
}

#rectList .corrige-mapping-score-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

#rectList .corrige-mapping-score-main {
    display: grid;
    gap: 2px;
    min-width: 86px;
    color: #0b4fb3;
}

#rectList .corrige-mapping-score-main span {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

#rectList .corrige-mapping-score-main strong {
    font-size: 1.5rem;
    line-height: 1;
    color: #0b4fb3;
}

#rectList .corrige-mapping-score-main small,
#rectList .corrige-mapping-score-meta {
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.25;
}

#rectList .corrige-mapping-score-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

#rectList .corrige-mapping-question-list {
    display: grid;
    gap: 7px;
}

#rectList .corrige-mapping-question {
    padding: 8px 9px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-left-width: 4px;
    border-radius: 10px;
    background: #ffffff;
}

#rectList .corrige-mapping-question.is-correct {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

#rectList .corrige-mapping-question.is-wrong {
    border-left-color: #dc2626;
    background: #fef2f2;
}

#rectList .corrige-mapping-question.is-annulled-score {
    border-left-color: #0b5ed7;
    background: #eff6ff;
}

#rectList .corrige-mapping-question.is-annulled-ignore {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

#rectList .corrige-mapping-question.is-discursive {
    border-left-color: #2563eb;
    background: #f8fafc;
}

#rectList .corrige-mapping-question-head,
#rectList .corrige-mapping-question-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#rectList .corrige-mapping-question-head {
    justify-content: space-between;
    margin-bottom: 5px;
}

#rectList .corrige-mapping-question-head strong {
    color: #0f172a;
    font-size: 0.84rem;
}

#rectList .corrige-mapping-question-head span {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
}

#rectList .corrige-mapping-question-body span {
    font-size: 0.74rem;
    color: #475569;
}

#rectList .corrige-mapping-question-body strong {
    color: #0f172a;
}

#rectList ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

#rectList li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#rectList li:last-child {
    border-bottom: none;
}

.corrige-modal[hidden] {
    display: none;
}

.corrige-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.corrige-modal-panel {
    width: min(860px, 100%);
    height: min(820px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
    padding: 14px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
}

.corrige-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: 0;
}

.corrige-modal-head h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.corrige-modal-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.corrige-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0;
}

.corrige-modal-actions-inline {
    align-self: center;
    flex-wrap: nowrap;
}

.corrige-modal-btn-secondary {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.corrige-modal-actions .corrige-modal-btn {
    min-width: 124px;
    height: 38px;
    font-size: 0.8rem;
    padding: 0 12px;
}

.corrige-modal-actions .corrige-modal-btn-primary {
    min-width: 220px;
    height: 44px;
    font-size: 0.88rem;
    padding: 0 18px;
}

.corrige-modal-actions .corrige-modal-btn-primary:last-child,
.corrige-modal-actions .corrige-modal-btn-primary:not([hidden]) {
    box-shadow: 0 16px 32px rgba(11, 94, 215, 0.26);
}

.corrige-hidden-input,
.corrige-processing-canvas {
    display: none;
}

/* =====================================================================
   PAINEL DE ANÁLISE — QUESTÕES E TAGS
   ===================================================================== */

.analytics-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
}

/* Cabeçalho com resumo e filtros */
.analytics-header {
    position: relative;
    z-index: 30;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(11, 94, 215, 0.10);
    flex-wrap: wrap;
    overflow: visible;
}

.analytics-summary-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.analytics-summary-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
}

.analytics-summary-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    min-width: 0;
}

.analytics-summary-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.analytics-summary-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.analytics-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0b5ed7;
    line-height: 1.2;
}

.analytics-summary-label {
    font-size: 0.68rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analytics-tags-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.analytics-tags-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.analytics-duo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

.analytics-tags-toggle .analytics-duo-icon i {
    font-size: 0.9rem;
    line-height: 1;
}

.analytics-tags-toggle .analytics-duo-icon i:last-child {
    font-size: 0.82rem;
}

.analytics-tags-toggle.is-active {
    background: #eef4ff;
    border-color: rgba(11, 94, 215, 0.32);
}

.analytics-skills-toggle {
    border-color: rgba(162, 28, 175, 0.20);
    color: #86198f;
}

.analytics-skills-toggle:hover:not(:disabled) {
    background: #fdf4ff;
}

.analytics-skills-toggle.is-active {
    background: #fdf4ff;
    border-color: rgba(162, 28, 175, 0.32);
    color: #86198f;
}

.analytics-tags-toggle.is-hidden {
    display: none;
}

.analytics-tags-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.analytics-question-filter {
    position: relative;
}

.analytics-question-filter.is-hidden {
    display: none;
}

.analytics-question-filter-summary {
    position: relative;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.analytics-question-filter-summary::-webkit-details-marker {
    display: none;
}

.analytics-question-filter-summary i {
    font-size: 1rem;
    line-height: 1;
}

.analytics-filter-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #0b5ed7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.54rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

.analytics-question-filter[open] .analytics-question-filter-summary {
    background: #eef4ff;
    border-color: rgba(11, 94, 215, 0.30);
}

.analytics-question-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 15;
    width: min(340px, 82vw);
    padding: 10px;
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.analytics-question-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.analytics-question-filter-head span {
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 900;
}

.analytics-question-filter-head button {
    border: none;
    background: #eef4ff;
    color: #0b4fb3;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.68rem;
    font-weight: 900;
    cursor: pointer;
}

.analytics-question-filter-hint {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.3;
}

.analytics-question-filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.analytics-question-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.analytics-question-option input {
    width: 12px;
    height: 12px;
    accent-color: #0b5ed7;
}

.analytics-tag-filter-control {
    position: relative;
}

.analytics-tag-filter-control.is-hidden,
.analytics-skill-filter-control.is-hidden {
    display: none;
}

.analytics-tag-filter-summary,
.analytics-skill-filter-summary {
    position: relative;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.analytics-tag-filter-summary::-webkit-details-marker,
.analytics-skill-filter-summary::-webkit-details-marker {
    display: none;
}

.analytics-tag-filter-summary i,
.analytics-skill-filter-summary i {
    font-size: 1rem;
    line-height: 1;
}

.analytics-tag-filter-control[open] .analytics-tag-filter-summary {
    background: #eef4ff;
    border-color: rgba(11, 94, 215, 0.30);
}

.analytics-skill-filter-control {
    position: relative;
}

.analytics-skill-filter-summary {
    border-color: rgba(162, 28, 175, 0.20);
    color: #86198f;
}

.analytics-skill-filter-summary .analytics-filter-count-badge {
    background: #a21caf;
}

.analytics-skill-filter-control[open] .analytics-skill-filter-summary {
    background: #fdf4ff;
    border-color: rgba(162, 28, 175, 0.34);
}

.analytics-tag-filter-menu,
.analytics-skill-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: min(380px, 84vw);
    padding: 10px;
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.analytics-skill-filter-menu {
    width: min(520px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    border-color: rgba(162, 28, 175, 0.16);
}

.analytics-tag-filter-menu-head,
.analytics-skill-filter-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.analytics-tag-filter-menu-head span,
.analytics-skill-filter-menu-head span {
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 900;
}

.analytics-tag-filter-menu-head button,
.analytics-skill-filter-menu-head button {
    border: none;
    background: #eef4ff;
    color: #0b4fb3;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.68rem;
    font-weight: 900;
    cursor: pointer;
}

.analytics-skill-filter-menu-head button {
    background: #fdf4ff;
    color: #86198f;
}

.analytics-tag-filter-hint,
.analytics-skill-filter-hint {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.3;
}

.analytics-tag-filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 2px;
}

.analytics-skill-filter-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.analytics-tag-filter-option,
.analytics-skill-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.analytics-skill-filter-option {
    align-items: flex-start;
    background: #fdf4ff;
    border-color: rgba(217, 70, 239, 0.22);
    color: #701a75;
    line-height: 1.35;
}

.analytics-tag-filter-option input,
.analytics-skill-filter-option input {
    width: 12px;
    height: 12px;
    accent-color: #0b5ed7;
    flex-shrink: 0;
}

.analytics-skill-filter-option input {
    margin-top: 2px;
    accent-color: #a21caf;
}

.analytics-tag-filter-option span,
.analytics-skill-filter-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.analytics-applied-filters {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.analytics-applied-filters-clear {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex: 0 0 auto;
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 999px;
    background: #fff;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.analytics-applied-filters-clear i {
    font-size: 0.8rem;
    line-height: 1;
}

.analytics-applied-filters-clear:hover,
.analytics-applied-filters-clear:focus-visible {
    border-color: rgba(220, 38, 38, 0.28);
    background: #fef2f2;
    color: #991b1b;
}

.analytics-applied-filters-toggle {
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 999px;
    background: #f8fbff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    font-size: 0.62rem;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.analytics-applied-filters-toggle i {
    font-size: 0.78rem;
    line-height: 1;
}

.analytics-applied-filters-toggle strong {
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #0b5ed7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-size: 0.56rem;
    line-height: 1;
}

.analytics-applied-filters-toggle:hover,
.analytics-applied-filters-toggle:focus-visible {
    border-color: rgba(11, 94, 215, 0.26);
    background: #eef4ff;
}

.analytics-applied-filters.is-collapsed {
    width: auto;
}

.analytics-applied-filter-list {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    min-height: 28px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: thin;
}

.analytics-applied-filter-list::-webkit-scrollbar {
    height: 4px;
}

.analytics-applied-filter-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.38);
}

.analytics-applied-filter-chip {
    height: 23px;
    max-width: 260px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px 0 7px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 999px;
    background: #eef4ff;
    color: #0b4fb3;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.analytics-applied-filter-chip i {
    flex: 0 0 auto;
    font-size: 0.72rem;
    line-height: 1;
}

.analytics-applied-filter-kind {
    color: rgba(11, 79, 179, 0.72);
    font-size: 0.56rem;
    font-weight: 900;
    text-transform: uppercase;
}

.analytics-applied-filter-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-applied-filter-remove {
    width: 15px;
    height: 15px;
    min-width: 15px;
    border: none;
    border-radius: 999px;
    background: rgba(11, 79, 179, 0.12);
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.analytics-applied-filter-remove:hover,
.analytics-applied-filter-remove:focus-visible {
    background: rgba(11, 79, 179, 0.22);
    outline: none;
}

.analytics-applied-filter-chip--question {
    border-color: rgba(51, 65, 85, 0.16);
    background: #f8fafc;
    color: #334155;
}

.analytics-applied-filter-chip--question .analytics-applied-filter-kind {
    color: rgba(51, 65, 85, 0.68);
}

.analytics-applied-filter-chip--skill {
    border-color: rgba(217, 70, 239, 0.22);
    background: #fdf4ff;
    color: #86198f;
}

.analytics-applied-filter-chip--skill .analytics-applied-filter-kind {
    color: rgba(134, 25, 143, 0.70);
}

.analytics-applied-filter-chip--skill .analytics-applied-filter-remove {
    background: rgba(162, 28, 175, 0.12);
}

.analytics-applied-filter-chip--skill .analytics-applied-filter-remove:hover,
.analytics-applied-filter-chip--skill .analytics-applied-filter-remove:focus-visible {
    background: rgba(162, 28, 175, 0.22);
}

.corrige-export-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.corrige-export-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.corrige-export-btn i {
    font-size: 1rem;
    line-height: 1;
}

.corrige-export-btn:hover:not(:disabled),
.corrige-export-btn:focus-visible {
    border-color: rgba(11, 94, 215, 0.28);
    background: #eef4ff;
    color: #0b4fb3;
}

.corrige-export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.corrige-toolbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Botões de alternância legados da análise */
.analytics-view-toggle {
    display: flex;
    gap: 3px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}

.analytics-toggle-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}

.analytics-toggle-btn.is-active {
    background: #fff;
    color: #0b5ed7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.analytics-toggle-btn:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.55);
    color: #334155;
}

/* Área de conteúdo rolável */
.analytics-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 28px;
    position: relative;
    z-index: 1;
}

/* Estado vazio */
.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    text-align: center;
    color: #64748b;
    padding: 24px;
}

.analytics-empty strong {
    display: block;
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 6px;
}

.analytics-empty p {
    font-size: 0.82rem;
    margin: 0;
    max-width: 340px;
    line-height: 1.5;
}

/* ---- Grid de cards por questão ---- */
.analytics-q-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.analytics-q-card {
    background: #fff;
    border: 1px solid rgba(11, 94, 215, 0.10);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.analytics-q-card:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 94, 215, 0.24);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.analytics-q-card:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.28);
    outline-offset: 2px;
}

.analytics-q-card.is-filtered {
    border-color: rgba(11, 94, 215, 0.36);
    box-shadow: 0 12px 28px rgba(11, 94, 215, 0.14);
}

.analytics-q-card.is-discursive-card {
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 36%),
        linear-gradient(180deg, #f6fbff, #eaf6ff);
    border-color: rgba(14, 165, 233, 0.18);
}

.analytics-q-card.is-annulled-card {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34%),
        linear-gradient(180deg, #fffdf4, #fff7dc);
    border-color: rgba(245, 158, 11, 0.22);
}

.analytics-q-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.analytics-q-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
}

.analytics-q-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.analytics-tag {
    font-size: 0.65rem;
    font-weight: 600;
    background: #e0eaff;
    color: #3b60d0;
    border-radius: 4px;
    padding: 1px 6px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.analytics-skill {
    font-size: 0.65rem;
    font-weight: 700;
    background: #fdf4ff;
    color: #86198f;
    border: 1px solid rgba(217, 70, 239, 0.24);
    border-radius: 4px;
    padding: 1px 6px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.analytics-annul-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: #fef3c7;
    color: #b45309;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.analytics-annul-badge--all {
    background: #d1fae5;
    color: #065f46;
}

.analytics-annul-badge--discursive {
    background: #e0f2fe;
    color: #0369a1;
}

.analytics-q-notices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: -2px 0 9px;
}

.analytics-q-notice {
    padding: 5px 7px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
}

.analytics-q-special {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #eaf6ff;
    border: 1px dashed rgba(14, 165, 233, 0.30);
    color: #475569;
}

.analytics-q-card.is-annulled-card .analytics-q-special {
    background: rgba(255, 251, 235, 0.78);
    border-color: rgba(245, 158, 11, 0.30);
}

.analytics-q-special strong {
    color: #0f172a;
    font-size: 0.78rem;
}

.analytics-q-special span,
.analytics-q-special small {
    font-size: 0.7rem;
    line-height: 1.35;
}

/* ---- Gráfico de barras ---- */
.analytics-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 7px;
    padding: 1px 2px;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.analytics-bar-row:hover,
.analytics-bar-row:focus-visible {
    background: #f8fbff;
}

.analytics-bar-row:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.24);
    outline-offset: 1px;
}

.analytics-bar-row.is-filtered {
    background: #dbeafe;
    box-shadow: inset 0 0 0 2px #0b5ed7, 0 0 0 2px rgba(11, 94, 215, 0.10);
}

.analytics-bar-row.is-filtered .analytics-bar-label,
.analytics-bar-row.is-filtered .analytics-bar-stat {
    color: #0b4fb3;
    font-weight: 900;
}

.analytics-bar-row.is-filtered .analytics-bar-track {
    box-shadow: inset 0 0 0 2px rgba(11, 94, 215, 0.30);
}

.analytics-bar-label {
    width: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    flex-shrink: 0;
    text-align: center;
}

.analytics-bar-row--blank .analytics-bar-label {
    color: #94a3b8;
}

.analytics-bar-track {
    flex: 1;
    height: 16px;
    background: #f1f5f9;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.analytics-bar-fill {
    height: 100%;
    background: #cbd5e1;
    border-radius: 4px;
    transition: width 0.25s ease;
}

.analytics-bar-fill.is-correct {
    background: #2563eb;
}

.analytics-bar-stat {
    width: 72px;
    font-size: 0.68rem;
    color: #475569;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.3;
}

.analytics-bar-stat em {
    color: #94a3b8;
    font-style: normal;
}

/* Rodapé do card com taxa de acertos */
.analytics-q-footer {
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
}

.analytics-q-footer strong {
    color: #0f172a;
}

.analytics-footer-detail {
    color: #94a3b8;
}

/* ---- Visão geral ---- */
.analytics-general-view {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.analytics-general-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.analytics-general-metric {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 12px;
    background: #f8fbff;
}

.analytics-general-metric span,
.analytics-general-metric small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
}

.analytics-general-metric strong {
    color: #0b5ed7;
    font-size: 1.15rem;
    line-height: 1.15;
}

.analytics-general-balance {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #fff;
}

.analytics-general-balance-track {
    display: flex;
    height: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.analytics-general-balance-hit {
    background: #2563eb;
}

.analytics-general-balance-error {
    background: #94a3b8;
}

.analytics-general-balance-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
}

.analytics-general-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-flex;
    margin-right: 5px;
}

.analytics-general-dot-hit {
    background: #2563eb;
}

.analytics-general-dot-error {
    background: #94a3b8;
}

.analytics-general-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.analytics-general-ranking {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 12px;
    background: #fff;
}

.analytics-general-ranking h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 0.9rem;
}

.analytics-general-ranking-list {
    display: grid;
    gap: 9px;
}

.analytics-general-rank-row {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: #fbfdff;
}

.analytics-general-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.analytics-general-rank-head strong {
    color: #0b4fb3;
    font-size: 0.82rem;
}

.analytics-general-rank-head span {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: right;
}

.analytics-general-rank-track {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.analytics-general-rank-track span {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: 999px;
}

.analytics-general-rank-fill-error {
    background: #94a3b8;
}

.analytics-general-rank-fill-hit {
    background: #2563eb;
}

.analytics-general-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.analytics-general-chip {
    display: inline-block;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.analytics-general-chip-tag {
    background: #e0eaff;
    color: #3157c5;
}

.analytics-general-chip-skill {
    background: #fdf4ff;
    border: 1px solid rgba(217, 70, 239, 0.20);
    color: #86198f;
}

.analytics-general-chip-empty {
    background: #f1f5f9;
    color: #64748b;
}

/* ---- Relatório de erros ---- */
.analytics-error-report-view {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.analytics-error-card {
    min-width: 0;
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.analytics-error-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(11, 94, 215, 0.10);
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}

.analytics-error-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.analytics-error-title strong {
    color: #0f172a;
    font-size: 0.88rem;
}

.analytics-error-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
}

.analytics-error-badge--correct {
    background: #eef4ff;
    color: #0b4fb3;
    border: 1px solid rgba(11, 94, 215, 0.16);
}

.analytics-error-badge--neutral {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.20);
}

.analytics-error-percent {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.analytics-error-percent strong {
    color: #0b4fb3;
    font-size: 0.88rem;
    text-transform: none;
}

.analytics-error-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 12px 0;
    min-width: 0;
}

.analytics-error-table {
    display: grid;
    min-width: 0;
}

.analytics-error-table-head,
.analytics-error-row {
    display: grid;
    grid-template-columns: minmax(82px, 0.7fr) minmax(124px, 0.8fr) minmax(0, 2.8fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.analytics-error-table-head {
    padding: 9px 12px 6px;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analytics-error-row {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: #ffffff;
    color: inherit;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
}

.analytics-error-row:nth-child(odd) {
    background: #f8fafc;
}

.analytics-error-row:hover,
.analytics-error-row:focus-visible {
    background: #eef4ff;
    outline: none;
}

.analytics-error-row.has-errors {
    background: #fbfdff;
}

.analytics-error-row.is-correct-answer {
    background: #f8fbff;
}

.analytics-error-response {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.analytics-error-response strong {
    min-width: 34px;
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 900;
}

.analytics-error-row.is-correct-answer .analytics-error-response strong {
    background: #eef4ff;
    color: #0b4fb3;
}

.analytics-error-row-percent {
    display: grid;
    grid-template-columns: minmax(48px, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.analytics-error-mini-track {
    height: 7px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.analytics-error-mini-track i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: 999px;
    background: #94a3b8;
}

.analytics-error-row.is-correct-answer .analytics-error-mini-track i {
    background: #2563eb;
}

.analytics-error-row-percent em {
    color: #334155;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.analytics-error-students {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.analytics-error-student-chip {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.analytics-error-correct-note,
.analytics-error-empty-note {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
}

.analytics-error-correct-note {
    background: #eef4ff;
    color: #0b4fb3;
}

.analytics-error-empty-note {
    background: #f8fafc;
    color: #94a3b8;
}

.analytics-error-special {
    margin: 10px 12px 12px;
    padding: 10px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

/* ---- Seções por tag ---- */
.analytics-tag-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analytics-tag-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.analytics-tag-selected-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 10px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    min-width: 0;
}

.analytics-tag-selected-strip-label {
    color: #475569;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analytics-tag-filter {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(11, 94, 215, 0.10);
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    min-width: 0;
}

.analytics-tag-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.analytics-tag-filter-label {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 900;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analytics-tag-filter-help {
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.3;
}

.analytics-tag-selected-list {
    min-height: 34px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 7px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    min-width: 0;
}

.analytics-tag-filter-placeholder {
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.25;
}

.analytics-tag-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 7px 3px 9px;
    border-radius: 999px;
    background: #e0eaff;
    color: #3157c5;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.analytics-skill-selected-strip {
    border-color: rgba(162, 28, 175, 0.14);
    background: linear-gradient(180deg, #fffbff, #fdf4ff);
}

.analytics-skill-selected-chip {
    background: #fdf4ff;
    color: #86198f;
    border: 1px solid rgba(217, 70, 239, 0.22);
}

.analytics-tag-selected-chip button {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(49, 87, 197, 0.14);
    color: #3157c5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 900;
}

.analytics-skill-selected-chip button {
    background: rgba(162, 28, 175, 0.12);
    color: #86198f;
}

.analytics-tag-input-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
}

.analytics-tag-search-input {
    width: 100%;
    height: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    padding: 0 10px;
    font-size: 0.76rem;
    font-weight: 700;
    outline: none;
}

.analytics-tag-search-input:focus {
    border-color: rgba(11, 94, 215, 0.38);
    box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.10);
}

.analytics-tag-suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 12;
    display: grid;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(11, 94, 215, 0.14);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.analytics-tag-suggestions.is-visible {
    display: grid;
    gap: 4px;
}

.analytics-tag-suggestion {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    padding: 7px 8px;
    text-align: left;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.analytics-tag-suggestion:hover,
.analytics-tag-suggestion:focus-visible {
    background: #eef4ff;
    color: #0b4fb3;
}

.analytics-tag-suggestion-empty {
    padding: 7px 8px;
    color: #94a3b8;
    font-size: 0.72rem;
}

.analytics-tag-clear-btn {
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 900;
    cursor: pointer;
}

.analytics-tag-clear-btn:hover {
    border-color: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

.analytics-empty--compact {
    min-height: 150px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.analytics-tag-section {
    background: #fff;
    border: 1px solid rgba(11, 94, 215, 0.10);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.analytics-skill-section {
    border-color: rgba(162, 28, 175, 0.12);
}

.analytics-skill-section .analytics-tag-section-header {
    background: #fdf4ff;
    border-bottom-color: rgba(162, 28, 175, 0.10);
}

.analytics-skill-section-name {
    color: #701a75;
}

.analytics-skill-section.is-empty-skill-section .analytics-tag-section-header {
    background: #f8fafc;
}

.analytics-skill-section.is-empty-skill-section .analytics-skill-section-name {
    color: #64748b;
}

.analytics-tag-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #f8faff;
    border-bottom: 1px solid rgba(11, 94, 215, 0.08);
}

.analytics-tag-section-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
    overflow-wrap: anywhere;
}

.analytics-tag-section-stats {
    font-size: 0.72rem;
    color: #64748b;
    white-space: normal;
    text-align: right;
    line-height: 1.35;
    min-width: 0;
}

.analytics-tag-bars {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.analytics-tag-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.analytics-tag-bar-row .analytics-bar-stat {
    width: 88px;
    white-space: normal;
}

.analytics-tag-q-label {
    width: 28px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
}

.analytics-tag-bar-row--stacked {
    align-items: flex-start;
    padding: 7px;
    border-radius: 10px;
}

.analytics-tag-bar-row--special {
    align-items: stretch;
    padding: 7px;
    border-radius: 10px;
}

.analytics-tag-bar-row.is-discursive-row {
    background: #eaf6ff;
    border: 1px solid rgba(14, 165, 233, 0.20);
}

.analytics-tag-bar-row.is-discursive-row .analytics-tag-special {
    background: #dff1ff;
    border-color: rgba(14, 165, 233, 0.32);
}

.analytics-tag-bar-row.is-annulled-row {
    background: #fff7dc;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.analytics-tag-bar-row.is-annulled-row .analytics-tag-special {
    background: #fff1bd;
    border-color: rgba(245, 158, 11, 0.32);
}

.analytics-tag-bar-row--special .analytics-bar-stat {
    width: 92px;
    white-space: normal;
}

.analytics-tag-special {
    flex: 1;
    min-width: 0;
    padding: 7px 9px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.analytics-stacked-wrap {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 5px;
}

.analytics-stacked-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.3;
}

.analytics-stacked-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.analytics-stacked-meta strong {
    flex-shrink: 0;
    color: #334155;
    font-size: 0.66rem;
}

.analytics-stacked-track {
    display: flex;
    width: 100%;
    height: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.20);
}

.analytics-stacked-segment {
    min-width: 2px;
    height: 100%;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: filter 0.16s ease, transform 0.16s ease;
}

.analytics-stacked-segment-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
    opacity: 0.92;
    pointer-events: none;
}

.analytics-stacked-segment:hover,
.analytics-stacked-segment:focus-visible {
    filter: brightness(1.08) saturate(1.08);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78);
}

.analytics-stacked-segment.is-filtered {
    filter: brightness(1.12) saturate(1.2);
    box-shadow:
        inset 0 0 0 2px #ffffff,
        inset 0 0 0 4px #0b5ed7,
        0 0 0 2px #0b5ed7;
    z-index: 2;
}

.analytics-stacked-segment:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.35);
    outline-offset: 1px;
}

.analytics-stacked-segment.is-correct {
    background: #2563eb;
}

.analytics-stacked-segment.is-gray-1 {
    background: #475569;
}

.analytics-stacked-segment.is-gray-2 {
    background: #64748b;
}

.analytics-stacked-segment.is-gray-3 {
    background: #94a3b8;
}

.analytics-stacked-segment.is-gray-4 {
    background: #cbd5e1;
    color: #334155;
}

.analytics-stacked-segment.is-gray-5 {
    background: #e2e8f0;
    color: #334155;
}

/* ---- Visão por estudante ---- */
.analytics-students-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.analytics-students-head,
.analytics-student-row {
    display: grid;
    grid-template-columns: 48px minmax(112px, 1fr) minmax(78px, 0.72fr) minmax(70px, 0.56fr) minmax(88px, 0.72fr) minmax(88px, 0.72fr) minmax(160px, 1.45fr);
    gap: 8px 10px;
    align-items: center;
    min-width: 0;
}

.analytics-students-head {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 9px 14px;
    border: 1px solid rgba(11, 94, 215, 0.10);
    border-radius: 10px;
    background: linear-gradient(180deg, #eaf2ff, #dceaff);
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 18px rgba(248, 250, 255, 0.98), 0 1px 0 rgba(11, 94, 215, 0.16);
    isolation: isolate;
}

.analytics-students-head::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: -20px;
    right: -20px;
    top: -16px;
    bottom: -8px;
    background: #fff;
}

.analytics-students-head span {
    min-width: 0;
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
}

.analytics-students-head > span:not(:first-child),
.analytics-student-row > :not(:first-child) {
    border-left: 1px solid rgba(148, 163, 184, 0.35);
    padding-left: 10px;
}

.analytics-students-sort-btn {
    border: none;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.analytics-students-sort-btn i {
    font-size: 0.82rem;
    line-height: 1;
}

.analytics-students-sort-btn:hover,
.analytics-students-sort-btn:focus-visible {
    color: #0b4fb3;
    outline: none;
}

.analytics-students-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.analytics-student-row {
    padding: 10px 14px;
    border: 1px solid rgba(11, 94, 215, 0.10);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    min-width: 0;
}

.analytics-students-list .analytics-student-row:nth-child(even) {
    background: #f2f7ff;
}

.analytics-students-list .analytics-student-row:nth-child(odd) {
    background: #ffffff;
}

.analytics-student-row:hover {
    background: #f2f7ff;
    border-color: rgba(11, 94, 215, 0.18);
}

.analytics-student-rank {
    width: 36px;
    height: 28px;
    border-radius: 999px;
    background: #eef4ff;
    color: #0b4fb3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.analytics-student-name {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.analytics-student-name strong {
    color: #0f172a;
    font-size: 0.84rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-student-name span {
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-student-score,
.analytics-student-hits,
.analytics-student-percent,
.analytics-student-class-average {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.analytics-student-percent {
    color: #0f172a;
}

.analytics-student-class-average {
    color: #64748b;
}

.analytics-student-hits {
    color: #475569;
}

.analytics-student-bar-cell {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.analytics-student-track {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 18px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.analytics-student-fill {
    height: 100%;
    min-width: 3px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.10);
    transition: width 0.25s ease;
    cursor: help;
}

.analytics-student-row.is-above-average .analytics-student-fill {
    background: #2563eb;
}

.analytics-student-average-marker {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    border-radius: 999px;
    background: #0f172a;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.86);
    cursor: help;
}

@media (max-width: 1080px) {
    body.gobarito-corrige-page {
        height: auto;
        box-sizing: border-box;
        overflow: auto;
    }

    .corrige-page {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .corrige-sidebar {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .corrige-list {
        height: auto;
        min-height: 0;
        max-height: 34vh;
        overflow-y: auto;
    }

    .corrige-viewer-panel {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .corrige-viewer-stage {
        min-height: 420px;
        flex: none;
    }

    .corrige-gabarito-layout.is-info-open {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .corrige-gabarito-info-column {
        min-height: 240px;
    }

    .corrige-modal-actions-inline {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .corrige-page {
        width: calc(100% - 18px);
        margin: 12px auto 20px;
    }

    .corrige-sidebar,
    .corrige-viewer-panel,
    .corrige-modal-panel {
        border-radius: 18px;
    }

    .corrige-viewer-stage {
        min-height: 320px;
        padding: 12px;
    }

    .corrige-viewer-tabs {
        gap: 4px;
    }

    .corrige-viewer-tab-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 0.72rem;
    }

    .corrige-viewer-tools {
        width: 100%;
    }

    .corrige-viewer-tools-overlay {
        top: 14px;
        right: 14px;
        width: auto;
    }

    .analytics-tag-search-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .analytics-question-filter-menu {
        left: 0;
        right: auto;
        width: min(320px, calc(100vw - 42px));
    }

    .analytics-tag-filter-menu,
    .analytics-skill-filter-menu {
        left: 0;
        right: auto;
        width: min(340px, calc(100vw - 42px));
    }

    .analytics-tag-bar-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .analytics-tag-q-label {
        width: auto;
        min-width: 28px;
    }

    .analytics-stacked-wrap,
    .analytics-tag-special {
        flex-basis: calc(100% - 40px);
    }

    .analytics-stacked-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .analytics-tag-bar-row .analytics-bar-stat {
        width: auto;
        text-align: left;
    }

    .analytics-general-overview,
    .analytics-general-columns {
        grid-template-columns: 1fr;
    }

    .analytics-error-table-head {
        display: none;
    }

    .analytics-error-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        align-items: stretch;
    }

    .analytics-error-row-percent {
        grid-template-columns: minmax(70px, 1fr) auto;
    }

    .analytics-error-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .analytics-students-head {
        display: none;
    }

    .analytics-student-row {
        grid-template-columns: 42px 1fr 1fr;
        grid-template-areas:
            "rank name name"
            "rank score hits"
            "rank percent classAverage"
            "bar bar bar";
        gap: 8px 10px;
    }

    .analytics-student-rank {
        grid-area: rank;
    }

    .analytics-student-name {
        grid-area: name;
    }

    .analytics-student-score {
        grid-area: score;
    }

    .analytics-student-hits {
        grid-area: hits;
        justify-self: end;
    }

    .analytics-student-percent {
        grid-area: percent;
        justify-self: start;
    }

    .analytics-student-class-average {
        grid-area: classAverage;
        justify-self: end;
    }

    .analytics-student-bar-cell {
        grid-area: bar;
        padding-top: 16px;
    }

    .corrige-zoom-readout {
        flex: 0 0 auto;
    }

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

    .corrige-modal {
        padding: 10px;
    }

    .corrige-status {
        right: 10px;
        top: calc(var(--gobarito-topbar-height) + 10px);
        width: calc(100vw - 20px);
    }

    .corrige-modal-panel {
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 14px;
    }

    .corrige-list {
        max-height: 40vh;
        padding-right: 0;
    }

    .corrige-modal-head {
        gap: 12px;
    }

    .corrige-modal-head h3 {
        font-size: 1rem;
    }

    .corrige-modal-actions {
        justify-content: stretch;
    }

    .corrige-modal-btn {
        width: 100%;
    }
}
