/* Horarios del equipo (horarios-plan.js, Erick 08-11).
   Todo dentro de .marcas. Los colores de los turnos son tintes planos (llevan texto adentro, y ahí el vidrio estorba:
   ver .claude/skills/liquid-glass): relleno suave + canto del mismo color. La pantalla angosta se decide por el
   ancho del módulo (@container marcas), igual que el resto de Marcas. */

.marcas [data-color="azul"]     { --tono:#74b3f0; }
.marcas [data-color="ambar"]    { --tono:#f9c157; }
.marcas [data-color="verde"]    { --tono:#5fc88f; }
.marcas [data-color="turquesa"] { --tono:#2bb3ad; }
.marcas [data-color="violeta"]  { --tono:#b39ddb; }
.marcas [data-color="rosa"]     { --tono:#f2a0b8; }
.marcas [data-color="coral"]    { --tono:#e8836b; }
.marcas [data-color="gris"]     { --tono:#a4adb8; }

.marcas .hp { display:grid; gap:18px; }
.marcas .hp-panel .ma-titulo { margin-bottom:14px; }
.marcas .hp-modos { display:inline-flex; gap:3px; padding:3px; flex:none; margin:0; }
.marcas .hp-modos button { min-height:38px; padding:0 18px; font-size:13px; font-weight:650; background:transparent; box-shadow:none; }
.marcas .hp-modos button.on { background:var(--ma-boton); box-shadow:var(--ma-boton-canto); color:var(--ink); }

/* La semana (o el mes) que se mira */
.marcas .hp-nav { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:8px; margin-bottom:14px; }
.marcas .hp-flecha { width:44px; padding:0 !important; }
.marcas .hp-flecha svg { width:20px; height:20px; }
.marcas .hp-nav-titulo { text-align:center; min-width:0; }
.marcas .hp-nav-titulo strong { display:block; font-size:18px; font-weight:700; letter-spacing:-.01em; }
.marcas .hp-corto { display:none; }
.marcas .hp-nav-titulo small { display:block; margin-top:2px; font-size:12.5px; color:var(--muted); }
.marcas .hp-hoy { min-height:44px; padding:0 16px; font-size:13px; }

/* La guía de arriba: dice qué hacer y, con casillas elegidas, ofrece los turnos. Su alto mínimo evita que la cuadrícula brinque. */
.marcas .hp-guia { display:flex; align-items:center; gap:12px; min-height:68px; padding:14px 16px; margin-bottom:14px; border-radius:16px; background:var(--v-pozo); box-shadow:var(--v-pozo-canto); }
.marcas .hp-guia > svg, .marcas .hp-guia > i { flex:none; width:22px; height:22px; color:var(--m-marcas); }
.marcas .hp-guia p { margin:0; font-size:13.5px; line-height:1.45; color:var(--ink); }
.marcas .hp-guia[data-estado="pasada"] p { color:var(--muted); }
.marcas .hp-guia[data-tono="bien"] > svg, .marcas .hp-guia[data-tono="bien"] > i { color:#2a9d6a; }
.marcas .hp-guia[data-tono="error"] > svg, .marcas .hp-guia[data-tono="error"] > i { color:var(--red); }
.marcas .hp-error { margin:0; flex-basis:100%; font-size:13px; color:var(--red); }
.marcas .hp-barra { display:grid; align-items:stretch; gap:12px; }
.marcas .hp-barra-cuenta { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.marcas .hp-barra-cuenta b { font-size:16px; font-variant-numeric:tabular-nums; }
.marcas .hp-barra-turnos { display:flex; flex-wrap:wrap; gap:8px; }
.marcas .hp-sin-turnos { color:var(--muted) !important; }
.marcas .hp-suave { min-height:38px; padding:0 14px; font-size:13px; font-weight:600; background:transparent; box-shadow:inset 0 0 0 1px var(--line); }
.marcas .hp-suave svg { width:16px; height:16px; }

/* Un turno: una pastilla con su color */
.marcas .hp-turno:not([data-color]) { --tono:var(--muted); }
.marcas .hp-turno { min-height:52px; padding:6px 14px 6px 12px; gap:10px; justify-content:flex-start; text-align:left; border-radius:14px;
  background:color-mix(in srgb, var(--tono) 24%, transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--tono) 55%, transparent); }
.marcas .hp-turno:hover:not(:disabled) { background:color-mix(in srgb, var(--tono) 34%, transparent); }
.marcas .hp-turno span { display:grid; gap:1px; min-width:0; }
.marcas .hp-turno b { font-size:13.5px; font-weight:700; }
.marcas .hp-turno small { font-size:12px; font-weight:500; color:var(--muted); font-variant-numeric:tabular-nums; }
.marcas .hp-punto { flex:none; width:12px; height:12px; border-radius:50%; background:var(--tono); box-shadow:0 0 0 2px color-mix(in srgb, var(--tono) 30%, transparent); }
.marcas .hp-libre, .marcas .hp-otras-boton { background:transparent; box-shadow:inset 0 0 0 1px var(--line); --tono:var(--muted); }
.marcas .hp-libre .hp-punto, .marcas .hp-otras-boton .hp-punto { background:transparent; box-shadow:inset 0 0 0 2px var(--muted); }
.marcas .hp-otras { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; padding-top:12px; border-top:1px solid var(--line); }
.marcas .hp-otras label, .marcas .hp-editor-horas label { display:grid; gap:5px; font-size:12px; font-weight:600; color:var(--muted); }
.marcas .hp-otras input, .marcas .hp-editor input[type="time"], .marcas .hp-editor input[type="number"], .marcas .hp-editor input[name="hp-nombre"] { min-height:42px; border:1px solid var(--line); background:var(--v-pozo); border-radius:10px; padding:6px 10px; color:var(--ink); font-size:14px; font-variant-numeric:tabular-nums; }
.marcas .hp-otras input[type="number"], .marcas .hp-editor input[type="number"] { width:96px; }
.marcas .hp-otras-botones { display:flex; gap:8px; flex-wrap:wrap; }

/* La cuadrícula */
.marcas .hp-tabla { overflow-x:auto; margin:0 -6px; padding:0 6px 4px; }
.marcas .hp-tabla table { width:100%; min-width:800px; border-collapse:separate; border-spacing:5px; table-layout:fixed; }
.marcas .hp-tabla th, .marcas .hp-tabla td { padding:0; text-align:center; font-weight:500; vertical-align:middle; }
.marcas .hp-tabla thead th:first-child, .marcas .hp-tabla tbody th { width:206px; text-align:left; }
.marcas .hp-col { width:100%; min-height:48px; flex-direction:column; gap:1px; padding:4px 0; background:transparent; box-shadow:none; font-size:12.5px; color:var(--muted); }
.marcas .hp-col small { font-size:16px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.marcas .hp-col:hover:not(:disabled), .marcas .hp-col[aria-pressed="true"] { background:rgb(var(--ac) / .12); }
.marcas .hp-tabla thead th[data-hoy] .hp-col { color:var(--m-marcas); box-shadow:inset 0 -3px 0 var(--m-marcas); border-radius:12px 12px 0 0; }
.marcas .hp-todo { min-height:40px; padding:0 12px; font-size:12.5px; background:transparent; box-shadow:inset 0 0 0 1px var(--line); }
.marcas .hp-todo svg { width:16px; height:16px; }
.marcas .hp-persona { display:flex; align-items:center; gap:4px; }
.marcas .hp-nombre { flex:1; min-width:0; justify-content:flex-start; gap:10px; min-height:62px; padding:4px 8px; text-align:left; white-space:normal; font-weight:500; background:transparent; box-shadow:none; border-radius:14px; }
.marcas .hp-nombre:hover:not(:disabled), .marcas .hp-nombre[aria-pressed="true"] { background:rgb(var(--ac) / .12); }
.marcas .hp-nombre strong { display:block; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:11ch; }
.marcas .hp-nombre small { display:block; margin-top:2px; font-size:12px; font-weight:500; color:var(--muted); white-space:normal; }
.marcas .hp-fijo { flex:none; width:36px; min-height:36px; padding:0 !important; background:transparent; box-shadow:none; color:var(--muted); }
.marcas .hp-fijo svg { width:16px; height:16px; }

.marcas .hp-celda { position:relative; width:100%; min-height:62px; flex-direction:column; gap:1px; padding:6px 4px; border-radius:12px; font-weight:500; white-space:normal;
  background:transparent; box-shadow:inset 0 0 0 1px var(--line); transition:background-color .15s, box-shadow .15s, transform .12s; }
.marcas .hp-celda[data-estado="turno"] { background:color-mix(in srgb, var(--tono, var(--muted)) 24%, transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--tono, var(--muted)) 55%, transparent); }
.marcas .hp-celda[data-estado="turno"]:not([data-color]) { --tono:var(--muted); }
.marcas .hp-celda[data-estado="libre"] { background:var(--v-pozo); box-shadow:none; }
.marcas .hp-celda[data-estado="sin"] { box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); }
.marcas .hp-celda:hover:not(:disabled) { box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--m-marcas) 60%, transparent); }
.marcas .hp-celda[aria-pressed="true"] { box-shadow:inset 0 0 0 2.5px var(--m-marcas); }
.marcas .hp-celda[aria-pressed="true"]::after { content:""; position:absolute; top:6px; right:6px; width:16px; height:16px; border-radius:50%; background:var(--m-marcas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.3 6.8 11 12 5.2'/%3E%3C/svg%3E") center/12px no-repeat; }
.marcas .hp-celda[data-cambio]::before { content:""; position:absolute; left:3px; top:12px; bottom:12px; width:3px; border-radius:3px; background:var(--m-marcas); }
.marcas .hp-celda:disabled { opacity:.5; }
.marcas .hp-dentro { display:grid; gap:1px; justify-items:center; }
.marcas .hp-hora { display:grid; gap:1px; justify-items:center; }
.marcas .hp-hora b { font-size:13px; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }
.marcas .hp-hora small { font-size:12px; font-weight:500; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.marcas .hp-dentro em { font-style:normal; font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; color:var(--muted); margin-top:2px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.marcas .hp-vacio { font-size:13px; color:var(--muted); }
.marcas .hp-dia-m { display:none; }
.marcas .hp-tabla tbody td[data-hoy] .hp-celda:not([aria-pressed="true"]) { box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--m-marcas) 45%, transparent); }
.marcas .hp-nota { margin:10px 2px 0; font-size:12.5px; color:var(--muted); }

/* Copiar y repetir */
.marcas .hp-herramientas { margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.marcas .hp-herr-fila { display:flex; flex-wrap:wrap; gap:10px; }
.marcas .hp-herr { min-height:42px; padding:0 16px; font-size:13px; }
.marcas .hp-herr svg { width:17px; height:17px; }
.marcas .hp-herr[aria-expanded="true"] { box-shadow:inset 0 0 0 2px var(--m-marcas); }
.marcas .hp-herr-nota { margin:10px 2px 0; font-size:12.5px; color:var(--muted); }
.marcas .hp-opciones { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; margin-top:12px; }
.marcas .hp-opcion { display:grid; gap:3px; justify-items:start; align-content:center; min-height:64px; padding:10px 14px; text-align:left; white-space:normal; border-radius:14px; }
.marcas .hp-opcion b { font-size:13.5px; }
.marcas .hp-opcion small { font-size:12px; font-weight:500; color:var(--muted); line-height:1.35; }

/* El mes */
.marcas .hp-tabla-mes table { min-width:640px; }
.marcas .hp-tabla-mes thead th { padding:6px 4px 8px; font-size:12.5px; font-weight:650; color:var(--muted); }
.marcas .hp-tabla-mes thead th small { display:block; font-size:11px; color:var(--m-marcas); font-weight:700; margin-top:1px; }
.marcas .hp-tabla-mes thead th:first-child, .marcas .hp-tabla-mes tbody th { width:180px; }
.marcas .hp-persona-mes { display:flex; align-items:center; gap:10px; min-height:62px; padding:0 8px; }
.marcas .hp-persona-mes strong { font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.marcas .hp-semana { width:100%; min-height:62px; flex-direction:column; gap:2px; padding:6px 4px; border-radius:12px; background:transparent; box-shadow:inset 0 0 0 1px var(--line); font-weight:500; }
.marcas .hp-semana b { font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; }
.marcas .hp-semana small { font-size:11.5px; color:var(--muted); }
.marcas .hp-semana[data-origen="fecha"] { background:rgb(var(--ac) / .13); box-shadow:inset 0 0 0 1px rgb(var(--ac) / .42); }
.marcas .hp-semana[data-origen="repite"] { background-image:repeating-linear-gradient(135deg, transparent 0 7px, rgb(var(--ac) / .08) 7px 8px); }
.marcas .hp-semana[data-origen="sin"] { background:var(--v-pozo); box-shadow:none; opacity:.8; }
.marcas .hp-semana[data-origen="pasada"] { background:var(--v-pozo); box-shadow:none; }
.marcas .hp-semana[data-hoy] { box-shadow:inset 0 0 0 2px var(--m-marcas); }
.marcas .hp-leyenda { display:flex; flex-wrap:wrap; gap:6px 18px; margin:12px 2px 0; font-size:12.5px; color:var(--muted); }
.marcas .hp-leyenda span { display:inline-flex; align-items:center; gap:7px; }
.marcas .hp-leyenda i { width:14px; height:14px; border-radius:5px; box-shadow:inset 0 0 0 1px var(--line); }
.marcas .hp-leyenda i[data-origen="fecha"] { background:rgb(var(--ac) / .2); box-shadow:inset 0 0 0 1px rgb(var(--ac) / .5); }
.marcas .hp-leyenda i[data-origen="repite"] { background-image:repeating-linear-gradient(135deg, transparent 0 3px, rgb(var(--ac) / .22) 3px 4px); }
.marcas .hp-leyenda i[data-origen="sin"], .marcas .hp-leyenda i[data-origen="pasada"] { background:var(--v-pozo); }

/* Sus turnos */
.marcas .hp-turnos-lista { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.marcas .hp-turnos-lista .hp-turno[aria-pressed="true"] { box-shadow:inset 0 0 0 2px var(--m-marcas); }
.marcas .hp-vacio-turnos p { margin:0 0 14px; max-width:60ch; font-size:13.5px; line-height:1.5; color:var(--muted); }
.marcas .hp-vacio-turnos b { color:var(--ink); }
.marcas .hp-vacio-botones, .marcas .hp-editor-botones { display:flex; flex-wrap:wrap; gap:10px; }
.marcas .hp-confirmar { min-height:44px; padding:0 18px; background:rgb(var(--ac) / .2); box-shadow:inset 0 0 0 1px rgb(var(--ac) / .5); }
.marcas .hp-confirmar svg { width:17px; height:17px; }
.marcas .hp-editor { display:grid; gap:14px; margin-top:16px; padding:18px; border-radius:16px; background:var(--v-pozo); box-shadow:var(--v-pozo-canto); }
.marcas .hp-nombre-turno { max-width:360px; }
.marcas .hp-editor-horas { display:flex; flex-wrap:wrap; gap:14px; }
.marcas .hp-ayuda { margin:0; font-size:12.5px; color:var(--muted); }
.marcas .hp-colores { border:0; margin:0; padding:0; min-width:0; }
.marcas .hp-colores legend { padding:0; margin-bottom:8px; font-size:12px; font-weight:600; color:var(--muted); }
.marcas .hp-colores > div { display:flex; flex-wrap:wrap; gap:10px; }
.marcas .hp-color { position:relative; display:inline-flex; width:40px; height:40px; cursor:pointer; }
.marcas .hp-color input { position:absolute; inset:0; margin:0; opacity:0; cursor:pointer; }
.marcas .hp-muestra { width:100%; height:100%; border-radius:50%; background:color-mix(in srgb, var(--tono) 70%, transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--tono) 90%, transparent); transition:box-shadow .15s, transform .12s; }
.marcas .hp-color:hover .hp-muestra { transform:scale(1.06); }
.marcas .hp-color input:checked + .hp-muestra { box-shadow:inset 0 0 0 1px var(--tono), 0 0 0 3px var(--m-marcas); }
.marcas .hp-color input:focus-visible + .hp-muestra { outline:2px solid var(--m-marcas); outline-offset:3px; }
.marcas .hp-quitar { margin-left:auto; min-height:44px; background:transparent; box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 55%, transparent); color:var(--red); }
.marcas .hp-quitar svg { width:16px; height:16px; }

/* Guardar */
.marcas .hp-guardar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:16px 20px; border-radius:18px; background:var(--v-lamina); box-shadow:var(--v-canto), var(--shadow); }
.marcas .hp-guardar p { margin:0; font-size:14px; }
.marcas .hp-guardar small { display:block; margin-top:3px; font-size:12.5px; color:var(--muted); }
.marcas .hp-guardar .ma-botones { border:0; margin:0; padding:0; }
.marcas .ma-hor-fijo-nota { margin:0 0 14px; }

/* Pantalla angosta (teléfono): cada persona es una tarjeta con sus siete días, uno debajo de otro. */
@container marcas (max-width:640px) {
  .marcas .hp-modos { align-self:stretch; display:grid; grid-template-columns:1fr 1fr; }
  .marcas .hp-nav-titulo strong { font-size:16px; }
  .marcas .hp-nav-titulo .hp-largo { display:none; }
  .marcas .hp-nav-titulo strong .hp-corto { display:inline; }
  .marcas .hp-nav-titulo small .hp-largo { display:none; }
  .marcas .hp-hoy { padding:0 12px; }
  .marcas .hp-guia { min-height:0; }
  .marcas .hp-barra-turnos { display:flex; flex-wrap:wrap; }
  .marcas .hp-turno { min-width:0; flex:1 1 100%; }
  .marcas .hp-libre, .marcas .hp-otras-boton { flex:1 1 calc(50% - 4px); }
  .marcas .hp-otras-boton small { white-space:normal; }
  .marcas .hp-tabla { overflow:visible; margin:0; padding:0; }
  .marcas .hp-tabla table, .marcas .hp-tabla tbody, .marcas .hp-tabla tr, .marcas .hp-tabla th, .marcas .hp-tabla td { display:block; min-width:0; width:auto; }
  .marcas .hp-tabla table { border-spacing:0; }
  .marcas .hp-tabla thead th:not(:first-child) { display:none; }
  .marcas .hp-tabla thead th:first-child { width:auto; margin-bottom:10px; }
  .marcas .hp-todo { width:100%; min-height:44px; }
  .marcas .hp-tabla tbody tr { margin-bottom:12px; padding:8px; border-radius:18px; background:var(--v-pozo); box-shadow:var(--v-pozo-canto); }
  .marcas .hp-tabla tbody th { width:auto; padding:0 0 6px; }
  .marcas .hp-nombre strong { max-width:none; font-size:15px; }
  .marcas .hp-tabla td { margin-top:4px; }
  .marcas .hp-celda { flex-direction:row; justify-content:flex-start; gap:12px; min-height:56px; padding:6px 12px; text-align:left; }
  .marcas .hp-dia-m { display:flex; align-items:baseline; gap:5px; width:62px; flex:none; font-size:13px; font-weight:700; color:var(--ink); }
  .marcas .hp-dia-m small { font-size:12.5px; font-weight:500; color:var(--muted); }
  .marcas .hp-dentro { display:flex; align-items:center; flex-wrap:wrap; justify-items:start; gap:2px 10px; }
  .marcas .hp-hora { display:flex; align-items:baseline; gap:6px; }
  .marcas .hp-hora small::before { content:"a "; }
  .marcas .hp-dentro em { margin:0; }
  .marcas .hp-celda[aria-pressed="true"]::after { top:50%; right:10px; margin-top:-8px; }
  .marcas .hp-celda[data-cambio]::before { top:10px; bottom:10px; left:3px; }
  .marcas .hp-tabla-mes table { display:table; min-width:560px; border-spacing:5px; }
  .marcas .hp-tabla-mes thead, .marcas .hp-tabla-mes tbody { display:table-row-group; }
  .marcas .hp-tabla-mes tr { display:table-row; margin:0; padding:0; background:none; box-shadow:none; }
  .marcas .hp-tabla-mes th, .marcas .hp-tabla-mes td { display:table-cell; }
  .marcas .hp-tabla-mes thead th:not(:first-child) { display:table-cell; }
  .marcas .hp-tabla-mes { overflow-x:auto; margin:0 -4px; padding:0 4px 4px; }
  .marcas .hp-tabla-mes tbody th { position:sticky; left:0; z-index:1; width:120px; background:var(--v-lamina); }
  .marcas .hp-tabla-mes thead th:first-child, .marcas .hp-tabla-mes tbody th { width:120px; }
  .marcas .hp-persona-mes .avatar { display:none; }
  .marcas .hp-persona-mes strong { max-width:100px; }
  .marcas .hp-guardar { flex-direction:column; align-items:stretch; }
  .marcas .hp-guardar .ma-botones { flex-direction:column; }
  .marcas .hp-quitar { margin-left:0; }
  .marcas .hp-opciones { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) { .marcas .hp-celda, .marcas .hp-muestra { transition:none; } }
