/* teagendoapp — sistema visual (dirección Claro).
   Plus Jakarta Sans, blanco/tinta y un solo color de acción (verde azulado). */
:root {
  --tinta: #0f172a; --papel: #f7f8fa; --blanco: #fff; --polo: #0f766e; --polo-vivo: #0f766e; --azul: #0f766e;
  --gris: #475569; --linea: #cbd5e1; --ok: #15803d; --aviso: #92400e; --menta: #ccfbf1;
  --radio: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tinta); background: var(--papel);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    --tinta: #e8eef6; --papel: #0b1220; --blanco: #131c2e; --polo: #2dd4bf; --polo-vivo: #2dd4bf; --azul: #2dd4bf;
    --gris: #a3b0c3; --linea: #2a3750; --ok: #4ade80; --aviso: #fbbf24; --menta: #134e4a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); line-height: 1.45; font-size: 16px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--azul); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 64px; }
.wrap.ancho { max-width: 1040px; }
.suave { color: var(--gris); }
.num { font-variant-numeric: tabular-nums; }

/* Poste: progreso de la reserva */
.poste { height: 6px; border-radius: 99px; background: var(--linea); overflow: hidden; margin: 14px 0 22px; }
.poste > i {
  display: block; height: 100%; width: 25%; border-radius: 99px;
  background: var(--polo);
  transition: width .45s cubic-bezier(.3, .7, .2, 1);
}

/* Botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 2px solid var(--tinta); border-radius: var(--radio); background: var(--tinta); color: var(--papel); font-weight: 700; text-decoration: none; }
.btn { background: var(--polo); border-color: var(--polo); color: #fff; }
.btn:hover { filter: brightness(1.1); }
.btn.claro { background: transparent; color: var(--tinta); border-color: var(--linea); }
.btn.claro:hover { background: var(--menta); border-color: var(--polo); filter: none; }
.btn.chico { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ancho-total { width: 100%; }
label.campo { display: block; font-weight: 600; margin-bottom: 14px; }
label.campo > span { display: block; margin-bottom: 4px; }
label.campo small { font-weight: 400; color: var(--gris); }
input, select { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--linea); border-radius: var(--radio); background: var(--blanco); }
input:focus, select:focus { border-color: var(--azul); outline: none; }
input[type='checkbox'] { width: 20px; min-height: 20px; accent-color: var(--polo); }
.error { margin: 12px 0; padding: 12px 14px; border-left: 5px solid var(--polo); background: var(--blanco); font-weight: 600; }
.nota { margin: 12px 0; padding: 12px 14px; border-left: 5px solid var(--azul); background: var(--blanco); }

/* Elección: filas grandes y táctiles */
.opciones { display: grid; gap: 10px; padding: 0; margin: 16px 0; list-style: none; }
.opcion { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; text-align: left; min-height: 64px; padding: 12px 16px; border: 2px solid var(--linea); border-radius: var(--radio); background: var(--blanco); }
.opcion:hover { border-color: var(--polo); }
.opcion[aria-pressed='true'] { border-color: var(--polo); background: var(--menta); }
.opcion b { font-size: 1.1rem; font-weight: 700; }
.precio { font-weight: 700; white-space: nowrap; }
.precio s { font-weight: 400; color: var(--gris); margin-right: 6px; }
.precio em { font-style: normal; color: var(--polo); }

/* Días y horarios */
.dias { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.dia { flex: 0 0 62px; scroll-snap-align: start; padding: 8px 0; text-align: center; border: 2px solid var(--linea); border-radius: var(--radio); background: var(--blanco); line-height: 1.15; }
.dia span { display: block; font-size: .78rem; color: var(--gris); }
.dia b { font-size: 1.3rem; }
.dia[aria-pressed='true'] { background: var(--polo); border-color: var(--polo); color: #fff; }
.dia[aria-pressed='true'] span { color: inherit; }
.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.hora { min-height: 52px; padding: 6px; border: 2px solid var(--linea); border-radius: var(--radio); background: var(--blanco); font-weight: 700; line-height: 1.1; }
.hora small { display: block; font-weight: 600; color: var(--polo); font-size: .76rem; }
.hora:hover { border-color: var(--polo); }
.hora[aria-pressed='true'] { background: var(--polo); border-color: var(--polo); color: #fff; }
.hora[aria-pressed='true'] small { color: inherit; }

/* Resumen y ticket */
.resumen { margin: 16px 0; padding: 14px 16px; background: var(--blanco); border-radius: var(--radio); border: 2px solid var(--linea); }
.resumen div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.resumen .total { border-top: 2px dashed var(--linea); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.15rem; }
.ticket { margin: 18px 0; background: var(--blanco); border: 2px solid var(--polo); border-radius: var(--radio); padding: 20px 18px; }
.codigo { font-weight: 800; font-size: 2.4rem; letter-spacing: .14em; margin: 4px 0 14px; }
.volver { background: none; border: 0; padding: 8px 0; font-weight: 600; text-decoration: underline; color: var(--gris); }

@media (prefers-reduced-motion: reduce) { .poste > i { transition: none; } }

/* Panel del dueño */
.barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 2px solid var(--polo); font-size: .8rem; font-weight: 700; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--linea); margin: 14px 0 22px; }
.tab { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 0; background: none; font-weight: 700; color: var(--gris); border-bottom: 4px solid transparent; margin-bottom: -2px; }
.tab[aria-selected='true'] { color: var(--tinta); border-bottom-color: var(--polo-vivo); }
.fila { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px 14px; align-items: center; padding: 12px 14px; background: var(--blanco); border: 2px solid var(--linea); border-radius: var(--radio); margin-bottom: 8px; }
.fila.hecho { opacity: .6; }
.fila .acciones { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.hora-grande { font-weight: 800; font-size: 1.15rem; }
.etiqueta { font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 4px; background: var(--linea); }
.etiqueta.promo { background: var(--menta); color: var(--tinta); }
.tabla { width: 100%; border-collapse: collapse; background: var(--blanco); }
.tabla th, .tabla td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--linea); }
.tabla th { font-weight: 700; color: var(--gris); font-size: .85rem; }
.tabla td.der, .tabla th.der { text-align: right; }
.tabla-scroll { overflow-x: auto; }
.mapa { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 520px; }
.mapa th { font-size: .8rem; font-weight: 700; color: var(--gris); padding: 2px; }
.mapa td { text-align: center; height: 38px; font-size: .8rem; font-weight: 700; border-radius: 4px; }
.mapa td.muerta { outline: 3px solid var(--polo-vivo); outline-offset: -3px; }
.mapa td.vacio { background: transparent; }
.panel-caja { background: var(--blanco); border: 2px solid var(--linea); border-radius: var(--radio); padding: 16px; margin-bottom: 16px; }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dos-col { display: flex; gap: 8px; align-items: center; }
.dos-col > * { flex: 1; }
.dos-col .btn { flex: 0 0 auto; }
@media (min-width: 640px) { .fila { grid-template-columns: 70px 1.3fr 1fr auto; } .fila .acciones { grid-column: auto; } }

/* Seña online */
.resumen .sena { border-top: 2px dashed var(--linea); margin-top: 8px; padding-top: 10px; font-weight: 700; color: var(--polo); }
.fila.pendiente { border-style: dashed; border-color: var(--polo); }
.etiqueta.sena { background: var(--menta); color: var(--tinta); }
.etiqueta.alerta { background: var(--aviso); color: var(--papel); }
