:root {
    --bg: #f3f6fa;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9e0ea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ok: #0f766e;
    --danger: #b42318;
    --soft: #eef3fb;
    --nav: #111827;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 22px;
    background: var(--nav);
    color: #fff;
    border-bottom: 4px solid var(--primary);
}

.brand { color: #fff; font-weight: 700; }
.brand-rich {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}
.brand-rich img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 3px;
}
.brand-rich span {
    display: grid;
    gap: 2px;
}
.brand-rich small {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 400;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.topbar nav a { color: #e5e7eb; }
.topbar nav > a {
    padding: 7px 9px;
    border-radius: 5px;
}
.nav-group {
    position: relative;
}
.nav-group summary {
    color: #e5e7eb;
    cursor: pointer;
    list-style: none;
    padding: 7px 9px;
    border-radius: 5px;
}
.nav-group summary::-webkit-details-marker {
    display: none;
}
.nav-group summary::after {
    content: " v";
    font-size: 11px;
    color: #9ca3af;
}
.nav-group[open] summary,
.nav-group summary:hover,
.topbar nav > a:hover {
    background: #1f2937;
    text-decoration: none;
}
.nav-group div {
    position: absolute;
    top: 34px;
    left: 0;
    z-index: 20;
    display: grid;
    min-width: 190px;
    padding: 8px;
    border: 1px solid #374151;
    border-radius: 6px;
    background: #111827;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
}
.nav-group div a {
    padding: 8px 10px;
    border-radius: 4px;
}
.nav-group div a:hover {
    background: #1f2937;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 28px));
    margin: 22px auto 34px;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--bg);
}

.card, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.login-card { width: min(460px, 100%); }
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.login-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px;
    background: #fff;
}
.login-card h1 {
    margin-bottom: 4px;
    font-size: 24px;
}
.login-card h2 {
    font-size: 18px;
    color: var(--primary);
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-span-2 { grid-column: 1 / -1; }

h1, h2, h3 { margin: 0 0 14px; }
h1 { letter-spacing: 0; }
p { color: var(--muted); }

label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid #bfdbfe;
    border-color: var(--primary);
}

/* Resaltado reforzado de los avisos ortográficos nativos del navegador. */
input::spelling-error,
textarea::spelling-error,
[contenteditable="true"]::spelling-error {
    color: #b91c1c;
    background-color: #fee2e2;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 3px;
    text-decoration-style: wavy;
}
input::grammar-error,
textarea::grammar-error,
[contenteditable="true"]::grammar-error {
    color: #c2410c;
    background-color: #ffedd5;
    text-decoration-color: #ea580c;
    text-decoration-thickness: 3px;
    text-decoration-style: wavy;
}

textarea { min-height: 84px; resize: vertical; }

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.compact-actions {
    margin-top: 4px;
    margin-bottom: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.btn:hover { filter: brightness(.95); text-decoration: none; }
.btn.secondary { color: var(--text); background: #fff; border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.grade-edit-criteria {
    background: #6d28d9;
    border-color: #5b21b6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(91, 33, 182, .22);
}
.btn.grade-edit-criteria:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 2px; }
.grade-criteria-actions { margin: 12px 0 18px; }
.grade-criteria-hint { font-size: .9rem; }
#criterios { scroll-margin-top: 22px; }
/* El nombre mantiene el aspecto de una celda, no el de un control de formulario. */
.student-note-trigger { appearance: none; border: 0; padding: 0; background: transparent; box-shadow: none; color: inherit; text-align: left; font: inherit; font-weight: inherit; line-height: inherit; cursor: pointer; text-decoration: none; }
.student-note-trigger:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.student-note-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
.student-notes-modal { position: fixed; inset: 0; z-index: 70; background: rgba(17, 24, 39, .55); display: grid; place-items: center; padding: 18px; }
.student-notes-modal[hidden] { display: none; }
.student-notes-card { background: #fff; color: var(--text); border-radius: 10px; padding: 20px; width: min(520px, 100%); max-height: calc(100dvh - 36px); overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.student-notes-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.student-notes-top h2 { margin: 0; font-size: 1.3rem; }
.student-notes-name { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin: 16px 0 4px; overflow-wrap: anywhere; }
.student-notes-hint { font-size: .88rem; margin: 0 0 16px; }
.student-notes-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.student-notes-actions .btn { margin-left: auto; }
.student-notes-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.student-notes-details summary { color: var(--primary-dark); cursor: pointer; font-weight: 600; }
.student-notes-history { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-top: 10px; }
.student-notes-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.student-notes-item:last-child { border-bottom: 0; }
.student-notes-item strong { font-size: .83rem; }
.student-notes-item p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-notes-edited { display: block; font-size: .75rem; margin-top: 4px; }
.student-notes-item-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.student-notes-action { border: 0; border-radius: 4px; background: transparent; padding: 3px 6px; color: var(--primary-dark); font: inherit; font-size: .79rem; font-weight: 600; cursor: pointer; }
.student-notes-action:hover { background: var(--soft); text-decoration: underline; }
.student-notes-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.student-notes-action-delete { color: var(--danger); }
.student-notes-action-delete:hover { background: #fef3f2; }
.student-notes-edit-text { display: block; width: 100%; min-height: 86px; margin: 8px 0 4px; resize: vertical; }
#student-notes-text { width: 100%; margin: 6px 0 12px; resize: vertical; }
#student-notes-message.error { color: #b91c1c; }
@media (max-width: 520px) { .student-notes-card { padding: 16px; } .student-notes-top h2 { font-size: 1.15rem; } }

.table-wrap { overflow-x: auto; }
.grade-capture-context .grade-capture-group {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}
.grades-table-wrap {
    max-height: calc(100vh - 330px);
    overflow: auto;
    border: 1px solid var(--line);
    background: #fff;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
}

th, td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th { background: var(--soft); font-size: 14px; }
tbody tr:nth-child(even) td { background: #fbfcff; }
tbody tr:hover td { background: #f7faff; }
.grades-table {
    min-width: 760px;
    border: 0;
}
.grades-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: inset 0 -1px 0 var(--line);
}
.grades-table th.grade-student-name,
.grades-table td.grade-student-name {
    position: sticky;
    left: 56px;
    z-index: 2;
    min-width: 230px;
    max-width: 260px;
    background: #fff;
}
.grades-table thead th.grade-student-name {
    z-index: 4;
    background: #eef3fb;
}
.grades-table td {
    padding: 7px 8px;
}
.grades-table th {
    padding: 8px;
}
.grade-search-panel {
    margin-bottom: 12px;
    padding: 12px;
}
.grade-search-panel p {
    margin: 0;
}
.hidden-row {
    display: none;
}
.num { text-align: right; }
.muted { color: var(--muted); }
.alert {
    padding: 11px 13px;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #ecfdf3;
    color: #05603a;
    border: 1px solid #abefc6;
}
.alert.error { background: #fef3f2; color: var(--danger); border-color: #fecdca; }
.alert.warn { background: #fffaeb; color: #93370d; border-color: #fedf89; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef3fb; }
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}
.status-badge.active {
    background: #ecfdf3;
    color: #05603a;
}
.status-badge.baja {
    background: #fef3f2;
    color: #b42318;
}
.score-input { min-width: 72px; }
.grade-save-status { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.grade-save-status[data-state="pending"] { color: #65520c; }
.grade-save-status[data-state="saved"] { color: #05603a; }
.grade-save-status[data-state="error"] { color: #b42318; font-weight: 600; }
.grades-table .score-input[data-save-state="pending"],
.grades-table .score-input[data-save-state="saving"] { box-shadow: 0 0 0 2px #f9d875; }
.grades-table .score-input[data-save-state="error"] { border-color: #b42318; box-shadow: 0 0 0 2px #fda29b; }
.grade-scale-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 13px;
}
.grade-scale-legend span,
.grades-table .score-result,
.grade-color-chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
}
.grades-table .score-input.grade-band-red,
.grades-table .score-result.grade-band-red,
.grade-scale-legend .grade-band-red,
.grade-color-chip.grade-band-red { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.grades-table .score-input.grade-band-amber,
.grades-table .score-result.grade-band-amber,
.grade-scale-legend .grade-band-amber,
.grade-color-chip.grade-band-amber { background: #fde68a; color: #78350f; border-color: #f59e0b; }
.grades-table .score-input.grade-band-yellow,
.grades-table .score-result.grade-band-yellow,
.grade-scale-legend .grade-band-yellow,
.grade-color-chip.grade-band-yellow { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.grades-table .score-input.grade-band-green,
.grades-table .score-result.grade-band-green,
.grade-scale-legend .grade-band-green,
.grade-color-chip.grade-band-green { background: #dcfce7; color: #166534; border-color: #86efac; }
.grades-table .score-input.grade-band-strong-green,
.grades-table .score-result.grade-band-strong-green,
.grade-scale-legend .grade-band-strong-green,
.grade-color-chip.grade-band-strong-green { background: #bbf7d0; color: #14532d; border-color: #4ade80; }
.grades-table .score-input[class*="grade-band-"]:disabled { opacity: 1; }
.criteria-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.warn-total {
    background: #fffaeb;
    color: #93370d;
}
.list-selector {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.check-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px;
    align-items: start;
    padding: 8px;
    margin: 0;
    border-bottom: 1px solid var(--line);
    font-weight: 400;
}
.check-row:last-child { border-bottom: 0; }
.check-row input { width: auto; margin-top: 2px; }
.check-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.summary-grid { margin: 18px 0; }
.metric span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}
.metric strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
}
.chart-canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.group-report {
    margin-top: 16px;
}
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #05603a;
    font-weight: 700;
}
.risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fef3f2;
    color: #b42318;
    font-weight: 700;
}
.inline-checks {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 38px;
}
.inline-checks label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-weight: 400;
}
.inline-checks input {
    width: auto;
}
.inline-form {
    display: inline;
}
.link-button {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
}
.link-button:hover {
    text-decoration: underline;
}
/* Acciones de Mis listas: controles separados y elección de PDF en un diálogo. */
.teacher-lists-table { min-width: 980px; }
.teacher-lists-table th:last-child,
.teacher-lists-table td:last-child { min-width: 265px; width: 265px; }
.teacher-list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.teacher-list-actions .inline-form { display: inline-flex; margin: 0; }
.teacher-list-action,
.teacher-list-actions .link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.teacher-list-action:hover,
.teacher-list-actions .link-button:hover { border-color: var(--primary); background: var(--soft); color: var(--primary-dark); text-decoration: none; }
.teacher-list-action:focus-visible,
.teacher-list-actions .link-button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.teacher-list-action-pdf { background: var(--primary); border-color: var(--primary); color: #fff; }
.teacher-list-action-pdf:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.teacher-list-actions .teacher-list-action-danger { border-color: #fecaca; color: #b91c1c; }
.teacher-list-actions .teacher-list-action-danger:hover { background: #fef2f2; border-color: #b91c1c; color: #991b1b; }
.list-pdf-dialog { width: min(480px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); box-shadow: 0 20px 60px rgba(17, 24, 39, .28); overflow: auto; }
.list-pdf-dialog::backdrop { background: rgba(17, 24, 39, .55); }
.list-pdf-dialog-card { padding: 22px; }
.list-pdf-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.list-pdf-dialog-top h2 { margin: 0; font-size: 1.25rem; }
.list-pdf-close { flex: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.list-pdf-close:hover { background: var(--soft); }
.list-pdf-close:focus-visible,
.list-pdf-choice:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.list-pdf-context { margin: 13px 0 5px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.list-pdf-hint { margin: 0; font-size: .88rem; }
.list-pdf-options { display: grid; gap: 10px; margin-top: 18px; }
.list-pdf-choice { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; }
.list-pdf-choice strong { color: var(--primary-dark); }
.list-pdf-choice span { font-size: .85rem; line-height: 1.4; }
.list-pdf-choice:hover { border-color: var(--primary); background: var(--soft); text-decoration: none; }
@media (max-width: 600px) { .list-pdf-dialog-card { padding: 17px; } }
.delete-list-form {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto;
    gap: 6px;
    min-width: 190px;
}
.delete-list-form input {
    padding: 7px 8px;
}
.order-input {
    width: 76px;
}
.concentrado-order-table { min-width: 760px; }
.concentrado-sort-item { transition: background-color .12s ease; }
.concentrado-sort-item:hover { background: #f8fafc; }
.concentrado-sort-item.is-dragging { opacity: .45; background: #eaf2ff; }
.concentrado-drag-handle {
    cursor: grab;
    min-width: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 18px;
    touch-action: none;
}
.concentrado-drag-handle:active { cursor: grabbing; }
.concentrado-order-lists { min-width: 260px; }
.concentrado-list-option {
    display: grid;
    grid-template-columns: 18px minmax(100px, 1fr) minmax(90px, .8fr);
    align-items: center;
    gap: 7px;
    margin: 2px 0;
    font-size: .88rem;
}
.concentrado-list-option input { margin: 0; }
.concentrado-list-option small { color: var(--muted); }
.concentrado-order-position {
    display: inline-flex;
    min-width: 28px;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--soft);
}
.concentrado-order-buttons { white-space: nowrap; }
.concentrado-order-buttons .btn { min-width: 34px; padding: 6px 9px; margin: 0 2px; }
.concentrado-sort-block + .concentrado-sort-block tr:first-child td { border-top: 3px solid #d0d5dd; }
@media (max-width: 700px) {
    .concentrado-list-option { grid-template-columns: 18px minmax(90px, 1fr); }
    .concentrado-list-option small { grid-column: 2; }
}
.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    background: #fff;
}
.page-hero h1 {
    margin-bottom: 4px;
    font-size: 28px;
}
.page-hero p {
    margin: 0;
}
.section-kicker {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.user-chip {
    min-width: 190px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.user-chip span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.user-chip strong {
    display: block;
    margin-top: 3px;
}
.module-section {
    margin-top: 18px;
}
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.section-heading h2 {
    margin: 0;
}
.section-heading p {
    margin: 0;
}
.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.module-card {
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.module-card:hover {
    border-color: var(--primary);
    text-decoration: none;
}
.module-card strong {
    color: var(--text);
}
.module-card span {
    color: var(--muted);
    font-size: 14px;
}
.institution-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.institution-preview img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .nav-group div { position: static; margin-top: 8px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-hero { align-items: stretch; flex-direction: column; }
    .module-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .brand-rich { min-width: 0; }
}

@media (min-width: 761px) and (max-width: 1060px) {
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Gestión del docente: ficha única con acceso y grupos. */
.teacher-search { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.teacher-search input { flex:1; min-width:200px; }
.teacher-profile-form { margin-bottom:24px; }
.teacher-group-picker { display:flex; flex-wrap:wrap; gap:12px; margin:14px 0; }
.teacher-group-picker fieldset { flex:1 1 200px; border:1px solid var(--line); border-radius:8px; padding:12px; }
.teacher-group-picker label { display:inline-flex; align-items:center; gap:6px; margin:6px 12px 6px 0; }
.teacher-group-picker input[type=checkbox], .teacher-check input[type=checkbox] { width:auto; margin:0; }
.teacher-check { display:flex; align-items:center; gap:8px; margin:12px 0; }
.teacher-account-card { border:1px solid var(--line); border-radius:8px; padding:16px; margin:12px 0; }
.teacher-account-card details { border-top:1px solid var(--line); padding-top:12px; }

.teacher-profile-form .panel { margin-bottom:16px; }

.padron-compare { min-width:1100px; font-size:14px; }
.padron-compare td { vertical-align:top; }
.padron-compare td:nth-child(2), .padron-compare td:nth-child(3) { min-width:210px; }
.padron-compare td:nth-child(4) { min-width:280px; }
.padron-compare input[type=checkbox], #padron-apply input[type=checkbox] { width:auto; }
.padron-compare details { margin-top:12px; }
.padron-compare details label { display:block; margin:10px 0; }
.padron-value { white-space:pre-wrap; overflow-wrap:anywhere; }

/* Consecutivos visuales: no forman parte de la matrícula ni de la captura. */
.grades-table .teacher-row-number { position:sticky; left:0; width:56px; min-width:56px; max-width:56px; box-sizing:border-box; text-align:center; background:#fff; z-index:2; font-variant-numeric:tabular-nums; }
.grades-table thead th.teacher-row-number { z-index:4; background:#eef3fb; }
.teacher-sequence { text-align:center; white-space:nowrap; font-variant-numeric:tabular-nums; }
