/* ============================================================
   BEAUTY QR — Panel (/admin y /super)
   Pensado para usarse desde el celular: campos grandes,
   botones cómodos para el pulgar.
   ============================================================ */

:root {
  --rosa:        #D9587A;
  --rosa-oscuro: #B8395C;
  --rosa-suave:  #FADDE5;
  --rosa-nube:   #FDEFF3;
  --crema:       #FEF7F9;

  --tinta:       #33242B;
  --tinta-suave: #6E5A62;
  --gris:        #9C8890;
  --linea:       #EFDCE3;
  --blanco:      #FFFFFF;
  --rojo:        #D6335A;
  --verde:       #1DAF52;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --sombra: 0 4px 16px rgba(126, 60, 82, .10);
  --sombra-lg: 0 14px 40px rgba(126, 60, 82, .20);

  --fuente: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fuente-display: "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--fuente);
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: var(--rosa-oscuro); }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.envoltura { max-width: 720px; margin: 0 auto; padding-bottom: 90px; }

/* ---------------- Encabezado ---------------- */
.cab {
  position: sticky; top: 0; z-index: 30;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
}
.cab__fila {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
}
.cab__marca {
  font-family: var(--fuente-display);
  font-style: italic; font-weight: 600;
  font-size: 1.3rem; color: var(--rosa-oscuro);
  white-space: nowrap;
}
.cab__salon {
  flex: 1; min-width: 0;
  font-size: .82rem; color: var(--tinta-suave);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cab__acciones { display: flex; gap: 6px; }

/* ---------------- Pestañas ---------------- */
.pestanas {
  display: flex; gap: 6px;
  padding: 10px 16px;
  overflow-x: auto; scrollbar-width: none;
  max-width: 720px; margin: 0 auto;
}
.pestanas::-webkit-scrollbar { display: none; }
.pestana {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: var(--rosa-nube);
  color: var(--tinta-suave);
  font-size: .85rem; font-weight: 600;
  transition: all .16s;
}
.pestana[aria-selected="true"] {
  background: var(--rosa); color: var(--blanco);
  box-shadow: 0 3px 10px rgba(184, 57, 92, .3);
}

/* ---------------- Bloques ---------------- */
.panel { padding: 6px 16px; display: grid; gap: 10px; }
.panel__titulo {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--gris); margin: 12px 2px 0;
}
.tarjeta {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  padding: 14px;
}

/* ---------------- Formularios ---------------- */
.campo { display: block; margin-bottom: 14px; }
.campo__etiqueta {
  display: block;
  font-size: .82rem; font-weight: 600;
  margin-bottom: 6px; color: var(--tinta-suave);
}
.campo__ayuda {
  display: block;
  font-size: .74rem; color: var(--gris);
  margin-top: 5px; line-height: 1.5;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="color"], textarea, select {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  font-size: .94rem;
  color: var(--tinta);
  background: var(--blanco);
  border: 1.5px solid var(--linea);
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--rosa);
  box-shadow: 0 0 0 3px var(--rosa-nube);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input[type="color"] { height: 46px; padding: 4px; cursor: pointer; }

.fila-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; font-size: .9rem; cursor: pointer;
}
.check input { width: 20px; height: 20px; accent-color: var(--rosa); }

/* ---------------- Botones ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; height: 46px;
  border-radius: var(--r-full);
  font-size: .92rem; font-weight: 700;
  transition: transform .12s, filter .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn--rosa   { background: var(--rosa); color: var(--blanco); box-shadow: 0 4px 14px rgba(184,57,92,.3); }
.btn--claro  { background: var(--rosa-nube); color: var(--rosa-oscuro); }
.btn--linea  { background: var(--blanco); color: var(--tinta-suave); border: 1.5px solid var(--linea); }
.btn--rojo   { background: var(--rojo); color: var(--blanco); }
.btn--bloque { width: 100%; }
.btn--chico  { height: 38px; padding: 0 14px; font-size: .84rem; }

.btn-flotante {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  box-shadow: var(--sombra-lg);
}

/* ---------------- Lista editable ---------------- */
.item {
  display: flex; align-items: center; gap: 11px;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  padding: 10px;
}
.item--apagado { opacity: .5; }
.item__foto {
  flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: linear-gradient(140deg, #F6DCE4, #E3B9C8);
}
.item__txt { flex: 1; min-width: 0; }
/* display:block explícito: estas clases se usan tanto sobre <div>
   como sobre <span>, y en spans el nombre y los datos se pegarían
   en la misma línea. */
.item__nombre {
  display: block;
  font-size: .92rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item__meta { display: block; font-size: .78rem; color: var(--gris); margin-top: 2px; }
.item__orden { display: flex; flex-direction: column; gap: 2px; }
.mini {
  width: 30px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--rosa-nube);
  color: var(--rosa-oscuro);
  font-size: .8rem;
}
.mini:disabled { opacity: .3; pointer-events: none; }

.vacio {
  text-align: center; padding: 40px 20px;
  color: var(--gris); font-size: .88rem; line-height: 1.6;
}

/* ---------------- Selector de foto ---------------- */
.foto-campo { display: flex; align-items: center; gap: 12px; }
.foto-campo__vista {
  flex: 0 0 84px; width: 84px; height: 84px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: linear-gradient(140deg, #F6DCE4, #E3B9C8);
  border: 1px solid var(--linea);
}
.foto-campo__acciones { display: grid; gap: 7px; }
.foto-campo input[type="file"] { display: none; }

/* ---------------- Hoja modal ---------------- */
.velo {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(45, 14, 26, .55);
  animation: fundir .2s ease both;
}
@keyframes fundir { from { opacity: 0; } to { opacity: 1; } }

.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 720px; margin: 0 auto;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--blanco);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: subir .28s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes subir { from { transform: translateY(100%); } to { transform: none; } }
.hoja__asa {
  width: 40px; height: 4px; border-radius: var(--r-full);
  background: var(--linea); margin: 6px auto 14px;
}
.hoja__titulo {
  font-size: 1.14rem; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 16px;
}
.hoja__pie {
  display: flex; gap: 10px; margin-top: 6px;
  position: sticky; bottom: 0;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--blanco) 30%);
}
.hoja__pie .btn { flex: 1; }

/* ---------------- Aviso flotante ---------------- */
.aviso-flotante {
  position: fixed; left: 50%; bottom: 84px;
  transform: translateX(-50%);
  z-index: 90;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: var(--r-full);
  background: var(--tinta);
  color: var(--blanco);
  font-size: .87rem; font-weight: 600;
  box-shadow: var(--sombra-lg);
  animation: fundir .18s ease both;
}
.aviso-flotante--error { background: var(--rojo); }
.aviso-flotante--ok    { background: var(--verde); }

/* ---------------- Login ---------------- */
.acceso {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px;
}
.acceso__caja {
  width: 100%; max-width: 380px;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--sombra);
}
.acceso__marca {
  font-family: var(--fuente-display);
  font-style: italic; font-weight: 600;
  font-size: 2.1rem; color: var(--rosa-oscuro);
  text-align: center; margin-bottom: 4px;
}
.acceso__sub {
  text-align: center; font-size: .87rem;
  color: var(--tinta-suave); margin-bottom: 22px;
}
.acceso__error {
  background: #FDEAEE; color: var(--rojo);
  font-size: .84rem; font-weight: 600;
  padding: 11px 13px; border-radius: var(--r-sm);
  margin-bottom: 14px; line-height: 1.5;
}

/* ---------------- Cargando ---------------- */
.cargando {
  min-height: 60dvh;
  display: grid; place-items: center;
  color: var(--gris); font-size: .9rem;
}
.girador {
  width: 30px; height: 30px;
  border: 3px solid var(--rosa-suave);
  border-top-color: var(--rosa);
  border-radius: 50%;
  animation: girar .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ============================================================
   CLIENTES VIP
   Reutiliza .panel, .item, .tarjeta, .btn y .hoja del panel.
   Solo se añade lo que no existía: el bloque de saldo, la acción
   principal y la pantalla de confirmación.
   ============================================================ */

.vip-accion {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 68px; margin: 4px 0 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--rosa) 0%, var(--rosa-oscuro) 100%);
  color: var(--blanco); font-size: 1.08rem; font-weight: 700;
  box-shadow: 0 8px 24px rgba(184, 57, 92, .34);
  transition: transform .14s, box-shadow .14s;
}
.vip-accion:active { transform: scale(.985); }

.vip-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vip-dato {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--r-md); padding: 14px 16px;
}
.vip-dato b {
  display: block; font-size: 1.5rem; font-weight: 700;
  letter-spacing: -.03em; color: var(--tinta); line-height: 1.1;
}
.vip-dato span { font-size: .78rem; color: var(--tinta-suave); }

.vip-atajos { display: flex; gap: 8px; margin-top: 12px; }
.vip-atajos .btn { flex: 1; }

.vip-volver {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 0; margin-bottom: 6px;
  font-size: .88rem; font-weight: 600; color: var(--tinta-suave);
}

.vip-lista { display: grid; gap: 8px; margin-top: 10px; }
.vip-inicial {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--rosa-nube); color: var(--rosa-oscuro);
  font-weight: 700; font-size: 1rem;
}
.vip-puntos { font-size: .92rem; font-weight: 700; color: var(--rosa-oscuro); white-space: nowrap; }
.vip-puntos-chip {
  flex: 0 0 auto; padding: 7px 11px; border-radius: var(--r-full);
  background: var(--rosa-nube); color: var(--rosa-oscuro);
  font-size: .8rem; font-weight: 700;
}

/* ---------- Buscar y tarjeta de la clienta ---------- */
.vip-buscar h2 { font-size: 1.32rem; font-weight: 700; letter-spacing: -.02em; }
.vip-buscar > p { font-size: .9rem; color: var(--tinta-suave); margin: 8px 0 20px; }

/* Grande y espaciado: se teclea de pie, con prisa y a veces sin mirar */
.vip-codigo {
  font-size: 2rem !important; font-weight: 700;
  letter-spacing: .38em; text-align: center;
  padding: 16px 13px !important;
}

.vip-nada {
  display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 26px 18px; margin-top: 14px;
  border: 1.5px dashed var(--linea); border-radius: var(--r-md);
}
.vip-nada b { font-size: .96rem; color: var(--tinta); }
.vip-nada span { font-size: .85rem; color: var(--tinta-suave); }

.vip-tarjeta {
  margin-top: 16px; padding: 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--blanco), var(--rosa-nube));
  border: 1px solid var(--rosa-suave);
  box-shadow: var(--sombra);
}
.vip-tarjeta__cab { display: flex; align-items: center; gap: 12px; }
.vip-corona {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--rosa); color: var(--blanco);
}
.vip-tarjeta__cab h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.vip-nivel {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--rosa-oscuro);
}

.vip-saldo { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; }
.vip-saldo b {
  font-size: 2.9rem; font-weight: 700; line-height: 1;
  letter-spacing: -.04em; color: var(--tinta);
}
.vip-saldo span { font-size: .92rem; color: var(--tinta-suave); }

.vip-progreso { margin: 16px 0 4px; }
.vip-progreso__barra {
  height: 8px; border-radius: var(--r-full);
  background: var(--blanco); overflow: hidden;
  border: 1px solid var(--rosa-suave);
}
.vip-progreso__barra span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--rosa), var(--rosa-oscuro));
}
.vip-progreso__txt {
  display: block; margin-top: 8px;
  font-size: .82rem; color: var(--tinta-suave);
}
.vip-registrar { margin-top: 18px; height: 54px; font-size: 1rem; }

.vip-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px;
  font-size: .82rem; color: var(--tinta-suave);
}
.vip-aviso {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm);
  background: #FDEAEE; color: var(--rojo); font-size: .85rem; font-weight: 600;
}
.vip-acciones-ficha { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vip-acciones-ficha .btn { flex: 1 1 auto; }

/* ---------- QR ---------- */
.vip-qr-caja { text-align: center; }
.vip-qr { display: grid; place-items: center; padding: 10px 0 14px; }
.vip-qr svg { width: 190px; height: 190px; }
.vip-qr-caja input { margin-top: 10px; font-size: .78rem; text-align: center; }

/* ---------- Historial ---------- */
.vip-historial { display: grid; gap: 6px; }
.vip-mov {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--r-sm);
}
.vip-mov__signo {
  flex: 0 0 auto; min-width: 58px; text-align: center;
  padding: 5px 9px; border-radius: var(--r-full);
  font-size: .82rem; font-weight: 700;
}
.vip-mov__signo.mas   { background: rgba(29,175,82,.11); color: var(--verde); }
.vip-mov__signo.menos { background: var(--rosa-nube);    color: var(--rosa-oscuro); }
.vip-mov__txt { flex: 1; min-width: 0; }
.vip-mov__txt b { display: block; font-size: .88rem; font-weight: 600; }
.vip-mov__txt span { font-size: .76rem; color: var(--gris); }

.vip-recompensa:disabled { cursor: default; }
.vip-etiqueta {
  flex: 0 0 auto; padding: 5px 11px; border-radius: var(--r-full);
  background: var(--linea); color: var(--tinta-suave);
  font-size: .72rem; font-weight: 700;
}
.vip-etiqueta--ok { background: rgba(29,175,82,.13); color: var(--verde); }

/* ---------- Programa aún sin activar ---------- */
.vip-vacio {
  display: grid; justify-items: center; gap: 12px; text-align: center;
  padding: 44px 26px;
}
.vip-vacio__corona {
  width: 62px; height: 62px; display: grid; place-items: center;
  border-radius: 50%; background: var(--rosa-nube); color: var(--rosa-oscuro);
}
.vip-vacio__corona svg { width: 30px; height: 30px; }
.vip-vacio h3 { font-size: 1.16rem; font-weight: 700; }
.vip-vacio p { font-size: .9rem; color: var(--tinta-suave); max-width: 30rem; }

/* ---------- Confirmación de visita ---------- */
.vip-hoja { max-width: 440px; }

.vip-velo-fiesta {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: 24px;
  background: rgba(45, 14, 26, .72);
}
.vip-fiesta {
  width: 100%; max-width: 340px; text-align: center;
  padding: 34px 26px; border-radius: var(--r-lg);
  background: var(--blanco); box-shadow: var(--sombra-lg);
  animation: vipEntra .3s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes vipEntra {
  from { opacity: 0; transform: scale(.9) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.vip-fiesta__emoji { font-size: 2.8rem; line-height: 1; }
.vip-fiesta h2 { font-size: 1.3rem; font-weight: 700; margin: 10px 0 14px; }
.vip-fiesta__mas {
  display: inline-block; padding: 8px 18px; border-radius: var(--r-full);
  background: rgba(29,175,82,.12); color: var(--verde);
  font-size: 1.02rem; font-weight: 700;
}
.vip-fiesta p { font-size: .86rem; color: var(--tinta-suave); margin-top: 16px; }
.vip-fiesta__total {
  font-size: 2.9rem; font-weight: 700; line-height: 1.1;
  letter-spacing: -.04em; color: var(--tinta);
}
.vip-fiesta .btn { margin-top: 22px; }

@media (max-width: 420px) {
  .vip-datos { grid-template-columns: 1fr 1fr; }
  .vip-dato b { font-size: 1.3rem; }
  .vip-saldo b, .vip-fiesta__total { font-size: 2.4rem; }
}

/* ---------------- Escáner de QR ---------------- */
.vip-escanear {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; margin-bottom: 6px;
  border-radius: var(--r-lg);
  background: var(--tinta); color: var(--blanco);
  font-size: 1rem; font-weight: 700;
  transition: transform .14s;
}
.vip-escanear:active { transform: scale(.985); }

.vip-o {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 4px;
  font-size: .8rem; color: var(--gris);
}
.vip-o::before, .vip-o::after {
  content: ""; flex: 1; height: 1px; background: var(--linea);
}

.vip-escaner {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: grid; place-items: center;
}
.vip-escaner video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
/* Marco de puntería: ayuda a encuadrar sin tener que explicar nada */
.vip-escaner__marco {
  position: relative; z-index: 2;
  width: min(68vw, 280px); aspect-ratio: 1;
  border: 3px solid rgba(255,255,255,.9);
  border-radius: 22px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.5);
}
.vip-escaner__txt {
  position: absolute; z-index: 3; left: 0; right: 0;
  bottom: 21%; padding: 0 30px;
  text-align: center; color: var(--blanco);
  font-size: .95rem; font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.vip-escaner__cerrar {
  position: absolute; z-index: 4; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: var(--blanco);
  font-size: 1.15rem; backdrop-filter: blur(6px);
}
.vip-escaner__manual {
  position: absolute; z-index: 4; bottom: 34px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.94);
}
