:root {
    color-scheme: light;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #152740;
    background: #f3f6fb;
    --muted: #52647a;
    --line: #dce4ef;
    --primary: #164ab6;
}
* { box-sizing: border-box; }
body { margin: 0; }
.contenedor { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.barra { background: #132949; color: white; }
.marca { height: 64px; display: flex; align-items: center; gap: 12px; font-weight: 700; }
.marca span { background: #2d55a0; padding: 6px 8px; border-radius: 7px; font-size: .875rem; }
main { padding-block: 36px 48px; }
.encabezado, .fila, .titulo { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.035em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.06rem; margin-top: 4px; }
p { line-height: 1.5; color: var(--muted); }
.encabezado p { margin-top: 6px; }
.periodo, .acciones form { display: flex; align-items: end; gap: 8px; }
.indicadores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-block: 24px; }
.indicadores > div, .panel { border: 1px solid var(--line); background: white; border-radius: 14px; padding: 20px; }
.indicadores span, .cliente { color: var(--muted); font-size: .9rem; }
.indicadores strong { display: block; font-size: 1.65rem; margin-top: 7px; font-variant-numeric: tabular-nums; }
.contenido { display: grid; grid-template-columns: minmax(0, 1fr) minmax(315px, 370px); align-items: start; gap: 20px; }
.titulo { padding-bottom: 14px; }
.tarea { border-top: 1px solid var(--line); padding-block: 16px; overflow-wrap: anywhere; }
.tarea:last-child { padding-bottom: 0; }
.estado { display: inline-block; font-weight: 650; font-size: .875rem; background: #edf0f5; color: #41516c; padding: 5px 9px; border-radius: 8px; text-align: center; flex-shrink: 0; }
.estado.curso { background: #e8efff; color: #1c4796; }
.estado.validacion { background: #fff0ce; color: #774600; }
.estado.ok { background: #dcf6e9; color: #146441; }
.estado.postergado { background: #f1e7fb; color: #654489; }
.detalle { white-space: pre-wrap; margin-top: 10px; }
.pie-tarea { margin-top: 12px; }
.pie-tarea span { color: var(--muted); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.registro { display: grid; gap: 13px; margin-top: 16px; }
.campos-tiempo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; }
input, select, textarea, button { font: inherit; border-radius: 8px; min-height: 40px; }
input, select, textarea { background: white; border: 1px solid #aabbd0; padding: 7px 9px; color: inherit; min-width: 0; width: 100%; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 31px; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2352647a' stroke-width='1.5'/%3E%3C/svg%3E") right 8px center / 16px no-repeat; }
button { padding: 8px 12px; background: var(--primary); color: white; border: 1px solid transparent; font-weight: 650; cursor: pointer; white-space: nowrap; }
.secundario { background: white; color: var(--primary); border-color: #aabbd0; }
button:hover { filter: brightness(.94); }
a { color: var(--primary); font-weight: 650; }
:focus-visible { outline: 3px solid #5285ed; outline-offset: 2px; }
aside { display: grid; gap: 16px; }
.cierre p, .cierre form { margin-top: 10px; }
.resumen { padding: 0; margin: 12px 0; list-style: none; }
.resumen li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-block: 8px; overflow-wrap: anywhere; }
.resumen small { display: block; color: var(--muted); }
.aviso, .vacio { padding: 12px; background: #e8efff; border-radius: 8px; }
.aviso { margin-top: 16px; }
.error { background: #ffeaea; color: #971f30; }
@media (max-width: 800px) {
    .contenido { display: flex; flex-direction: column; align-items: stretch; }
    aside { order: -1; }
    .encabezado { align-items: start; flex-direction: column; }
}
@media (max-width: 470px) {
    .contenedor { width: calc(100% - 24px); }
    .indicadores { grid-template-columns: 1fr; gap: 8px; }
    .indicadores > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .indicadores strong { margin: 0; font-size: 1.25rem; }
    .tarea > .fila:first-child { align-items: start; flex-direction: column; gap: 7px; }
    .acciones form { flex-wrap: wrap; }
}

.sesion { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sesion span { background: none; }
.acceso { max-width: 440px; margin: 40px auto; }
.acceso h1 { font-size: 1.8rem; }
.acceso p { margin-top: 8px; }
.enlace-acceso { display: inline-block; margin-top: 18px; }
.gestion { margin-top: 24px; }
.navegacion { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 12px; }
.descarga { border: 1px solid #aabbd0; border-radius: 8px; padding: 8px 12px; text-decoration: none; }
.descarga:hover { background: #e8efff; }
.consolidado { margin-bottom: 14px; }
.consolidado > p { margin: 8px 0; }
.tabla { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; margin: 8px 0; }
td, th { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tfoot { font-weight: 700; }
.texto-detalle { white-space: pre-wrap; min-width: 220px; }
details { margin-top: 11px; border-top: 1px solid var(--line); padding-top: 11px; }
summary { font-weight: 650; cursor: pointer; }
