/* Ajustes propios sobre Tabler */
.rejilla { table-layout: fixed; min-width: 720px; }
.rejilla th { text-align: center; font-weight: 600; color: var(--tblr-secondary); }
.rejilla th.hora { width: 6.5rem; text-align: right; vertical-align: top; }
.rejilla td { vertical-align: top; height: 3.6rem; padding: 0; }
.rejilla td.ocupada { background: #DCE2E9; }   /* azul corporativo al 15 %: se distingue de las tareas no docentes */
.rejilla td.no-docente { background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); }
.sesion { padding: .35rem .5rem; display: flex; flex-wrap: wrap; gap: 0 .5rem; align-items: baseline; font-size: .85rem; line-height: 1.3; }
.sesion + .sesion { border-top: 1px dashed var(--tblr-secondary); }
.sesion strong { flex-basis: 100%; }
.sesion a { color: inherit; }
.sesion .nombre { font-size: .78rem; }
.page-body .rejilla .sesion a { text-decoration: none; }
.page-body .rejilla .sesion a:hover { text-decoration: underline; }

/* Edición del horario */
.rejilla td.hueco { position: relative; padding-bottom: 1.2rem; }
.rejilla td.hueco .sesion[draggable] { cursor: grab; }
.rejilla td.hueco .sesion.arrastrando { opacity: .4; }
.rejilla td.hueco.destino { outline: 2px dashed var(--tblr-primary); outline-offset: -3px; background: #FFFCD6; }
.rejilla td.hueco .sesion { position: relative; padding-right: 1.4rem; }
.rejilla .sesion .editar { position: absolute; top: .25rem; right: .4rem; }
.rejilla .anadir { position: absolute; right: .3rem; bottom: .1rem; font-weight: 700; color: var(--tblr-secondary); opacity: .35; }
.rejilla td.hueco:hover .anadir, .rejilla .anadir:focus { opacity: 1; color: var(--tblr-primary); }
.rejilla .sesion.sustitucion { background: #FFFCD6; }

/* Calendario: festivo en rojo, día no lectivo en gris, inicio en amarillo, exámenes en morado,
   formación en empresa en verde rayado; el resto de fechas y las sesiones, un punto */
.calendario-meses { --hol: #D7443A; --hol-bg: #FDE3E0; --off: #4F6680; --off-bg: #E2E8EF; --exam: #6A4CC0; --exam-bg: #EBE5FB;
  --work: #007A65; --work-bg: #CDEEE7; --mark: #00AE8F; --finde: #EEF1F4; }
.calendario-meses .mes-caja { background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-radius: 4px; overflow: hidden; height: 100%; padding-bottom: .35rem; }
.calendario-meses .mes-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .4rem .6rem; margin-bottom: .3rem; background: #102B44; color: #fff; font-family: Montserrat, sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: .05em; }
.calendario-meses .mes-cabecera small { font-family: Roboto, sans-serif; font-weight: 500; opacity: .8; letter-spacing: 0; }
.calendario-meses table.mes { width: calc(100% - .5rem); margin: 0 .25rem; table-layout: fixed; border-collapse: separate; border-spacing: 2px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.calendario-meses .mes th { text-align: center; color: var(--tblr-secondary); font-weight: 700; font-size: .65rem; font-family: Montserrat, sans-serif; }
.calendario-meses .mes td { position: relative; text-align: center; padding: .14rem 0; border-radius: 4px; border: 1px solid transparent; }
.calendario-meses .mes td a { display: block; color: inherit; text-decoration: none; }
.calendario-meses .mes td.finde { color: var(--tblr-secondary); background: var(--finde); }
.calendario-meses .mes td.festivo { background: var(--hol-bg); color: var(--hol); border-color: var(--hol); font-weight: 700; }
.calendario-meses .mes td.no-lectivo { background: var(--off-bg); color: var(--off); border-color: var(--off); font-weight: 700; }
.calendario-meses .mes td.cat-inicio { background: #FFF33E; color: #102B44; border-color: #102B44; font-weight: 800; }
.calendario-meses .mes td.cat-examen { background: var(--exam-bg); color: var(--exam); border-color: var(--exam); font-weight: 700; }
.calendario-meses .mes td.cat-empresa { background: repeating-linear-gradient(135deg, var(--work-bg) 0 4px, transparent 4px 7px); color: var(--work); font-weight: 700; }
.calendario-meses .mes td.con-punto::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--mark); }
.calendario-meses .mes td.cat-inicio.con-punto::after { background: #102B44; }
.calendario-meses .mes td.fuera { opacity: .38; }
.calendario-meses .mes td.elegido { outline: 2px solid #102B44; }
.calendario-meses .mes td.hoy { box-shadow: inset 0 0 0 2px #102B44; }
/* Leyenda */
.calendario-leyenda { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0 0 .75rem; font-size: .8rem; color: var(--tblr-secondary); }
.calendario-leyenda span { display: inline-flex; align-items: center; gap: .4rem; }
.calendario-leyenda .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--tblr-border-color); position: relative; }
.calendario-leyenda .sw.cat-inicio { background: #FFF33E; border-color: #102B44; }
.calendario-leyenda .sw.festivo { background: #FDE3E0; border-color: #D7443A; }
.calendario-leyenda .sw.no-lectivo { background: #E2E8EF; border-color: #4F6680; }
.calendario-leyenda .sw.cat-examen { background: #EBE5FB; border-color: #6A4CC0; }
.calendario-leyenda .sw.cat-empresa { background: repeating-linear-gradient(135deg, #CDEEE7 0 4px, #fff 4px 7px); border-color: #007A65; }
.calendario-leyenda .sw.con-punto { background: #fff; }
.calendario-leyenda .sw.con-punto::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #00AE8F; }
/* Fechas clave */
.fechas-clave .fecha-clave { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; padding: .4rem .75rem .4rem 0; border-top: 1px solid var(--tblr-border-color); font-size: .85rem; }
.fechas-clave .fecha-clave > span { display: grid; grid-template-columns: .55rem 1fr; gap: .45rem; align-items: baseline; }
.fechas-clave .fecha-clave strong { font-family: Montserrat, sans-serif; font-size: .8rem; color: #102B44; }
.fechas-clave .punto-cat { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #00AE8F; }
.fechas-clave .punto-cat.cat-inicio { background: #FFF33E; box-shadow: 0 0 0 1px #102B44; }
.fechas-clave .punto-cat.cat-examen { background: #6A4CC0; }
.fechas-clave .punto-cat.cat-empresa { background: #007A65; }
.fechas-clave .festivos-linea { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--tblr-border-color); font-size: .8rem; }
.fechas-clave .festivo-tramo.es-festivo { color: #D7443A; }
/* Leyendas antiguas de los editores (mismos colores) */
.leyenda .festivo { background: #FDE3E0; color: #D7443A; box-shadow: inset 0 0 0 1px #D7443A; }
.leyenda .no-lectivo { background: #E2E8EF; color: #4F6680; box-shadow: inset 0 0 0 1px #4F6680; }
.leyenda .hito { background: #FFF33E; color: #102B44; font-weight: 700; }
.calendario-meses .mes td.hito:not([class*="cat-"]):not(.con-punto):not(.festivo):not(.no-lectivo):not(.finde) { background: #FFF33E; color: #102B44; font-weight: 700; }
.leyenda span { display: inline-block; padding: .05rem .5rem; border-radius: 4px; margin-right: .5rem; }
.lista-dias { max-height: 22rem; overflow: auto; }
.grupos-check { max-height: 16rem; overflow: auto; border: 1px solid var(--tblr-border-color); border-radius: 4px; padding: .5rem; }
.grupos-check .form-check-inline { min-width: 5.5rem; }
.hitos select { min-width: 12rem; }

/* Planificador de sesiones de evaluación */
.rejilla-ev { table-layout: fixed; min-width: 640px; }
.rejilla-ev th { text-align: center; font-size: .75rem; color: var(--tblr-secondary); font-weight: 600; }
.rejilla-ev th.hora { width: 5.5rem; text-align: left; white-space: nowrap; }
.rejilla-ev td.casilla { vertical-align: top; min-height: 2.6rem; height: 2.6rem; padding: .25rem; }
.planificador.armado td.casilla, .planificador.armado #bandeja { cursor: pointer; }
.planificador.armado td.casilla:hover { background: #FFFCD6; }
td.casilla.destino, #bandeja.destino { outline: 2px dashed var(--tblr-primary); outline-offset: -3px; background: #FFFCD6; }
.pieza { display: inline-block; margin: 2px; padding: .1rem .45rem; border-radius: 4px; background: #DCE2E9; color: #102B44; font-weight: 600; font-size: .82rem; cursor: grab; user-select: none; }
.pieza small { font-weight: 400; color: var(--tblr-secondary); }
.pieza.aviso { background: #FDE8D7; }
.pieza.elegida { outline: 2px solid #102B44; background: #FFF33E; }
.pieza.arrastrando { opacity: .4; }
.bandeja .pieza { background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color); }
.rejilla-ev thead th { white-space: normal; word-break: break-word; line-height: 1.15; vertical-align: bottom; }
.departamentos .list-group-item.active { background: #102B44; border-color: #102B44; color: #fff; }

/* Acta de tutoría (pantalla e impresión) */
.acta { max-width: 52rem; }
.acta-cabecera { display: flex; align-items: center; gap: 1.5rem; border-bottom: 3px solid #FFF33E; padding-bottom: 1rem; margin-bottom: 1rem; }
.acta-cabecera img { height: 3.2rem; }
.acta-titulo { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 1.25rem; color: #102B44; }
.acta-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.acta-datos span { display: block; font-size: .72rem; color: var(--tblr-secondary); text-transform: uppercase; letter-spacing: .03em; }
.acta-bloque { margin-bottom: 1.1rem; }
.acta-bloque h3 { font-size: .85rem; color: #102B44; border-bottom: 1px solid var(--tblr-border-color); padding-bottom: .2rem; margin-bottom: .4rem; }
.acta-bloque div { white-space: normal; min-height: 1.5rem; }
.acta-firma { margin-top: 3rem; display: flex; justify-content: flex-end; }
.acta-firma div { border-top: 1px solid #102B44; padding-top: .3rem; min-width: 14rem; text-align: center; font-size: .85rem; }
@media print {
  header.navbar, .d-print-none, .page-header, .alert { display: none !important; }
  body, .page, .page-wrapper, .page-body { background: #fff !important; }
  .acta { border: 0; box-shadow: none; max-width: none; }
  .acta .card-body { padding: 0; }
}
.page-body .departamentos a { text-decoration: none; }
.ver-como { background: #FFF33E; color: #102B44; border-color: #e6da2c; }

/* Notas */
.notas input.nota { width: 3.5rem; margin: 0 auto; text-align: center; font-weight: 600; text-transform: uppercase; }
.notas input.nota.suspenso { color: #b42318; }
.notas input.nota.nv { color: var(--tblr-secondary); background: var(--tblr-bg-surface-secondary); }
td.casilla.vedada { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(16,43,68,.06) 6px 12px); cursor: not-allowed !important; }
.acta-contenido { white-space: normal; min-height: 12rem; }
.asistencia td { padding-top: .25rem; padding-bottom: .25rem; }
.acta-md p { margin-bottom: .6rem; }
.acta-md strong { color: #102B44; }
.acta-md ul, .acta-md ol { margin-bottom: .6rem; }
.acta-md h1, .acta-md h2, .acta-md h3 { font-size: 1rem; margin: 1rem 0 .4rem; color: #102B44; }
.acta-md blockquote { border-left: 3px solid #102B44; padding: .3rem .8rem; background: var(--tblr-bg-surface-secondary); }

/* NEAE: categorías plegables en la ficha */
details.clasificacion { border-bottom: 1px solid var(--tblr-border-color); }
details.clasificacion > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; }
details.clasificacion > summary::before { content: '▸'; margin-right: .5rem; color: var(--tblr-secondary); }
details.clasificacion[open] > summary::before { content: '▾'; }

/* Tutoría: notas del grupo en matriz */
.matriz-notas { width: 100%; }
.matriz-notas table { width: 100%; }
.matriz-notas th, .matriz-notas td { padding: .3rem .4rem; font-size: .9rem; }
.matriz-notas thead th { text-transform: none; letter-spacing: 0; vertical-align: middle; }
.matriz-notas .nm-sigla { background: #dbeafe; color: #102B44; font-weight: 700; font-size: .8rem; white-space: nowrap; cursor: help; min-width: 3.2rem; }
.matriz-notas .nm-otro.nm-sigla { background: #fde4c8; }
.matriz-notas td { white-space: nowrap; }
.matriz-notas .nm-vertical { font-size: .7rem; }
.matriz-notas td { font-weight: 600; }
.matriz-notas .nm-alumno { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 17rem; }
.matriz-notas .nm-suspenso { color: #d63939; }
.matriz-notas .nm-especial { background: #fde4c8; color: #1d4ed8; }
.matriz-notas .nm-superado { color: var(--tblr-secondary); font-weight: 400; }
.matriz-notas .nm-nv { color: var(--tblr-secondary); font-weight: 400; }
.matriz-notas .nm-vacia { background: #eef1f4; }
.matriz-notas .nm-fila-baja td { color: var(--tblr-secondary); font-weight: 400; background: var(--tblr-bg-surface-secondary); }
.matriz-notas .nm-fila-baja a { color: var(--tblr-secondary); text-decoration: line-through; }
.matriz-notas .nm-resumen { border-left: 3px solid var(--tblr-border-color) !important; border-right: 3px solid var(--tblr-border-color) !important; font-size: .75rem; white-space: nowrap; cursor: help; }
.matriz-notas td.nm-resumen { font-size: .9rem; font-weight: 700; }
.matriz-notas .nm-todo { background: #dbeafe; color: #1d4ed8; }
.matriz-notas tfoot th, .matriz-notas tfoot td { font-weight: 400; background: var(--tblr-bg-surface-secondary); white-space: nowrap; }
.nm-leyenda { columns: 3 18rem; column-gap: 1.5rem; font-size: .75rem; line-height: 1.35; }
.nm-leyenda div { break-inside: avoid; }
@page apaisada { size: A4 landscape; margin: 8mm; }
@media print {
  body:has(.nm-pagina) { page: apaisada; }
  .page, .page-wrapper, .page-body { min-height: 0 !important; }
  .page-body { margin: 0 !important; }
  .matriz-notas, .matriz-notas .table-responsive { overflow: visible !important; border: 0; box-shadow: none; max-width: none !important; }
  .nm-pagina .card { margin: 0; }
  .matriz-notas tfoot { display: table-row-group; }
  .matriz-notas th, .matriz-notas td { font-size: 9pt; padding: 0 4px; line-height: 1.3; }
  .matriz-notas .nm-sigla { font-size: 8pt; }
  .matriz-notas a { color: inherit; text-decoration: none; }
  .matriz-notas .nm-sigla, .matriz-notas .nm-especial, .matriz-notas .nm-todo, .matriz-notas .nm-vacia, .matriz-notas .nm-fila-baja td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nm-leyenda { font-size: 7pt; columns: 3; line-height: 1.2; margin-top: 2mm !important; }
  .matriz-notas .nm-alumno { max-width: 60mm; }
}

/* Profesorado: clases sin profesor ya gestionadas */
tr.clase-resuelta td:not(:last-child) { opacity: .45; }
tr.clase-resuelta td:first-child { text-decoration: line-through; }

/* Cuaderno: diario y calendario de sesiones */
.diario-texto { white-space: pre-line; }
.diario-tabla td { font-size: .875rem; }
.diario-tabla td:nth-child(4), .diario-tabla td:nth-child(5) { min-width: 16rem; }
.diario-hoy td { background: rgba(var(--tblr-primary-rgb), .05); }
.diario-no_impartida td { color: var(--tblr-secondary); }
.cuaderno-cal { table-layout: fixed; }
.cuaderno-cal th { text-align: center; }
.cuaderno-cal td { height: 6.5rem; vertical-align: top; padding: .35rem; border-right: 1px solid var(--tblr-border-color); }
.cuaderno-cal td:last-child { border-right: 0; }
.cuaderno-cal .cal-num { font-size: .75rem; color: var(--tblr-secondary); text-align: right; }
.cuaderno-cal .cal-fuera { background: var(--tblr-bg-surface-secondary); }
.cuaderno-cal .cal-fuera .cal-num { opacity: .5; }
.cuaderno-cal .cal-hoy .cal-num { color: var(--tblr-primary); font-weight: 700; }
.cal-sesion, .cal-sesion * { text-decoration: none !important; }
.cal-sesion { display: block; border-radius: 4px; padding: .25rem .4rem; font-size: .75rem; line-height: 1.25; text-decoration: none; margin-top: .15rem; }
.cal-sesion:hover { text-decoration: none; filter: brightness(.95); }
.cal-horas { font-weight: 700; margin-right: .25rem; }
.cal-icono { margin-right: .25rem; }
.cal-ud { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Estados del diario: los mismos colores en el calendario, en la lista y en las leyendas */
.cal-impartida, .cal-muestra.cal-impartida, .diario-lista tr.fila-impartida td.estado { background: #dcf1e1; color: #1b5e2b; }
.cal-no_impartida, .cal-muestra.cal-no_impartida, .diario-lista tr.fila-no_impartida td.estado { background: #fbe1e1; color: #8a1c1c; }
/* Pasada y sin registrar: falta pasar lista o marcarla (una tarea, no un fallo) */
.cal-pendiente, .cal-muestra.cal-pendiente, .diario-lista tr.fila-pendiente td.estado { background: #fdefd3; color: #7a4a00; }
.cal-sinlista { font-size: .68rem; font-weight: 600; opacity: .8; margin-left: .15rem; }
.cal-sin_programar, .cal-muestra.cal-sin_programar { background: #fff; color: #12263a; outline: 1px dashed #7d95ad; outline-offset: -1px; }
/* Lo futuro, en blanco: con texto si está programado, punteado si falta programarlo */
.cal-futura, .cal-muestra.cal-futura, .cal-programada, .cal-muestra.cal-programada { background: #fff; color: #12263a; box-shadow: inset 0 0 0 1px var(--tblr-border-color); }
.cal-futura .cal-ud, .cal-sin_programar .cal-ud { color: var(--tblr-secondary); }
.cal-accion { font-weight: 600; }
.diario-lista .cal-hoy-marca { float: none; }
/* Lista del diario: la fila entera, como en la hoja de cálculo */
.diario-lista tbody tr[data-href] { cursor: pointer; }
.diario-lista td:nth-child(2) a { text-decoration: none; }
.diario-lista tbody tr[data-href]:hover td { filter: brightness(.97); }
.diario-lista td.estado { width: 1%; white-space: nowrap; text-align: center; font-weight: 600; padding-left: .9rem; padding-right: .9rem; }
.diario-lista tr.fila-programada td.estado { font-weight: 400; color: var(--tblr-secondary); }
.diario-lista tr.fila-sin_programar td.estado { outline: 1px dashed #7d95ad; outline-offset: -4px; }
.diario-lista td.estado a { color: inherit; }
.diario-lista tr.fila-futura td.estado { color: var(--tblr-secondary); font-weight: 400; }
.diario-lista tr.fila-hoy td:first-child { box-shadow: inset 4px 0 0 #f5c400; }
.cal-fuerahorario { outline: 2px dashed var(--tblr-warning); }
.cal-muestra { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; }
@media print {
  .diario-tabla td:nth-child(4), .diario-tabla td:nth-child(5) { min-width: 0; }
  .diario .table-responsive { overflow: visible; }
}

/* Pasar lista */
.lista-fila { transition: background-color .15s; }
.lista-fila.lista-nj { background: rgba(214, 57, 57, .08); }
.lista-fila.lista-j { background: rgba(247, 103, 7, .08); }
.lista-fila.lista-huelga { background: rgba(var(--tblr-secondary-rgb), .08); }
.lista-tipos .btn { min-width: 4.5rem; }
.btn-check:checked + .lista-presente-btn { background: var(--tblr-green); border-color: var(--tblr-green); color: #fff; }
.btn-check:checked + .lista-nj-btn { background: var(--tblr-red); border-color: var(--tblr-red); color: #fff; }
.btn-check:checked + .lista-j-btn { background: var(--tblr-orange); border-color: var(--tblr-orange); color: #fff; }
.btn-check:checked + .lista-huelga-btn { background: var(--tblr-secondary); border-color: var(--tblr-secondary); color: #fff; }
@media (max-width: 576px) { .lista-tipos .btn { min-width: 0; padding-left: .5rem; padding-right: .5rem; } }

/* Calendario del diario: el día de hoy y el menú del botón derecho */
.cuaderno-cal td.cal-hoy { box-shadow: inset 0 3px 0 #f5c400; }
.cal-hoy-marca { float: left; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #f5c400; color: #12263a; border-radius: 3px; padding: 0 .3rem; }
.cal-menu { z-index: 1080; min-width: 14rem; }

/* Copia de pruebas: franja naranja y «Enviar comentario» */
.entorno-pruebas { background: #f76707; color: #fff; padding: .35rem 0; font-size: .875rem; position: relative; z-index: 1030; }
.entorno-comentario { position: relative; }
.entorno-comentario summary { list-style: none; background: #fff; color: #12263a; }
.entorno-comentario summary::-webkit-details-marker { display: none; }
.entorno-form { position: absolute; right: 0; top: 2.4rem; width: min(24rem, 90vw); background: #fff; color: #12263a; padding: .9rem; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }

/* Lista de módulos: limpia, el nombre como enlace discreto */
.modulo-enlace { text-decoration: none !important; }
.modulo-enlace:hover { text-decoration: underline; color: var(--tblr-primary) !important; }
.modulos-curso th { background: var(--tblr-bg-surface-secondary); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-secondary); padding-top: .4rem; padding-bottom: .4rem; }
/* Propuestas de calendario: días que cambian entre una opción y otra */
.calendario-meses .mes td.difiere, .leyenda .difiere { box-shadow: inset 0 0 0 2px #E8590C; }
.propuestas-tabla th.perfil { background: var(--tblr-bg-surface-secondary); }
.propuestas-tabla td.distinto { background: #FFF4E6; font-weight: 600; }
.propuestas-tabla td.ref, .propuestas-tabla th.ref { color: var(--tblr-secondary); border-left: 2px solid var(--tblr-border-color); }
/* Marcar días arrastrando */
.pintando .calendario-meses td[data-fecha] { cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.pintando .calendario-meses td[data-fecha]:hover { outline: 2px solid #E8590C; }
.calendario-meses td.seleccionando { outline: 2px solid #E8590C; background: #FFE8CC; color: #102B44; }
.pintar-barra { position: sticky; top: .5rem; z-index: 5; }
.pintar-nombre { width: 13rem; max-width: 100%; }
.pintar-punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.pintar-punto.festivo { background: #D7443A; }
.pintar-punto.no-lectivo { background: #4F6680; }
.btn-check:checked + .pintar-quitar { background: var(--tblr-danger-lt); }
.btn-check:checked + .pintar-hol { background: #D7443A; color: #fff; border-color: #D7443A; }
.btn-check:checked + .pintar-off { background: #4F6680; color: #fff; border-color: #4F6680; }
.btn-check:checked + .pintar-hol .pintar-punto, .btn-check:checked + .pintar-off .pintar-punto { background: #fff; }
/* Contador de días lectivos de una propuesta */
.contador-dias { display: flex; align-items: center; gap: .5rem; padding: .15rem .75rem; border-radius: 6px; background: var(--tblr-bg-surface-secondary); }
.contador-dias .contador-numero { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.contador-dias .contador-texto { font-size: .75rem; line-height: 1.15; color: var(--tblr-secondary); }
.contador-dias.cumple { background: #EBFBEE; }
.contador-dias.cumple .contador-numero { color: #2B8A3E; }
.contador-dias.no-cumple { background: #FFF5F5; }
.contador-dias.no-cumple .contador-numero { color: #C92A2A; }
.propuestas-tabla td.cumple { color: #2B8A3E; }
.propuestas-tabla td.no-cumple { color: #C92A2A; background: #FFF5F5; }
/* Selección en las listas laterales: el mismo azul oscuro que los menús */
.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { background: #102B44; border-color: #102B44; color: #fff; box-shadow: none; }
.list-group-item.active::before { display: none; }
.list-group-item.active .badge { background: #fff !important; color: #102B44 !important; }
.list-group-item.active .text-secondary { color: rgba(255, 255, 255, .75) !important; }
/* Módulos: horas, grado y mis módulos */
.horas-pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: #E7EEF6; color: #102B44; font-weight: 600; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grado-pill { display: inline-flex; white-space: nowrap; flex-shrink: 0; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 6px; font-weight: 700; font-size: .8rem; color: #fff; }
.grado-pill.grado-d { background: #102B44; }
.grado-pill.grado-c { background: #2F7D6D; }
.grado-pill.grado-e { background: #7048A8; }
.grado-titulo { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 .5rem; font-weight: 600; color: var(--tblr-secondary); }
.modulo-tarjeta { border-left: 4px solid #FFF33E; }
.modulo-tarjeta .modulo-grupo { font-weight: 600; }
tr.modulo-mio td:first-child { box-shadow: inset 3px 0 0 #FFF33E; }
.badge-tuyo { background: #FFF33E; color: #102B44; }
/* Editor visual de las actas (Toast UI): mismos colores y letra que el resto */
.editor-acta .toastui-editor-defaultUI { border-color: var(--tblr-border-color); border-radius: var(--tblr-border-radius); }
.editor-acta .toastui-editor-contents { font-family: inherit; font-size: .9rem; }
.editor-acta .toastui-editor-contents h1, .editor-acta .toastui-editor-contents h2, .editor-acta .toastui-editor-contents h3 { color: #102B44; border-bottom: 0; }
.editor-acta .toastui-editor-mode-switch .tab-item.active { color: #102B44; }

/* Profesorado: estado de cada profesor (Lanean · Ez lanean · Zentrotik kanpo) */
.estado-lanean { background: #E3F4EA; color: #1C6B3A; }
.estado-ez-lanean { background: #FDEBD8; color: #9A4A07; }
.estado-kanpo { background: #ECEEF1; color: #5B6573; }
.estado-botones .btn { min-width: 9rem; }
.estado-botones .estado-actual { font-weight: 600; cursor: default; }
.estado-botones .estado-actual.estado-lanean { background: #1C6B3A; border-color: #1C6B3A; color: #fff; }
.estado-botones .estado-actual.estado-ez-lanean { background: #B85A0B; border-color: #B85A0B; color: #fff; }
.estado-botones .estado-actual.estado-kanpo { background: #5B6573; border-color: #5B6573; color: #fff; }
.estado-botones .btn.active { background: #102B44; border-color: #102B44; color: #fff; }
.cambio-estado { border-top: 1px solid var(--tblr-border-color); padding-top: 1rem; }
#tabla-profesorado tbody tr.fila-enlace { cursor: pointer; }
#tabla-profesorado tbody tr.fila-enlace:hover { background: #F3F6FA; }

/* Fechas de los grupos: un color por perfil de calendario */
.grupo-fecha { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 600; text-decoration: none; margin: 0 .1rem .15rem 0; background: var(--perfil-fondo); color: var(--perfil-texto); border: 1px solid var(--perfil-borde); }
a.grupo-fecha:hover { text-decoration: underline; }
.perfil-0 { --perfil-fondo: #E7EEF6; --perfil-texto: #102B44; --perfil-borde: #2F6DB5; }
.perfil-1 { --perfil-fondo: #E3F4EA; --perfil-texto: #1C6B3A; --perfil-borde: #2F9E5B; }
.perfil-2 { --perfil-fondo: #F3E8FA; --perfil-texto: #5E2A84; --perfil-borde: #8E4EC6; }
.perfil-3 { --perfil-fondo: #FDEBD8; --perfil-texto: #8A4206; --perfil-borde: #D9730D; }
.perfil-4 { --perfil-fondo: #E0F4F6; --perfil-texto: #0E5E68; --perfil-borde: #1597A6; }
.perfil-5 { --perfil-fondo: #FBE4EA; --perfil-texto: #8C1D3E; --perfil-borde: #D6336C; }
.perfil-6 { --perfil-fondo: #EEF0D9; --perfil-texto: #535C12; --perfil-borde: #8A9A1F; }
.perfil-7 { --perfil-fondo: #ECEEF1; --perfil-texto: #3E4652; --perfil-borde: #6B7686; }
.perfil-8 { --perfil-fondo: #FFF4CC; --perfil-texto: #6B5200; --perfil-borde: #C9A200; }
.perfil-9 { --perfil-fondo: #E6E9FB; --perfil-texto: #2C3592; --perfil-borde: #4C5AD6; }



.grupos-fecha summary { cursor: pointer; list-style: none; }
.grupos-fecha summary::-webkit-details-marker { display: none; }
.grupos-fecha[open] summary { margin-bottom: .25rem; }
.proximas-fechas .fecha-cuando { min-width: 13rem; }

.lista-fechas .pasada, .semana-fechas .pasada { opacity: .55; }
.semana-actual { border-color: #102B44; box-shadow: 0 0 0 1px #102B44; }
.semana-pasada { opacity: .7; }
.punto-perfil { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; background: var(--perfil-borde); vertical-align: baseline; }
.calendarios-pestanas .nav-link.active .punto-perfil { box-shadow: 0 0 0 2px #fff; }
tr:target > td { background: #FFF9C4; }

/* Ficha del módulo */
.ficha-datos dt { font-weight: 600; color: var(--tblr-secondary); }
.ficha-datos dd { margin-bottom: .35rem; }
.objetivos-ciclo li { margin-bottom: .35rem; }
.objetivos-ciclo li::marker { font-weight: 700; color: #102B44; }
.contenido-bloque + .contenido-bloque { border-top: 1px solid var(--tblr-border-color); padding-top: 1rem; }
.ficha-indice .nav-link { padding: .25rem .6rem; font-size: .875rem; }
:target { scroll-margin-top: 1rem; }
/* RA y CE en la ficha del módulo: como los bloques de contenidos */
.ra-bloque { font-family: var(--tblr-font-sans-serif); font-weight: 600; font-size: .95rem; line-height: 1.45; }
.ra-bloque .badge { font-family: "Montserrat", var(--tblr-font-sans-serif); }
.ce-lista { list-style: none; padding-left: 0; font-size: .875rem; }
.ce-lista li { padding: .15rem 0 .15rem 1.6rem; text-indent: -1.6rem; }
.ce-lista .ce-letra { display: inline-block; width: 1.6rem; text-indent: 0; font-weight: 700; color: #102B44; }
/* Cabecera: que quepa todo en una línea también en euskera */
.navbar .marca, .navbar .marca-app, .navbar .nav-link { white-space: nowrap; }
@media (min-width: 1200px) {
  .navbar .navbar-nav .nav-link { padding-left: .55rem; padding-right: .55rem; }
  .navbar .marca { margin-right: 1rem !important; }
}
/* Calendario de un grupo impreso: una hoja A4 con la cabecera de Tartanga */
.calendario-impreso-cabecera { display: none; }
@media print {
  @page { size: A4 portrait; margin: 9mm; }
  .calendario-impreso-cabecera { display: flex; align-items: center; gap: 1rem; padding-bottom: .4rem; margin-bottom: .6rem; border-bottom: 3px solid #FFF33E; }
  .calendario-impreso-cabecera img { height: 34px; }
  .calendario-impreso-cabecera .titulo { font: 700 15px Montserrat, sans-serif; color: #102B44; padding-left: 1rem; border-left: 1px solid #D8DEE6; }
  .calendario-impreso-cabecera .titulo span { background: #FFF33E; padding: 0 .25em; }
  body:has(.calendario-perfil) .page-header { display: block !important; margin-bottom: .4rem !important; }
  body:has(.calendario-perfil) .page-header .page-title { font-size: 16px; }
  body:has(.calendario-perfil) .page-header .text-secondary { font-size: 9px; }
  .calendario-perfil .calendario-leyenda { font-size: 8px; gap: 2px 10px; margin-bottom: 4px; }
  .calendario-perfil .calendario-leyenda .sw { width: 10px; height: 10px; }
  .calendario-perfil .calendario-meses { --bs-gutter-x: 5px; --bs-gutter-y: 5px; }
  .calendario-perfil .calendario-meses > .col { flex: 0 0 20% !important; max-width: 20% !important; }
  .calendario-perfil .mes-caja { break-inside: avoid; padding-bottom: 2px; }
  .calendario-perfil .mes-cabecera { font-size: 8px; padding: 3px 5px; margin-bottom: 2px; }
  .calendario-perfil table.mes { font-size: 7.5px; border-spacing: 1px; }
  .calendario-perfil .mes th { font-size: 6.5px; }
  .calendario-perfil .mes td { padding: 1px 0; }
  .calendario-perfil .mes td.con-punto::after { width: 3px; height: 3px; margin-left: -1.5px; bottom: 0; }
  .calendario-perfil .mes td.hoy { box-shadow: none; }
  .calendario-perfil .fechas-clave { margin-top: 8px !important; border-top: 3px solid #00AE8F; break-inside: avoid; }
  .calendario-perfil .fechas-clave .card-header { padding: 4px 8px; min-height: 0; }
  .calendario-perfil .fechas-clave .card-title { font-size: 11px; }
  .calendario-perfil .fechas-clave .card-body { padding: 4px 8px; }
  .calendario-perfil .fechas-clave .row > .col { flex: 0 0 33.333% !important; max-width: 33.333% !important; }
  .calendario-perfil .fecha-clave { font-size: 8px; grid-template-columns: 4.5rem 1fr; padding: 2px 6px 2px 0; }
  .calendario-perfil .fecha-clave strong { font-size: 8px; }
  .calendario-perfil .festivos-linea { font-size: 7.5px; margin-top: 4px; padding-top: 3px; }
  .calendario-meses .mes td, .calendario-leyenda .sw, .fechas-clave .punto-cat { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .calendario-meses .mes-cabecera { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Marcas NEAE: ocultas hasta pulsar el ojo (con el proyector el alumnado las vería) */
.neae-marca { display: none !important; }
body.ver-apoyo .neae-marca { display: inline-block !important; }
.neae-ojo-cerrado { display: none; }
body.ver-apoyo .neae-ojo-abierto { display: none; }
body.ver-apoyo .neae-ojo-cerrado { display: inline-block; }
body.ver-apoyo .neae-ojo { background: var(--tblr-purple-lt, #f1e6fb); }

/* Retraso al pasar lista */
.lista-fila.lista-retraso { background: rgba(247, 103, 7, .06); }
.btn-check:checked + .lista-retraso-btn { background: var(--tblr-yellow); border-color: var(--tblr-yellow); color: #12263a; }

/* Mi semana: la clase de ahora o la siguiente */
.hoy-destacada { border-width: 2px; }

/* Diario: la sesión en un panel a la derecha */
.sesion-lateral { --tblr-offcanvas-width: min(38rem, 100vw); }
.sesion-lateral.ancho { --tblr-offcanvas-width: min(48rem, 100vw); }
.sesion-lateral { transition: transform .3s ease-in-out, width .2s; }
.sesion-lateral .lista-form .card-footer { position: sticky; bottom: -1rem; z-index: 2; background: var(--tblr-bg-surface); }

/* Acta de la sesión de evaluación */
.acta-ev-equipo { columns: 2 14rem; }
.acta-ev-equipo .form-check { break-inside: avoid; }
.acta-ev-casos-ver { padding-left: 1.1rem; margin: 0; }
.acta-ev-casos-ver li { margin-bottom: .35rem; }
.acta-ev-tabla td { height: 2.1rem; }
.acta-ev-pie { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; }
@media print {
  .acta-ev-hoja-anexo { break-before: page; }
  .acta-ev-anexo { border: 0; box-shadow: none; }
  .acta-ev-anexo .text-green, .acta-ev-anexo .text-red { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .acta-ev-tabla { break-inside: avoid; }
}

/* Jefatura → Autoevaluaciones */
.autoev-ok { color: #2fb344; font-weight: 700; }
.autoev-ko { color: #d63939; font-weight: 700; }
.autoev-fila { cursor: pointer; }
.autoev-fila:hover td, .autoev-fila:focus td { background: var(--tblr-bg-surface-secondary); }
.autoev-ko-fila td:first-child { box-shadow: inset 3px 0 0 #d63939; }
.autoev-nc-fila > summary { cursor: pointer; list-style: none; }
.autoev-nc-fila > summary::-webkit-details-marker { display: none; }
.autoev-seguimiento > summary { cursor: pointer; list-style: none; }
.autoev-faltan { position: absolute; right: 1rem; z-index: 5; max-height: 20rem; overflow: auto; min-width: 20rem; }
.autoev-seguimiento { position: relative; }
.autoev-nc-lista { max-height: 26rem; overflow-y: auto; }
.autoev-barra { height: .8rem; background: #102B44; border-radius: 2px; min-width: 2px; }
.autoev-dep { cursor: pointer; }

/* Acta de homogeneización */
.homog-reglas td:first-child { min-width: 16rem; }
.homog-reglas .homog-cambia { font-weight: 600; color: var(--tblr-orange); }
.homog-frases { padding-left: 1.1rem; }
.homog-frases li { margin-bottom: .35rem; }
.homog-num { max-width: 7rem; }
.homog-form td { vertical-align: middle; }
.homog-form .form-select-sm { min-width: 11rem; }
.homog-reglas .homog-grupo td { background: var(--tblr-bg-surface-secondary); font-weight: 600; font-size: .8rem; padding-top: .6rem; }
.homog-competencias input[name$="[nombre]"] { max-width: 16rem; }
.homog-cambios div + div { margin-top: .25rem; }
.homog-fija { table-layout: fixed; min-width: 44rem; }
.homog-fija .homog-col-regla { width: 30%; }
.homog-fija .form-select-sm { min-width: 0; }

/* Calendarios de cada perfil, por grado */
.calendarios-grado { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; padding: .35rem 0; border-bottom: 1px solid var(--tblr-border-color); }
.calendarios-grado:last-child { border-bottom: 0; }
.calendarios-grado-titulo { flex: 0 0 15rem; font-size: .8rem; font-weight: 600; color: var(--tblr-secondary); }
@media (max-width: 767px) { .calendarios-grado-titulo { flex-basis: 100%; } }

/* Calendario público: por áreas y ciclos, para alumnado y familias */
.calendario-areas-enlaces { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .85rem; }
.calendario-sin-clase { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .9rem; }
.calendario-sin-clase .es-festivo strong { color: var(--tblr-red); }
.calendario-ciclo { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.calendario-ciclo-nombre { flex: 1 1 18rem; }
.calendario-ciclo-cursos { display: flex; flex-wrap: wrap; gap: .4rem; }
.calendario-resumen li { margin-bottom: .35rem; }
.calendario-resumen strong { white-space: nowrap; }

/* Ayuda de cada pantalla */
.ayuda-boton { width: 1.9rem; height: 1.9rem; padding: 0; border-radius: 50%; font-weight: 700; border: 1px solid var(--tblr-border-color); }
.ayuda-panel { max-width: 26rem; }
.ayuda-intro { font-size: .95rem; }
.ayuda-puntos { padding-left: 1.1rem; }
.ayuda-puntos li { margin-bottom: .6rem; line-height: 1.45; }
@media print { .ayuda-boton, .ayuda-panel { display: none !important; } }

/* Buscador de pantallas */
.buscador-boton { display: inline-flex; align-items: center; border: 1px solid var(--tblr-border-color); }
.buscador-boton kbd { font-size: .65rem; padding: .05rem .3rem; background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); border: 1px solid var(--tblr-border-color); box-shadow: none; }
.buscador .modal-dialog { margin-top: 8vh; }
.buscador-item.active, .buscador-item.active .text-secondary { background: var(--tblr-primary); color: #fff !important; }
@media print { .buscador-boton { display: none !important; } }

/* Programación: calificación de los RA */
.prog-calif .prog-ra { min-width: 16rem; max-width: 26rem; }
.prog-calif .prog-aula { min-width: 2.6rem; justify-content: center; }

/* Documento de la programación */
.prog-doc .prog-doc-cabecera th { width: 22%; font-weight: 500; color: var(--tblr-secondary); font-size: .8rem; }
.prog-doc-h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 2px solid #102B44; padding-bottom: .25rem; margin: 1.6rem 0 .8rem; }
.prog-doc-n { display: inline-block; min-width: 1.6rem; }
.prog-doc-h3 { font-size: .92rem; margin: 1rem 0 .5rem; }
.prog-doc-ra { margin-bottom: .6rem; }
.prog-doc-ce { font-size: .85rem; margin: .2rem 0 0; }
.prog-doc-lista li { margin-bottom: .3rem; }
.prog-doc-tabla { font-size: .85rem; }
.prog-doc-temp td:first-child { min-width: 14rem; }
.prog-doc-falta { font-style: italic; }
.prog-doc-objetivos { list-style: none; padding-left: 0; }
.prog-doc-objetivos li { padding-left: 1.8rem; text-indent: -1.8rem; }
.prog-doc-num { display: inline-block; min-width: 1.8rem; text-indent: 0; font-weight: 600; }
.prog-doc-temp td:not(:first-child) { color: #102B44; }
.prog-doc-total th { border-top: 2px solid #102B44; }
.prog-doc-comprobacion { font-size: .8rem; color: var(--tblr-secondary); margin: -.5rem 0 0; }
.prog-doc-comprobacion.falta { color: var(--tblr-orange); }
/* Portada (versión completa) */
.prog-portada { max-width: 52rem; padding: 2.5rem; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 2rem; }
.prog-portada-arriba img { height: 4.5rem; }
.prog-portada-centro { border-left: 6px solid #FFF33E; padding-left: 1.5rem; }
.prog-portada-tipo { font: 600 .95rem Montserrat, sans-serif; color: #102B44; text-transform: uppercase; letter-spacing: .04em; }
.prog-portada-modulo { font: 700 2.2rem/1.15 Montserrat, sans-serif; color: #102B44; margin: .6rem 0 .4rem; }
.prog-portada-codigo { color: var(--tblr-secondary); margin-bottom: 1.5rem; }
.prog-portada-datos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
.prog-portada-datos dt { font-weight: 500; color: var(--tblr-secondary); font-size: .85rem; }
.prog-portada-datos dd { margin: 0; }
.prog-portada-indice-titulo { font: 600 .9rem Montserrat, sans-serif; color: #102B44; text-transform: uppercase; border-bottom: 2px solid #102B44; padding-bottom: .25rem; margin-bottom: .6rem; }
.prog-portada-indice ol { margin: 0; padding-left: 1.4rem; font-size: .9rem; }
.prog-portada-indice li { margin-bottom: .25rem; }
.prog-portada-pie { font-size: .8rem; color: var(--tblr-secondary); }
@media print {
  .prog-doc { page: programacion; }
  .prog-portada { page: portada; break-after: page; border: 0; box-shadow: none; max-width: none; padding: 0; height: 268mm; gap: 0; justify-content: space-between; }
  .prog-portada-arriba img { height: 24mm; }
  .prog-portada-modulo { font-size: 26pt; }
  .prog-doc .card-body { padding: 0; }
  .prog-doc { font-size: 10pt; color: #1b2733; }
  .prog-doc .text-secondary, .prog-doc .prog-doc-cabecera th { color: #4a5868 !important; }
  .prog-doc-ce { font-size: 9.5pt; }
  .prog-doc-tabla { font-size: 9pt; }
  .prog-doc-sec { break-inside: auto; }
  .prog-doc-h2, .prog-doc-h3 { break-after: avoid; }
  .prog-doc-h2 + *, .prog-doc-h3 + * { break-before: avoid; }
  .prog-doc-ra, .prog-doc-lista li, .prog-doc-tabla tr { break-inside: avoid; }
}

/* Programación por pestañas */
.prog-partes { gap: .25rem; flex-wrap: wrap; }
.prog-partes .nav-link { padding: .35rem .7rem; font-size: .88rem; }
.prog-estado { display: inline-flex; align-items: center; justify-content: center; width: 1.05rem; height: 1.05rem; border-radius: 50%; font-size: .65rem; margin-right: .35rem; vertical-align: -.1rem; }
.prog-estado.hecho { background: var(--tblr-green); color: #fff; }
.prog-estado.falta { background: var(--tblr-orange); width: .55rem; height: .55rem; }
.prog-partes .nav-link.active .prog-estado.hecho { background: #fff; color: var(--tblr-green); }
.prog-doc-editar { font-size: .75rem; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: .75rem; }

/* Centro → Matrícula: cifras */
.mat-cifra-principal { background: #102B44; color: #fff; }
.mat-cifra-principal .small { color: #FFF33E; }
.mat-barras { display: grid; gap: .35rem; }
.mat-barra { display: grid; grid-template-columns: minmax(4.5rem, 11rem) 1fr auto; align-items: center; gap: .6rem; font-size: .875rem; }
.mat-barra-etiqueta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-barra-pista { height: .85rem; background: var(--tblr-bg-surface-secondary, #f1f4f8); border-radius: 3px; overflow: hidden; }
.mat-barra-relleno { height: 100%; background: #102B44; border-radius: 3px; }
.mat-barra-n { min-width: 3rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mat-gs { background: #102B44 !important; } .mat-gm { background: #3170C4 !important; }
.mat-c1 { background: #102B44 !important; } .mat-c2 { background: #3170C4 !important; } .mat-c3 { background: #2FB344 !important; }
.mat-m { background: #A04CC2 !important; } .mat-h { background: #2C9FAF !important; }
.mat-sin { background: #C6CDD6 !important; }
.mat-apilada { display: flex; height: 1.1rem; border-radius: 4px; overflow: hidden; background: var(--tblr-bg-surface-secondary, #f1f4f8); }
.mat-apilada-fina { height: .7rem; }
.mat-leyenda { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; margin-top: .5rem; }
.card-actions.mat-leyenda { margin-top: 0; }
.mat-leyenda i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: -.05rem; }
.mat-tabla td, .mat-tabla th { font-variant-numeric: tabular-nums; }
.mat-tabla td.mat-calor { background-color: rgba(49, 112, 196, calc(var(--p) * .7)) !important; }
.mat-grupo-fila th { background: var(--tblr-bg-surface-secondary, #f1f4f8); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #102B44; }
.mat-procedencia th { white-space: normal; min-width: 5rem; vertical-align: bottom; }
.mat-procedencia th:first-child { min-width: 14rem; }
@media (max-width: 575px) { .mat-barra { grid-template-columns: 5rem 1fr auto; } }

/* Evaluación por RA */
.notas-ra input.nota { width: 4.2rem; margin: 0 auto; text-align: center; }
.calc-col { background: var(--tblr-bg-surface-secondary, #f6f8fb); min-width: 6.5rem; }
.calc-nota { border: 0; background: #102B44; color: #fff; font-weight: 600; border-radius: 4px; min-width: 2.2rem; padding: .15rem .45rem; cursor: pointer; }
.calc-nota.suspenso { background: var(--tblr-red); }
.calc-detalle td { background: #fbfcfe; border-top: 0; }
.calc-explica > summary { cursor: pointer; list-style: none; }
.calc-explica > summary::-webkit-details-marker { display: none; }
.calc-explica > summary .card-title::after { content: ' ▾'; color: var(--tblr-secondary); font-weight: 400; }
.calc-explica:not([open]) > summary { border-bottom: 0; }
.calc-explica:not([open]) > summary .card-title::after { content: ' ▸'; }
.nota-propuesta { font-size: .72rem; color: var(--tblr-secondary); margin-top: .15rem; white-space: nowrap; }
.nota-propuesta.distinta { color: var(--tblr-orange); }
.notas input.nota.pasada { background: #fffbe0; }

/* Unidades: «Empresa» es un interruptor (los RA, casillas) */
.ud-tabla .form-switch { padding-left: 2.5em; }
.calc-col.calc-fijada { background: #eef2f7; }

/* Tablas de notas: cabecera y nombres fijos al desplazarse, color según la nota, casillas cambiadas */
.notas .table-responsive { max-height: 78vh; overflow: auto; }
.notas thead th { position: sticky; top: 0; z-index: 2; background: var(--tblr-bg-surface, #fff); box-shadow: inset 0 -1px 0 var(--tblr-border-color, #e6e7e9); }
.notas thead th.calc-col { background: #f1f4f8; }
.notas tbody td:first-child, .notas thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--tblr-bg-surface, #fff); box-shadow: inset -1px 0 0 var(--tblr-border-color, #e6e7e9); }
.notas thead th:first-child { z-index: 3; }
.notas tr.calc-detalle td:first-child { position: static; box-shadow: none; }
.notas input.nota.nota-baja { background-color: #fde8e8; }
.notas input.nota.nota-alta { background-color: #e6f6ea; }
.notas input.nota.cambiada { border-color: #f59f00; box-shadow: 0 0 0 .15rem rgba(245, 159, 0, .2); }
.notas .falta-aviso { font-size: .72rem; white-space: nowrap; }

/* Informe por RA y alumno: uno por hoja */
.informe-alumno { margin-bottom: 1.5rem; }
.informe-firma { margin-top: 2rem; border-top: 1px solid var(--tblr-border-color, #e6e7e9); padding-top: .5rem; }
@media print {
  .informe-alumno { break-after: page; border: 0; box-shadow: none; margin: 0; }
  .informe-alumno:last-child { break-after: auto; }
  .informe-alumno .badge { border: 1px solid #c8d0da; }
}
/* Primera implantación en la real: franja amarilla de Tartanga con «Enviar comentario» */
.entorno-implantacion { background: #FFF33E; color: #102B44; padding: .3rem 0; font-size: .85rem; position: relative; z-index: 1030; }
.entorno-implantacion .entorno-comentario summary, .entorno-implantacion > div > a.btn { background: #fff; color: #102B44; }
.error-comentario { max-width: 32rem; }
