/* Barbería Ejemplo · demo de la app de equipo. Tinta neutra + ámbar. Tipografía del sistema. */
:root {
  --bg: #12100d;
  --panel: #1d1914;
  --panel-2: #241f18;
  --text: #f4eee3;
  --muted: #b3a795;
  --line: rgb(244 238 227 / .16);
  --accent: #e2a45f;
  --accent-bright: #f4c184;
  --accent-soft: rgb(226 164 95 / .14);
  --ok: #9ad6a8;
  --banner-h: 2.2rem;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  padding: calc(var(--banner-h) + env(safe-area-inset-top)) 0 max(1.5rem, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
svg { display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
.saltar { position: absolute; left: -999px; top: 0; z-index: 100; padding: .7rem 1rem; background: var(--accent); color: #1a1207; font-weight: 700; }
.saltar:focus { left: .5rem; top: .5rem; }

/* ---- banner de demo: fijo en todas las pantallas */
.banner {
  position: fixed; inset: 0 0 auto; z-index: 60; margin: 0;
  padding: calc(.5rem + env(safe-area-inset-top)) .75rem .5rem;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #090806; border-bottom: 1px solid rgb(226 164 95 / .55);
  color: var(--accent-bright); font-size: .72rem; line-height: 1;
  font-weight: 700; letter-spacing: .12em;
}
.banner__dot { width: .45rem; height: .45rem; flex: none; border-radius: 50%; background: var(--accent); }

/* ---- cabecera */
.topbar { display: flex; align-items: center; gap: .6rem; max-width: 32rem; margin: 0 auto; padding: .5rem .9rem .6rem; border-bottom: 1px solid var(--line); }
.marca { margin: 0; font-size: .95rem; font-weight: 500; letter-spacing: .01em; }
.marca b { color: var(--accent-bright); font-weight: 700; }
.volver {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 .7rem 0 0;
  color: var(--accent-bright); text-decoration: none; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}

/* ---- pantallas */
.vista { max-width: 32rem; margin: 0 auto; padding: 1rem .9rem 2rem; }
.portada {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100dvh - var(--banner-h) - env(safe-area-inset-top) - 4rem);
  padding-top: 1.25rem;
}
.kicker { margin: 0; color: var(--accent); font-size: .64rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.h1 { margin: .25rem 0 0; font-size: clamp(1.9rem, 9vw, 2.7rem); line-height: 1.05; letter-spacing: -.025em; font-weight: 700; }
.h1 em { color: var(--accent-bright); font-style: normal; }
.lead { margin: .55rem 0 0; color: var(--muted); font-size: .9rem; max-width: 22rem; }
.h2 { margin: 0; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.h3 { margin: 1.1rem 0 .55rem; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sub { margin: .15rem 0 .9rem; color: var(--muted); font-size: .8rem; }
.pista { margin: .9rem 0 0; color: var(--muted); font-size: .72rem; text-align: center; }

/* ---- portada: rejilla 2×2 de mini-apps, icono + etiqueta */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; width: min(100%, 22rem); margin: 1.5rem auto 0; }
.app {
  min-height: 7.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem .6rem; border: 1px solid rgb(226 164 95 / .55); border-radius: 18px;
  background: linear-gradient(180deg, rgb(226 164 95 / .12), rgb(226 164 95 / .03));
  color: var(--text); text-decoration: none; box-shadow: 0 6px 18px rgb(0 0 0 / .35);
  transition: transform .16s, border-color .16s, background .16s; -webkit-tap-highlight-color: transparent;
}
.app svg { width: 2rem; height: 2rem; fill: none; stroke: var(--accent-bright); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app__lbl { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.app:hover { border-color: var(--accent); background: rgb(226 164 95 / .2); }
.app:active { transform: scale(.97); }

/* ---- agenda: selector de días y 3 sillas */
.dias { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-bottom: .9rem; }
.dia {
  min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem;
  padding: .2rem; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dia b { font-size: .78rem; font-weight: 700; }
.dia span { font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dia[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.dia[aria-pressed="true"] b, .dia[aria-pressed="true"] span { color: var(--accent-bright); }

.sillas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; align-items: start; }
.silla { min-width: 0; padding: .45rem .35rem .5rem; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 12px; background: rgb(244 238 227 / .02); }
.silla h2 { margin: 0 0 .45rem; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-align: center; }
.citas { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.cita {
  width: 100%; min-height: 3.9rem; display: flex; flex-direction: column; gap: .05rem;
  padding: .4rem .45rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cita b { font-size: .76rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cita span { font-size: .74rem; line-height: 1.25; overflow-wrap: anywhere; }
.cita small { font-size: .6rem; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.cita[data-estado="pagada"] { opacity: .7; }
.cita[data-estado="pagada"] b::after { content: " ✓"; color: var(--ok); }
.cita:hover { border-color: var(--accent); }
.cita:active { transform: scale(.98); }
.silla__vacia { margin: .2rem 0; color: var(--muted); font-size: .68rem; text-align: center; }

/* ---- ficha de la cita (diálogo nativo) */
.ficha {
  width: min(100% - 1.4rem, 26rem); max-height: calc(100dvh - 2rem); overflow: auto; margin: auto;
  padding: 1.1rem; border: 1px solid var(--accent); border-radius: 20px;
  background: #1a1611; color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .65);
}
.ficha::backdrop { background: rgb(0 0 0 / .72); }
.ficha__cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ficha__cerrar {
  min-height: 44px; padding: 0 .35rem; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: .74rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ficha__t { margin: .45rem 0 .1rem; font-size: 1.7rem; line-height: 1.1; letter-spacing: -.02em; }
.ficha__serv { margin: 0; color: var(--muted); font-size: .86rem; }
.acciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .9rem; }
.acciones button {
  min-height: 5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem .35rem; border: 1px solid var(--line); border-radius: 14px; background: rgb(244 238 227 / .04);
  color: var(--text); font: inherit; font-size: .68rem; font-weight: 600; line-height: 1.25; text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.acciones svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: var(--accent-bright); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.acciones button:hover { border-color: var(--accent); background: var(--accent-soft); }
.acciones button:disabled { opacity: .45; cursor: default; }
.mover { display: grid; gap: .55rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.mover .campo { margin: 0; }
.status { min-height: 1.2rem; margin: .55rem 0 0; color: var(--ok); font-size: .8rem; }

/* ---- cobrar */
.importe { display: flex; align-items: baseline; justify-content: center; gap: .25rem; margin: .2rem 0 .9rem; font-weight: 700; letter-spacing: -.03em; }
.importe b { font-size: clamp(2.9rem, 18vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.importe span { font-size: 1.3rem; color: var(--accent); }
.etiqueta { margin: 0 0 .4rem; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.servicios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: 1rem; }
.servicio {
  min-height: 4.3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  padding: .45rem .25rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(244 238 227 / .04);
  color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.servicio b { font-size: .72rem; line-height: 1.2; text-align: center; }
.servicio span { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.servicio[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.servicio[aria-pressed="true"] span { color: var(--accent-bright); }
.campo { display: grid; gap: .3rem; margin: 0 0 .8rem; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
select, input[type="date"], input[type="time"] {
  min-height: 50px; width: 100%; min-width: 0; padding: 0 .7rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 1rem; color-scheme: dark;
}
select:focus, input:focus { border-color: var(--accent); }
input[type="radio"] { width: 21px; height: 21px; flex: none; accent-color: var(--accent); }
.metodos { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.metodos legend { padding: 0; margin-bottom: .3rem; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.metodo {
  min-height: 50px; display: flex; align-items: center; gap: .5rem; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 10px; background: rgb(244 238 227 / .03);
  font-size: .9rem; cursor: pointer;
}
.metodo:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.btn {
  width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 1rem; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent);
  color: #1a1207; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { background: var(--accent-bright); }
.btn:disabled { opacity: .45; cursor: default; }
.hecho { display: grid; justify-items: center; gap: .3rem; margin-top: .5rem; padding: 1.4rem 1rem; border: 1px solid rgb(154 214 168 / .5); border-radius: 16px; background: rgb(154 214 168 / .08); text-align: center; }
.hecho__ico { width: 3rem; height: 3rem; fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hecho__t { margin: 0; font-size: 1.1rem; font-weight: 700; }
.hecho__d { margin: 0 0 .6rem; color: var(--muted); font-size: .88rem; }
.hecho .btn { max-width: 16rem; }

/* ---- caja */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .4rem; }
.stat { min-width: 0; padding: .6rem .45rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(244 238 227 / .03); }
.stat span { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.stat b { font-size: clamp(.82rem, 4vw, 1.05rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat--pend b { color: var(--accent-bright); }
.movs { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.mov { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mov__h { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.mov__d { min-width: 0; }
.mov__d b { display: block; font-size: .8rem; font-weight: 600; overflow-wrap: anywhere; }
.mov__d span { font-size: .66rem; color: var(--muted); }
.mov__i { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.movs__vacio { margin: 0; color: var(--muted); font-size: .85rem; }
.ok-line:empty { display: none; }
.ok-line { margin: .7rem 0 0; padding: .7rem .8rem; border: 1px solid rgb(154 214 168 / .5); border-radius: 10px; background: rgb(154 214 168 / .08); color: var(--ok); font-size: .82rem; }

/* ---- avisos */
.avisos { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.aviso { padding: .8rem .85rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; background: var(--panel); }
.aviso--leido { border-left-color: var(--line); }
.aviso__cab { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.aviso time { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.aviso__tipo { color: var(--accent-bright); font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.aviso p { margin: 0; font-size: .86rem; }
.chip { margin-left: auto; padding: .12rem .45rem; border-radius: 999px; background: rgb(244 238 227 / .08); color: var(--muted); font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chip--ok { background: rgb(154 214 168 / .14); color: var(--ok); }
.aviso__b { margin-top: .6rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--accent); border-radius: 10px; background: transparent; color: var(--accent-bright); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.aviso__b:hover { background: var(--accent-soft); }

/* ---- aviso flotante */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1rem); translate: -50% 0;
  max-width: min(92vw, 26rem); margin: 0; padding: .65rem .9rem; border: 1px solid var(--accent); border-radius: 10px;
  background: #241c12; color: var(--text); font-size: .85rem; box-shadow: 0 12px 30px rgb(0 0 0 / .5);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
