:root {
  --bg: #060607;
  --ink: #f3ede0;
  --muted: #9b958a;
  --gold: #d6a84c;
  --gold-2: #f1d28a;
  --gold-3: #8a6a24;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .09);
  --ok: #7fd49a;
  --warn: #e9b95a;
  --bad: #e07a6b;
  --radius: 24px;
  --font-title: 'Cinzel', Georgia, serif;
  --font: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Brillos de fondo: dan el efecto cristal */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow i { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.glow i:nth-child(1) { width: 520px; height: 520px; background: #b98a2c; top: -160px; left: 18%; opacity: .34; }
.glow i:nth-child(2) { width: 460px; height: 460px; background: #6b4a12; bottom: -140px; right: 6%; opacity: .5; }
.glow i:nth-child(3) { width: 340px; height: 340px; background: #f1d28a; top: 45%; left: -120px; opacity: .12; }

.glass {
  background: linear-gradient(150deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 50px -25px rgba(0, 0, 0, .8);
}

/* Shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding: 20px; min-height: 100vh; }
.side { position: sticky; top: 20px; height: calc(100vh - 40px); padding: 26px 18px; display: flex; flex-direction: column; gap: 28px; }
.logo { font-family: var(--font-title); font-size: 26px; letter-spacing: .22em; padding: 0 10px; }
.logo small { display: block; font-family: var(--font); font-size: 10px; letter-spacing: .5em; color: var(--gold); margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  color: var(--muted); font-size: 14px; transition: .2s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--ink); background: var(--glass); }
.nav a.on {
  color: #1a1305; font-weight: 600;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 30px -10px rgba(214, 168, 76, .6);
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #1a1305; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user b { font-size: 13px; display: block; }
.user span { font-size: 11px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
#vista { display: flex; flex-direction: column; gap: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; }
h1 { font-family: var(--font-title); font-weight: 500; font-size: clamp(28px, 4vw, 44px); letter-spacing: .04em; margin-top: 4px; text-transform: uppercase; }
h2 { font-family: var(--font-title); font-weight: 500; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.mobile-bar { display: none; }

/* Botones */
.btn {
  border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 10px 18px;
  font-size: 13px; transition: .2s; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn:hover { background: var(--glass-2); border-color: rgba(214, 168, 76, .5); }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1305; font-weight: 600; border-color: transparent; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Rejillas */
.grid { display: grid; gap: 20px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.5fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.card { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }

.stat { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.stat .lbl { font-size: 11px; letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.stat .val { font-family: var(--font-title); font-size: 30px; letter-spacing: .02em; }
.stat .hint { font-size: 12px; color: var(--muted); }
.stat .hint.up { color: var(--ok); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(var(--gold), transparent 70%); opacity: .13; }

/* Gráfica de barras tipo píldora */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 210px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.bar .v { font-size: 11px; color: var(--muted); }
.bar .col { width: 100%; max-width: 46px; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); border: 1px solid var(--line); min-height: 14px; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bar.today .col { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; box-shadow: 0 0 30px rgba(214, 168, 76, .45); }
.bar.today .v { color: var(--gold-2); }
.bar .d { font-size: 11px; color: var(--muted); }

.rank { display: flex; flex-direction: column; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 110px 1fr 28px; gap: 12px; align-items: center; font-size: 13px; }
.track { height: 8px; background: rgba(255, 255, 255, .07); border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); border-radius: 99px; }
.rank-row b { text-align: right; font-weight: 500; }

.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 3px; margin: 14px 0 12px; }
.stack i { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--c); }

/* Agenda: tarjetas de cita */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 13px; color: var(--muted); }
.chip.on { background: rgba(214, 168, 76, .16); border-color: var(--gold); color: var(--gold-2); }
.citas { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.cita { padding: 18px; display: flex; flex-direction: column; gap: 14px; border-radius: 22px; }
.cita .hora { font-family: var(--font-title); font-size: 20px; color: var(--gold-2); }
.cita .who { display: flex; align-items: center; gap: 12px; }
.cita .who b { display: block; font-weight: 500; }
.cita .who span { font-size: 12px; color: var(--muted); }
.cita .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .07); letter-spacing: .04em; }
.tag.confirmada { background: rgba(127, 212, 154, .15); color: var(--ok); }
.tag.pendiente { background: rgba(233, 185, 90, .16); color: var(--warn); }
.tag.completada { background: rgba(214, 168, 76, .18); color: var(--gold-2); }
.tag.cancelada, .tag.no_asistio { background: rgba(224, 122, 107, .15); color: var(--bad); }
.row-top { display: flex; align-items: center; justify-content: space-between; }

.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.item:last-child { border: 0; }
.item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label, .lbl-s { font-size: 11px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
input, select, textarea {
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%; outline: none; transition: .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 168, 76, .15); }
select option { background: #121214; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); font-size: 13px; text-align: left; transition: .2s; }
.opt:hover { border-color: rgba(214, 168, 76, .5); }
.opt.on { border-color: var(--gold); background: rgba(214, 168, 76, .15); color: var(--gold-2); }
.opt small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.total-row { display: flex; justify-content: space-between; font-family: var(--font-title); font-size: 22px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }
.inline { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; }

/* Tarjeta de fidelización */
.level-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px; min-height: 230px;
  background: radial-gradient(120% 120% at 100% 0%, rgba(241, 210, 138, .3), transparent 50%), linear-gradient(145deg, #1b1608, #0b0a07);
  border: 1px solid rgba(214, 168, 76, .4); box-shadow: 0 30px 60px -30px rgba(214, 168, 76, .4);
}
.level-card .brand { font-family: var(--font-title); letter-spacing: .3em; font-size: 20px; color: var(--gold-2); }
.level-card .brand small { font-family: var(--font); font-size: 10px; letter-spacing: .5em; color: var(--muted); display: block; }
.level-card .nm { margin-top: 18px; font-size: 18px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(214, 168, 76, .45); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.stamp.on { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1305; border: 0; font-weight: 700; box-shadow: 0 0 18px rgba(214, 168, 76, .5); }
.progress { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.progress .track { flex: 1; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; font-weight: 500; padding: 10px 8px; }
.tbl td { padding: 13px 8px; border-top: 1px solid var(--line); }
.tbl td small { color: var(--muted); }

/* Toast + login + modal */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; z-index: 50; padding: 12px 20px; border-radius: 999px; font-size: 14px; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--bad); color: var(--bad); }
.center { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(420px, 100%); padding: 36px 30px; }
.login .logo { text-align: center; font-size: 34px; margin-bottom: 26px; padding: 0; }
.demo-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; line-height: 1.5; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }
.skel { animation: pulse 1.2s infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
.badge-demo { font-size: 10px; letter-spacing: .2em; padding: 4px 10px; border-radius: 99px; background: rgba(214, 168, 76, .18); color: var(--gold-2); }

/* Público */
.pub { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 22px; }
.pub-nav { display: flex; justify-content: space-between; align-items: center; }
.hero { padding: 44px 36px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.steps i { flex: 1; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .1); }
.steps i.on { background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.hours .opt { text-align: center; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .g3 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .side { display: none; }
  .inline { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 90px 1fr 24px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat .val { font-size: 22px; }
  .card { padding: 16px; }
  .bars { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Movimiento sutil */
.glow i { animation: deriva 22s ease-in-out infinite alternate; }
.glow i:nth-child(2) { animation-duration: 28s; animation-direction: alternate-reverse; }
.glow i:nth-child(3) { animation-duration: 18s; }
@keyframes deriva { to { transform: translate(70px, 50px) scale(1.12); } }

#vista .card, #vista .cita { transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s, box-shadow .35s; }
#vista .card:hover, #vista .cita:hover { transform: translateY(-3px); border-color: rgba(214, 168, 76, .4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 26px 50px -22px rgba(214, 168, 76, .28); }
.nav a svg { transition: transform .3s; }
.nav a:hover svg { transform: scale(1.12); }
.btn { transition: .2s, transform .2s; }
.btn:active { transform: scale(.97); }

#vista.anim > * { animation: sube .6s cubic-bezier(.2, .8, .2, 1) backwards; }
#vista.anim > :nth-child(2) { animation-delay: .07s; }
#vista.anim > :nth-child(3) { animation-delay: .14s; }
#vista.anim > :nth-child(4) { animation-delay: .21s; }
#vista.anim > :nth-child(5) { animation-delay: .28s; }
#vista.anim .grid > *, #vista.anim .citas > * { animation: sube .6s cubic-bezier(.2, .8, .2, 1) backwards; }
#vista.anim .grid > :nth-child(2), #vista.anim .citas > :nth-child(2) { animation-delay: .12s; }
#vista.anim .grid > :nth-child(3), #vista.anim .citas > :nth-child(3) { animation-delay: .19s; }
#vista.anim .grid > :nth-child(4), #vista.anim .citas > :nth-child(4) { animation-delay: .26s; }
#vista.anim .col { transform-origin: bottom; animation: crece .9s cubic-bezier(.2, .8, .2, 1) backwards; }
#vista.anim .bar:nth-child(2) .col { animation-delay: .05s; } #vista.anim .bar:nth-child(3) .col { animation-delay: .1s; }
#vista.anim .bar:nth-child(4) .col { animation-delay: .15s; } #vista.anim .bar:nth-child(5) .col { animation-delay: .2s; }
#vista.anim .bar:nth-child(6) .col { animation-delay: .25s; } #vista.anim .bar:nth-child(7) .col { animation-delay: .3s; }
#vista.anim .track i { transform-origin: left; animation: llena 1s .2s cubic-bezier(.2, .8, .2, 1) backwards; }
#vista.anim .stack i { transform-origin: left; animation: llena .9s .2s cubic-bezier(.2, .8, .2, 1) backwards; }
#vista.anim .stamp.on { animation: sello .45s cubic-bezier(.3, 1.6, .5, 1) backwards; }
#vista.anim .stamp:nth-child(n+2) { animation-delay: .05s; } #vista.anim .stamp:nth-child(n+4) { animation-delay: .12s; } #vista.anim .stamp:nth-child(n+6) { animation-delay: .2s; } #vista.anim .stamp:nth-child(n+8) { animation-delay: .28s; }
@keyframes sube { from { opacity: 0; transform: translateY(14px); } }
@keyframes crece { from { transform: scaleY(.05); opacity: 0; } }
@keyframes llena { from { transform: scaleX(0); } }
@keyframes sello { from { transform: scale(.4); opacity: 0; } }
.bar.today .col { animation: brillo 3.5s 1.2s ease-in-out infinite alternate; }
@keyframes brillo { to { box-shadow: 0 0 44px rgba(214, 168, 76, .7); } }

/* ───────── Reserva nueva ───────── */
.paso-t { font-family: var(--font-title); font-weight: 500; font-size: 20px; letter-spacing: .04em; margin-bottom: 14px; }
.link { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.barberos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.barbero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); text-align: center; transition: .2s; cursor: pointer; }
.barbero:hover { border-color: rgba(214, 168, 76, .5); }
.barbero.on { border-color: var(--gold); background: rgba(214, 168, 76, .14); }
.barbero b { font-weight: 500; }
.barbero small { color: var(--muted); font-size: 12px; }
.foto { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(214, 168, 76, .5); flex: none; }
.foto.ini { display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #1a1305; font-weight: 700; font-size: 24px; border: 0; }
.servicios { display: flex; flex-direction: column; gap: 10px; }
.servicio { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); text-align: left; transition: .2s; }
.servicio .check { width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: transparent; font-size: 14px; }
.servicio.on { border-color: var(--gold); background: rgba(214, 168, 76, .12); }
.servicio.on .check { background: var(--gold); color: #1a1305; border-color: transparent; }
.servicio .txt small, .servicio .precio small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.servicio .precio { text-align: right; font-weight: 500; }
.rapido { display: block; width: 100%; text-align: left; padding: 16px 18px; margin-bottom: 16px; border-radius: 20px; border: 1px solid var(--gold); background: linear-gradient(135deg, rgba(241, 210, 138, .18), rgba(214, 168, 76, .06)); }
.rapido b { display: block; font-size: 18px; margin-top: 4px; }
.rapido small { color: var(--muted); }
.dias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.dia { flex: none; width: 62px; padding: 10px 0; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; align-items: center; gap: 2px; scroll-snap-align: start; }
.dia b { font-family: var(--font-title); font-size: 20px; font-weight: 500; }
.dia small { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.dia.on { border-color: var(--gold); background: rgba(214, 168, 76, .16); }
.dia.on b { color: var(--gold-2); }
.dia.lleno { opacity: .45; }
.dia.lleno b { text-decoration: line-through; }
.franja { margin-top: 14px; }
.franja .lbl-s { display: block; margin-bottom: 8px; }
.espera { padding: 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 12px; border-radius: 18px; }
.inline2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.autoriza { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 12px; align-items: flex-start; }
.autoriza input { width: auto; margin-top: 3px; }
.autoriza a { color: var(--gold-2); text-decoration: underline; }
.resumen { display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 18px; border-radius: 18px; }
.resumen .foto { width: 52px; height: 52px; font-size: 18px; }
.resumen small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.barra-reserva { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 10px 10px 10px 18px; border-radius: 999px; border: 1px solid rgba(214, 168, 76, .35); background: rgba(14, 13, 10, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .9); }
.barra-reserva > span { flex: 1; min-width: 0; }
.barra-reserva b { font-family: var(--font-title); font-size: 18px; display: block; }
.barra-reserva small { color: var(--muted); font-size: 12px; }
.barra-reserva [data-atras] { padding: 8px 14px; font-size: 16px; }

/* Final de la reserva y «Mi cita» */
.exito { text-align: center; padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ok-icono { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #1a1305; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 0 40px rgba(214, 168, 76, .5); animation: sello .5s cubic-bezier(.3, 1.6, .5, 1); }
.anticipo { padding: 16px 18px; border-radius: 18px; margin-top: 14px; text-align: left; display: flex; flex-direction: column; gap: 8px; border-color: rgba(233, 185, 90, .5); width: 100%; }
.anticipo .btn { align-self: flex-start; }
.acciones-exito { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.mi-cita .acciones-exito { justify-content: flex-start; }
.sellos { padding: 16px 18px; border-radius: 18px; margin-top: 16px; width: 100%; text-align: left; }
.sellos p { margin: 8px 0 12px; font-size: 14px; }
.stamps.mini { grid-template-columns: repeat(10, 1fr); gap: 6px; margin: 0; }
.stamps.mini .stamp { font-size: 0; }
.pub.angosta { max-width: 640px; }
.pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: 13px; color: var(--muted); padding-top: 10px; }
.pie a:hover { color: var(--gold-2); }
.legal p { margin-top: 14px; line-height: 1.6; font-size: 14px; color: #d8d2c4; }
.elegir-estrellas { display: flex; gap: 6px; margin: 14px 0; }
.elegir-estrellas button { font-size: 34px; line-height: 1; background: none; border: 0; color: rgba(255, 255, 255, .18); padding: 0 2px; transition: transform .15s, color .15s; }
.elegir-estrellas button.on { color: var(--gold-2); }
.elegir-estrellas button:active { transform: scale(1.2); }

/* Galería y opiniones */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.galeria figure { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); }
.galeria figure.apagada { opacity: .45; }
.galeria img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.galeria figcaption { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.antes-despues { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.antes-despues img { aspect-ratio: 1 / 2; }
.antes-despues span { position: absolute; bottom: 8px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; background: rgba(0, 0, 0, .6); padding: 3px 8px; border-radius: 99px; }
.antes-despues span:nth-of-type(1) { left: 8px; }
.antes-despues span:nth-of-type(2) { right: 8px; color: var(--gold-2); }
.estrellas { color: var(--gold-2); letter-spacing: 2px; }
.estrellas i { font-style: normal; color: rgba(255, 255, 255, .15); }
.opiniones { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.opinion { margin: 0; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; gap: 8px; }
.opinion p { font-size: 14px; line-height: 1.5; }
.opinion cite { font-style: normal; font-size: 12px; color: var(--muted); }
.marcas { display: flex; flex-wrap: wrap; gap: 6px; }
.g2c { grid-template-columns: 1fr 1fr; gap: 0 16px; }
details summary { cursor: pointer; margin-bottom: 8px; }

@media (max-width: 860px) {
  .g2c { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pub { padding: 16px 12px 40px; gap: 16px; }
  .hero { padding: 30px 20px; }
  .inline2 { grid-template-columns: 1fr; }
  .barberos { grid-template-columns: repeat(2, 1fr); }
  .foto { width: 64px; height: 64px; }
  .barra-reserva { bottom: 8px; padding-left: 14px; }
  .barra-reserva .btn.gold { padding: 10px 14px; }
  .pub-nav .logo { font-size: 20px; }
}

/* ───────── Navegación en el celular: 4 opciones abajo y «Más» con el resto ───────── */
.barra-movil { display: none; }
.hoja-mas { display: none; }
@media (max-width: 860px) {
  .barra-movil {
    display: flex; position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 22px; gap: 2px; background: rgba(14, 13, 10, .9);
  }
  .barra-movil a, .barra-movil button {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 16px;
    font-size: 10.5px; color: var(--muted); background: none; border: 0; transition: .2s;
  }
  .barra-movil svg { width: 21px; height: 21px; }
  .barra-movil span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .barra-movil .on { color: #1a1305; font-weight: 600; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
  .hoja-mas { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0); transition: background .2s; }
  .hoja-mas[hidden] { display: none; }
  .hoja-mas.abierta { background: rgba(0, 0, 0, .55); }
  .hoja { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #121110f2;
    transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); max-height: 85vh; overflow: auto; }
  .hoja-mas.abierta .hoja { transform: none; }
  .hoja-asa { width: 44px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .2); margin: 2px auto 14px; }
  .hoja-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
  .hoja-lista a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); font-size: 12.5px; text-align: center; color: var(--ink); }
  .hoja-lista a.on { border-color: var(--gold); color: var(--gold-2); }
  .hoja-lista svg { width: 22px; height: 22px; }
}

/* ───────── Piezas comunes ───────── */
.acts-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-cod { display: flex; gap: 8px; }
.inline-cod input { flex: 1; min-width: 0; }
.g2b { grid-template-columns: 1fr 1fr; }
.selector-dia { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.selector-dia input[type=date] { width: auto; }
.alerta { border-color: rgba(233, 185, 90, .45); }
.cli-nombre { display: flex; gap: 10px; align-items: center; }
.tbl-acciones { text-align: right; white-space: nowrap; }
.tbl-acciones .btn + .btn { margin-left: 6px; }
.item.apagado, .ficha.apagada { opacity: .55; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-2); text-decoration: underline; font-size: inherit; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.opt-check { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); font-size: 13px; cursor: pointer; }
.opt-check input { width: auto; accent-color: var(--gold); }
.autoriza input[type=checkbox] { accent-color: var(--gold); }
.segmentado { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(0, 0, 0, .3); }
.segmentado button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.segmentado button.on { background: var(--gold); color: #1a1305; font-weight: 600; }

/* ───────── Agenda ───────── */
.agenda-card { padding: 16px; }
.agenda-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.agenda-barra select { width: auto; padding: 8px 12px; }
.agenda-titulo { font-family: var(--font-title); font-weight: 500; font-size: 15px; letter-spacing: .06em; text-transform: capitalize; margin-left: 4px; }
.ag-grilla { display: grid; grid-template-columns: 50px 1fr; }
.ag-eje { position: relative; margin-top: 52px; }
.ag-hora { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ag-hora:first-child { transform: none; }
.ag-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(118px, 1fr)); overflow-x: auto; scrollbar-width: thin; }
.ag-grilla.semana .ag-cols { grid-template-columns: repeat(7, minmax(92px, 1fr)); }
.ag-col { border-left: 1px solid var(--line); min-width: 0; }
.ag-col.hoy .ag-cab { color: var(--gold-2); }
.ag-cab { height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; font-size: 13px; text-transform: capitalize; border: 0; background: none; width: 100%; border-bottom: 1px solid var(--line); }
.ag-cab b { font-family: var(--font-title); font-size: 18px; font-weight: 500; }
.ag-cab small { font-size: 10.5px; color: var(--muted); text-transform: none; }
.ag-cuerpo { position: relative; }
.ag-linea { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, .06); }
.ag-cita { position: absolute; left: 3px; right: 3px; padding: 4px 7px; border-radius: 10px; text-align: left; overflow: hidden; font-size: 11.5px; line-height: 1.25;
  border: 1px solid rgba(214, 168, 76, .6); background: rgba(214, 168, 76, .2); color: var(--ink); z-index: 2; }
.ag-cita b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-cita small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-cita[style*="width"] { right: auto; }
.ag-cita.confirmada { background: linear-gradient(135deg, rgba(241, 210, 138, .34), rgba(214, 168, 76, .22)); }
.ag-cita.pendiente { background: rgba(233, 185, 90, .08); border-style: dashed; border-color: var(--warn); }
.ag-cita.completada, .ag-cita.no_asistio { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--muted); }
.ag-cita:hover { filter: brightness(1.15); }
.ag-bloqueo { position: absolute; left: 0; right: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 8px, rgba(255, 255, 255, .015) 8px 16px); border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ag-bloqueo span { font-size: 10.5px; color: var(--muted); padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .5); }
.ag-ahora { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; }
.ag-ahora::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.leyenda-agenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.ley::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--gold); }
.ley.confirmada::before { background: rgba(214, 168, 76, .4); }
.ley.pendiente::before { border-style: dashed; border-color: var(--warn); }
.ley.completada::before { border-color: var(--line); background: rgba(255, 255, 255, .06); }
.ley.bloqueo::before { border-color: rgba(255, 255, 255, .2); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .15) 0 3px, transparent 3px 6px); }
.detalle-cita h3 { font-family: var(--font-title); font-weight: 500; font-size: 20px; margin: 10px 0 4px; text-transform: capitalize; }

/* ───────── Equipo, ajustes y plataforma ───────── */
.equipo, .negocios { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ficha { display: flex; flex-direction: column; gap: 12px; }
.ficha-cab { display: flex; gap: 12px; align-items: center; }
.ficha-cab > div { flex: 1; min-width: 0; }
.ficha-cab b { display: block; font-weight: 500; font-size: 16px; }
.ficha-cab small, .acceso small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.ficha .foto { width: 54px; height: 54px; font-size: 18px; }
.clave-temporal { display: grid; gap: 2px; padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.clave-temporal small { color: var(--gold); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; margin-top: 8px; }
.clave-temporal small:first-child { margin-top: 0; }
.clave-temporal b { font-size: 18px; font-weight: 500; word-break: break-all; }
.horario { display: flex; flex-direction: column; }
.dia-horario { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dia-horario .autoriza { margin: 0; }
.turnos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.turnos input { width: 112px; padding: 8px 10px; }
.turnos span { color: var(--muted); font-size: 12px; }
.negocio .card-head { align-items: flex-start; }
.negocio select { width: auto; padding: 7px 12px; font-size: 12.5px; }

/* ───────── Página pública: tarjeta de fidelidad, anticipo y cambios ───────── */
.tarjeta-fid { position: relative; overflow: hidden; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px;
  background: radial-gradient(120% 120% at 100% 0%, rgba(241, 210, 138, .28), transparent 50%), linear-gradient(145deg, #1b1608, #0b0a07); border: 1px solid rgba(214, 168, 76, .4); }
.tf-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tf-cab span { font-family: var(--font-title); letter-spacing: .18em; color: var(--gold-2); text-transform: uppercase; }
.tf-cab small { font-size: 10.5px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.tf-nombre { font-size: 18px; }
.tarjeta-fid .stamps { margin-top: 0; }
.tf-estado { font-size: 14px; color: #d8d2c4; }
.tf-codigo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .4); }
.tf-codigo small { font-size: 10.5px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.tf-codigo b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 26px; letter-spacing: .18em; color: var(--gold-2); }
.billetera { background: #000; border-color: rgba(255, 255, 255, .35); color: #fff; font-weight: 500; }
.billetera:hover { background: #111; }
.cambio-hora { border-color: rgba(233, 185, 90, .55); }
.cambio-hora p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.cambio-hora s { color: var(--muted); }
.aviso-rechazo { color: var(--bad); font-size: 14px; }
.subir-captura { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.subir-captura .btn { cursor: pointer; }
.captura { text-align: center; }
.captura img { max-width: 100%; max-height: 60vh; border-radius: 14px; border: 1px solid var(--line); }
.escaner video { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 10px; }

@media (max-width: 860px) {
  .g2b { grid-template-columns: 1fr; }
  .top > div:last-child { width: 100%; }
  .top .acts-fila { width: 100%; }
  /* La tabla de clientes pasa a tarjetas: nombre arriba, teléfono y botones debajo. */
  .tbl-movil thead { display: none; }
  .tbl-movil, .tbl-movil tbody, .tbl-movil tr, .tbl-movil td { display: block; width: 100%; }
  .tbl-movil tr { padding: 12px 0; border-top: 1px solid var(--line); }
  .tbl-movil td { border: 0; padding: 3px 0; }
  .tbl-movil td[data-etq] { color: var(--muted); font-size: 13px; padding-left: 46px; }
  .tbl-acciones { text-align: left; padding-left: 46px !important; margin-top: 6px; }
  .dia-horario { grid-template-columns: 1fr; gap: 4px; }
  .equipo, .negocios { grid-template-columns: 1fr; }
  .agenda-barra { flex-direction: column; align-items: stretch; }
  .agenda-barra .acts-fila { justify-content: space-between; }
}
@media (max-width: 520px) {
  .hours { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .top h1 { font-size: 26px; }
  .inline-cod { flex-wrap: wrap; }
  .inline-cod input { flex-basis: 100%; }
  .turnos input { width: 100px; }
  .tf-codigo b { font-size: 22px; }
}

@media (max-width: 860px) {
  .grid.g3.compacta { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .compacta .card { padding: 14px 12px; }
  .compacta .stat .lbl { font-size: 9.5px; letter-spacing: .14em; }
  .compacta .stat .val { font-size: 24px; }
}
