/* MOLLER'STUDIOS · estilos base. Para cambiar la marca, tocar solo las variables. */
:root {
  --bg: #0d0d0e;
  --superficie: #161618;
  --superficie-2: #1f1f22;
  --borde: #2a2a2e;
  --texto: #f2efe9;
  --texto-suave: #a19d95;
  --acento: #c8a24a;          /* bronce / dorado de barbería */
  --acento-texto: #141210;
  --ok: #4fb57a;
  --error: #e26a5b;
  --radio: 16px;
  --radio-chico: 12px;
  --fuente: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fuente-marca: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sa-top: env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--texto); }
body {
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(20px + var(--sa-top)) 20px calc(28px + var(--sa-bottom));
}
.vista { animation: entrar .35s var(--ease) both; display: flex; flex-direction: column; gap: 16px; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Marca ---------- */
.marca { font-family: var(--fuente-marca); font-size: 44px; letter-spacing: 2px; line-height: 1; margin: 24px 0 4px; }
.marca span { color: var(--acento); }
.marca-chica { font-family: var(--fuente-marca); font-size: 22px; letter-spacing: 1.5px; color: var(--acento); }
.bajada { color: var(--texto-suave); margin: 0; }
h2 { font-size: 24px; margin: 8px 0 0; letter-spacing: -.3px; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ---------- Botones (grandes, para el pulgar) ---------- */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--radio-chico);
  min-height: 54px; padding: 0 20px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 16px; cursor: pointer;
  transition: transform .12s var(--ease), opacity .2s, background .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primario { background: var(--acento); color: var(--acento-texto); }
.btn-secundario { background: var(--superficie-2); border-color: var(--borde); color: var(--texto); }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-link { background: none; border: 0; color: var(--texto-suave); min-height: 44px; width: auto; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn .spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 14px; color: var(--texto-suave); font-weight: 500; }
.campo input {
  background: var(--superficie-2); border: 1px solid var(--borde); border-radius: var(--radio-chico);
  min-height: 54px; padding: 0 16px; font-size: 17px; /* >=16px: iOS no hace zoom */
  outline: none; transition: border-color .2s;
}
.campo input:focus { border-color: var(--acento); }
.campo input[readonly] { color: var(--texto-suave); }
.campo .ayuda { font-size: 13px; color: var(--texto-suave); }
.campo.con-error input { border-color: var(--error); }
.campo .error { font-size: 13px; color: var(--error); }
.input-codigo { text-align: center; letter-spacing: 10px; font-size: 26px !important; font-variant-numeric: tabular-nums; }

.separador { display: flex; align-items: center; gap: 12px; color: var(--texto-suave); font-size: 13px; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--borde); }

.fila-centro { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.chico { font-size: 13px; color: var(--texto-suave); }
.dato { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.dato:last-child { border-bottom: 0; }
.dato span:first-child { color: var(--texto-suave); }
.badge { align-self: flex-start; background: rgba(200,162,74,.15); color: var(--acento); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.zona-salir { margin-top: 40px; display: flex; justify-content: center; }

/* ---------- Skeletons ---------- */
.skel { background: linear-gradient(90deg, var(--superficie) 0%, var(--superficie-2) 50%, var(--superficie) 100%); background-size: 200% 100%; animation: brillo 1.2s ease-in-out infinite; border-radius: var(--radio-chico); }
.skel-titulo { height: 44px; width: 70%; margin-top: 24px; }
.skel-linea { height: 18px; width: 50%; }
.skel-card { height: 180px; border-radius: var(--radio); }
.skel-boton { height: 54px; }
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--sa-bottom)); z-index: 50;
  transform: translate(-50%, 160%); max-width: calc(100vw - 32px); width: max-content;
  background: #f2efe9; color: #141210; border-radius: 14px; padding: 14px 18px;
  font-weight: 500; font-size: 15px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .3s, visibility 0s .4s;
}
.toast.ver { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .4s var(--ease), opacity .2s; }
.toast.error { background: var(--error); color: #fff; }
.red {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: calc(10px + var(--sa-top)) 16px 10px; text-align: center;
  background: #3a2a12; color: #f6dfa8; font-size: 14px; font-weight: 500;
  transform: translateY(-100%); transition: transform .35s var(--ease);
}
.red.ver { transform: none; }

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

/* =====================================================================
   Fase 2 · Navegación, página pública, reserva y turnos
   ===================================================================== */
.app.con-tabs { padding-bottom: calc(96px + var(--sa-bottom)); }

/* Barra inferior */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--sa-bottom));
  background: rgba(13,13,14,.86); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--borde);
  transform: translateY(110%); transition: transform .3s var(--ease);
}
.tabs.ver { transform: none; }
.tab {
  appearance: none; background: none; border: 0; min-height: 56px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--texto-suave); font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.tab svg { width: 24px; height: 24px; }
.tab.activa { color: var(--acento); }
.tab:active { background: var(--superficie); }

/* Encabezado de pantalla */
.cabecera { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.cabecera h2 { margin: 0; font-size: 22px; }
.atras {
  appearance: none; border: 0; background: var(--superficie); color: var(--texto);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
}
.atras svg { width: 22px; height: 22px; }
.pasos { display: flex; gap: 6px; }
.pasos span { flex: 1; height: 4px; border-radius: 4px; background: var(--superficie-2); }
.pasos span.ok { background: var(--acento); }

/* Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 28px 22px 22px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(200,162,74,.22), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
    var(--superficie);
  border: 1px solid var(--borde); display: flex; flex-direction: column; gap: 14px;
}
.hero .marca { margin: 0; font-size: clamp(36px, 11.5vw, 52px); padding-right: 30px; }
.hero .poste { position: absolute; right: 18px; top: 22px; width: 14px; height: 64px; border-radius: 8px;
  background: repeating-linear-gradient(135deg, #b8322b 0 8px, #f2efe9 8px 16px, #2b4f9e 16px 24px, #f2efe9 24px 32px);
  opacity: .85; box-shadow: 0 0 0 3px var(--superficie-2); }
.btn-grande { min-height: 60px; font-size: 18px; border-radius: 14px; }
.seccion { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--texto-suave); margin: 10px 0 -4px; font-weight: 600; }
.lista { display: flex; flex-direction: column; gap: 10px; }

/* Servicio */
.servicio {
  appearance: none; text-align: left; width: 100%; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 18px; display: flex; align-items: center; gap: 14px; transition: border-color .2s, transform .12s var(--ease);
}
.servicio:active { transform: scale(.985); border-color: var(--acento); }
.servicio .txt { flex: 1; min-width: 0; }
.servicio .nom { font-weight: 700; font-size: 17px; }
.servicio .desc { color: var(--texto-suave); font-size: 14px; margin-top: 2px; }
.servicio .precio { font-weight: 700; font-size: 17px; color: var(--acento); white-space: nowrap; }
.servicio .flecha { color: var(--texto-suave); width: 20px; height: 20px; flex: none; }

.info-fila { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0; }
.info-fila svg { width: 22px; height: 22px; color: var(--acento); flex: none; margin-top: 1px; }
.info-fila a { color: var(--texto); }

/* Días y horas */
.dias { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 20px; scrollbar-width: none; }
.dias::-webkit-scrollbar { display: none; }
.dia {
  appearance: none; flex: none; scroll-snap-align: start; cursor: pointer;
  min-width: 68px; min-height: 68px; border-radius: 14px; border: 1px solid var(--borde);
  background: var(--superficie); color: var(--texto);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 10px;
}
.dia .d1 { font-size: 12px; color: var(--texto-suave); text-transform: capitalize; font-weight: 600; }
.dia .d2 { font-size: 20px; font-weight: 700; }
.dia.activo { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }
.dia.activo .d1 { color: var(--acento-texto); }
.horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hora {
  appearance: none; cursor: pointer; min-height: 54px; border-radius: 12px;
  border: 1px solid var(--borde); background: var(--superficie); color: var(--texto);
  font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: transform .12s var(--ease), border-color .2s;
}
.hora:active { transform: scale(.96); border-color: var(--acento); }
.skel-dias { display: flex; gap: 8px; } .skel-dias .skel { width: 68px; height: 68px; border-radius: 14px; flex: none; }
.skel-horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .skel-horas .skel { height: 54px; }
.skel-serv { height: 82px; border-radius: var(--radio); }

/* Resumen y métodos */
.resumen .grande { font-size: 22px; font-weight: 700; line-height: 1.25; }
.resumen .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--borde); padding-top: 14px; }
.resumen .total strong { font-size: 24px; color: var(--acento); }
.metodo {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-chico); padding: 16px;
}
.metodo input { position: absolute; opacity: 0; pointer-events: none; }
.metodo .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borde); flex: none; display: grid; place-items: center; }
.metodo:has(input:checked) { border-color: var(--acento); }
.metodo:has(input:checked) .radio { border-color: var(--acento); }
.metodo:has(input:checked) .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--acento); }
.metodo .t1 { font-weight: 600; } .metodo .t2 { font-size: 13px; color: var(--texto-suave); }
.nota { font-size: 14px; color: var(--texto-suave); display: flex; gap: 10px; align-items: flex-start; }
.nota svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--acento); }

/* Éxito */
.exito { align-items: center; text-align: center; padding-top: 24px; }
.check { width: 84px; height: 84px; border-radius: 50%; background: rgba(79,181,122,.14); color: var(--ok); display: grid; place-items: center; animation: pop .5s var(--ease) both; }
.check svg { width: 44px; height: 44px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }

/* Turnos */
.turno { gap: 10px; }
.turno .cuando { font-size: 19px; font-weight: 700; }
.turno .linea { display: flex; justify-content: space-between; gap: 10px; color: var(--texto-suave); font-size: 15px; }
.estado { align-self: flex-start; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.e-pendiente, .e-pendiente_pago { background: rgba(214,164,58,.15); color: #e2b453; }
.e-confirmado { background: rgba(79,181,122,.15); color: var(--ok); }
.e-completado { background: rgba(140,150,170,.15); color: #aab3c5; }
.e-cancelado, .e-rechazado, .e-expirado, .e-no_vino { background: rgba(226,106,91,.13); color: var(--error); }
.direccion { background: var(--superficie-2); border-radius: var(--radio-chico); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.direccion strong { font-size: 16px; }
.btn-chico { min-height: 46px; font-size: 15px; }
.btn-peligro { background: transparent; border-color: rgba(226,106,91,.45); color: var(--error); }
.vacio { text-align: center; padding: 28px 16px; color: var(--texto-suave); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.vacio svg { width: 44px; height: 44px; color: var(--borde); }
.historial .turno { opacity: .8; }

/* Hoja inferior (confirmaciones) */
.fondo-hoja { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: aparecer .2s ease both; }
.hoja {
  width: 100%; max-width: 520px; background: var(--superficie); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(20px + var(--sa-bottom)); display: flex; flex-direction: column; gap: 12px;
  animation: subir .35s var(--ease) both; border-top: 1px solid var(--borde);
}
.hoja .agarre { width: 40px; height: 5px; border-radius: 5px; background: var(--borde); align-self: center; margin-bottom: 6px; }
.hoja h3 { margin: 0; font-size: 20px; }
.hoja p { margin: 0; color: var(--texto-suave); }
.btn-peligro-lleno { background: var(--error); color: #fff; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(100%); } }
.vista.quieta { animation: none; }
a.btn { text-decoration: none; }
.app.con-tabs ~ .toast { bottom: calc(92px + var(--sa-bottom)); }

/* Fase 7 · Puntos */
.tabs { grid-template-columns: repeat(5, 1fr); }
.tab { font-size: 11px; }
.saldo .num { font-family: var(--fuente-marca); font-size: 64px; line-height: .9; color: var(--acento); letter-spacing: 1px; }
.saldo .num span { font-family: var(--fuente); font-size: 16px; color: var(--texto-suave); letter-spacing: 0; margin-left: 6px; }
.barra { height: 12px; border-radius: 999px; background: var(--superficie-2); overflow: hidden; }
.barra span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #a8842f, var(--acento)); transition: width .8s var(--ease); }
.premio { display: flex; align-items: center; gap: 14px; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; }
.premio img, .premio .ico-premio { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--superficie-2); display: grid; place-items: center; font-size: 24px; flex: none; color: var(--acento); }
.premio .ico-premio svg { width: 28px; height: 28px; }
.premio .txt { flex: 1; min-width: 0; }
.premio .nom { font-weight: 700; }
.premio .pts { font-size: 14px; color: var(--texto-suave); }
.premio.alcanza { border-color: rgba(200,162,74,.5); }
.btn-mini-acc { width: auto; min-height: 42px; padding: 0 16px; font-size: 14px; background: var(--acento); color: var(--acento-texto); }
.btn-mini-acc[disabled] { background: var(--superficie-2); color: var(--texto-suave); opacity: 1; }
.mini-canje { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.mini-canje:last-child { border-bottom: 0; }
.mini-canje small { color: var(--texto-suave); }

/* Fase 9 · Instalar */
.banner-instalar { position: relative; display: flex; align-items: center; gap: 12px; background: var(--superficie); border: 1px solid rgba(200,162,74,.45); border-radius: var(--radio); padding: 12px 40px 12px 12px; }
.banner-instalar img { border-radius: 12px; flex: none; }
.banner-instalar .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.banner-instalar .tx span { font-size: 13px; color: var(--texto-suave); }
.banner-instalar .cerrar-banner { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; border: 0; background: none; color: var(--texto-suave); font-size: 15px; cursor: pointer; }
.ayuda-ios .telefono { align-self: center; width: 190px; border: 3px solid var(--borde); border-radius: 28px; overflow: hidden; background: #000; }
.ayuda-ios .pantalla { height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(circle at 70% 0, rgba(200,162,74,.25), transparent 60%), var(--bg); }
.ayuda-ios .pantalla img { width: 56px; height: 56px; border-radius: 14px; }
.ayuda-ios .pantalla span { font-size: 11px; color: var(--texto); }
.ayuda-ios .barra-safari { display: flex; justify-content: space-around; align-items: center; padding: 10px 6px 14px; background: #1c1c1e; }
.ayuda-ios .barra-safari span { width: 18px; height: 18px; border-radius: 4px; background: #3a3a3c; display: grid; place-items: center; }
.ayuda-ios .barra-safari .resalta { width: 30px; height: 30px; background: none; color: #0a84ff; border-radius: 50%; box-shadow: 0 0 0 3px var(--acento); animation: latido 1.4s ease-in-out infinite; }
.ayuda-ios .barra-safari .resalta svg { width: 22px; height: 22px; }
@keyframes latido { 50% { box-shadow: 0 0 0 7px rgba(200,162,74,.25); } }
.pasos-ios { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pasos-ios li { display: flex; gap: 12px; align-items: center; }
.pasos-ios .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--superficie-2); display: grid; place-items: center; color: #0a84ff; font-weight: 700; }
.pasos-ios .ic svg { width: 22px; height: 22px; }

/* Logo (tile tipo app) */
.logo-tile { display: block; flex: none; border-radius: 22.5%; box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06); user-select: none; -webkit-user-drag: none; }
.logo-cab { margin-left: auto; flex: none; border-radius: 22.5%; transition: transform .15s var(--ease); }
.logo-cab:active { transform: scale(.92); }
.logo-grande { margin-top: 18px; box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
.logo-grande + .marca { margin-top: 14px; }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-top .bajada { margin: 0; }
.hero .marca { padding-right: 0; }

/* Alias de transferencia */
.alias { background: rgba(200,162,74,.1); border: 1px solid rgba(200,162,74,.4); border-radius: var(--radio-chico); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fila-alias { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fila-alias strong { font-size: 19px; letter-spacing: .3px; word-break: break-all; color: var(--acento); }
.alias .btn-mini { flex: none; }
.btn-mini { appearance: none; border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); border-radius: 999px; padding: 0 14px; min-height: 36px; font-size: 14px; font-weight: 600; cursor: pointer; }
