/* RC Fichajes (28/10/2026). Claro y oscuro con la clave «theme» de la suite; acento mostaza (img/marca/fichajes). */
:root {
  --bg: #f6f4ee; --panel: #ffffff; --panel-2: #f1eee5; --line: rgba(28, 26, 20, .12);
  --ink: #1c1a14; --muted: #6b6558; --accent: #f2c230; --accent-ink: #7a5200; --accent-soft: rgba(242, 194, 48, .18);
  --ok: #15803d; --ok-soft: rgba(21, 128, 61, .12); --warn: #b45309; --warn-soft: rgba(245, 158, 11, .14);
  --bad: #b91c1c; --bad-soft: rgba(185, 28, 28, .1); --info: #1e3a8a; --info-soft: rgba(30, 58, 138, .1);
  --radius: 14px; --shadow: 0 1px 2px rgba(28, 26, 20, .06), 0 4px 14px rgba(28, 26, 20, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e0b; --panel: #1a1813; --panel-2: #23201a; --line: rgba(244, 239, 226, .1);
    --ink: #f4efe2; --muted: #a59d8b; --accent-ink: #f2c230; --accent-soft: rgba(242, 194, 48, .14);
    --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
    --bad: #f87171; --bad-soft: rgba(248, 113, 113, .12); --info: #93c5fd; --info-soft: rgba(147, 197, 253, .12);
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e0b; --panel: #1a1813; --panel-2: #23201a; --line: rgba(244, 239, 226, .1);
  --ink: #f4efe2; --muted: #a59d8b; --accent-ink: #f2c230; --accent-soft: rgba(242, 194, 48, .14);
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .12); --info: #93c5fd; --info-soft: rgba(147, 197, 253, .12);
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: Geist, Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: Poppins, Geist, system-ui, sans-serif; line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 15.5px; }
.muted { color: var(--muted); }
.peq { font-size: 13px; }
[hidden] { display: none !important; }

/* La franja de la demo pública (3/11/2026) */
.fc-demo { background: var(--accent); color: #1c1a14; font-size: 13px; line-height: 1.45; padding: 7px 16px; text-align: center; }
.fc-demo a { color: #1c1a14; font-weight: 600; }
.fc-demo-mas { display: block; font-size: 12px; opacity: .85; }

/* Cabecera y pestañas del dueño */
.fc-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.fc-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.fc-marca img { border-radius: 8px; flex-shrink: 0; }
.fc-marca span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.fc-marca small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-cab-acc { display: flex; align-items: center; gap: 6px; }
.fc-tema { background: none; border: 1px solid var(--line); color: var(--ink); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; }
.fc-salir { font-size: 13px; color: var(--muted); text-decoration: none; padding: 8px 10px; }
.fc-enc-quien { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--ink); white-space: nowrap; }   /* el encargado que tiene el panel (fase 2) */
.fc-pest { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 57px; z-index: 19; }
.fc-pest::-webkit-scrollbar { display: none; }
.fc-pest a { flex-shrink: 0; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.fc-pest a.on { background: var(--accent-soft); color: var(--accent-ink); }
.fc-main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 40px; }
.fc-pie { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 16px 30px; }
.fc-pie a { color: inherit; }

/* Bloques */
.fc-tit { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fc-tit p { margin: 2px 0 0; color: var(--muted); }
.fc-caja { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.fc-caja > h2:first-child, .fc-caja > h3:first-child { margin-top: 0; }
.fc-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.fc-cifra { display: flex; flex-direction: column; gap: 2px; }
.fc-cifra b { font-size: 26px; font-family: Poppins, Geist, sans-serif; }
.fc-cifra span { color: var(--muted); font-size: 13px; }

/* Avisos */
.fc-aviso { border-radius: 12px; padding: 11px 14px; margin-bottom: 12px; font-size: 14px; border: 1px solid transparent; }
.fc-aviso.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.fc-aviso.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.fc-aviso.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.fc-aviso.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

/* Estado de una persona */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.dentro { color: var(--ok); background: var(--ok-soft); }
.pill.pausa { color: var(--warn); background: var(--warn-soft); }
.pill.fuera { color: var(--muted); background: var(--panel-2); }
.pill.olvido { color: var(--bad); background: var(--bad-soft); }

.fc-personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fc-persona { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: var(--ink); }
.fc-ini { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.fc-persona .dato { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-persona .dato b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tablas */
.fc-tabla-env { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table.fc-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.fc-tabla th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.fc-tabla td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fc-tabla tr:last-child td { border-bottom: 0; }
.fc-tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-tabla tr.vacio td { color: var(--muted); }
.fc-tabla tr.finde td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.fc-tabla tr.total td { font-weight: 700; background: var(--panel-2); }
.fc-tramo { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-marcas-aviso { display: block; font-size: 12px; color: var(--warn); margin-top: 3px; }

/* Formularios y botones */
label.fc-lab { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; }
.fc-campo { margin-bottom: 12px; }
.fc-in, select.fc-in, textarea.fc-in { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; min-height: 42px; }
.fc-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fc-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .fc-dos { grid-template-columns: 1fr; } }
.fc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.fc-btn.prim { background: var(--accent); border-color: var(--accent); color: #1c1a14; }
.fc-btn.peligro { color: var(--bad); }
.fc-btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.fc-btn:disabled { opacity: .6; cursor: wait; }
.fc-btn.peq { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.fc-acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; }
.fc-interruptor { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.fc-interruptor span { display: flex; flex-direction: column; gap: 2px; }
.fc-interruptor small { color: var(--muted); font-size: 13px; }
.fc-switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; transition: background-color .2s; }
.fc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.23, 1, .32, 1); }
.fc-switch:checked { background: var(--ok); }
.fc-switch:checked::after { transform: translateX(20px); }

/* Ventana */
.fc-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.fc-modal[hidden] { display: none; }
.fc-modal-caja { background: var(--panel); color: var(--ink); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .fc-modal { align-items: center; padding: 20px; } .fc-modal-caja { border-radius: 18px; } }

/* Trabajador y fichador: el botón grande */
.fc-yo { max-width: 520px; margin: 0 auto; text-align: center; }
.fc-hola { font-size: 22px; margin: 6px 0 2px; }
.fc-estado { color: var(--muted); margin: 0 0 18px; }
.fc-grandes { display: grid; gap: 12px; }
.fc-grande { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 84px; border-radius: 20px; border: 0; color: #fff; font: inherit; font-size: 21px; font-weight: 700; cursor: pointer; transition: transform .12s ease; }
.fc-grande:active { transform: scale(.98); }
.fc-grande.entrada, .fc-grande.vuelta { background: #15803d; }
.fc-grande.pausa { background: #b45309; }
.fc-grande.salida { background: #1e3a8a; }
.fc-grande:disabled { opacity: .6; cursor: wait; }
.fc-hecho { padding: 30px 10px; }
.fc-hecho .tic { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: #15803d; color: #fff; font-size: 46px; line-height: 84px; font-weight: 700; }
.fc-linea { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; }
.fc-linea li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.fc-pin-puntos { display: flex; justify-content: center; gap: 14px; margin: 16px 0 8px; }
.fc-pin-puntos i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.fc-pin-puntos i.on { background: var(--ink); border-color: var(--ink); }
.fc-teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.fc-teclado button { height: 68px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; font-size: 26px; cursor: pointer; }
.fc-teclado .sec { font-size: 15px; color: var(--muted); }
.fc-equipo { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 170px)); justify-content: center; gap: 10px; }
.fc-equipo button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.fc-error { min-height: 20px; color: var(--bad); font-size: 14px; margin: 6px 0; }

/* Firma con el dedo */
.fc-firma { width: 100%; height: 160px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; display: block; }

@media (prefers-reduced-motion: reduce) { .fc-grande, .fc-switch, .fc-switch::after { transition: none; } }

/* Panel y registro */
.fc-cifras { margin-bottom: 14px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.fc-cifras .fc-caja { margin-bottom: 0; padding: 12px 14px; }
.fc-cifras .fc-cifra b { font-size: 22px; }
.c-dentro { color: var(--ok); } .c-pausa { color: var(--warn); } .c-info { color: var(--info); } .c-bad { color: var(--bad); }
.fc-pasos { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.fc-seg { display: inline-flex; background: var(--panel-2); border-radius: 12px; padding: 3px; gap: 2px; }
.fc-seg a { padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.fc-seg a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.fc-nav-fecha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fc-nav-fecha .fc-in { width: auto; min-width: 150px; }
.fc-nav-txt { margin-left: 4px; }
.etq { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); margin-left: 4px; white-space: nowrap; }
.etq.ok { background: var(--ok-soft); color: var(--ok); } .etq.warn { background: var(--warn-soft); color: var(--warn); } .etq.bad { background: var(--bad-soft); color: var(--bad); }
.fc-tabla tr.semana td { font-size: 12.5px; color: var(--muted); background: var(--panel-2); padding-top: 6px; padding-bottom: 6px; }
.fc-lista { list-style: none; margin: 0; padding: 0; }
.fc-lista li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fc-lista li:last-child { border-bottom: 0; }

/* Ventana de corregir */
.fc-marcas { list-style: none; margin: 0; padding: 0; }
.fc-marcas li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.fc-marcas li.quitada > span { text-decoration: line-through; opacity: .55; }
.fc-quitar { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bad); cursor: pointer; white-space: nowrap; }
.fc-nueva { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr auto; gap: 6px; margin-bottom: 8px; }
@media (max-width: 480px) { .fc-nueva { grid-template-columns: 1fr 1fr; } .fc-nueva select { grid-column: 1 / -1; } }

/* Equipo, ajustes, accesos */
.fc-equipo-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fc-equipo-lista .fc-caja { margin-bottom: 0; }
.fc-ficha-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fc-ficha-cab h2 { margin: 0; font-size: 17px; }
.fc-ficha-cab p { margin: 2px 0 0; }
.fc-formas { list-style: none; margin: 0; padding: 0; }
.fc-formas li, .fc-linea-aparato { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fc-formas li:last-child { border-bottom: 0; }
.fc-formas .fe-detalle { flex-basis: 100%; margin-top: -6px; font-size: 12.5px; color: var(--muted); }   /* el detalle de una fila: la formación (FC19), lo que puede un encargado */
.fc-interruptor.apagado { opacity: .45; cursor: default; }   /* permisos del encargado sin «Es encargado» */
/* «Tus locales» (fase 2, FC5): un dueño con varios locales elige o cambia */
.fc-locales { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fc-local { margin-bottom: 0; display: flex; flex-direction: column; gap: 4px; }
.fc-local h2 { margin: 0; }
.fc-local .fc-linea { margin: 6px 0 12px; }
.fc-local button { margin-top: auto; }
.fc-local.actual { border-color: var(--accent); }
.fc-forma { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.fc-forma p { margin: 4px 0 6px; }
details.fc-caja > summary { cursor: pointer; list-style-position: inside; }
.fc-docs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.fc-docs li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.fc-guardar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; z-index: 5; }
.fc-rapido { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.fc-rapido.destacado { box-shadow: 0 0 0 3px var(--accent-soft); }
.fc-resolver { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-top: 8px; align-items: center; }
.fc-resolver .fc-error { grid-column: 1 / -1; margin: 0; min-height: 0; }
@media (max-width: 520px) { .fc-resolver { grid-template-columns: 1fr 1fr; } .fc-resolver .fc-in { grid-column: 1 / -1; } }

/* Móvil del trabajador */
.fc-reloj { font-family: Poppins, Geist, sans-serif; font-size: 46px; font-weight: 700; margin: 4px 0 0; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.fc-yo-secciones { max-width: 520px; margin: 22px auto 0; }
.fc-hecho b { display: block; font-size: 20px; }
.fc-hecho p { margin: 8px 0 0; }

/* Fichador del local */
body.modo-fichador .fc-main { max-width: 900px; padding-top: 12px; }
.fd { text-align: center; }
.fd-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; margin-bottom: 18px; }
.fd-cab span:first-child { display: flex; flex-direction: column; }
.fd-cab small { color: var(--muted); }
.fd-reloj { font-family: Poppins, Geist, sans-serif; font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fd h1 { font-size: 26px; margin-bottom: 14px; }
.fd .fc-grandes { max-width: 520px; margin: 0 auto; }
.fd .fc-linea { max-width: 520px; margin-left: auto; margin-right: auto; }
.fd .fc-equipo { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.fd .fc-equipo button { min-height: 120px; font-size: 16px; }
.fd .fc-equipo .fc-ini { width: 52px; height: 52px; font-size: 18px; }
#fd-cola { max-width: 520px; margin: 16px auto 0; }

/* Botón pequeño dentro de una celda (corregir) */
.fc-mini { display: block; margin-top: 4px; padding: 2px 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fc-mini:hover { text-decoration: underline; }
@media (max-width: 520px) { .fc-tabla { font-size: 13px; } .fc-tabla td, .fc-tabla th { padding: 8px 7px; } }

/* ── Turnos: el cuadrante de la semana (fase 2, 29/10/2026) ── */
/* Seis colores para los turnos: fondo suave y tinta que se lee en claro y en oscuro */
:root {
  --t-a: var(--accent-soft); --t-a-ink: var(--accent-ink);
  --t-b: rgba(37, 99, 235, .12); --t-b-ink: #1d4ed8;
  --t-c: rgba(21, 128, 61, .12); --t-c-ink: #166534;
  --t-d: rgba(194, 65, 12, .12); --t-d-ink: #9a3412;
  --t-e: rgba(190, 24, 93, .11); --t-e-ink: #9d174d;
  --t-f: rgba(109, 40, 217, .11); --t-f-ink: #5b21b6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-b: rgba(96, 165, 250, .16); --t-b-ink: #93c5fd; --t-c: rgba(74, 222, 128, .14); --t-c-ink: #86efac;
    --t-d: rgba(251, 146, 60, .15); --t-d-ink: #fdba74; --t-e: rgba(244, 114, 182, .15); --t-e-ink: #f9a8d4;
    --t-f: rgba(167, 139, 250, .16); --t-f-ink: #c4b5fd;
  }
}
:root[data-theme="dark"] {
  --t-b: rgba(96, 165, 250, .16); --t-b-ink: #93c5fd; --t-c: rgba(74, 222, 128, .14); --t-c-ink: #86efac;
  --t-d: rgba(251, 146, 60, .15); --t-d-ink: #fdba74; --t-e: rgba(244, 114, 182, .15); --t-e-ink: #f9a8d4;
  --t-f: rgba(167, 139, 250, .16); --t-f-ink: #c4b5fd;
}
.cu-c-a { background: var(--t-a); color: var(--t-a-ink); } .cu-c-b { background: var(--t-b); color: var(--t-b-ink); }
.cu-c-c { background: var(--t-c); color: var(--t-c-ink); } .cu-c-d { background: var(--t-d); color: var(--t-d-ink); }
.cu-c-e { background: var(--t-e); color: var(--t-e-ink); } .cu-c-f { background: var(--t-f); color: var(--t-f-ink); }
.cu-c-n { background: var(--panel-2); color: var(--ink); }   /* horas sueltas, sin turno del local */

.cu-nav-txt { font-weight: 700; min-width: 118px; text-align: center; font-variant-numeric: tabular-nums; }
table.cu-tabla { min-width: 780px; table-layout: fixed; }
.cu-tabla th, .cu-tabla td { padding: 6px; }
.cu-tabla thead th { text-align: center; }
.cu-tabla .cu-persona { position: sticky; left: 0; z-index: 1; width: 150px; text-align: left; border-right: 1px solid var(--line); }
.cu-tabla tbody .cu-persona { background: var(--panel); color: var(--ink); font-size: 14px; white-space: normal; vertical-align: middle; }
.cu-tabla .cu-persona b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-tabla .cu-persona small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-tabla th.cu-hoy { color: var(--accent-ink); }
.cu-tabla td.cu-hoy { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.cu-td { vertical-align: middle; }
.cu-celda { width: 100%; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 5px 4px;
  border-radius: 9px; border: 1px solid transparent; font: inherit; cursor: pointer; position: relative; text-align: center; line-height: 1.2; }
.cu-celda b { font-size: 12.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-celda small { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cu-vacia { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 18px; }
.cu-libre { background: var(--panel-2); color: var(--muted); }
.cu-libre b { font-weight: 600; font-style: italic; }
.cu-celda:focus-visible, .cu-turno:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cu-nota { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.cu-fuera { background: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--panel-2) 5px, var(--panel-2) 10px); }
.cu-total { vertical-align: middle; }
.cu-total small { display: block; color: var(--muted); font-size: 11.5px; }
.cu-total small.cu-mas { color: var(--warn); }
.cu-total small.cu-menos { color: var(--info); }
.cu-tabla tfoot td { font-size: 12px; color: var(--muted); text-align: center; background: var(--panel-2); border-top: 1px solid var(--line); }
.cu-tabla tfoot .cu-persona { background: var(--panel-2); }
.cu-acciones { justify-content: flex-start; }
.cu-ayuda { margin-top: 8px; }
@media (hover: hover) and (pointer: fine) {
  .cu-celda { transition: transform .12s var(--ease-out, ease-out), box-shadow .12s ease; }
  .cu-celda:hover { box-shadow: 0 0 0 2px var(--accent) inset; }
  .cu-vacia:hover { color: var(--accent-ink); }
}
/* La ventana de una casilla y la de los turnos */
.cu-turnos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cu-turno { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; cursor: pointer; text-align: left; min-height: 58px; }
.cu-turno small { font-variant-numeric: tabular-nums; }
.cu-turno.on { border-color: currentColor; }
.cu-fila { display: flex; gap: 8px; }
.cu-fila .fc-in { flex: 1; min-width: 0; }
.cu-lista-turnos li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cu-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 8px; font-size: 13.5px; }
.cu-colores { border: 0; padding: 0; margin: 0 0 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.cu-colores legend { padding: 0; margin-bottom: 6px; }
.cu-color { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: inline-block; border: 2px solid transparent; position: relative; }
.cu-color:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--panel) inset; }
.cu-color input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cu-color:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* El turno del día en «Hoy», el registro y el móvil */
.cu-previsto { display: block; font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { table.cu-tabla { min-width: 690px; } .cu-tabla .cu-persona { width: 112px; } }

/* ── Vacaciones y ausencias (fase 2, 29/10/2026) ── */
.cu-seg { margin: 0 0 12px; }
.cu-aus { background: var(--info-soft); color: var(--info); text-decoration: none; }
.cu-aus b { font-weight: 600; font-style: italic; }
.cu-fest { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 600; color: var(--bad); text-transform: lowercase; cursor: help; }
.au-lista li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.au-lista li > div { flex-basis: 100%; }
.au-resolver { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.au-resolver .fc-in { flex: 1 1 220px; min-width: 0; }
.au-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 12px; align-items: end; }
.au-form .au-nota, .au-form .au-aviso-baja, .au-form .fc-error { grid-column: 1 / -1; }
.au-enviar { margin-bottom: 12px; }
.au-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.au-cab h2 { margin: 0; }
.au-festivos { columns: 2 220px; column-gap: 24px; padding-left: 18px; margin: 8px 0 14px; }
.au-festivos li { break-inside: avoid; margin-bottom: 4px; font-size: 14px; }

/* ── Horas de más (fase 2, 29/10/2026) ── */
.hx-tabla td { vertical-align: middle; }
.hx-tabla .hx-in { width: 86px; min-height: 36px; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.hx-tabla .hx-in:disabled { background: transparent; border-style: dashed; opacity: .55; }
