/* Sistema visual: los colores del poste de barbería, en serio.
   Menú azul noche, acción principal en azul cobalto, rojo solo para alertas y la hora actual.
   Una sola familia (Schibsted Grotesk). */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url("fuentes/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-display: swap; src: url("fuentes/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url("fuentes/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("fuentes/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url("fuentes/schibsted-grotesk-latin-800-normal.woff2") format("woff2"); }

:root {
  --papel: #FFFFFF;
  --tinta: #0F172A;
  --gris: #64748B;
  --linea: #E2E8F0;
  --linea-suave: #F1F5F9;
  --rojo: #E03A3E;
  --rojo-claro: #FDECEC;
  --verde: #12955A;
  --verde-claro: #E3F5EC;
  --sombra: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.05);
  --radio: 14px;
  --fila: 46px;              /* alto de un intervalo en la agenda */
  --lateral: 216px;
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--tinta);
}
/* Temas: cada barbería elige el suyo en Configuración. Turquesa es el de fábrica. */
[data-tema="carbon"] { --noche: #1E1F24; --noche-2: #2D2F36; --acento: #E5484D; --acento-oscuro: #C93338; --acento-claro: #FDECEC; --fondo: #F4F4F5; }
[data-tema="violeta"] { --noche: #1B1530; --noche-2: #2C2350; --acento: #6E44FF; --acento-oscuro: #5A30EC; --acento-claro: #F0EBFF; --fondo: #F4F3F9; }
[data-tema="esmeralda"] { --noche: #0E2A23; --noche-2: #173F35; --acento: #0E9F74; --acento-oscuro: #0A825F; --acento-claro: #E2F5EE; --fondo: #F1F6F4; }
:root, [data-tema="turquesa"] { --noche: #1D232B; --noche-2: #2B333F; --acento: #0891B2; --acento-oscuro: #0E7490; --acento-claro: #E0F3F8; --fondo: #F2F5F7; }
[data-tema="cobalto"] { --noche: #0E1B3D; --noche-2: #1A2B57; --acento: #2F5BFF; --acento-oscuro: #1E44E0; --acento-claro: #EAF0FF; --fondo: #F1F4F9; }
[data-tema="bordo"] { --noche: #2A1219; --noche-2: #42202B; --acento: #B3264F; --acento-oscuro: #951E41; --acento-claro: #FBE9EF; --fondo: #F7F3F4; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); }
a { color: inherit; }
h1 { font-size: 1.9rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
.suave { color: var(--gris); }
.chico-txt { font-size: .85rem; }
.derecha { text-align: right; white-space: nowrap; }
.tachado { text-decoration: line-through; opacity: .5; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; background: var(--noche); color: #fff;
  display: flex; flex-direction: column; padding: 20px 12px; gap: 2px; }
.marca { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; padding: 4px 10px 22px; line-height: 1.15; color: #fff; display: flex; align-items: center; gap: 10px; }
.marca::before { content: ""; width: 10px; height: 26px; border-radius: 3px; flex: none;
  background: repeating-linear-gradient(135deg, var(--rojo) 0 5px, #fff 5px 9px, var(--acento) 9px 14px, #fff 14px 18px); }
.lateral a.item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none;
  color: rgba(255,255,255,.66); font-weight: 500; }
.lateral a.item:hover { background: var(--noche-2); color: #fff; }
.lateral a.item[aria-current="page"] { background: var(--acento); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--acento) 40%, transparent); }
.lateral a.item svg { width: 19px; height: 19px; flex: none; }
.lateral .pie { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: rgba(255,255,255,.55); }
.lateral .pie strong { display: block; color: #fff; font-weight: 600; }
.contenido { padding: 28px 36px 48px; width: 100%; min-width: 0; }
.encabezado { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.encabezado .acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Superficies y listas ---------- */
.seccion { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px; margin-bottom: 16px; box-shadow: var(--sombra); }
.seccion.angosta { max-width: 760px; }
.seccion.sin-padding { padding: 0; overflow: hidden; }
.columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--gris); font-size: .85rem; padding: 10px 14px; border-bottom: 1px solid var(--linea); }
td { padding: 11px 14px; border-bottom: 1px solid var(--linea-suave); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #F8FAFF; }
td a { text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
.vacio { padding: 28px 20px; color: var(--gris); text-align: center; }

/* Cifras del día: una fila, sin tarjetas */
.cifras { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 20px; }
.cifra { min-width: 110px; }
.cifra b { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.cifra span { color: var(--gris); font-size: .85rem; }

/* ---------- Botones y formularios ---------- */
.btn, button { font: inherit; font-weight: 600; border: 1px solid var(--acento); background: var(--acento); color: #fff;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.btn:hover, button:hover { background: var(--acento-oscuro); border-color: var(--acento-oscuro); }
.btn.sec, button.sec { background: var(--papel); color: var(--tinta); border-color: var(--linea); }
.btn.sec:hover, button.sec:hover { background: var(--papel); border-color: var(--acento); color: var(--acento); }
.btn.peligro, button.peligro { background: var(--papel); color: var(--rojo); border-color: var(--linea); }
.btn.peligro:hover, button.peligro:hover { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.btn.cobrar, button.cobrar { background: var(--verde); border-color: var(--verde); }
.btn.cobrar:hover, button.cobrar:hover { background: #0C7E4B; border-color: #0C7E4B; }
.btn.chico, button.chico { padding: 6px 11px; font-size: .87rem; }
.btn svg { width: 16px; height: 16px; }
.icono-btn { padding: 7px; }
form { margin: 0; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; margin-bottom: 14px; }
.campos .ancho { grid-column: 1 / -1; }
label { display: block; font-size: .85rem; color: var(--gris); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px;
  background: var(--papel); color: var(--tinta); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 18%, transparent); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--acento); vertical-align: -3px; margin: 0 8px 0 0; }
label.check { display: flex; align-items: center; color: var(--tinta); font-size: .95rem; margin: 6px 0 12px; font-weight: 400; }
.ayuda { font-size: .85rem; color: var(--gris); margin: -4px 0 14px; }
.botones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* Estados y etiquetas */
.etiqueta { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 500;
  background: var(--linea-suave); color: var(--gris); white-space: nowrap; }
.etiqueta.ok { background: var(--verde-claro); color: var(--verde); }
.etiqueta.mal { background: var(--rojo-claro); color: var(--rojo); }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.aviso { background: var(--rojo-claro); color: var(--rojo); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }

.encontrado { margin: -4px 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--linea-suave); color: var(--gris); font-size: .9rem; }
.encontrado.ok { background: var(--verde-claro); color: var(--tinta); }
.encontrado .nota { color: var(--gris); }

.aviso-link { display: block; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; text-decoration: none; background: var(--acento-claro); color: var(--tinta); }
.aviso-link:hover { filter: brightness(.98); }
button.wpp svg { width: 16px; height: 16px; color: #1FAF5A; }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.galeria figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--linea-suave); }
.galeria img, .galeria video { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria .quitar { position: absolute; top: 4px; right: 4px; padding: 4px; background: rgba(255,255,255,.9); }
.galeria .quitar svg { width: 14px; height: 14px; }
.subir { aspect-ratio: 1; }
.subir-btn { height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed var(--linea); border-radius: 10px; cursor: pointer; color: var(--gris); font-size: .85rem; text-align: center; padding: 8px; }
.subir-btn:hover { border-color: var(--acento); color: var(--acento); }
.subir-btn svg { width: 26px; height: 26px; }
.subir-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Calendario de visitas del cliente */
.cal-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.cal-grilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dia-nombre { font-size: .75rem; color: var(--gris); text-align: center; padding-bottom: 4px; }
.cal-dia, .cal-vacio { aspect-ratio: 1; border-radius: 8px; position: relative; overflow: hidden; }
.cal-dia { background: var(--fondo); display: block; text-decoration: none; color: var(--gris); }
.cal-dia .num { position: absolute; top: 5px; left: 7px; font-size: .78rem; font-weight: 500; }
.cal-dia.hoy { box-shadow: inset 0 0 0 1.5px var(--acento); }
.cal-dia.con-visita { background-color: color-mix(in srgb, var(--c) 16%, white); background-size: cover; background-position: center;
  color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--c); transition: transform .12s ease; }
.cal-dia.con-visita:hover { transform: scale(1.04); }
.cal-dia.con-visita[style*="background-image"] .num { background: rgba(255,255,255,.92); border-radius: 5px; padding: 0 5px; left: 4px; top: 4px; }
.cal-dia.falta { background: var(--rojo-claro); box-shadow: inset 0 0 0 1.5px var(--rojo); }
.cal-dia.futura { background: var(--fondo); box-shadow: inset 0 0 0 1.5px dashed var(--c); }
.cal-txt { position: absolute; left: 6px; right: 6px; bottom: 5px; font-size: .68rem; line-height: 1.15; font-weight: 500;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-medios { position: absolute; right: 4px; bottom: 4px; background: var(--tinta); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 6px; }

.perfil-cab { display: flex; gap: 14px; align-items: center; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; flex: none; }
.avatar.grande { width: 56px; height: 56px; font-size: 1.5rem; }
.galeria figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: .75rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); }

.nota-cliente { background: var(--linea-suave); border-left: 4px solid var(--noche); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.nota-cliente span { display: block; font-size: .8rem; color: var(--gris); }

/* Reserva de turno */
.reserva .paso { padding: 16px 0; border-bottom: 1px solid var(--linea-suave); }
.reserva .paso:first-of-type { padding-top: 4px; }
.reserva .paso[hidden] { display: none; }
.paso-titulo { display: block; font-size: .85rem; font-weight: 600; color: var(--gris); margin-bottom: 10px; }
.pildoras { display: flex; flex-wrap: wrap; gap: 8px; }
.pildora { margin: 0; cursor: pointer; }
.pildora input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pildora > span { display: inline-flex; flex-direction: column; padding: 9px 14px; border: 1.5px solid var(--linea); border-radius: 12px;
  color: var(--tinta); font-weight: 500; font-size: .95rem; line-height: 1.25; background: var(--papel); transition: border-color .12s, background .12s; }
.pildora > span small { font-size: .78rem; color: var(--gris); font-weight: 400; }
.pildora > span.con-punto { flex-direction: row; align-items: center; }
.pildora:hover > span { border-color: color-mix(in srgb, var(--acento) 50%, var(--linea)); }
.pildora input:checked + span { border-color: var(--acento); background: var(--acento-claro); }
.pildora input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }
.dias input[type=date] { width: auto; min-width: 180px; }
.horas-libres { margin-top: 12px; transition: box-shadow .2s; border-radius: 10px; }
.horas-libres.falta { box-shadow: 0 0 0 2px var(--rojo); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-bottom: 8px; }
.slot { justify-content: center; background: var(--papel); color: var(--tinta); border: 1.5px solid var(--linea); padding: 8px 0; font-weight: 500; border-radius: 10px; }
.slot:hover { background: var(--acento-claro); border-color: var(--acento); color: var(--tinta); }
.slot.elegido, .slot.elegido:hover { background: var(--acento); border-color: var(--acento); color: #fff; }
button.enlace { background: none; border: 0; padding: 0; color: var(--acento); font-weight: 500; text-decoration: underline; font-size: .9rem; }
button.enlace:hover { background: none; color: var(--acento-oscuro); }
.reserva details.nota summary { cursor: pointer; color: var(--acento); font-weight: 500; font-size: .92rem; list-style: none; }
.reserva details.nota summary::-webkit-details-marker { display: none; }
.reserva details.nota summary::before { content: "+ "; }
.reserva details.nota[open] summary::before { content: "− "; }
button.reservar { width: 100%; justify-content: center; padding: 13px; margin-top: 18px; font-size: 1rem; }

/* Estilo de corte */
.pildoras.chicas { gap: 6px; margin-bottom: 8px; }
.pild { background: var(--papel); color: var(--tinta); border: 1.5px solid var(--linea); padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .88rem; }
.pild:hover { background: var(--acento-claro); border-color: var(--acento); color: var(--tinta); }
.pild.elegida, .pild.elegida:hover { background: var(--acento); border-color: var(--acento); color: #fff; }
.como-quedo { border: 1.5px solid var(--linea); border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.como-quedo summary { cursor: pointer; font-weight: 600; }
.como-quedo[open] summary { margin-bottom: 12px; }
.subir-linea { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 12px; border: 1.5px dashed var(--linea); border-radius: 10px;
  cursor: pointer; color: var(--tinta); font-weight: 500; font-size: .95rem; }
.subir-linea:hover { border-color: var(--acento); color: var(--acento); }
.subir-linea svg { width: 20px; height: 20px; }
.subir-linea input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.pildora-off { display: inline-flex; flex-direction: column; padding: 9px 14px; border: 1.5px dashed var(--linea); border-radius: 12px;
  color: var(--gris); font-size: .95rem; line-height: 1.25; }
.pildora-off small { font-size: .75rem; }

/* Buscador de clientes */
.combo { position: relative; }
.combo-input { padding: 12px 44px 12px 40px; font-size: 1rem; }
.combo-lupa { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gris); display: flex; pointer-events: none; }
.combo-lupa svg { width: 18px; height: 18px; }
.combo-flecha { position: absolute; right: 5px; top: 5px; bottom: 5px; width: 36px; padding: 0; justify-content: center;
  background: transparent; border: 0; color: var(--gris); border-radius: 8px; }
.combo-flecha:hover { background: var(--linea-suave); color: var(--acento); border: 0; }
.combo-flecha svg { width: 18px; height: 18px; }
.combo-lista { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14);
  max-height: 300px; overflow-y: auto; }
.combo-lista li { padding: 8px 10px; border-radius: 10px; cursor: pointer; line-height: 1.3; display: flex; gap: 10px; align-items: center; }
.combo-lista li .txt { min-width: 0; }
.combo-lista li strong { display: block; font-weight: 600; }
.combo-lista li small { display: block; font-size: .8rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-lista li.activo, .combo-lista li:hover { background: var(--acento-claro); }
.combo-lista li.actual { box-shadow: inset 0 0 0 1.5px var(--acento); }
.combo-lista li.opcion-nuevo { color: var(--acento); }
.combo-lista li.opcion-nuevo strong { font-weight: 600; }
.avatar.chico { width: 30px; height: 30px; font-size: .85rem; }
.avatar.mas { background: var(--acento-claro) !important; color: var(--acento); font-size: 1.1rem; }
.combo-lista li.vacio-lista { color: var(--gris); cursor: default; font-size: .9rem; }
.combo-lista li.vacio-lista:hover { background: none; }
.cliente-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--acento); background: var(--acento-claro); border-radius: 12px; }
.cliente-card[hidden], .combo[hidden], .cliente-nuevo[hidden] { display: none; }
.cliente-card-datos { flex: 1; min-width: 0; line-height: 1.3; }
.cliente-card-datos strong { display: block; }
.cliente-card-datos .suave { font-size: .85rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cliente-nuevo { border: 1.5px dashed var(--linea); border-radius: 12px; padding: 12px; }
.cliente-nuevo-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

/* Confirmaciones */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(400px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15,23,42,.28); color: var(--tinta); }
dialog.modal::backdrop { background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modal .16s ease-out; }
@keyframes modal { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog.modal form { padding: 24px; }
dialog.modal h2 { font-size: 1.15rem; margin: 0 0 6px; }
dialog.modal p { margin: 0 0 20px; }
.modal-botones { display: flex; gap: 8px; justify-content: flex-end; }
button.peligro-lleno { background: var(--rojo); border-color: var(--rojo); }
button.peligro-lleno:hover { background: #C42F33; border-color: #C42F33; }

.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.tema { margin: 0; border: 1.5px solid var(--linea); border-radius: 12px; padding: 10px; cursor: pointer; color: var(--tinta); font-weight: 500; font-size: .9rem; }
.tema input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tema .muestra { display: flex; height: 34px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.tema .muestra i { flex: 1; } .tema .muestra i:first-child { flex: 1.4; }
.tema:has(input:checked) { border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 18%, transparent); }

.estado-turno { padding: 10px 14px; border-radius: 10px; background: var(--linea-suave); color: var(--gris); margin-bottom: 14px; font-weight: 500; }
.estado-turno.ok { background: var(--verde-claro); color: var(--verde); }
.estado-turno.mal { background: var(--rojo-claro); color: var(--rojo); }
.estado-turno a { color: inherit; }

.horario { margin-bottom: 8px; width: auto; }
.horario td, .horario th { padding: 5px 6px 5px 0; border: 0; }
.horario td:first-child { width: 100px; font-weight: 500; }
.horario input { padding: 7px 8px; }

.lista-horas { position: absolute; z-index: 60; margin: 0; padding: 4px; list-style: none; background: var(--papel); border: 1px solid var(--linea);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.16); max-height: 220px; overflow-y: auto; }
.lista-horas li { padding: 7px 12px; border-radius: 7px; cursor: pointer; font-size: .95rem; }
.lista-horas li:hover { background: var(--acento-claro); }
.lista-horas li.elegida { background: var(--acento); color: #fff; }
.lista-horas li.limpiar { color: var(--gris); font-size: .85rem; border-bottom: 1px solid var(--linea-suave); border-radius: 7px 7px 0 0; }
input[data-hora] { max-width: 120px; }
input[data-hora].mal { border-color: var(--rojo); }

.medios { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.medio { margin: 0; cursor: pointer; }
.medio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.medio span { display: block; text-align: center; padding: 10px 8px; border: 1.5px solid var(--linea); border-radius: 10px; color: var(--tinta);
  font-weight: 500; font-size: .92rem; background: var(--papel); white-space: nowrap; }
.medio:hover span { border-color: var(--acento); }
.medio input:checked + span { background: var(--acento); border-color: var(--acento); color: #fff; }
.medio input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }

.caja-hoy { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; text-decoration: none; color: inherit; }
.caja-hoy > div { background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; padding: 12px 16px; min-width: 150px; box-shadow: var(--sombra); }
.caja-hoy span { display: block; font-size: .82rem; color: var(--gris); }
.caja-hoy b { font-size: 1.35rem; letter-spacing: -0.01em; }
.caja-hoy small { display: block; font-size: .78rem; color: var(--gris); }
.caja-hoy-total { background: var(--noche) !important; border-color: var(--noche) !important; color: #fff; }
.caja-hoy-total span { color: rgba(255,255,255,.65); }
.caja-hoy-medio.destacado { border: 1.5px solid var(--verde) !important; }
.caja-hoy-medio.destacado b { color: var(--verde); }
a.caja-hoy:hover > div { border-color: var(--acento); }

/* Avisos flotantes */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: 360px; }
.flash { background: var(--noche); color: var(--papel); padding: 11px 16px; border-radius: 8px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(22,32,42,.18); animation: toast 4.5s ease forwards; }
.flash.error { background: var(--rojo); animation: toast-error 9s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }
@keyframes toast-error { 0% { opacity: 0; transform: translateY(8px); } 3%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* ---------- Agenda (línea de tiempo) ---------- */
.dia-nav { display: flex; align-items: center; gap: 6px; }
.dia-nav input[type=date] { width: auto; padding: 7px 9px; }
.agenda { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); background: var(--papel);
  border: 1px solid var(--linea); border-radius: var(--radio); overflow-x: auto; box-shadow: var(--sombra); }
.agenda .cab { position: sticky; top: 0; z-index: 3; background: var(--papel); border-bottom: 1px solid var(--linea);
  padding: 12px 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda .cab small { display: block; font-weight: 400; color: var(--gris); font-size: .8rem; }
.horas, .columna { position: relative; height: calc(var(--n) * var(--fila)); }
.horas span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .78rem; color: var(--gris); }
.horas span:first-child { transform: none; }
.columna { border-left: 1px solid var(--linea-suave);
  background-image: linear-gradient(to bottom, var(--linea-suave) 1px, transparent 1px); background-size: 100% var(--fila); }
.columna > * { position: absolute; left: 4px; right: 4px; top: calc(var(--i) * var(--fila) + 2px); height: calc(var(--s, 1) * var(--fila) - 4px); }
.hueco { border-radius: 7px; display: flex; align-items: center; justify-content: center; color: transparent; text-decoration: none; font-size: .85rem; font-weight: 600; }
.hueco:hover, .hueco:focus-visible { background: var(--linea-suave); color: var(--gris); }
.fuera { left: 0 !important; right: 0 !important; top: calc(var(--i) * var(--fila)) !important; height: calc(var(--s, 1) * var(--fila)) !important;
  background: repeating-linear-gradient(135deg, #F4F5F7 0 6px, #ECEEF1 6px 12px); }
.libre-barbero { border-radius: 7px; background: var(--linea-suave); color: var(--gris); font-size: .82rem; padding: 6px 9px; }
.turno { border-radius: 7px; padding: 6px 9px; text-decoration: none; overflow: hidden; z-index: 1; color: var(--tinta);
  background: color-mix(in srgb, var(--c) 15%, white); border-left: 4px solid var(--c); line-height: 1.25; transition: transform .12s ease, box-shadow .12s ease; }
.turno:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,32,42,.12); }
.turno strong { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turno small { color: var(--gris); font-size: .78rem; }
.turno.llego { box-shadow: inset 0 0 0 2px var(--c); }
.turno.completado { opacity: .55; }
.turno .pagado { color: var(--verde); font-weight: 600; }
.ahora { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--rojo); z-index: 2; pointer-events: none;
  top: calc(var(--min) * var(--fila)); }
.ahora::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); }

/* Panel lateral (turno, nuevo turno, cobro) */
.velo { position: fixed; inset: 0; background: rgba(22,32,42,.32); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.cajon { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--fondo); z-index: 41;
  transform: translateX(100%); transition: transform .22s ease, visibility .22s; visibility: hidden; overflow-y: auto; padding: 22px; box-shadow: -12px 0 40px rgba(22,32,42,.15); }
body.con-cajon .velo { opacity: 1; pointer-events: auto; }
body.con-cajon .cajon { transform: none; visibility: visible; }
.cajon .cerrar { position: absolute; top: 14px; right: 14px; z-index: 2; }
.cajon .seccion.angosta { max-width: none; }
.cajon .encabezado { padding-right: 40px; }
.estados { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }

/* Selector de período */
.segmentos { display: inline-flex; background: var(--papel); border: 1px solid var(--linea); border-radius: 8px; padding: 3px; gap: 2px; }
.segmentos a { padding: 6px 12px; border-radius: 6px; text-decoration: none; font-weight: 500; color: var(--gris); }
.segmentos a:hover { color: var(--tinta); }
.segmentos a[aria-current="page"] { background: var(--acento); color: #fff; }
.segmentos label.opcion { flex: 1; margin: 0; padding: 7px 10px; border-radius: 6px; text-align: center; cursor: pointer; color: var(--gris); font-size: .95rem; }
.segmentos label.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmentos label.opcion:has(input:checked) { background: var(--acento); color: #fff; }
.segmentos label.opcion:has(input:focus-visible) { outline: 2px solid var(--tinta); outline-offset: 1px; }
.cambio { display: block; font-size: .8rem; font-weight: 500; color: var(--gris); margin-top: 2px; }
.cambio.sube { color: var(--verde); }
.cambio.baja { color: var(--rojo); }

/* Barras por día: una serie, un tono; tooltip al pasar */
.barras { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; height: 200px; align-items: end;
  border-bottom: 1px solid var(--linea); background-image: linear-gradient(to top, var(--linea-suave) 1px, transparent 1px);
  background-size: 100% 25%; padding-top: 8px; margin-bottom: 26px; }
.barra { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.barra .col { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; }
.barra .valor { display: block; width: 100%; max-width: 38px; min-height: 2px; background: var(--acento); border-radius: 4px 4px 0 0; opacity: .85; }
.barra.futuro .valor { background: var(--linea); opacity: 1; }
.barra .col:hover .valor, .barra .col:focus-visible .valor { opacity: 1; }
.barra.hoy .valor { background: var(--noche); opacity: 1; }
.barra .eje { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .72rem; color: var(--gris); }
.barra .tip { position: absolute; bottom: calc(var(--h) + 8px); left: 50%; transform: translateX(-50%); background: var(--tinta); color: var(--papel);
  padding: 6px 10px; border-radius: 6px; font-size: .8rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s; z-index: 5; }
.barra .tip strong { display: block; }
.barra .col:hover .tip, .barra .col:focus-visible .tip { opacity: 1; }

/* Cobro */
.linea-cobro { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-bottom: 8px; }
.total-cobro { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--linea); padding-top: 14px; margin-top: 6px; }
.total-cobro b { font-size: 1.8rem; letter-spacing: -0.02em; }
.agregar { background: none; border: 0; color: var(--acento); padding: 4px 0; font-weight: 500; text-decoration: underline; }
.agregar:hover { background: none; color: var(--acento-oscuro); }

/* Login */
.centro { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.centro.oscuro { background: radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--acento) 45%, var(--noche)) 0%, transparent 60%), var(--noche); }
.centro.oscuro .login > h1, .centro.oscuro .login > p { color: #fff; }
.centro.oscuro .login > p { color: rgba(255,255,255,.65); }
.login .poste { display: inline-block; width: 12px; height: 34px; border-radius: 3px; vertical-align: -6px; margin-right: 10px;
  background: repeating-linear-gradient(135deg, var(--rojo) 0 6px, #fff 6px 11px, var(--acento) 11px 17px, #fff 17px 22px); }
.login { width: 100%; max-width: 380px; }
.login h1 { margin-bottom: 4px; }

/* ---------- Celular ---------- */
.solo-movil { display: none; }
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30; flex-direction: row;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; overflow-x: auto; }
  .marca, .lateral .pie, .lateral a.item.secundario { display: none; }
  .lateral a.item { flex-direction: column; gap: 2px; font-size: .7rem; padding: 6px 8px; min-width: 58px; }
  .lateral a.item[aria-current="page"] { background: none; color: #fff; box-shadow: none; }
  .lateral a.item[aria-current="page"] svg { color: color-mix(in srgb, var(--acento) 55%, white); }
  .contenido { padding: 18px 14px 96px; }
  .solo-movil { display: block; }
  h1 { font-size: 1.45rem; }
  .cifras { gap: 20px; }
  .ocultar-movil { display: none; }
  .toasts { left: 14px; right: 14px; bottom: 84px; max-width: none; }
  .agenda { grid-template-columns: 44px repeat(var(--cols), minmax(124px, 1fr)); }
  .encabezado .acciones { width: 100%; }
  .encabezado .acciones > .btn:last-child { margin-left: auto; }
  .dia-nav input[type=date] { display: none; }
  .cifra b { font-size: 1.35rem; }
  .barra .eje:not(.eje-ver) { visibility: hidden; }
  td, th { padding: 10px 10px; }
  .cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
  .flash { animation: none; }
}

.link-reserva { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--acento-claro); margin-bottom: 8px; }
.link-reserva span { flex: 1; min-width: 200px; font-weight: 500; word-break: break-all; }
.etiqueta-online { display: inline-block; font-size: .68rem; font-weight: 600; padding: 0 6px; border-radius: 6px; background: var(--acento); color: #fff; vertical-align: 1px; }

/* ---------- Reserva online (vista del cliente) ---------- */
body.publico { background: var(--fondo); min-height: 100vh; display: flex; flex-direction: column; }
.r-cab { background: radial-gradient(900px 400px at 85% -20%, color-mix(in srgb, var(--acento) 55%, var(--noche)) 0%, transparent 60%), var(--noche);
  color: #fff; padding: 22px 20px 60px; padding-top: max(22px, env(safe-area-inset-top)); }
.r-cab-int { max-width: 620px; margin: 0 auto; padding: 0 14px; display: flex; gap: 14px; align-items: flex-start; }
.r-cab h1 { color: #fff; font-size: 1.7rem; }
.r-cab p { color: rgba(255,255,255,.7); margin: 4px 0 0; font-size: .92rem; }
.r-poste { flex: none; width: 12px; height: 40px; border-radius: 3px; margin-top: 2px;
  background: repeating-linear-gradient(135deg, var(--rojo) 0 6px, #fff 6px 11px, var(--acento) 11px 17px, #fff 17px 22px); }
.r-main { width: 100%; max-width: 620px; margin: -40px auto 0; padding: 0 14px 40px; flex: 1; }
.r-form, .r-tarjeta { display: flex; flex-direction: column; gap: 12px; }
.r-paso, .r-tarjeta { background: var(--papel); border-radius: 18px; padding: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.08); }
.r-paso[hidden] { display: none; }
.r-paso h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 14px; }
.r-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--acento); color: #fff; font-size: .85rem; flex: none; }
.r-opciones { display: grid; gap: 8px; }
.r-servicios { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.r-barberos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.r-op { margin: 0; cursor: pointer; }
.r-op input, .r-dia input, .r-extra input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.r-op > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border: 1.5px solid var(--linea); border-radius: 14px;
  color: var(--tinta); transition: border-color .12s, background .12s, transform .12s; }
.r-op > span strong { font-size: 1rem; }
.r-op > span small { color: var(--gris); font-size: .82rem; }
.r-op > span b { margin-top: 6px; font-size: 1.05rem; }
.r-op:hover > span { border-color: color-mix(in srgb, var(--acento) 55%, var(--linea)); }
.r-op input:checked + span { border-color: var(--acento); background: var(--acento-claro); box-shadow: 0 0 0 1px var(--acento) inset; }
.r-op input:focus-visible + span, .r-dia input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }
.r-av { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; margin-bottom: 6px; }
.r-av-cual { background: var(--noche); font-size: .95rem; }
.r-resumen { background: var(--fondo); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 4px; }
.r-resumen div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.r-resumen span { color: var(--gris); }
.r-paso input:not([type=checkbox]):not([type=radio]) { margin-bottom: 12px; font-size: 1rem; padding: 12px; }
.r-trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.r-error { background: var(--rojo-claro); color: var(--rojo); padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.r-confirmar { width: 100%; justify-content: center; padding: 15px; font-size: 1.05rem; border-radius: 12px; margin-top: 4px; }
.r-confirmar:disabled { opacity: .7; cursor: wait; }
.r-ticket { align-items: flex-start; }
.r-estado { font-weight: 600; color: var(--gris); margin: 0; }
.r-estado.ok { color: var(--verde); }
.r-estado.cancelado { color: var(--rojo); }
.r-cuando { font-size: 1.6rem; letter-spacing: -0.02em; margin: 2px 0 6px; }
.r-detalle { margin: 0; width: 100%; display: grid; gap: 8px; border-top: 1px solid var(--linea-suave); padding-top: 12px; }
.r-detalle div { display: flex; justify-content: space-between; gap: 12px; }
.r-detalle dt { color: var(--gris); }
.r-detalle dd { margin: 0; font-weight: 500; text-align: right; }
.r-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 10px; width: 100%; }
.r-cancelar summary { list-style: none; cursor: pointer; }
.r-cancelar summary::-webkit-details-marker { display: none; }
.r-cancelar form { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--rojo-claro); }
.r-cancelar p { margin-bottom: 10px; }
.r-otro { text-align: center; margin-top: 18px; }
.r-otro a { color: var(--acento); font-weight: 500; }
.r-pie { text-align: center; color: var(--gris); font-size: .88rem; padding: 0 16px 28px; }
.r-pie a { color: var(--acento); }
@media (max-width: 480px) {
  .r-servicios { grid-template-columns: 1fr 1fr; }
  .r-barberos { grid-template-columns: 1fr 1fr; }
  .r-cab h1 { font-size: 1.45rem; }
}
.etiqueta-online.fijo { background: var(--noche); }
.nota-fijo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--acento-claro); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: .92rem; }
.nota-fijo svg { width: 18px; height: 18px; flex: none; color: var(--acento); }
.nota-fijo span { flex: 1; min-width: 180px; }
.nota-fijo a { font-weight: 600; color: var(--acento); }
.lista-fijos { display: grid; gap: 8px; }
.fijo-item { display: flex; align-items: center; gap: 14px; background: var(--papel); border-radius: 14px; padding: 12px 14px; border-left: 4px solid var(--c); box-shadow: 0 1px 2px rgba(15,23,42,.05); flex-wrap: wrap; }
.fijo-item.pausado { opacity: .6; }
.fijo-cuando { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.fijo-cuando strong { font-size: .8rem; color: var(--gris); font-weight: 600; }
.fijo-cuando span { font-size: 1.15rem; font-weight: 700; }
.fijo-datos { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.fijo-datos a { color: var(--tinta); }
.fijo-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.aviso-fijos { background: var(--rojo-claro); }
.aviso-fijos ul { margin: 6px 0; padding-left: 18px; }
.dias-semana .pildora span { min-width: 84px; justify-content: center; }
.foto-producto { display: flex; gap: 14px; align-items: center; margin: 12px 0 14px; }
.foto-producto img, .foto-vacia { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; }
.foto-vacia { display: grid; place-items: center; background: var(--acento-claro); color: var(--acento); font-size: 2rem; font-weight: 700; }
.pedido-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--linea-suave); flex-wrap: wrap; }
.pedido-item:first-of-type { border-top: 0; }
.pedido-datos { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.pedido-total { font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* ---------- Web del cliente: navegación tipo app ---------- */
.r-cab-txt { flex: 1; min-width: 0; }
.r-yo { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acento); color: #fff; font-weight: 700; flex: none; text-decoration: none; }
.r-yo.chico { width: 34px; height: 34px; font-size: .9rem; }
.r-yo.grande { width: 56px; height: 56px; font-size: 1.4rem; }
.r-tabs { max-width: 620px; margin: 18px auto 0; padding: 0 14px; display: flex; gap: 6px; }
.r-tabs a { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; color: rgba(255,255,255,.78); text-decoration: none; font-weight: 500; font-size: .95rem; }
.r-tabs a:hover { color: #fff; background: rgba(255,255,255,.08); }
.r-tabs a[aria-current="page"] { background: #fff; color: var(--noche); }
.r-tabs svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.r-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acento); color: #fff; font-size: .7rem; font-weight: 700; }
.r-badge[hidden] { display: none; }
.r-aviso { background: var(--papel); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-weight: 500; box-shadow: 0 6px 20px rgba(15,23,42,.08); border-left: 4px solid var(--verde); }
.r-aviso.error { border-left-color: var(--rojo); }

/* Paso 3: calendario */
.r-primero { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 0; cursor: pointer; text-align: left;
  background: linear-gradient(120deg, var(--noche), color-mix(in srgb, var(--acento) 70%, var(--noche))); color: #fff; font: inherit; }
.r-primero[hidden] { display: none; }
.r-primero-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.14); flex: none; }
.r-primero-ico svg { width: 18px; height: 18px; fill: #fff; }
.r-primero-txt { flex: 1; display: flex; flex-direction: column; }
.r-primero-txt small { opacity: .75; font-size: .78rem; }
.r-primero-txt strong { font-size: 1.02rem; }
.r-primero-ir { background: #fff; color: var(--noche); font-weight: 600; font-size: .85rem; padding: 7px 12px; border-radius: 999px; }
.r-primero:hover .r-primero-ir { background: var(--acento-claro); }
.r-cal-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.r-cal-mes { font-size: 1rem; }
.r-cal-flecha { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: var(--fondo); border: 0; color: var(--tinta); cursor: pointer; }
.r-cal-flecha svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r-cal-flecha:hover:not(:disabled) { background: var(--acento-claro); color: var(--acento); }
.r-cal-flecha:disabled { opacity: .3; cursor: default; }
.r-cal-sem, .r-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.r-cal-sem span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--gris); padding-bottom: 6px; }
.r-semana[hidden] { display: none; }
.r-dia { margin: 0; cursor: pointer; position: relative; }
.r-dia > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; aspect-ratio: 1 / 1.08; border-radius: 14px; border: 1.5px solid var(--linea); background: var(--papel); transition: border-color .15s, background .15s; }
.r-dia b { font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1; }
.r-dia.es-hoy b::after { content: ""; display: block; width: 4px; height: 4px; margin: 3px auto 0; border-radius: 50%; background: currentColor; opacity: .5; }
.r-dia.vacio { visibility: hidden; }
.r-dia:hover > span { border-color: color-mix(in srgb, var(--acento) 55%, var(--linea)); }
.r-dia input:checked + span { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--acento) 35%, transparent); }
.r-dia input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 2px; }
.r-dia.cerrado, .r-dia.lleno { cursor: not-allowed; }
.r-dia.cerrado > span, .r-dia.lleno > span { background: var(--fondo); border-color: transparent; color: #A0AEC0; }
.r-dia.lleno b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.r-disp { display: block; width: 18px; height: 4px; border-radius: 2px; background: transparent; }
.r-disp.mucho { background: var(--verde); }
.r-disp.poco { background: #E08A1E; }
.r-disp.lleno { background: #CBD5E1; }
.r-dia input:checked + span .r-disp { background: rgba(255,255,255,.85); }
.cargando-disp .r-semana { opacity: .55; transition: opacity .2s; }
.r-leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: .78rem; color: var(--gris); }
.r-leyenda span { display: inline-flex; align-items: center; gap: 6px; }

/* Paso 4: horas */
.r-hora-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.r-hora-cab > div { flex: 1; display: flex; flex-direction: column; text-align: center; }
.r-hora-dia { font-size: 1.05rem; }
.r-hora-cuantos { color: var(--gris); font-size: .82rem; }
.r-franjas { display: flex; gap: 4px; padding: 4px; background: var(--fondo); border-radius: 12px; margin-bottom: 12px; }
.r-franjas[hidden] { display: none; }
.r-franjas button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 9px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--gris); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.r-franjas button small { font-size: .72rem; font-weight: 600; background: var(--papel); color: var(--gris); border-radius: 999px; padding: 1px 7px; }
.r-franjas button[aria-selected="true"] { background: var(--papel); color: var(--tinta); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.r-franjas button[aria-selected="true"] small { background: var(--acento-claro); color: var(--acento); }
.r-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.r-slot { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 11px 4px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--papel); color: var(--tinta); font: inherit; cursor: pointer; }
.r-slot b { font-size: 1.05rem; }
.r-slot small { font-size: .72rem; color: var(--gris); }
.r-slot:hover { border-color: var(--acento); background: var(--acento-claro); color: var(--tinta); }
.r-slot.elegido:hover { background: var(--acento); color: #fff; }
.r-slot.elegido { background: var(--acento); border-color: var(--acento); color: #fff; }
.r-slot.elegido small { color: rgba(255,255,255,.85); }
.r-esqueleto span { height: 54px; border-radius: 12px; background: linear-gradient(90deg, var(--fondo) 0%, var(--linea-suave) 50%, var(--fondo) 100%); background-size: 200% 100%; animation: r-brillo 1.1s linear infinite; }
@keyframes r-brillo { to { background-position: -200% 0; } }
.r-sin-horas { margin: 0; padding: 18px; text-align: center; color: var(--gris); background: var(--fondo); border-radius: 12px; }

/* Paso 5 */
.r-soy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--linea); margin-bottom: 14px; }
.r-soy div { display: flex; flex-direction: column; }
.r-soy small { color: var(--gris); }
.r-ya-cuenta { margin: 0 0 12px; font-size: .9rem; color: var(--gris); }
.r-ya-cuenta a, .r-auth-otro a { color: var(--acento); font-weight: 600; }
.r-clave[hidden] { display: none; }
.r-extras { margin-bottom: 16px; }
.r-extras-tit { font-weight: 600; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.r-extras-tit small { font-weight: 400; color: var(--gris); }
.r-extras-lista { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.r-extra { margin: 0; cursor: pointer; flex: none; scroll-snap-align: start; position: relative; }
.r-extra > span { display: flex; flex-direction: column; width: 118px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--linea); }
.r-extra img, .r-extra i { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; margin-bottom: 6px; }
.r-extra i { display: grid; place-items: center; background: var(--acento-claro); color: var(--acento); font-style: normal; font-weight: 700; font-size: 1.6rem; }
.r-extra strong { font-size: .85rem; line-height: 1.2; }
.r-extra small { color: var(--gris); font-size: .8rem; }
.r-extra input:checked + span { border-color: var(--acento); background: var(--acento-claro); box-shadow: 0 0 0 1px var(--acento) inset; }
.r-extra input:checked + span::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--acento); color: #fff; font-size: .75rem; font-weight: 700; }

/* Cuenta */
.r-auth h2 { margin-bottom: 2px; }
.r-auth-form { display: flex; flex-direction: column; width: 100%; }
.r-auth-form label:not(.check) { font-weight: 500; margin-bottom: 4px; }
.r-auth-otro { margin: 6px 0 0; text-align: center; }
.r-hola { flex-direction: row; align-items: center; gap: 14px; }
.r-hola h2 { margin: 0; }
.r-hola p { margin: 2px 0 0; }
.r-tit-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-tit-fila h2 { margin: 0; }
.r-fijo { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--acento-claro); font-size: .92rem; }
.r-fijo svg { width: 18px; height: 18px; fill: none; stroke: var(--acento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.r-turno { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 12px; border: 1.5px solid var(--linea); border-left: 4px solid var(--c); flex-wrap: wrap; }
.r-turno-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; color: var(--tinta); text-decoration: none; }
.r-turno-info span { color: var(--gris); font-size: .9rem; }
.r-chip { font-style: normal; font-size: .7rem; font-weight: 600; background: var(--noche); color: #fff; border-radius: 6px; padding: 1px 6px; }
.r-btn-cancelar { background: transparent; border: 1.5px solid var(--linea); color: var(--rojo); padding: 7px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; list-style: none; }
.r-btn-cancelar::-webkit-details-marker { display: none; }
.r-confirmar-mini[open] > summary { background: var(--rojo-claro); border-color: transparent; }
.r-confirmar-mini form { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.r-pedido { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linea-suave); flex-wrap: wrap; }
.r-pedido:first-of-type { border-top: 0; }
.r-pedido > div { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.r-pedido span { color: var(--gris); font-size: .88rem; }
.r-pedido.cancelado { opacity: .55; }
.r-visitas { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.r-visitas li { display: grid; grid-template-columns: 74px 1fr; column-gap: 10px; padding: 8px 0; border-top: 1px solid var(--linea-suave); }
.r-visitas li:first-child { border-top: 0; }
.r-visitas li span { color: var(--gris); font-variant-numeric: tabular-nums; grid-row: span 2; }
.r-visitas small { color: var(--gris); }
.r-datos summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.r-datos summary::-webkit-details-marker { display: none; }
.r-datos summary::after { content: "Editar"; color: var(--acento); font-weight: 600; font-size: .9rem; }
.r-datos[open] summary::after { content: "Cerrar"; }
.r-datos summary h2 { margin: 0; }
.r-datos[open] { display: block; }
.r-datos form { margin-top: 12px; }
.r-salir { width: 100%; margin-top: 10px; background: transparent; color: var(--gris); border: 0; text-decoration: underline; cursor: pointer; }

/* Tienda */
.r-tienda-cab p { margin: 0; }
.r-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.r-prod { display: flex; flex-direction: column; background: var(--papel); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.07); border: 1.5px solid transparent; transition: border-color .15s; }
.r-prod.en-carrito { border-color: var(--acento); }
.r-prod-foto { position: relative; aspect-ratio: 1; background: var(--acento-claro); display: grid; place-items: center; overflow: hidden; }
.r-prod-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-prod-foto span { font-size: 2.6rem; font-weight: 700; color: var(--acento); }
.r-prod-info { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 4px; }
.r-prod-info strong { line-height: 1.25; }
.r-prod-info small { color: var(--gris); font-size: .8rem; line-height: 1.3; }
.r-prod-info b { margin-top: 4px; font-size: 1.05rem; }
.r-agregar { margin: 8px 12px 12px; padding: 10px; border-radius: 10px; justify-content: center; }
.r-agregar[hidden] { display: none; }
.r-cant { display: flex; align-items: center; justify-content: space-between; margin: 8px 12px 12px; border-radius: 10px; background: var(--acento-claro); }
.r-cant[hidden] { display: none; }
.r-cant button { width: 40px; height: 40px; padding: 0; justify-content: center; background: transparent; color: var(--acento); font-size: 1.3rem; border: 0; box-shadow: none; }
.r-cant button:disabled { opacity: .3; }
.r-cant output { font-weight: 700; font-variant-numeric: tabular-nums; }
.r-prod.agotado { opacity: .55; }
.r-agotado { margin: 8px 12px 14px; color: var(--gris); font-size: .88rem; font-weight: 600; }
.r-carrito { position: sticky; bottom: 12px; margin-top: 14px; z-index: 5; }
.r-carrito[hidden] { display: none; }
.r-carrito-barra { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--noche); color: #fff; font: inherit; border: 0; cursor: pointer; box-shadow: 0 12px 30px rgba(15,23,42,.3); }
.r-carrito-n { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 13px; background: var(--acento); font-weight: 700; font-size: .85rem; padding: 0 6px; }
.r-carrito-total { flex: 1; text-align: left; }
.r-carrito-barra > span:last-child { font-weight: 600; }
.r-checkout { width: min(520px, 100%); max-height: 92vh; border: 0; border-radius: 20px; padding: 20px; background: var(--papel); color: var(--tinta); }
.r-checkout::backdrop { background: rgba(15,23,42,.55); }
.r-checkout-form { display: flex; flex-direction: column; }
.r-checkout-form[hidden] { display: none; }
.r-checkout input:not([type=radio]):not([type=checkbox]) { margin-bottom: 12px; font-size: 1rem; padding: 12px; }
.r-cerrar { background: var(--fondo); color: var(--tinta); border: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center; }
.r-lineas { list-style: none; margin: 12px 0 0; padding: 0; }
.r-lineas li { display: grid; grid-template-columns: 1fr auto 80px; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--linea-suave); }
.r-lineas .r-cant { margin: 0; }
.r-lineas .r-cant button { width: 34px; height: 34px; }
.r-lineas output { min-width: 18px; text-align: center; }
.r-lineas strong { text-align: right; font-variant-numeric: tabular-nums; }
.r-total { display: flex; justify-content: space-between; padding: 12px 0 0; font-size: 1.1rem; }
.r-entrega { grid-template-columns: 1fr; }
.r-listo { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; }
.r-listo[hidden] { display: none; }
.r-listo-ico { width: 60px; height: 60px; border-radius: 50%; background: var(--verde-claro); color: var(--verde); display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; }
.r-listo h2 { margin: 0; }
.r-listo p { margin: 0 0 6px; color: var(--gris); }

/* Instalar como app */
.r-instalar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px; border-radius: 16px; background: var(--papel);
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.08); opacity: 0; transition: opacity .3s ease; }
.r-instalar.visible { opacity: 1; }
.r-instalar[hidden] { display: none; }
.r-instalar-ico img { width: 44px; height: 44px; border-radius: 11px; display: block; }
.r-instalar > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.r-instalar strong { font-size: .95rem; }
.r-instalar small { color: var(--gris); font-size: .82rem; }
.r-instalar-si { padding: 9px 14px; border-radius: 999px; }
.r-instalar-no { background: transparent; color: var(--gris); border: 0; padding: 6px; font-size: 1rem; box-shadow: none; }
.r-ios { border: 0; border-radius: 20px; padding: 22px; max-width: 360px; }
.r-ios::backdrop { background: rgba(15,23,42,.55); }
.r-ios ol { padding-left: 20px; display: grid; gap: 10px; margin: 12px 0 18px; }
.r-ios svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--acento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r-ios button { width: 100%; justify-content: center; }

@media (max-width: 700px) {
  /* En el celular las secciones van abajo, como en una app */
  .r-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; max-width: none; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--papel); border-top: 1px solid var(--linea); justify-content: space-around; box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
  .r-tabs a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; border-radius: 12px; color: var(--gris); font-size: .74rem; }
  .r-tabs a:hover { background: transparent; color: var(--tinta); }
  .r-tabs a[aria-current="page"] { background: transparent; color: var(--acento); }
  .r-tabs svg { width: 23px; height: 23px; }
  .r-tabs .r-badge { position: absolute; top: 2px; left: calc(50% + 6px); }
  body.publico { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .r-carrito { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .r-checkout { margin: auto 0 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .r-productos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .r-semana, .r-cal-sem { gap: 4px; }
  .r-dia > span { border-radius: 12px; }
  .r-paso, .r-tarjeta { padding: 16px; }
}

/* ---------- Panel de administración ---------- */
.aviso.soporte { background: var(--noche); color: #fff; }
.aviso.soporte a { color: #fff; font-weight: 600; margin-left: 6px; }
.op .lateral .marca { font-size: 1rem; }
.op-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.op-cifra { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); color: var(--tinta); text-decoration: none; }
a.op-cifra:hover { box-shadow: 0 0 0 1.5px var(--acento) inset, var(--sombra); }
.op-cifra b { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.15; }
.op-cifra span { color: var(--gris); font-size: .84rem; }
.op-cifra.destacada { background: var(--noche); }
.op-cifra.destacada b { color: #fff; }
.op-cifra.destacada span { color: rgba(255,255,255,.7); }
.op-alerta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; text-decoration: none; color: var(--tinta); background: var(--fondo); border-left: 4px solid #E08A1E; }
.op-alerta.mal { border-left-color: var(--rojo); background: var(--rojo-claro); }
.op-alerta span { color: var(--gris); font-size: .9rem; }
.op-alerta:hover { filter: brightness(.97); }
.op-datos { margin: 0; display: grid; gap: 2px; }
.op-datos div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linea-suave); }
.op-datos div:first-child { border-top: 0; }
.op-datos dt { color: var(--gris); }
.op-datos dd { margin: 0; font-weight: 600; text-align: right; }
.op-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.op-filtros input { flex: 1; min-width: 220px; max-width: 420px; }
.pildora-link { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--papel); border: 1px solid var(--linea); color: var(--tinta); text-decoration: none; font-size: .9rem; font-weight: 500; }
.pildora-link.activa { background: var(--noche); border-color: var(--noche); color: #fff; }
.fila-link { cursor: pointer; }
.fila-link:hover td { background: var(--linea-suave); }
.op-estado { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radio); background: var(--verde-claro); }
.op-estado.mal { background: var(--rojo-claro); }
.op-estado > div:first-child { display: flex; flex-direction: column; }
.op-estado span { color: var(--gris); font-size: .92rem; }
.op-estado-acciones, .op-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.op-inline select { width: auto; padding: 6px 10px; }
.op-usuario { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linea-suave); }
.op-usuario:first-of-type { border-top: 0; }
.op-clave { background: var(--noche); color: #fff; padding: 14px 16px; border-radius: var(--radio); margin-bottom: 16px; }
.op-clave code { background: rgba(255,255,255,.14); padding: 2px 8px; border-radius: 6px; font-size: 1.05rem; letter-spacing: .04em; }
.op-tabla-pagos { margin-top: 14px; }
.op-tabla-pagos td { padding: 8px 4px; font-size: .9rem; }
.op-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; margin: 0 6px 6px 0; border-radius: 999px; background: var(--fondo); font-size: .9rem; }
.op-chip i { width: 9px; height: 9px; border-radius: 50%; }
.login h1, .login .login-titulo { color: var(--tinta); }
.login-error { background: var(--rojo-claro); color: var(--rojo); padding: 10px 12px; border-radius: 10px; font-weight: 500; margin: 0 0 12px; }

/* ---------- Marca Fade Barber ---------- */
.logo-fb { display: inline-flex; align-items: center; gap: calc(var(--t) * .22); color: var(--noche); text-decoration: none; }
.logo-fb.claro { color: #fff; }
.logo-fb .simbolo { flex: none; }
.logo-fb-txt { display: flex; flex-direction: column; line-height: 1; }
.logo-fb-txt b { font-size: calc(var(--t) * .78); font-weight: 800; letter-spacing: -0.055em; line-height: .86; }
.logo-fb-txt small { font-size: calc(var(--t) * .3); font-weight: 400; letter-spacing: .02em; padding-left: calc(var(--t) * .04); }
.firma-fb { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; opacity: .75; }
.firma-fb:hover { opacity: 1; }
.firma-fb b { font-weight: 800; letter-spacing: -0.03em; }
.login-logo { margin-bottom: 14px; }
.login-logo a { text-decoration: none; }
.marca-op { display: flex; flex-direction: column; gap: 8px; padding: 6px 10px 18px; }
.marca-op > span:last-child { color: rgba(255,255,255,.55); font-size: .8rem; padding-left: 2px; }
.lateral .pie .firma-fb { color: rgba(255,255,255,.75); margin-bottom: 10px; font-size: .9rem; }
@media (max-width: 820px) { .marca-op { display: none; } }
