/* Estilos propios, móvil primero. De momento solo tema claro. Tema «Tres colors»: base neutra (pizarra casi
   negra, fondo hueso) y los tres colores del logo del AFA, rebajados, como acentos (grupos del menú,
   tarjetas del inicio, columnas del tablero).
   Contraste AA comprobado en claro y oscuro. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --fondo: #fbfaf7;
  --fondo-junta: #fcfbf8;
  --superficie: #ffffff;
  --superficie-2: #f6f5f1;
  --texto: #14181f;
  --texto-suave: #5b6472;
  --borde: #e8e5de;
  /* «verde» es el color principal del AFA (configurable): por defecto, pizarra. */
  --verde: #263238;
  --verde-claro: #eceff1;
  --verde-medio: #455a64;
  --principal: #1f1f1f;
  --principal-texto: #ffffff;
  --enlace: #0d7266;
  --ok: #1c7a5e;
  --ok-fondo: #e1f2ea;
  --aviso: #8a5300;
  --aviso-fondo: #fdf0d9;
  --error: #b3303b;
  --error-fondo: #fde8e8;
  --info: #2b4c9a;
  --info-fondo: #e7edfb;
  --demo: #6d28d9;
  --foco: #fcb42b;
  /* Los tres colores del logo, rebajados (rojo, amarillo y verde agua). Solo decoración, nunca texto. */
  --c-rojo: #d9505c;
  --c-amarillo: #eeb144;
  --c-verde: #2b9a8a;
  --radio: 12px;
  --radio-s: 8px;
  --sombra: 0 1px 2px rgba(20, 24, 31, 0.05), 0 4px 16px rgba(20, 24, 31, 0.04);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--fondo);
  color: var(--texto);
}
body.d-junta { background: var(--fondo-junta); }
a { color: var(--enlace); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
}
.saltar { position: absolute; left: -9999px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.saltar:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--superficie); padding: .5rem 1rem; }
.icono { width: 1.15rem; height: 1.15rem; flex: none; }
h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 .35rem; letter-spacing: -0.01em; font-weight: 700; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; font-weight: 650; }
p, ul, ol { margin: 0 0 .9rem; }
.suave { color: var(--texto-suave); }
.pequeno { font-size: .85rem; }
.espaciador { flex: 1; }

.demo-aviso {
  display: flex; gap: .5rem; align-items: center; justify-content: center;
  background: var(--superficie); border-bottom: 1px solid var(--borde);
  color: var(--texto-suave); padding: .3rem 1rem; font-size: .82rem;
}
.marca { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--verde); font-weight: 700; line-height: 1.2; }
.marca .icono { width: 1.6rem; height: 1.6rem; }
.marca .marca-img { height: 2.1rem; width: auto; flex: none; }
.lateral .marca .marca-img { height: 2.6rem; }
.logo-entrada { display: block; width: min(15rem, 70%); height: auto; margin: 0 auto 1.25rem; }
.avatar {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--c-amarillo); color: #1f1f1f; font-weight: 700; font-size: .8rem; text-decoration: none;
  text-transform: uppercase;
}

/* ---------- Disposición de la junta: barra lateral ---------- */
.junta { display: block; min-height: 100vh; }
.lateral {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30;
  background: var(--superficie); border-right: 1px solid var(--borde);
  padding: 1rem .75rem 2rem; overflow-y: auto;
  transform: translateX(-100%); transition: transform .2s ease;
}
.lateral.abierta { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .25); }
.lateral-cabecera { display: grid; gap: .35rem; padding: .25rem .5rem 1rem; border-bottom: 1px solid var(--borde); margin-bottom: .5rem; }
.lateral-seccion { margin: 1rem .6rem .3rem; font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-suave); }
.lateral-grupo > summary { cursor: pointer; list-style: none; display: flex; align-items: center; border-radius: var(--radio-s); }
.lateral-grupo > summary::-webkit-details-marker { display: none; }
.lateral-grupo > summary::after { content: "▾"; font-size: .8rem; transition: transform .15s ease; }
.lateral-grupo:not([open]) > summary::after { transform: rotate(-90deg); }
.lateral-grupo > summary:hover { color: var(--texto); }
/* Un color del logo por grupo, en un punto junto al título y en la marca del elemento activo. */
.lateral-grupo:nth-of-type(3n+1) { --c: var(--c-rojo); }
.lateral-grupo:nth-of-type(3n+2) { --c: var(--c-amarillo); }
.lateral-grupo:nth-of-type(3n) { --c: var(--c-verde); }
.lateral-grupo > summary { justify-content: flex-start; }
.lateral-grupo > summary::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); margin-right: .45rem; }
.lateral-grupo > summary::after { margin-left: auto; }
.lateral ul { list-style: none; margin: 0; padding: 0; }
.lateral li a, .lateral li .desactivado {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: var(--radio-s);
  color: var(--texto); text-decoration: none; font-size: .92rem;
}
.lateral li a:hover { background: var(--superficie-2); }
.lateral li a.activo { background: var(--superficie-2); color: var(--texto); font-weight: 600; box-shadow: inset 3px 0 0 var(--c, var(--c-verde)); }
.lateral li .desactivado { color: var(--texto-suave); opacity: .7; cursor: default; }
.pronto { margin-left: auto; font-size: .68rem; border: 1px solid var(--borde); border-radius: 999px; padding: 0 .4rem; }
.junta-principal { min-width: 0; }
.barra-superior {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem; background: color-mix(in srgb, var(--fondo-junta) 88%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--borde);
}
.contenido-junta { padding: 1.25rem 1rem 3rem; max-width: 1200px; }
@media (min-width: 64rem) {
  .junta { display: grid; grid-template-columns: 260px 1fr; }
  .lateral { position: sticky; top: 0; height: 100vh; transform: none; }
  .lateral.abierta { box-shadow: none; }
  .barra-superior .nav-alternar { display: none; }
  .contenido-junta { padding: 1.75rem 2.25rem 3rem; }
}

/* ---------- Disposición de las familias: app móvil ---------- */
.app-cabecera, .publico-cabecera {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem;
  max-width: 44rem; margin: 0 auto; padding: .75rem 1rem;
  background: color-mix(in srgb, var(--fondo) 90%, transparent); backdrop-filter: blur(6px);
}
.publico-cabecera { justify-content: space-between; }
.contenido-familia { max-width: 44rem; margin: 0 auto; padding: .5rem 1rem 6rem; }
.contenido-publico { max-width: 44rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.app-pestanas {
  position: fixed; inset: auto 0 0 0; z-index: 25; display: flex; justify-content: space-around;
  background: var(--superficie); border-top: 1px solid var(--borde);
  padding: .35rem max(.25rem, calc((100% - 44rem) / 2)) calc(.35rem + env(safe-area-inset-bottom));
}
.app-pestanas a {
  display: grid; justify-items: center; gap: .1rem; min-width: 3.6rem; padding: .25rem .4rem; border-radius: var(--radio-s);
  color: var(--texto-suave); text-decoration: none; font-size: .72rem; font-weight: 550;
}
.app-pestanas a .icono { width: 1.35rem; height: 1.35rem; }
.app-pestanas a.activo { color: var(--enlace); }
.app-pestanas a.activo .icono { background: color-mix(in srgb, var(--c-verde) 14%, white); border-radius: 999px; padding: .15rem .6rem; width: 2.6rem; height: 1.65rem; }

/* ---------- Componentes ---------- */
.pagina-cabecera { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.1rem; }
.pagina-cabecera p:last-child { margin-bottom: 0; }
.volver { margin: 0 0 .35rem; font-size: .88rem; }
.volver a { color: var(--texto-suave); text-decoration: none; }

.tarjeta {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1rem 1.1rem; box-shadow: var(--sombra); margin-bottom: 1rem;
}
.tarjeta > :first-child { margin-top: 0; }
.tarjeta > :last-child { margin-bottom: 0; }
.tarjeta h2 { margin-top: 0; }
.rejilla { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
.rejilla > .tarjeta { margin-bottom: 0; }
@media (min-width: 40rem) { .rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .d-junta .rejilla { grid-template-columns: repeat(3, 1fr); } }
.tarjeta-enlace { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.tarjeta-enlace:hover { border-color: var(--verde-medio); }
.tarjeta-enlace h2 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.cifra { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin: .2rem 0; }
.estrecho { max-width: 30rem; margin-inline: auto; }
.carnet { text-align: center; background: linear-gradient(160deg, var(--verde) 0 38%, var(--superficie) 38%); }
.carnet > p:first-child, .carnet h1 { color: var(--principal-texto); }
.carnet .qr img { width: 230px; height: 230px; }
.destacado { background: var(--verde-claro); border-color: transparent; }
.lista-tarjetas { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.lista-tarjetas > li { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .85rem 1rem; }
.lista-tarjetas a { color: inherit; text-decoration: none; }
.fila { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Pestañas con contador */
.pestanas { display: flex; gap: .25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; border-bottom: 1px solid var(--borde); margin-bottom: 1rem; }
.pestanas a {
  white-space: nowrap; padding: .55rem .75rem; color: var(--texto-suave); text-decoration: none; font-weight: 550; font-size: .9rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pestanas a.activa { color: var(--texto); border-bottom-color: var(--texto); }
.contador { display: inline-block; min-width: 1.4rem; text-align: center; font-size: .75rem; background: var(--superficie-2); border: 1px solid var(--borde); border-radius: 999px; padding: 0 .35rem; }

/* Formularios */
form > div, .campo { margin-bottom: .9rem; }
label { display: block; font-weight: 550; margin-bottom: .25rem; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local],
input[type=date], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .75rem; font: inherit; color: var(--texto);
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-s);
}
input:focus, select:focus, textarea:focus { border-color: var(--verde-medio); }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; vertical-align: -.15rem; accent-color: var(--verde-medio); margin-right: .35rem; }
fieldset { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .75rem 1rem; margin: 0 0 1rem; }
fieldset label { font-weight: 400; }
textarea { min-height: 6rem; }
.helptext, form div > div:not(:first-child) { font-size: .82rem; color: var(--texto-suave); }
.errorlist { list-style: none; padding: 0; margin: .25rem 0; color: var(--error); font-weight: 600; font-size: .88rem; }
.buscador { display: flex; gap: .5rem; flex: 1; min-width: 14rem; }
.buscador input { flex: 1; }

/* Botones */
.boton, button.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; font: inherit; font-weight: 600; font-size: .92rem; border-radius: var(--radio-s);
  border: 1px solid var(--principal); background: var(--principal); color: var(--principal-texto);
  cursor: pointer; text-decoration: none; min-height: 40px;
}
.boton:hover { filter: brightness(1.15); }
.boton.secundario { background: var(--superficie); color: var(--texto); border-color: var(--borde); }
.boton.secundario:hover { border-color: var(--texto-suave); filter: none; }
.boton.peligro { background: var(--error); border-color: var(--error); color: #fff; }
.boton.verde { background: var(--verde); border-color: var(--verde); color: var(--principal-texto); }
.boton.ancho { width: 100%; min-height: 48px; }
.boton[disabled] { opacity: .45; cursor: default; filter: none; }
.pequeno-boton { min-height: 32px; padding: .3rem .7rem; font-size: .82rem; }
.boton-icono { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: var(--radio-s); border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); cursor: pointer; font-size: 1.05rem; }
button.enlace { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.acciones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.en-linea { display: inline; margin: 0; }

/* Mensajes, avisos y etiquetas */
.mensajes { list-style: none; padding: 0; margin: 0 0 1rem; }
.mensajes li { padding: .7rem 1rem; border-radius: var(--radio-s); margin-bottom: .5rem; border: 1px solid transparent; }
.mensajes .success { background: var(--ok-fondo); color: var(--ok); }
.mensajes .info { background: var(--info-fondo); color: var(--info); }
.mensajes .warning { background: var(--aviso-fondo); color: var(--aviso); }
.mensajes .error { background: var(--error-fondo); color: var(--error); }
.aviso { background: var(--aviso-fondo); color: var(--aviso); padding: .7rem 1rem; border-radius: var(--radio-s); margin-bottom: 1rem; }
.info-caja { background: var(--info-fondo); color: var(--info); padding: .7rem 1rem; border-radius: var(--radio-s); margin-bottom: 1rem; }
.etiqueta {
  display: inline-block; font-size: .74rem; font-weight: 650; padding: .08rem .5rem; border-radius: 999px;
  background: var(--aviso-fondo); color: var(--aviso); vertical-align: middle; white-space: nowrap;
}
.etiqueta.ok { background: var(--ok-fondo); color: var(--ok); }
.etiqueta.error { background: var(--error-fondo); color: var(--error); }
.etiqueta.neutra { background: var(--superficie-2); color: var(--texto-suave); border: 1px solid var(--borde); }
.etiqueta.info { background: var(--info-fondo); color: var(--info); }
.etiqueta.demo { background: var(--demo); color: #fff; }
.etiqueta.numero { background: var(--verde-claro); color: var(--verde); font-variant-numeric: tabular-nums; }

/* Tablas */
.tabla-contenedor { overflow-x: auto; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--borde); vertical-align: middle; }
thead th { font-weight: 600; color: var(--texto-suave); font-size: .78rem; text-transform: none; background: var(--superficie-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--superficie-2) 70%, transparent); }
td a { font-weight: 550; text-decoration: none; }
td a:hover { text-decoration: underline; }
.tarjeta table th, .tarjeta table td { padding: .45rem .3rem; }
/* Columnas redimensionables (afa.js): un asa en el borde derecho de cada cabecera. */
th.redimensionable { position: relative; }
.asa-columna { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 1; touch-action: none; }
.asa-columna:hover, .asa-columna.activa { background: color-mix(in srgb, var(--verde-medio) 45%, transparent); }
table.columnas-fijas { table-layout: fixed; }
table.columnas-fijas td, table.columnas-fijas th { overflow: hidden; text-overflow: ellipsis; }
body.redimensionando { cursor: col-resize; user-select: none; }
.importe { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.negativo { color: var(--error); }

.documento-legal { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.25rem; }
.documento-legal.desplazable { max-height: 22rem; overflow-y: auto; }
.codigos { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; columns: 2; }
.qr { background: #fff; padding: .75rem; border-radius: var(--radio-s); display: inline-block; }
.qr img { display: block; width: 200px; height: 200px; }
details summary { cursor: pointer; font-weight: 600; }
#lector-video { width: 100%; border-radius: var(--radio-s); margin-top: .75rem; }
.pasos { counter-reset: paso; list-style: none; padding: 0; }
.pasos li { counter-increment: paso; position: relative; padding-left: 2.2rem; margin-bottom: .6rem; }
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--verde); color: var(--principal-texto); font-size: .8rem; font-weight: 700;
}
.lista-check { list-style: none; padding: 0; }
.lista-check li { padding-left: 1.6rem; position: relative; margin-bottom: .4rem; }
.lista-check li::before { content: "✓"; position: absolute; left: 0; color: var(--verde-medio); font-weight: 700; }

.pie { margin: 2rem 0 0; font-size: .82rem; color: var(--texto-suave); }
.pie a, .pie button { color: inherit; }
.pie ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }

/* Catálogo de actividades */
.rejilla-actividades { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tarjeta-actividad a { display: block; height: 100%; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--sombra); }
.tarjeta-actividad a:hover { border-color: var(--verde-medio); }
.tarjeta-actividad img, .tarjeta-actividad .sin-imagen { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.tarjeta-actividad .sin-imagen { display: grid; place-items: center; background: var(--verde-claro); color: var(--verde); }
.tarjeta-actividad .sin-imagen .icono { width: 2.5rem; height: 2.5rem; }
.tarjeta-actividad .cuerpo { padding: .75rem 1rem 1rem; }
.tarjeta-actividad h3 { margin: .45rem 0 .2rem; }
.cabecera-imagen { width: 100%; max-height: 16rem; object-fit: cover; border-radius: var(--radio); margin-bottom: 1rem; }
.cifra-pequena { font-size: 1.15rem; font-weight: 700; }
/* Mensajes */
.conversacion { list-style: none; padding: 0; display: grid; gap: .5rem; }
.burbuja { max-width: 85%; padding: .6rem .85rem; border-radius: 14px; background: var(--superficie); border: 1px solid var(--borde); }
.burbuja.mia { margin-left: auto; background: var(--verde-claro); border-color: transparent; }
.burbuja .pequeno { display: block; margin-top: .25rem; }
.lista-tarjetas a.boton, .tarjeta-enlace .boton { color: var(--principal-texto); }
.lista-tarjetas a.boton.secundario { color: var(--texto); }

/* Calendario de días sueltos */
.mes { margin: 0; text-transform: none; }
.calendario { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: .75rem; }
.cal-cabecera { text-align: center; font-size: .75rem; color: var(--texto-suave); font-weight: 600; }
.cal-dia { display: grid; justify-items: center; gap: .1rem; min-height: 3.6rem; padding: .3rem .1rem; border-radius: var(--radio-s);
  background: var(--superficie); border: 1px solid var(--borde); font-size: .9rem; margin: 0; font-weight: 400; }
.cal-dia.nada { background: transparent; border-color: transparent; color: var(--texto-suave); opacity: .5; }
.cal-dia.festivo { background: var(--superficie-2); color: var(--texto-suave); }
.cal-dia.lleno { background: var(--error-fondo); color: var(--error); }
.cal-dia.libre { cursor: pointer; }
.cal-dia.libre:has(input:checked) { border-color: var(--verde-medio); background: var(--verde-claro); }
.cal-dia.reservado { background: var(--verde); color: var(--principal-texto); border-color: var(--verde); }
.cal-dia.reservado .enlace { color: inherit; }
.cal-dia input { margin: 0; }
.marca .logo { width: 2rem; height: 2rem; border-radius: 8px; object-fit: contain; background: #fff; }

/* Selector de idioma: fijo abajo a la derecha en todas las pantallas */
.selector-idioma {
  position: fixed; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 24;
  display: flex; gap: .2rem; padding: .2rem; margin: 0;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 999px; box-shadow: var(--sombra);
}
.d-familia .selector-idioma { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
.selector-idioma button {
  display: grid; place-items: center; padding: .3rem .4rem; border: 0; border-radius: 999px;
  background: none; cursor: pointer; opacity: .55; filter: grayscale(.6);
}
.selector-idioma button:hover { opacity: 1; filter: none; background: var(--superficie-2); }
.selector-idioma button[aria-pressed="true"] { opacity: 1; filter: none; background: var(--verde-claro); cursor: default; }
.selector-idioma img { display: block; width: 1.5rem; height: 1rem; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
@media print { .selector-idioma { display: none; } }

/* Calendario semanal de extraescolares (posiciones en un <style> con nonce: actividades/semana.py) */
.semana { --semana-fila: .45rem; --semana-fila-corta: .1rem; margin-bottom: 1rem; }
.semana-rejilla {
  display: grid; column-gap: 3px; background: var(--superficie); border: 1px solid var(--borde);
  border-radius: var(--radio); padding: .25rem .35rem .6rem 0; box-shadow: var(--sombra);
}
.semana-esquina { grid-column: 1; grid-row: 1; }
.semana-dia { grid-row: 1; text-align: center; font-size: .78rem; font-weight: 650; padding: .35rem 0 .45rem; }
.semana-dia .corto { display: none; }
.semana-hora { grid-column: 1; font-size: .68rem; color: var(--texto-suave); text-align: right; padding-right: .35rem; transform: translateY(-.5em); }
.semana-linea { grid-column: 2 / -1; z-index: 1; border-top: 1px solid color-mix(in srgb, var(--borde) 70%, var(--texto-suave)); opacity: .5; pointer-events: none; }
.semana-franja { z-index: 0; border-radius: 4px; }
.franja-lectivo { background: repeating-linear-gradient(135deg, var(--superficie-2) 0 6px, #eceee6 6px 12px); }
.franja-comedor { background: #fbf1dc; }
.franja-extraescolar { background: color-mix(in srgb, var(--ok) 16%, var(--superficie)); }
.franja-otra { background: #eef1f8; }
.semana-bloque {
  position: relative; z-index: 2; display: flex; align-items: flex-end; min-width: 0; margin: 1px 0;
  overflow: hidden; border-radius: 6px; color: #fff; text-decoration: none; background: var(--verde);
  box-shadow: 0 1px 3px rgba(20, 24, 31, .25);
}
.semana-bloque:hover { filter: brightness(1.08); }
.semana-bloque:focus-visible { outline: 3px solid var(--foco); outline-offset: 1px; }
.semana-bloque img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.semana-texto {
  position: relative; width: 100%; padding: .9rem .3rem .2rem; font-size: .68rem; line-height: 1.15;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}
.sin-foto .semana-texto { background: none; padding-top: .25rem; }
.semana-texto strong, .semana-texto span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.semana-texto .grupo, .semana-texto .horas { opacity: .92; }
.semana-bloque.corto .grupo { display: none; }
.semana-bloque.color-0 { background: #24603c; } .semana-bloque.color-1 { background: #2b4c9a; }
.semana-bloque.color-2 { background: #8a3b12; } .semana-bloque.color-3 { background: #6d28d9; }
.semana-bloque.color-4 { background: #9a2b5b; } .semana-bloque.color-5 { background: #0f6b74; }
.semana-bloque.inscrito { box-shadow: 0 0 0 2px var(--ok), 0 1px 3px rgba(20, 24, 31, .25); }
.semana-marca {
  position: absolute; top: .2rem; right: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 700;
}
.semana-leyenda { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: 0; margin: .6rem 0 0; font-size: .78rem; color: var(--texto-suave); }
.muestra { display: inline-block; width: 1.1rem; height: .75rem; margin-right: .35rem; vertical-align: -.05rem; border-radius: 3px; border: 1px solid var(--borde); }
.muestra.inscrito { background: var(--ok); border-color: var(--ok); color: #fff; font-size: .55rem; line-height: .7rem; text-align: center; }
tr.seleccionada td { background: var(--verde-claro); }
@media (max-width: 40rem) {
  .semana-dia .largo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .semana-dia .corto { display: inline; }
  .semana-texto { font-size: .62rem; padding-left: .2rem; padding-right: .2rem; }
  .semana-texto .grupo { display: none; }
}
.semana-bloque.estrecho .semana-texto {
  writing-mode: vertical-rl; transform: rotate(180deg); align-self: stretch; width: auto;
  padding: .3rem .1rem; background: linear-gradient(to left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .15));
}
.semana-bloque.estrecho { justify-content: flex-start; }
.semana-bloque.estrecho .grupo, .semana-bloque.estrecho .horas { display: none; }

/* ---------- tareas: tablero (kanban) y calendario de la Agenda AFA ---------- */
.texto-error { color: var(--error); }
.kanban-barra { margin-bottom: .75rem; }
.kanban-progreso { display: flex; flex-direction: column; gap: .25rem; min-width: 14rem; }
.kanban-progreso progress { width: 100%; height: .5rem; accent-color: var(--verde-medio); }
.kanban { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; margin-bottom: .75rem; }
@media (min-width: 56rem) { .kanban { grid-template-columns: repeat(3, 1fr); } }
.kanban-columna { background: var(--superficie-2); border: 1px solid var(--borde); border-radius: var(--radio); padding: .75rem; min-height: 8rem; }
.kanban-columna h2 { font-size: .95rem; margin: 0 0 .6rem; display: flex; gap: .4rem; align-items: center; }
.kanban-por_hacer h2::before, .kanban-en_marcha h2::before, .kanban-hecha h2::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; }
.kanban-por_hacer h2::before { background: var(--c-rojo); }
.kanban-en_marcha h2::before { background: var(--c-amarillo); }
.kanban-hecha h2::before { background: var(--c-verde); }
.kanban-columna.soltar { outline: 2px dashed var(--verde-medio); outline-offset: 2px; }
.kanban-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; min-height: 2rem; }
.kanban-tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .6rem .7rem; box-shadow: var(--sombra); cursor: grab; }
.kanban-tarjeta.vencida { border-left: 4px solid var(--error); }
.kanban-tarjeta.arrastrando { opacity: .5; }
.kanban-hecha .kanban-titulo { text-decoration: line-through; color: var(--texto-suave); }
.kanban-titulo { font-weight: 600; color: var(--texto); text-decoration: none; display: block; margin-bottom: .35rem; }
.kanban-cabeza { display: flex; gap: .45rem; align-items: flex-start; }
.kanban-cabeza input { margin-top: .25rem; flex: none; accent-color: var(--verde-medio); }
.kanban-tarjeta.marcada { outline: 2px solid var(--verde-medio); }
.kanban-seleccion { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.kanban-seleccion button[disabled] { opacity: .45; cursor: not-allowed; }
.kanban-datos { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.kanban-quien { margin: .35rem 0 0; display: flex; gap: .3rem; align-items: center; }
.kanban-quien .icono { width: 14px; height: 14px; }
.sin-asignar { color: var(--aviso); }
.kanban-mover { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.kanban-mover .pequeno-boton { min-height: 26px; padding: .15rem .5rem; font-size: .75rem; }
.kanban-vacia { padding: .5rem; text-align: center; }
.kanban-nueva { margin-top: .6rem; }
.kanban-nueva summary { cursor: pointer; font-size: .88rem; color: var(--enlace); display: flex; gap: .3rem; align-items: center; }
.kanban-nueva form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.calendario-barra { justify-content: flex-start; margin-bottom: .75rem; }
.calendario-mes { margin: 0; font-size: 1.1rem; min-width: 10rem; text-align: center; }
.calendario-mensual { table-layout: fixed; }
.calendario-mensual td { vertical-align: top; height: 6.5rem; padding: .3rem; border: 1px solid var(--borde); }
.calendario-mensual td.fuera { background: var(--superficie-2); color: var(--texto-suave); }
.calendario-mensual td.hoy { box-shadow: inset 0 0 0 2px var(--verde-medio); }
.calendario-dia { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .2rem; }
.calendario-tarea, .calendario-evento { display: block; font-size: .75rem; line-height: 1.25; padding: .15rem .3rem; border-radius: 4px; margin-bottom: .15rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.calendario-tarea { background: var(--info-fondo); color: var(--info); }
.calendario-tarea.en_marcha { background: var(--aviso-fondo); color: var(--aviso); }
.calendario-tarea.hecha { background: var(--superficie-2); color: var(--texto-suave); text-decoration: line-through; }
.calendario-tarea.vencida { background: var(--error-fondo); color: var(--error); font-weight: 600; }
.calendario-evento { background: var(--verde-claro); color: var(--verde); display: flex; gap: .2rem; align-items: center; }
.calendario-evento .icono { width: 12px; height: 12px; flex: none; }

/* Tarjetas del inicio de la junta: borde superior con los colores del logo, por turnos. */
.contenido-junta .tarjeta-enlace { border-top: 4px solid var(--c-verde); }
.contenido-junta .tarjeta-enlace:nth-child(3n+1) { border-top-color: var(--c-rojo); }
.contenido-junta .tarjeta-enlace:nth-child(3n+2) { border-top-color: var(--c-amarillo); }

/* Opciones de radio con texto largo (aceptar una solicitud) */
label.opcion { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px solid var(--borde); }
label.opcion:last-child { border-bottom: 0; }
label.opcion input[type="radio"] { margin-top: .25rem; flex: none; }
label.opcion input[type=text] { width: 7rem; display: inline-block; margin-left: .3rem; padding: .3rem .5rem; }
