.corrige-answer-key-modal {
    align-items: flex-start;
    overflow-y: auto;
    padding: 12px 18px 18px;
}

.corrige-answer-key-panel {
    width: min(1180px, 100%);
    height: min(840px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    margin: 0 auto;
    padding: 14px;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 10px;
    overflow: hidden;
}

.corrige-answer-key-head {
    min-height: 0;
}

.corrige-answer-key-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(230px, 0.82fr) minmax(0, 1.28fr);
    gap: 10px;
    min-height: 0;
    align-items: stretch;
}

.corrige-answer-key-import-wrap,
.corrige-answer-key-count-card,
.corrige-answer-key-summary-card {
    border: 1px solid rgba(11, 94, 215, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff, #eef4ff);
    padding: 8px 10px;
    min-height: 0;
    min-width: 0;
}

.corrige-answer-key-import-wrap {
    padding: 0;
    overflow: hidden;
    display: flex;
}

.corrige-answer-key-count-card label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
    line-height: 1;
}

.corrige-answer-key-count-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
}

.corrige-answer-key-count-row {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.corrige-answer-key-count-row input {
    width: 88px;
    min-width: 0;
    height: 34px;
    border: 1px solid rgba(11, 94, 215, 0.16);
    border-radius: 12px;
    background: #ffffff;
    padding: 0 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.corrige-answer-key-count-row input::-webkit-outer-spin-button,
.corrige-answer-key-count-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.corrige-answer-key-count-row input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.corrige-answer-key-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title points"
        "meta meta";
    align-items: start;
    gap: 4px 12px;
}

.corrige-answer-key-summary-card strong {
    grid-area: title;
    color: #0f172a;
    font-size: 0.88rem;
    min-width: 0;
    line-height: 1.15;
}

.corrige-answer-key-summary-card span {
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.25;
    min-width: 0;
}

.corrige-answer-key-summary-points {
    grid-area: points;
    color: #0b4fb3;
    font-weight: 800;
    white-space: nowrap;
    align-self: start;
}

.corrige-answer-key-summary-card #answerKeySummaryMeta {
    grid-area: meta;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.28;
}

.corrige-answer-key-import-btn {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    box-shadow: none;
    border-radius: inherit;
    padding: 9px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    text-align: left;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.corrige-answer-key-import-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.55);
}

.corrige-answer-key-import-btn:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px #2563eb, inset 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.corrige-answer-key-import-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(11, 94, 215, 0.1);
    font-size: 0.7rem;
    font-weight: 800;
    color: #0b4fb3;
    line-height: 1;
}

.corrige-answer-key-import-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0b4fb3;
    line-height: 1.1;
}

.corrige-answer-key-import-btn i {
    font-size: 0.98rem;
    line-height: 1;
}

.corrige-answer-key-import-meta {
    color: #64748b;
    font-size: 0.73rem;
    line-height: 1.2;
    flex: 1 1 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corrige-answer-key-status {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    border: 1px solid transparent;
}

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

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

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

.corrige-answer-key-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    grid-row: 4;
}

.corrige-answer-key-list-shell {
    flex: 1 1 auto;
    height: auto;
    max-height: 100%;
    min-height: 0;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid rgba(11, 94, 215, 0.12);
    background:
        radial-gradient(circle at top left, rgba(42, 115, 232, 0.08), transparent 18%),
        linear-gradient(180deg, #fbfdff, #f5f9ff);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.corrige-answer-key-list-head {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.corrige-answer-key-list {
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.corrige-answer-key-empty {
    min-height: 180px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    padding: 20px;
    line-height: 1.5;
}

.corrige-answer-key-question-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.corrige-answer-key-question-side {
    min-width: 0;
    display: flex;
    align-self: stretch;
    align-items: stretch;
}

.corrige-answer-key-question-number {
    width: 100%;
    height: auto;
    min-height: 0;
    align-self: stretch;
    box-sizing: border-box;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b5ed7, #2563eb);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    box-shadow: 0 14px 30px rgba(11, 94, 215, 0.22);
}

.corrige-answer-key-question-number span {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    opacity: 0.88;
}

.corrige-answer-key-question-number strong {
    font-size: 1.12rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

.corrige-answer-key-question-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.corrige-answer-key-question-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.corrige-answer-key-question-type-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #334155;
    margin-right: 2px;
}

.corrige-answer-key-panel .question-type-switch,
.corrige-answer-key-panel .question-inline-config,
.corrige-answer-key-panel .question-inline-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.corrige-answer-key-panel .question-type-btn,
.corrige-answer-key-panel .question-inline-option {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #64748b;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.corrige-answer-key-panel .question-type-btn:hover,
.corrige-answer-key-panel .question-inline-option:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.corrige-answer-key-panel .question-type-btn.is-selected,
.corrige-answer-key-panel .question-inline-option.is-selected {
    background: #dbeafe;
    color: #1d4ed8;
}

.corrige-answer-key-panel .question-type-btn i {
    font-size: 15px;
}

.corrige-answer-key-panel .question-inline-dropdown {
    position: relative;
}

.corrige-answer-key-panel .question-inline-dropdown summary {
    list-style: none;
}

.corrige-answer-key-panel .question-inline-dropdown summary::-webkit-details-marker {
    display: none;
}

.corrige-answer-key-panel .question-inline-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.corrige-answer-key-panel .question-inline-dropdown-toggle:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.corrige-answer-key-panel .question-inline-dropdown-toggle > span {
    min-width: 12px;
    text-align: center;
    font-size: 0.71rem;
    font-weight: 800;
    color: #0f172a;
}

.corrige-answer-key-points-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.86);
    font-family: Arial, sans-serif;
    color: #334155;
}

.corrige-answer-key-points-prefix,
.corrige-answer-key-points-suffix {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.corrige-answer-key-points-input {
    width: 48px;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 0.74rem;
    font-weight: 800;
    color: #0f172a;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.corrige-answer-key-points-input::-webkit-outer-spin-button,
.corrige-answer-key-points-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.corrige-answer-key-panel .question-inline-dropdown-toggle i {
    font-size: 13px;
    color: #64748b;
}

.corrige-answer-key-panel .question-inline-dropdown[open] .question-inline-dropdown-toggle {
    background: #e2e8f0;
}

.corrige-answer-key-panel .question-inline-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 176px;
    padding: 4px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    display: none;
    z-index: 260;
}

.corrige-answer-key-panel .question-inline-dropdown[open] .question-inline-dropdown-menu {
    display: grid;
    gap: 2px;
}

.corrige-answer-key-panel .question-inline-dropdown-item {
    padding: 7px 9px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    font-size: 0.73rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.corrige-answer-key-panel .question-inline-dropdown-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.corrige-answer-key-panel .question-inline-dropdown-item.is-selected {
    background: #dbeafe;
    color: #1d4ed8;
}

.corrige-answer-key-state-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.69rem;
    font-weight: 800;
}

.corrige-answer-key-state-chip i {
    font-size: 13px;
}

.corrige-answer-key-state-chip.is-open {
    background: #ede9fe;
    color: #6d28d9;
}

.corrige-answer-key-state-chip.is-cancelled {
    background: #fff7ed;
    color: #c2410c;
}

.corrige-answer-key-answer-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.corrige-answer-key-open-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.74rem;
    font-weight: 800;
}

.corrige-answer-key-open-badge i {
    font-size: 14px;
}

.corrige-answer-key-cancelled-box {
    width: 100%;
    padding: 7px 9px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.74rem;
    line-height: 1.35;
}

.corrige-answer-key-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.corrige-answer-key-bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(11, 94, 215, 0.16);
    background: #ffffff;
    color: #35507f;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.corrige-answer-key-bubble:hover {
    transform: translateY(-1px);
    background: #f8fbff;
}

.corrige-answer-key-bubble.is-selected {
    background: linear-gradient(135deg, #0b5ed7, #2563eb);
    color: #ffffff;
    border-color: rgba(11, 94, 215, 0.35);
    box-shadow: 0 12px 22px rgba(11, 94, 215, 0.2);
}

.corrige-answer-key-question-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.corrige-answer-key-tool-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.corrige-answer-key-tool-chip:hover {
    background: #ffffff;
    border-color: #60a5fa;
    transform: translateY(-1px);
}

.corrige-answer-key-tool-chip.has-content {
    border-color: #93c5fd;
}

.corrige-answer-key-tool-chip.is-active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.16);
}

.corrige-answer-key-tool-chip i {
    font-size: 13px;
}

.corrige-answer-key-tool-count {
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    line-height: 1;
}

.corrige-answer-key-tool-chip.is-active .corrige-answer-key-tool-count {
    background: rgba(255, 255, 255, 0.22);
}

.corrige-answer-key-inline-stack {
    display: none;
}

.corrige-answer-key-inline-stack.has-open-panel {
    display: block;
}

.corrige-answer-key-inline-panel {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 9px;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.corrige-answer-key-inline-panel.is-open {
    display: flex;
}

.corrige-answer-key-skills-panel {
    background: #fdf4ff;
    border-color: #f0abfc;
}

.corrige-answer-key-tags-panel {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.corrige-answer-key-panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.corrige-answer-key-skills-panel .corrige-answer-key-panel-title {
    color: #a21caf;
}

.corrige-answer-key-panel .skills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.corrige-answer-key-panel .skills-list:empty,
.corrige-answer-key-panel .tags-list:empty {
    display: none;
}

.corrige-answer-key-panel .skill-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff7ed;
    color: #9a3412;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 0.69rem;
    border: 1px solid #fdba74;
    line-height: 1.4;
}

.corrige-answer-key-panel .skill-text {
    flex: 1;
    white-space: normal;
    word-break: break-word;
}

.corrige-answer-key-panel .skill-input-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
}

.corrige-answer-key-panel .skill-input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 0.72rem;
    outline: none;
    padding: 7px 9px;
    border: 1px dashed #fdba74;
    border-radius: 10px;
    background: #ffffff;
    color: #7c2d12;
    resize: vertical;
    font-family: inherit;
}

.corrige-answer-key-panel .skill-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.corrige-answer-key-panel .skill-source-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.corrige-answer-key-panel .skill-source-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 30px;
    border: none;
    border-radius: 8px;
    padding: 0 10px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 800;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.corrige-answer-key-panel .skill-source-btn:hover {
    transform: translateY(-1px);
}

.corrige-answer-key-panel .skill-source-btn--bncc {
    background: #f97316;
}

.corrige-answer-key-panel .skill-source-btn--bncc:hover {
    background: #ea580c;
}

.corrige-answer-key-panel .skill-source-btn--saeb {
    background: #0284c7;
}

.corrige-answer-key-panel .skill-source-btn--saeb:hover {
    background: #0369a1;
}

.corrige-answer-key-panel .skill-source-btn--enem {
    background: #16a34a;
}

.corrige-answer-key-panel .skill-source-btn--enem:hover {
    background: #15803d;
}

.corrige-answer-key-panel .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.corrige-answer-key-panel .tag-item {
    background: #3b82f6;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.66rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.corrige-answer-key-panel .tag-remove {
    cursor: pointer;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.corrige-answer-key-panel .tag-remove:hover {
    background: rgba(0, 0, 0, 0.34);
    transform: scale(1.06);
}

.corrige-answer-key-panel .tag-input-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    position: relative;
}

.corrige-answer-key-panel .tag-input {
    width: 100%;
    min-width: 0;
    font-size: 0.72rem;
    outline: none;
    padding: 5px 9px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
}

.corrige-answer-key-panel .tag-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.corrige-answer-key-panel .tag-add-btn {
    flex: 0 0 auto;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    min-height: 32px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.corrige-answer-key-panel .tag-add-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.corrige-answer-key-panel .tag-suggestions-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: calc(100% - 62px);
    max-height: 150px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 10px;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
    z-index: 280;
}

.corrige-answer-key-panel .tag-suggestions-dropdown.is-visible {
    display: block;
}

.corrige-answer-key-panel .tag-suggestion-item {
    padding: 8px 10px;
    font-size: 0.72rem;
    cursor: pointer;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.14s ease;
}

.corrige-answer-key-panel .tag-suggestion-item:last-child {
    border-bottom: none;
}

.corrige-answer-key-panel .tag-suggestion-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.corrige-answer-key-actions {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0;
    padding: 6px 2px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 28%, #ffffff);
    position: relative;
    z-index: 2;
    grid-row: 5;
}

.corrige-answer-key-actions .corrige-modal-btn {
    min-width: 138px;
    flex: 0 0 auto;
}

.corrige-answer-key-actions .corrige-modal-btn-primary {
    min-width: 198px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 28, 64, 0.58);
    backdrop-filter: blur(6px);
}

.modal-content {
    width: min(780px, 95vw);
    max-height: 88vh;
    border-radius: 18px;
    border: 1px solid #d6e3fb;
    background: linear-gradient(180deg, #ffffff, #f7faff);
    box-shadow: 0 30px 60px rgba(11, 61, 145, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    border-bottom: 1px solid #cfdcf6;
    background: linear-gradient(180deg, #f9fbff, #edf4ff);
}

.modal-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #e6eefc;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

.skills-modal-content {
    width: min(780px, 95vw);
    height: min(680px, 85vh);
}

.skills-modal-body {
    min-height: 0;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.skills-modal-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.skills-modal-select {
    flex: 1 1 220px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #cfdcf6;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}

.skills-modal-select:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.skills-modal-select-native-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.skills-modal-single-select {
    position: relative;
    flex: 1 1 220px;
    min-width: 0;
}

.skills-modal-single-trigger {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #cfdcf6;
    background: #ffffff;
    color: #0f172a;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.skills-modal-single-trigger:hover:not(.is-disabled),
.skills-modal-single-trigger.is-open {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.skills-modal-single-trigger.is-disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.skills-modal-single-trigger i {
    flex: 0 0 auto;
    margin-top: 2px;
    transition: transform 0.2s ease;
}

.skills-modal-single-trigger.is-open i {
    transform: rotate(180deg);
}

.skills-modal-single-summary {
    flex: 1;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.skills-modal-single-summary.is-placeholder {
    color: #64748b;
}

.skills-modal-single-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

.skills-modal-single-option {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.skills-modal-single-option:hover {
    background: #eff6ff;
}

.skills-modal-single-option.is-selected {
    background: #dbeafe;
    color: #1d4ed8;
}

.skills-modal-single-option-title {
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.skills-modal-single-option-text {
    font-size: 12px;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
}

.skills-modal-search {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cfdcf6;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
}

.skills-modal-search:focus,
.skills-modal-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.skills-modal-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #cfdcf6;
    border-radius: 10px;
    padding: 10px;
    background: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.skills-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #cfdcf6;
}

.skills-modal-message {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #64748b;
    padding: 24px 18px;
}

.skills-modal-message i {
    font-size: 42px;
    opacity: 0.55;
}

.skills-modal-message p {
    margin: 0;
    line-height: 1.5;
    max-width: 520px;
}

.skills-modal-message.is-error {
    color: #b91c1c;
}

.skills-picker-item {
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background 0.2s, border-color 0.2s;
}

.skills-picker-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.skills-picker-checkbox {
    margin-top: 4px;
    transform: scale(1.15);
    cursor: pointer;
}

.skills-picker-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #0f172a;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.55;
    user-select: none;
}

.skills-picker-code {
    color: #0b5ed7;
}

.skills-picker-meta {
    color: #64748b;
}

@media (max-width: 980px) {
    .corrige-answer-key-modal {
        padding: 10px 12px 14px;
    }

    .corrige-answer-key-panel {
        width: min(100%, calc(100vw - 16px));
        height: min(900px, calc(100dvh - 28px));
        max-height: calc(100dvh - 28px);
        padding: 12px;
    }

    .corrige-answer-key-toolbar {
        grid-template-columns: minmax(0, 1.05fr) minmax(210px, 0.85fr) minmax(0, 1.1fr);
        gap: 8px;
    }

    .corrige-answer-key-list-head,
    .corrige-answer-key-question-card {
        grid-template-columns: 1fr;
    }

    .corrige-answer-key-question-side {
        display: flex;
        justify-content: flex-start;
    }

    .corrige-answer-key-question-number {
        width: 96px;
    }
}

@media (max-width: 640px) {
    .corrige-answer-key-modal {
        padding: 8px 8px 12px;
    }

    .corrige-answer-key-panel {
        height: calc(100dvh - 24px);
        max-height: calc(100dvh - 24px);
        gap: 8px;
        padding: 10px;
    }

    .corrige-answer-key-toolbar {
        grid-template-columns: 1fr;
    }

    .skills-modal-content {
        width: 96vw;
        height: 88vh;
    }

    .skills-modal-filters {
        flex-direction: column;
    }

    .skills-modal-select,
    .skills-modal-single-select {
        flex-basis: auto;
        width: 100%;
    }

    .corrige-answer-key-count-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .corrige-answer-key-count-row {
        flex-wrap: wrap;
    }

    .corrige-answer-key-count-row input,
    .corrige-answer-key-count-row .corrige-modal-btn {
        width: 100%;
    }

    .corrige-answer-key-question-tools {
        width: 100%;
        margin-left: 0;
    }

    .corrige-answer-key-tool-chip {
        flex: 1 1 0;
    }

    .corrige-answer-key-panel .tag-input-wrapper,
    .corrige-answer-key-panel .skill-input-wrapper {
        grid-template-columns: 1fr;
    }

    .corrige-answer-key-panel .tag-add-btn {
        width: 100%;
        min-height: 36px;
    }

    .corrige-answer-key-panel .tag-suggestions-dropdown {
        width: 100%;
    }

    .corrige-answer-key-actions .corrige-modal-btn,
    .corrige-answer-key-actions .corrige-modal-btn-primary {
        width: 100%;
        min-width: 0;
    }

    .corrige-answer-key-actions {
        padding-top: 6px;
    }

    .corrige-answer-key-summary-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "points"
            "meta";
        gap: 4px;
    }

    .corrige-answer-key-summary-card #answerKeySummaryMeta,
    .corrige-answer-key-import-meta {
        white-space: normal;
    }
}
