/* Horarios del Centro Tecnológico Sur · estilos propios sobre la base Riel de cdn.cestrada.net (temas claro y oscuro). */
body { min-height: 100vh; display: flex; flex-direction: column; }
.lienzo { width: 100%; max-width: var(--ce-ancho, 1280px); margin: 0 auto; padding: 20px 16px 48px; flex: 1; }

/* Cabecera Riel: fundida con el lienzo; logo según el tema y, en el teléfono, solo el isotipo */
.cabecera { background: none; }
.cabecera__dentro { max-width: var(--ce-ancho, 1280px); margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.logo { height: 34px; width: auto; display: block; }
.isotipo { display: none; height: 30px; width: auto; flex: none; }
.logo--oscuro, .isotipo--oscuro { display: none; }
html[data-tema="oscuro"] .logo--claro { display: none; }
html[data-tema="oscuro"] .logo--oscuro { display: block; }
.cabecera__nombre { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 13px var(--fuente-titulo); letter-spacing: .2em; text-transform: uppercase; color: var(--orange-text); padding-left: 12px; border-left: 1px solid var(--line); }
.cabecera__acc { display: flex; align-items: center; gap: 8px; }
.cabecera__quien { color: var(--muted); font: 600 13px var(--fuente-ui); white-space: nowrap; }
.ce-pestanas { max-width: var(--ce-ancho, 1280px); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (max-width: 720px) {
  .cabecera__dentro { gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
  .logo, html[data-tema="oscuro"] .logo--oscuro { display: none; }
  .isotipo--claro { display: block; }
  html[data-tema="oscuro"] .isotipo--claro { display: none; }
  html[data-tema="oscuro"] .isotipo--oscuro { display: block; }
  .cabecera__nombre { letter-spacing: .1em; padding-left: 10px; }
  .cabecera__quien { display: none; }
}
.centro { margin: 0 0 14px; font-size: 22px; }

/* Entrada: una tarjeta centrada */
.entrada { max-width: 440px; margin: 6vh auto 0; }
.entrada h1 { margin: 0 0 6px; font-size: 22px; }
.entrada form { display: grid; gap: 12px; margin-top: 16px; }
.entrada input { width: 100%; }

.barra { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.barra .empuja { margin-left: auto; }
.nota { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--orange); background: var(--surface); margin-bottom: 16px; }
.nota--mal { border-left-color: var(--error); }
.pendiente { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--pulsado); border-bottom: 1px solid var(--orange); font: 600 13px var(--fuente-ui); justify-content: center; }

/* Semana */
.semana { margin-bottom: 18px; padding: 16px; }
.semana__cab { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.semana__cab h2 { margin: 0; font-size: 17px; flex: 1 1 260px; }
.semana--hoy { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.tabla-caja { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { background: var(--banda); color: #fff; font: 600 12px var(--fuente-ui); letter-spacing: .04em; white-space: nowrap; }
thead th:first-child { border-radius: 8px 0 0 0; } thead th:last-child { border-radius: 0 8px 0 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font: 600 14px var(--fuente-texto); white-space: nowrap; }
.horario th.dia, .horario td.dia { text-align: center; min-width: 78px; }
.horario th.dia small { display: block; font-weight: 400; opacity: .85; }
.horario th.dia--feriado { background: var(--orange); color: #1d2928; }
.horario td.dia { font: 600 13px var(--fuente-ui); font-variant-numeric: tabular-nums; border-left: 2px solid var(--surface); white-space: nowrap; }
.horario td.dia span { display: block; }
.dia--libre { color: var(--muted); font-weight: 400 !important; background: var(--tint); }
.dia--fuera { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 6px, var(--tint) 6px, var(--tint) 12px); color: var(--ink); }
/* Un tinte por turno, mezclado con el fondo para que sirva en claro y en oscuro; el nombre del turno siempre va escrito */
.t0 { background: color-mix(in srgb, var(--teal) 16%, var(--surface)); } .t1 { background: color-mix(in srgb, var(--orange) 24%, var(--surface)); }
.t2 { background: color-mix(in srgb, var(--ink) 13%, var(--surface)); } .t3 { background: color-mix(in srgb, var(--teal) 38%, var(--surface)); }
.t0, .t1, .t2, .t3 { color: var(--ink); }
.turno { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.turno select { min-width: 150px; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: baseline; border: 1px solid rgba(0, 0, 0, .15); }
.turno-ver { display: flex; align-items: center; min-width: 96px; } .turno-ver .punto { flex: none; }
td > .ce-estado { margin: 2px 4px 2px 0; }
.horas { white-space: nowrap; font-variant-numeric: tabular-nums; }
.horas b { font: 700 15px var(--fuente-ui); }
.horas .ce-estado, .horas small { display: flex; width: max-content; margin-top: 3px; }
.horas small { color: var(--muted); }
.mini { min-height: 28px !important; padding: 2px 8px !important; font-size: 12px !important; }

/* Equidad */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cifras .ce-tarjeta { padding: 16px; }
.cifras h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--fuente-ui); }
.cifras strong { display: block; font: 800 26px var(--fuente-titulo); color: var(--titulo); }
.cifras strong.mal { color: var(--error); }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }

/* Formularios de configuración */
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.bloque { margin-bottom: 16px; }
.bloque > h2 { margin: 0 0 4px; font-size: 18px; }
.bloque > p { margin: 0 0 14px; }
.lista { display: grid; gap: 8px; margin-bottom: 12px; }
.linea { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.linea > input[type="text"] { flex: 1 1 180px; min-width: 0; }
.linea .crece { flex: 1 1 200px; min-width: 0; }
.marca { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--fuente-ui); color: var(--ink); cursor: pointer; }
.marca input { width: 18px; height: 18px; accent-color: var(--teal); }
.rol { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.rol__cab { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
.rol__cab .ce-campo:first-child { flex: 1 1 200px; }
.rol__cab input[type="number"] { width: 90px; }
.tramo { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.dias { display: flex; gap: 4px; }
.dias label { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--campo-borde); border-radius: 8px; font: 600 13px var(--fuente-ui); cursor: pointer; position: relative; }
.dias input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.dias label:has(input:checked) { background: var(--teal); color: var(--on-teal); border-color: var(--teal); }
.dias label:has(input:focus-visible) { outline: 2px solid var(--resp); outline-offset: 2px; }
dialog.ce-ventana { width: min(520px, 92vw); }
dialog.ce-ventana .ce-campo { margin-bottom: 12px; }
dialog.ce-ventana textarea { width: 100%; min-height: 260px; font: 400 13px/1.5 var(--fuente-mono); }
dialog.ce-ventana input, dialog.ce-ventana select { width: 100%; }
dialog.ce-ventana form { display: grid; gap: 0; }
.actualizado { margin-top: 18px; }

@media (max-width: 640px) { th, td { padding: 6px 8px; } }
@media print {
  @page { size: landscape; margin: 1cm; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-imprimir, .pendiente { display: none !important; }
  .lienzo { padding: 0; max-width: none; }
  .ce-isotipo-fondo { display: none; }
  body { zoom: 1 !important; }
  .semana { box-shadow: none; break-inside: avoid; padding: 8px 0; border: 0; }
  .semana--hoy { box-shadow: none; }
  table { font-size: 10pt; }
}
