/* ============================================================
   DANGOFE · Configuración → Horario y tandas (rehecho, 2026-10-12)
   Hoja ENTREGABLE para configuracion/horario.js. Prefijo hz- para la forma;
   se conservan los ids y clases cfgh-* que engancha horario.js.
   Mismo cristal aprobado: blanco / «Noche azul» (clase hz--noche en la raíz
   .hz), SIN sombras exteriores, cápsulas, muelle, solo transform y opacity.
   Pensado para teléfono y escritorio (la columna de Configuración).
   ============================================================ */
.hz {
  --hz-azul: #03269b; --hz-celeste: #3592cf; --hz-azul-txt: #03269b;
  --hz-tinta: #0a1633; --hz-tenue: #5b6880; --hz-suave: #93a0b8;
  --hz-ok: #1d9a5b; --hz-amb: #c27500; --hz-mal: #c0392b;
  --hz-vidrio: rgba(255, 255, 255, .58); --hz-vidrio-f: rgba(255, 255, 255, .8); --hz-vidrio-azul: rgba(3, 38, 155, .9);
  --hz-hundido: rgba(10, 22, 51, .06); --hz-linea: rgba(10, 22, 51, .1);
  --hz-brillo: rgba(255, 255, 255, .55); --hz-rim-a: rgba(255, 255, 255, .95); --hz-rim-b: rgba(255, 255, 255, .25);
  --hz-muelle: cubic-bezier(.34, 1.45, .64, 1); --hz-fluido: cubic-bezier(.2, .9, .25, 1);
  --hz-ui: var(--font-family-ui, var(--f-ui, "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif));
  position: relative; display: block; color: var(--hz-tinta); font-family: var(--hz-ui); font-size: 15px; line-height: 1.35; -webkit-font-smoothing: antialiased;
}
.hz--noche {
  color-scheme: dark;
  --hz-azul-txt: #8fb4ff; --hz-tinta: #f2f5fb; --hz-tenue: #a9b4c9; --hz-suave: #6f7a93;
  --hz-ok: #5ad486; --hz-amb: #f6b64a; --hz-mal: #ff8a7a;
  --hz-vidrio: rgba(16, 28, 66, .62); --hz-vidrio-f: rgba(20, 34, 80, .86); --hz-vidrio-azul: rgba(30, 72, 214, .92);
  --hz-hundido: rgba(255, 255, 255, .08); --hz-linea: rgba(255, 255, 255, .14);
  --hz-brillo: rgba(255, 255, 255, .14); --hz-rim-a: rgba(255, 255, 255, .5); --hz-rim-b: rgba(255, 255, 255, .1);
}
.hz *, .hz *::before, .hz *::after { box-sizing: border-box; }
:where(.hz) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
:where(.hz) input, :where(.hz) select, :where(.hz) textarea { font: inherit; color: inherit; }
.hz button:focus-visible, .hz input:focus-visible, .hz select:focus-visible { outline: 2px solid var(--hz-celeste); outline-offset: 2px; }
.hz p, .hz h3, .hz h4 { margin: 0; }
.hz--capa { position: static; }

/* ---------- Cristal ---------- */
.hz-g {
  position: relative; border-radius: 24px; color: var(--hz-tinta);
  background: radial-gradient(120% 90% at 18% 0%, var(--hz-brillo), rgba(255, 255, 255, 0) 55%), var(--hz-vidrio);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 var(--hz-rim-a), inset 0 -1px 0 var(--hz-rim-b), inset 1px 0 0 rgba(255, 255, 255, .45), inset -1px 0 0 rgba(255, 255, 255, .3);
}
.hz-g::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(135deg, var(--hz-rim-a), var(--hz-rim-b) 35%, rgba(255, 255, 255, .06) 62%, var(--hz-rim-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.hz-g--f { background: radial-gradient(120% 90% at 18% 0%, var(--hz-brillo), rgba(255, 255, 255, 0) 55%), var(--hz-vidrio-f); }
.hz-sec .hz-g, .hz-hoja .hz-g { background: radial-gradient(120% 90% at 18% 0%, var(--hz-brillo), rgba(255, 255, 255, 0) 55%), var(--hz-vidrio-f); box-shadow: inset 0 0 0 1px var(--hz-linea), inset 0 1px 0 var(--hz-rim-a); }
.hz--noche .hz-g { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .12), inset -1px 0 0 rgba(255, 255, 255, .06); }
.hz--noche .hz-sec .hz-g, .hz--noche .hz-hoja .hz-g { box-shadow: inset 0 0 0 1px var(--hz-linea), inset 0 1px 0 rgba(255, 255, 255, .22); }

/* ---------- Cabecera y secciones ---------- */
.hz__cab { margin-bottom: 14px; }
.hz__ojal { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hz-azul-txt); }
.hz__ojal i { width: 18px; height: 1px; background: currentColor; opacity: .6; }
.hz__tit { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin-top: 4px; }
.hz__sub { margin-top: 4px; font-size: 14px; color: var(--hz-tenue); line-height: 1.45; text-wrap: pretty; }
.hz-sec { padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; animation: hz-sube .5s var(--hz-fluido) both; }
.hz-sec__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hz-sec__tit { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.hz-sec__sub { font-size: 13px; color: var(--hz-tenue); margin-top: 3px; line-height: 1.4; }
.hz-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--hz-hundido); color: var(--hz-tenue); }
.hz-pill svg { width: 13px; height: 13px; }
.hz-pill--ok { background: rgba(29, 154, 91, .14); color: var(--hz-ok); }
.hz-pill--amb { background: rgba(194, 117, 0, .14); color: var(--hz-amb); }
.hz-pill--azul { background: rgba(3, 38, 155, .1); color: var(--hz-azul-txt); }
.hz-pill--mal { background: rgba(192, 57, 43, .12); color: var(--hz-mal); }
.hz--noche .hz-pill--ok { background: rgba(90, 212, 134, .16); } .hz--noche .hz-pill--amb { background: rgba(246, 182, 74, .16); } .hz--noche .hz-pill--azul { background: rgba(143, 180, 255, .16); } .hz--noche .hz-pill--mal { background: rgba(255, 138, 122, .16); }

/* Botones */
.hz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.1; white-space: nowrap; user-select: none; transition: transform .5s var(--hz-muelle), opacity .3s ease; }
.hz-btn:active { transform: scale(.955); transition-duration: .12s; }
.hz-btn svg { width: 18px; height: 18px; flex: none; }
.hz .hz-btn--pri { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 55%), var(--hz-vidrio-azul); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.hz .hz-btn--pri::before { background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .2) 40%, rgba(255, 255, 255, .08) 62%, rgba(255, 255, 255, .7)); }
.hz-btn--mal { color: var(--hz-mal); }
.hz-btn--chico { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.hz-btn--ancho { width: 100%; }
.hz-btn--txt { min-height: 36px; padding: 6px 4px; color: var(--hz-azul-txt); font-weight: 700; font-size: 14px; }
.hz-btn[disabled], .hz-btn.is-off { opacity: .45; pointer-events: none; }
.hz-fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hz-fila--der { justify-content: flex-end; }

/* Técnicos: cápsulas con iniciales */
.hz-tecs { display: flex; gap: 8px; flex-wrap: wrap; }
.hz-tec { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px 6px 6px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--hz-tenue); transition: transform .5s var(--hz-muelle); }
.hz-tec:active { transform: scale(.96); transition-duration: .12s; }
.hz-tec__ini { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(3, 38, 155, .1); color: var(--hz-azul-txt); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.hz-tec.is-on { background: var(--hz-azul); color: #fff; }
.hz-tec.is-on .hz-tec__ini { background: rgba(255, 255, 255, .22); color: #fff; }
.hz-tec small { font-weight: 600; font-size: 12px; opacity: .8; }

/* Interruptor de cristal (envuelve la casilla real cfgh-*, que sigue funcionando) */
.hz-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 700; font-size: 14px; }
.hz-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.hz-sw i { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(10, 22, 51, .16); transition: background-color .3s ease; }
.hz-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .45s var(--hz-muelle); }
.hz-sw input:checked + i { background: var(--hz-ok); }
.hz-sw input:checked + i::after { transform: translateX(18px); }
.hz-sw--azul input:checked + i { background: var(--hz-azul); }
.hz-sw input:focus-visible + i { outline: 2px solid var(--hz-celeste); outline-offset: 2px; }
.hz-sw span small { display: block; font-weight: 500; font-size: 12.5px; color: var(--hz-tenue); margin-top: 1px; }
.hz--noche .hz-sw i { background: rgba(255, 255, 255, .2); }
.hz--noche .hz-sw input:checked + i { background: #22b36b; }
.hz--noche .hz-sw--azul input:checked + i { background: #2e5bd9; }
.hz-sw.is-off { opacity: .45; pointer-events: none; }

/* Horas: dos cápsulas de tiempo con «a» en medio. OJO: input type=time en español necesita ~9 em */
.hz-horas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hz-horas input[type="time"] { flex: 1 1 8.6em; min-width: 8.6em; width: auto; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 999px; background: var(--hz-hundido); box-shadow: inset 0 0 0 1px var(--hz-linea); color: var(--hz-tinta); font-weight: 700; font-variant-numeric: tabular-nums; outline: 0; transition: box-shadow .3s ease; }
.hz-horas input[type="time"]:focus { box-shadow: 0 0 0 3px rgba(53, 146, 207, .28); }
.hz-horas input[type="time"]:disabled { opacity: .45; }
.hz-horas em { font-style: normal; font-size: 13px; color: var(--hz-tenue); font-weight: 700; }
.hz-horas.is-off { opacity: .45; pointer-events: none; }

/* ---------- Versión 1 · la semana en tarjetas ---------- */
.hz-dias { display: grid; gap: 10px; }
@media (min-width: 720px) { .hz-dias { grid-template-columns: 1fr 1fr; } }
.hz-dia { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; animation: hz-sube .45s var(--hz-fluido) both; }
.hz-dia__cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hz-dia__nom { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.hz-dia__nom small { display: block; font-size: 12px; font-weight: 600; color: var(--hz-tenue); margin-top: 1px; }
.hz-tanda { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 18px; }
.hz-tanda .hz-horas { grid-column: 1 / -1; }
.hz-tanda__nom { font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.hz-tanda__nom svg { width: 16px; height: 16px; color: var(--hz-azul-txt); }
.hz-tanda__res { justify-self: end; font-size: 12.5px; color: var(--hz-tenue); font-weight: 600; white-space: nowrap; }
.hz-dia.is-libre .hz-tanda, .hz-dia.is-libre .hz-dia__pub { opacity: .4; pointer-events: none; }
.hz-dia__pub { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 2px; }
.hz-dia__pub span { font-size: 13px; color: var(--hz-tenue); }
.hz-dia--sin { color: var(--hz-tenue); }

/* ---------- Versión 2 · la rejilla de la semana ---------- */
.hz-rejilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hz-col { padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 196px; transition: transform .5s var(--hz-muelle); }
.hz-col:active { transform: scale(.97); transition-duration: .12s; }
.hz-col__nom { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hz-tenue); }
.hz-col.is-on .hz-col__nom { color: var(--hz-azul-txt); }
.hz-col__pista { position: relative; width: 100%; max-width: 28px; flex: 1 1 auto; border-radius: 999px; background: var(--hz-hundido); overflow: hidden; }
.hz-col__bloque { position: absolute; left: 0; right: 0; border-radius: 999px; background: var(--hz-azul); }
.hz-col__bloque--gris { background: rgba(10, 22, 51, .28); }
.hz-col__bloque--t { background: var(--hz-celeste); }
.hz--noche .hz-col__bloque { background: #5aa9ff; } .hz--noche .hz-col__bloque--t { background: #8fb4ff; } .hz--noche .hz-col__bloque--gris { background: rgba(255, 255, 255, .3); }
.hz-col__pie { font-size: 10.5px; font-weight: 700; color: var(--hz-tenue); text-align: center; line-height: 1.2; }
.hz-col.is-libre .hz-col__pista { background: repeating-linear-gradient(135deg, var(--hz-hundido) 0 6px, transparent 6px 12px); }
.hz-col.is-on { box-shadow: inset 0 0 0 2px var(--hz-azul); }
.hz--noche .hz-col.is-on { box-shadow: inset 0 0 0 2px #5aa9ff; }
.hz-leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--hz-tenue); font-weight: 600; }
.hz-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; background: var(--hz-azul); }
.hz-leyenda i.t { background: var(--hz-celeste); } .hz-leyenda i.g { background: rgba(10, 22, 51, .28); }

/* ---------- Versión 3 · la línea del tiempo ---------- */
.hz-lineas { display: flex; flex-direction: column; gap: 8px; }
.hz-regla { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; font-size: 10.5px; color: var(--hz-suave); font-weight: 700; }
.hz-regla div { display: flex; justify-content: space-between; padding: 0 2px; }
.hz-ren { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 18px; width: 100%; text-align: left; transition: transform .5s var(--hz-muelle); animation: hz-sube .45s var(--hz-fluido) both; }
.hz-ren:active { transform: scale(.985); transition-duration: .12s; }
.hz-ren__nom { font-size: 14px; font-weight: 800; }
.hz-ren__nom small { display: block; font-size: 11px; font-weight: 600; color: var(--hz-tenue); margin-top: 1px; white-space: nowrap; }
.hz-ren__pista { position: relative; height: 30px; border-radius: 999px; background: var(--hz-hundido); overflow: hidden; }
.hz-ren__bloque { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: var(--hz-azul); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; padding: 0 6px; }
.hz-ren__bloque--t { background: var(--hz-celeste); }
.hz-ren__bloque--gris { background: rgba(10, 22, 51, .32); }
.hz--noche .hz-ren__bloque { background: #2e5bd9; } .hz--noche .hz-ren__bloque--t { background: #3b8fe0; } .hz--noche .hz-ren__bloque--gris { background: rgba(255, 255, 255, .28); }
.hz-ren.is-libre .hz-ren__pista { background: repeating-linear-gradient(135deg, var(--hz-hundido) 0 6px, transparent 6px 12px); }
.hz-ren.is-on { box-shadow: inset 0 0 0 2px var(--hz-azul); }
.hz--noche .hz-ren.is-on { box-shadow: inset 0 0 0 2px #5aa9ff; }

/* ---------- Cambios para una fecha y feriados ---------- */
.hz-cambio { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 18px; animation: hz-sube .45s var(--hz-fluido) both; }
.hz-fecha { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--hz-azul); color: #fff; line-height: 1; }
.hz-fecha small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hz-fecha b { font-size: 21px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hz-fecha--gris { background: var(--hz-hundido); color: var(--hz-tenue); }
.hz-fecha--mal { background: rgba(192, 57, 43, .14); color: var(--hz-mal); }
.hz--noche .hz-fecha { background: #2e5bd9; }
.hz-cambio__txt b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.2; }
.hz-cambio__txt span { display: block; font-size: 12.5px; color: var(--hz-tenue); margin-top: 2px; line-height: 1.35; }
.hz-vacio { padding: 14px; border-radius: 18px; background: var(--hz-hundido); font-size: 13.5px; color: var(--hz-tenue); line-height: 1.45; }
.hz-campo { display: grid; gap: 5px; }
.hz-campo label { font-size: 12.5px; font-weight: 700; color: var(--hz-tenue); padding-left: 4px; }
.hz-campo input, .hz-campo select, .hz-campo textarea { width: 100%; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 16px; background: var(--hz-hundido); box-shadow: inset 0 0 0 1px var(--hz-linea); color: var(--hz-tinta); outline: 0; transition: box-shadow .3s ease; }
.hz-campo textarea { min-height: 72px; resize: vertical; }
.hz-campo input:focus, .hz-campo select:focus, .hz-campo textarea:focus { box-shadow: 0 0 0 3px rgba(53, 146, 207, .28); }
.hz-seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; gap: 2px; }
.hz-seg button { min-height: 38px; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--hz-tenue); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.hz-seg button svg { width: 16px; height: 16px; flex: none; }
.hz-seg button.is-on { background: var(--hz-azul); color: #fff; }
.hz--noche .hz-seg button.is-on { background: #2e5bd9; }
.hz-seg--col { grid-auto-flow: row; grid-auto-columns: auto; border-radius: 20px; }
.hz-seg--col button { text-align: left; justify-content: flex-start; display: flex; gap: 10px; align-items: center; min-height: 44px; border-radius: 14px; white-space: normal; }
.hz-seg--col button small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
.hz-err { font-size: 13.5px; font-weight: 600; color: var(--hz-mal); padding: 0 4px; animation: hz-sube .35s var(--hz-fluido) both; }
.hz-err:empty { display: none; }

/* ---------- Hoja desde abajo (editar un día en las versiones 2 y 3; agregar un cambio) ---------- */
.hz-velo { position: fixed; inset: 0; z-index: 40; background: rgba(10, 22, 51, .18); animation: hz-aparece .3s ease both; }
.hz--noche .hz-velo { background: rgba(0, 0, 0, .5); }
.hz-velo.is-fuera { opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.hz-hoja { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 41; border-radius: 30px; padding: 10px 16px 16px; max-height: 88%; display: flex; flex-direction: column; gap: 12px; animation: hz-sube-mas .6s var(--hz-muelle) both; }
.hz-hoja.is-fuera { animation: hz-baja .35s cubic-bezier(.3, 0, .2, 1) both; pointer-events: none; }
.hz-hoja__asa { width: 40px; height: 5px; border-radius: 999px; background: var(--hz-linea); margin: 0 auto 2px; }
.hz-hoja__cuerpo { overflow-y: auto; min-height: 0; scrollbar-width: none; display: flex; flex-direction: column; gap: 12px; padding: 2px 2px 4px; }
.hz-hoja__cuerpo::-webkit-scrollbar { display: none; }
.hz-hoja__cuerpo > * { flex: none; }
.hz-hoja h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.hz-hoja p { font-size: 14px; color: var(--hz-tenue); line-height: 1.45; }
@media (min-width: 720px) { .hz-hoja { left: 50%; right: auto; width: 460px; transform: translateX(-50%); } }

/* ---------- Animaciones ---------- */
@keyframes hz-sube { from { opacity: 0; transform: translateY(14px); } }
@keyframes hz-sube-mas { from { transform: translateY(110%); } }
@keyframes hz-baja { to { transform: translateY(110%); } }
@keyframes hz-aparece { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hz *, .hz *::before, .hz *::after, .hz-velo, .hz-hoja { animation: none !important; transition: none !important; } }

/* Al cambiar algo no vuelve a entrar todo: sin animación de entrada */
.hz-ya .hz-sec, .hz-ya .hz-dia, .hz-ya .hz-ren, .hz-ya .hz-cambio { animation: none; }

/* En pantallas angostas el botón de un cambio o feriado baja debajo del texto (no se corta) */
@media (max-width: 440px) { .hz-cambio { grid-template-columns: 54px 1fr; } .hz-cambio .hz-btn { grid-column: 2; justify-self: start; } }

/* Los títulos van en la letra del sistema aunque el módulo que nos aloja ponga otra en h1–h4 */
.hz.hz h1, .hz.hz h2, .hz.hz h3, .hz.hz h4 { font-family: var(--hz-ui); }
