/* ==========================================================================
   Barbería Leal · Prototipo Fase 0
   Tema oscuro premium con acento configurable por barbería (variables CSS).
   ========================================================================== */

@font-face { font-family: 'Cinzel'; src: url('../fuentes/cinzel.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fuentes/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  /* ---- Acento: lo cambia cada barbería desde Perfil → Color de tu marca ---- */
  --acento: #d9b566;
  --acento-contraste: #14110a;          /* texto sobre el acento */
  --acento-suave: color-mix(in srgb, var(--acento) 14%, transparent);
  --acento-medio: color-mix(in srgb, var(--acento) 32%, transparent);
  --acento-linea: color-mix(in srgb, var(--acento) 38%, transparent);
  --acento-claro: color-mix(in srgb, var(--acento) 70%, #ffffff);
  --acento-hondo: color-mix(in srgb, var(--acento) 72%, #000000);

  /* ---- Superficies ---- */
  --fondo: #0f1012;
  --fondo-2: #131518;
  --tarjeta: #17191d;
  --tarjeta-2: #1d2025;
  --linea: rgba(255, 255, 255, .08);
  --linea-fuerte: rgba(255, 255, 255, .14);

  /* ---- Texto ---- */
  --texto: #f4f2ee;
  --texto-2: #b9bcc2;
  --texto-3: #9a9da4;

  /* ---- Estados ---- */
  --ok: #7fd6a4;
  --ok-suave: rgba(127, 214, 164, .14);
  --alerta: #f2b36b;
  --alerta-suave: rgba(242, 179, 107, .14);
  --peligro: #ff9b9b;
  --wa: #3ddc84;
  --wa-texto: #062012;

  --fuente: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cinzel', 'Times New Roman', serif;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --sombra: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --curva: cubic-bezier(.22, 1, .36, 1);
  --alto-barra-inf: 68px;
  --ancho-lateral: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Patrón sutil de fondo tipo monograma (como la referencia) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--acento) 9%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--acento) 6%, transparent), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='60' y='72' text-anchor='middle' font-family='Georgia,serif' font-size='34' fill='%23ffffff' fill-opacity='0.022' letter-spacing='2'%3EBL%3C/text%3E%3C/svg%3E");
}

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--acento); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; border-radius: 6px; }

.saltar { position: absolute; left: -999px; top: 8px; background: var(--acento); color: var(--acento-contraste); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.saltar:focus { left: 8px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Cinta de prototipo ---------- */
.cinta-proto {
  position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 12px;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--texto-2);
  background: #0a0b0c;
  border-bottom: 1px solid var(--acento-linea);
  text-align: center;
}
.cinta-proto .punto { width: 6px; height: 6px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); flex: none; }

/* ---------- Estructura ---------- */
.marco { display: block; }
.lateral { display: none; }
.zona { min-width: 0; }

.barra-sup {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--fondo) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
}
.barra-sup .marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.barra-sup .marca img { width: 38px; height: 38px; border-radius: 50%; }
.barra-sup .marca .nombre { font-family: var(--serif); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-sup .marca .sub { display: block; font-family: var(--fuente); font-size: 11px; letter-spacing: .18em; color: var(--acento); text-transform: uppercase; margin-top: 1px; }
.barra-sup .acciones { display: flex; align-items: center; gap: 6px; }

.contenido {
  padding: 18px 16px calc(var(--alto-barra-inf) + 28px + env(safe-area-inset-bottom));
  max-width: 1180px; margin: 0 auto;
  outline: none;
}
.contenido.publica { padding-bottom: 40px; }
@media (min-width: 960px) { .contenido { padding-bottom: 60px; } }

/* ---------- Barra inferior (móvil) ---------- */
.barra-inf {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--alto-barra-inf) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, #0b0c0d 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--linea-fuerte);
}
.barra-inf a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--texto-3); font-size: 10.5px; letter-spacing: .02em;
  transition: color .2s var(--curva);
}
.barra-inf a svg { width: 22px; height: 22px; transition: transform .25s var(--curva); }
.barra-inf a.activo { color: var(--acento); }
.barra-inf a.activo::before { content: ''; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--acento); box-shadow: 0 0 12px var(--acento); }
.barra-inf a:active svg { transform: scale(.86); }
.barra-inf .conteo {
  position: absolute; top: 8px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--acento); color: var(--acento-contraste);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}

/* ---------- Tipografía ---------- */
.rotulo { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--acento); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.rotulo::before { content: '◆'; font-size: 8px; }
.titulo-pag { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 6vw, 38px); line-height: 1.1; letter-spacing: .02em; margin-top: 6px; }
.titulo-pag em { font-style: normal; color: var(--acento); }
.subtitulo { color: var(--texto-2); margin-top: 8px; max-width: 56ch; }
.titulo-seccion { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: .03em; }
.cabecera-pag { margin-bottom: 18px; }
.cabecera-pag.con-accion { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: linear-gradient(180deg, var(--tarjeta), var(--fondo-2));
  border: 1px solid var(--linea);
  border-radius: var(--r-l);
  padding: 18px;
  position: relative;
}
.tarjeta.borde-acento { border-color: var(--acento-linea); }
.tarjeta + .tarjeta { margin-top: 14px; }

.rejilla { display: grid; gap: 14px; }
.rejilla-2 { grid-template-columns: 1fr; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--tarjeta-2);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--linea-fuerte);
  background: var(--btn-bg);
  color: var(--texto);
  font-weight: 600; font-size: 15px; letter-spacing: .02em;
  transition: transform .18s var(--curva), box-shadow .25s var(--curva), background .2s, border-color .2s, color .2s;
  user-select: none; -webkit-user-select: none;
  text-align: center;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: scale(.965); }
.btn:hover { border-color: var(--acento-linea); }
.btn-primario {
  background: linear-gradient(135deg, var(--acento-claro), var(--acento) 55%, var(--acento-hondo));
  color: var(--acento-contraste);
  border-color: transparent;
  box-shadow: 0 10px 30px -12px var(--acento-medio), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primario:hover { box-shadow: 0 14px 36px -12px var(--acento), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-contorno { background: transparent; border-color: var(--acento-linea); color: var(--acento); }
.btn-fantasma { background: transparent; border-color: transparent; color: var(--texto-2); }
.btn-fantasma:hover { color: var(--texto); }
.btn-wa { background: #12261b; border-color: rgba(61, 220, 132, .45); color: var(--wa); }
.btn-peligro { background: transparent; border-color: rgba(255, 155, 155, .4); color: var(--peligro); }
.btn-bloque { width: 100%; }
.btn-grande { min-height: 60px; font-size: 17px; letter-spacing: .04em; }
.btn-chico { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn-icono { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* Onda al tocar */
.onda { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .28); animation: onda .6s ease-out forwards; pointer-events: none; }
.btn-primario .onda { background: rgba(0, 0, 0, .18); }
@keyframes onda { to { transform: scale(3.2); opacity: 0; } }

/* ---------- Formularios ---------- */
.campo { display: block; margin-bottom: 16px; }
.campo > label, .etiqueta { display: block; font-size: 13px; font-weight: 600; color: var(--texto-2); margin-bottom: 7px; letter-spacing: .02em; }
.campo .ayuda { font-size: 12.5px; color: var(--texto-3); margin-top: 6px; }
.campo .error { font-size: 12.5px; color: var(--peligro); margin-top: 6px; display: none; }
.campo.invalido .error { display: block; }
.campo.invalido .entrada { border-color: var(--peligro); }

.entrada, .selector, textarea.entrada {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--linea-fuerte);
  background: #0c0d0f;
  color: var(--texto);
  transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
textarea.entrada { min-height: 120px; resize: vertical; line-height: 1.5; }
.entrada::placeholder { color: #8b8e95; }
.entrada:focus, .selector:focus, textarea.entrada:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px var(--acento-suave); }
.selector { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d9b566' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
.selector option { background: #141619; }

/* Campos grandes (cliente nuevo en menos de un minuto) */
.campo-grande .entrada, .campo-grande .selector { min-height: 66px; font-size: 21px; padding: 14px 18px; border-radius: 18px; }
.campo-grande > label { font-size: 14px; }

.entrada-con-icono { position: relative; }
.entrada-con-icono .entrada { padding-left: 46px; }
.entrada-con-icono > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--texto-3); pointer-events: none; }
.entrada-con-icono .ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--texto-2); }
.entrada-con-icono .ver-clave svg { width: 20px; height: 20px; position: static; transform: none; }
.entrada-con-icono.con-boton .entrada { padding-right: 52px; }

.prefijo { display: flex; gap: 8px; }
.prefijo .cod { flex: none; display: grid; place-items: center; padding: 0 14px; border-radius: 14px; border: 1px solid var(--linea-fuerte); background: #0c0d0f; color: var(--texto-2); font-weight: 600; }
.campo-grande .prefijo .cod { border-radius: 18px; font-size: 19px; }

/* Segmentado / pestañas */
.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #0b0c0e; border: 1px solid var(--linea); position: relative; }
.segmentado button { min-height: 42px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--texto-2); transition: color .25s, background .25s; position: relative; z-index: 1; }
.segmentado button[aria-selected="true"] { background: var(--acento-suave); color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento-linea); }

/* Chips de filtro */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--linea-fuerte); background: var(--tarjeta);
  color: var(--texto-2); font-size: 14px; font-weight: 500;
  transition: transform .18s var(--curva), background .2s, color .2s, border-color .2s;
}
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--acento-contraste); font-weight: 700; }
.chip .n { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.chip[aria-pressed="true"] .n { background: rgba(0, 0, 0, .18); }

/* Interruptor */
.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor .pista { width: 48px; height: 28px; border-radius: 999px; background: #2a2d33; border: 1px solid var(--linea-fuerte); position: relative; transition: background .25s; flex: none; }
.interruptor .pista::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #c9ccd1; transition: transform .25s var(--curva), background .25s; }
.interruptor input:checked + .pista { background: var(--acento-medio); border-color: var(--acento); }
.interruptor input:checked + .pista::after { transform: translateX(20px); background: var(--acento); }
.interruptor input:focus-visible + .pista { outline: 2px solid var(--acento); outline-offset: 3px; }

/* ---------- Insignias ---------- */
.insignia { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--linea-fuerte); color: var(--texto-2); white-space: nowrap; }
.insignia svg { width: 12px; height: 12px; }
.insignia.acento { color: var(--acento); border-color: var(--acento-linea); background: var(--acento-suave); }
.insignia.ok { color: var(--ok); border-color: rgba(127, 214, 164, .4); background: var(--ok-suave); }
.insignia.alerta { color: var(--alerta); border-color: rgba(242, 179, 107, .4); background: var(--alerta-suave); }

/* ---------- Pantalla de acceso ---------- */
.acceso { min-height: calc(100dvh - 34px); display: grid; place-items: center; padding: 24px 16px 40px; }
.acceso-caja { width: 100%; max-width: 440px; }
.acceso-marca { text-align: center; margin-bottom: 22px; }
.acceso-marca img { width: 104px; height: 104px; margin: 0 auto 14px; filter: drop-shadow(0 10px 30px var(--acento-medio)); animation: flotar 6s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-6px); } }
.acceso-marca h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: .18em; text-transform: uppercase; }
.acceso-marca p { color: var(--texto-2); font-size: 14.5px; margin-top: 6px; }
.acceso .tarjeta { padding: 22px 18px; }
.acceso .segmentado { margin-bottom: 20px; }
.acceso .fila-entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -4px 0 18px; font-size: 14px; }
.enlace-texto { color: var(--acento); font-weight: 600; text-decoration: underline; text-decoration-color: var(--acento-linea); text-underline-offset: 3px; background: none; border: 0; padding: 6px 0; }
.acceso-pie { text-align: center; color: var(--texto-3); font-size: 13px; margin-top: 18px; }
.acceso-pie .btn { margin-top: 8px; }

.paneles-acceso > div { animation: entra .45s var(--curva) both; }

/* ---------- Panel ---------- */
.saludo { margin-bottom: 16px; }
.saludo .titulo-pag { font-size: clamp(24px, 5.6vw, 36px); }

.tarjeta-recordar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  border-radius: var(--r-l);
  border: 1px solid var(--acento-linea);
  background:
    radial-gradient(300px 160px at 100% 0%, var(--acento-suave), transparent 70%),
    linear-gradient(180deg, var(--tarjeta), var(--fondo-2));
  color: var(--texto);
  width: 100%; text-align: left;
  transition: transform .2s var(--curva), border-color .2s;
}
.tarjeta-recordar:active { transform: scale(.985); }
.tarjeta-recordar .numero {
  flex: none; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--acento-contraste);
  background: linear-gradient(135deg, var(--acento-claro), var(--acento) 60%, var(--acento-hondo));
  box-shadow: 0 0 0 6px var(--acento-suave);
}
.tarjeta-recordar .txt { flex: 1; min-width: 0; }
.tarjeta-recordar .txt strong { display: block; font-family: var(--serif); font-size: 18px; letter-spacing: .03em; }
.tarjeta-recordar .txt span { display: block; color: var(--texto-2); font-size: 13.5px; margin-top: 2px; }
.tarjeta-recordar .flecha { color: var(--acento); }

.metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.metrica { padding: 14px 12px; border-radius: var(--r-m); background: var(--tarjeta); border: 1px solid var(--linea); text-align: left; transition: transform .18s var(--curva), border-color .2s; }
.metrica:active { transform: scale(.97); }
.metrica .v { display: block; font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--texto); line-height: 1; }
.metrica .l { display: block; }
.metrica .l { font-size: 12px; color: var(--texto-2); margin-top: 6px; line-height: 1.3; }
.metrica.destacada .v { color: var(--acento); }

.buscador { margin: 20px 0 10px; }

.lista { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.lista > * { min-width: 0; }
.fila-cliente {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px;
  border-radius: var(--r-m);
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  color: var(--texto);
  text-align: left; width: 100%;
  transition: transform .18s var(--curva), border-color .2s, background .2s;
  animation: entra .4s var(--curva) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.fila-cliente:hover { border-color: var(--acento-linea); }
.fila-cliente:active { transform: scale(.985); }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .04em;
  color: var(--acento);
  background: var(--acento-suave);
  border: 1px solid var(--acento-linea);
}
.avatar.grande { width: 72px; height: 72px; font-size: 26px; }
.fila-cliente .info { flex: 1; min-width: 0; }
.fila-cliente .info .nom { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fila-cliente .info .meta { font-size: 13px; color: var(--texto-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-cliente .prog { flex: none; width: 74px; text-align: right; }
.fila-cliente .prog .t { font-size: 12px; color: var(--texto-2); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.mini-barra { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mini-barra > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--acento-hondo), var(--acento)); transition: width .8s var(--curva); }

/* Botón flotante */
.fab {
  position: fixed; right: 16px; z-index: 24;
  bottom: calc(var(--alto-barra-inf) + 16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--acento-claro), var(--acento) 55%, var(--acento-hondo));
  color: var(--acento-contraste); font-weight: 700;
  box-shadow: 0 16px 40px -14px var(--acento), 0 8px 20px rgba(0, 0, 0, .5);
  transition: transform .2s var(--curva);
}
.fab:active { transform: scale(.94); }
.fab svg { width: 22px; height: 22px; }

/* ---------- Estados vacíos ---------- */
.vacio { text-align: center; padding: 36px 18px; border: 1px dashed var(--linea-fuerte); border-radius: var(--r-l); background: rgba(255, 255, 255, .015); animation: entra .4s var(--curva) both; }
.vacio .ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--acento); background: var(--acento-suave); border: 1px solid var(--acento-linea); }
.vacio .ico svg { width: 32px; height: 32px; }
.vacio h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: .02em; }
.vacio p { color: var(--texto-2); margin: 8px auto 16px; max-width: 36ch; font-size: 14.5px; }

/* ---------- Perfil de cliente ---------- */
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-2); font-size: 14px; min-height: 40px; margin-bottom: 6px; }
.volver svg { width: 18px; height: 18px; }
.perfil-cab { display: flex; align-items: center; gap: 16px; }
.perfil-cab .datos { min-width: 0; }
.perfil-cab h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 6vw, 34px); line-height: 1.1; }
.perfil-cab .tel { color: var(--texto-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.perfil-cab .etiquetas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.progreso-caja { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.anillo { position: relative; width: 124px; height: 124px; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.anillo .pista { stroke: rgba(255, 255, 255, .08); }
.anillo .valor { stroke: var(--acento); transition: stroke-dashoffset 1s var(--curva); filter: drop-shadow(0 0 6px var(--acento-medio)); }
.anillo .centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anillo .centro b { font-family: var(--serif); font-size: 30px; line-height: 1; white-space: nowrap; }
.anillo .centro > span { display: block; font-size: 12px; color: var(--texto-2); margin-top: 2px; }
.anillo .centro b span { font-family: var(--serif); }
.progreso-txt .falta { font-family: var(--fuente); font-weight: 600; font-size: 18px; line-height: 1.3; }
.progreso-txt .falta b { color: var(--acento); font-weight: 700; }
.progreso-txt p { color: var(--texto-2); font-size: 14px; margin-top: 6px; }

.hitos { display: flex; justify-content: space-between; gap: 6px; margin-top: 16px; position: relative; }
.hitos::before { content: ''; position: absolute; left: 8%; right: 8%; top: 15px; height: 2px; background: rgba(255, 255, 255, .08); }
.hitos::after { content: ''; position: absolute; left: 8%; top: 15px; height: 2px; width: calc(84% * var(--avance, 0)); background: var(--acento); transition: width 1s var(--curva); }
.hito { position: relative; z-index: 1; flex: 1; text-align: center; font-size: 12px; color: var(--texto-2); }
.hito .pt { width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--tarjeta-2); border: 1px solid var(--linea-fuerte); font-weight: 700; font-size: 13px; color: var(--texto-2); transition: all .4s var(--curva); }
.hito.cumplido .pt { background: var(--acento); border-color: var(--acento); color: var(--acento-contraste); }
.hito.siguiente .pt { border-color: var(--acento); color: var(--acento); box-shadow: 0 0 0 4px var(--acento-suave); }
.hito .d { display: block; line-height: 1.25; }
.hito.cumplido, .hito.siguiente { color: var(--texto); }

.aviso-referido {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-m);
  border: 1px solid var(--acento-linea);
  background: linear-gradient(90deg, var(--acento-suave), transparent);
}
.aviso-referido .pct { flex: none; font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--acento); line-height: 1; }
.aviso-referido strong { display: block; }
.aviso-referido span { color: var(--texto-2); font-size: 13.5px; }

.accion-corte { margin-top: 16px; }
.accion-corte .pista-toques { text-align: center; font-size: 12.5px; color: var(--texto-3); margin-top: 8px; }

.historial { position: relative; padding-left: 22px; }
.historial::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--linea-fuerte); }
.hist-item { position: relative; padding: 8px 0 14px; animation: entra .4s var(--curva) both; }
.hist-item::before { content: ''; position: absolute; left: -21px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--fondo); border: 2px solid var(--acento); }
.hist-item.canje::before { background: var(--acento); }
.hist-item .f { font-size: 12.5px; color: var(--texto-3); }
.hist-item .t { font-weight: 600; }
.hist-item .d { font-size: 13.5px; color: var(--texto-2); }

/* ---------- Hojas y modales ---------- */
.capa { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
.capa .fondo-capa { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: aparece .25s ease both; }
.hoja {
  position: relative; width: 100%; max-width: 520px;
  background: linear-gradient(180deg, #1a1c21, #121316);
  border: 1px solid var(--linea-fuerte);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--sombra);
  animation: sube .42s var(--curva) both;
  max-height: 92dvh; overflow: auto;
}
.hoja .agarre { width: 42px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); margin: 2px auto 14px; }
.hoja h2 { font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: .02em; }
.hoja .desc { color: var(--texto-2); margin-top: 6px; }
.hoja .acciones { display: grid; gap: 10px; margin-top: 20px; }
.hoja .acciones.dos { grid-template-columns: 1fr 1.4fr; }

.modal-premio { text-align: center; overflow: hidden; }
.modal-premio .sello {
  position: relative; width: 132px; height: 132px; margin: 6px auto 14px;
  display: grid; place-items: center;
  animation: sello .8s var(--curva) both;
}
.modal-premio .sello .aro { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--acento); box-shadow: 0 0 40px var(--acento-medio), inset 0 0 30px var(--acento-suave); }
.modal-premio .sello .aro2 { position: absolute; inset: 9px; border-radius: 50%; border: 1px dashed var(--acento-linea); animation: girar 18s linear infinite; }
.modal-premio .sello svg { width: 60px; height: 60px; color: var(--acento); position: relative; }
.modal-premio .rotulo { justify-content: center; }
.modal-premio h2 { font-size: 30px; margin-top: 6px; }
.modal-premio .premio { font-family: var(--serif); font-size: 22px; color: var(--acento); margin-top: 4px; }
.brillo { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 12%, var(--acento-suave) 16%, transparent 22% 37%, var(--acento-suave) 41%, transparent 47% 62%, var(--acento-suave) 66%, transparent 72% 87%, var(--acento-suave) 91%, transparent 97%); animation: girar 14s linear infinite; opacity: .8; pointer-events: none; }
.chispas { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.chispa { position: absolute; left: 50%; top: 38%; width: 7px; height: 7px; border-radius: 1px; background: var(--acento); transform: translate(-50%, -50%) rotate(45deg); opacity: 0; animation: chispa 1.3s var(--curva) both; animation-delay: var(--d, 0s); }
.chispa.clara { background: var(--acento-claro); width: 5px; height: 5px; }

@keyframes sello { 0% { transform: scale(.3) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes chispa { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(.4); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(225deg) scale(1); } }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.vista { animation: entraVista .38s var(--curva) backwards; }
@keyframes entraVista { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Avisos (toast) ---------- */
.avisos { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--alto-barra-inf) + 18px + env(safe-area-inset-bottom)); z-index: 70; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.aviso { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #1d2025; border: 1px solid var(--acento-linea); box-shadow: var(--sombra); animation: sube .35s var(--curva) both; font-size: 14.5px; }
.aviso.sale { animation: aparece .3s reverse both; }
.aviso svg { width: 18px; height: 18px; color: var(--acento); flex: none; }
body.publica .avisos { bottom: calc(18px + env(safe-area-inset-bottom)); }

/* ---------- Perfil de la barbería ---------- */
.logo-editor { display: flex; align-items: center; gap: 16px; }
.logo-editor .logo-vista { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 1px solid var(--acento-linea); background: #0b0c0e; flex: none; display: grid; place-items: center; }
.logo-editor .logo-vista img { width: 100%; height: 100%; object-fit: cover; }
.logo-opciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.logo-op { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; border: 2px solid var(--linea-fuerte); transition: transform .18s var(--curva), border-color .2s; padding: 0; }
.logo-op img { width: 100%; height: 100%; object-fit: cover; }
.logo-op[aria-pressed="true"] { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); }
.logo-op:active { transform: scale(.93); }
.logo-op.subir { display: grid; place-items: center; color: var(--texto-2); border-style: dashed; }

.muestras-color { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.muestra { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); position: relative; transition: transform .18s var(--curva); background: var(--c); }
.muestra:active { transform: scale(.92); }
.muestra[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--c); }
.muestra.personalizada { background: conic-gradient(#ff8f8f, #d9b566, #5fd6a0, #8bb8ff, #c9b6ff, #ff8f8f); overflow: hidden; }
.muestra.personalizada input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.horarios { display: grid; gap: 8px; }
.horario-fila { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #0c0d0f; border: 1px solid var(--linea); }
.horario-fila .dia { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.horario-fila .horas { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.horario-fila .horas input { min-height: 44px; padding: 8px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.horario-fila .horas span { color: var(--texto-3); }
.horario-fila.cerrado .horas { opacity: .4; pointer-events: none; }
.horario-fila .estado { font-size: 13px; color: var(--texto-2); justify-self: end; }

/* ---------- Niveles ---------- */
.nivel {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px; border-radius: var(--r-m);
  background: var(--tarjeta); border: 1px solid var(--linea);
  animation: entra .4s var(--curva) both;
  transition: border-color .3s, box-shadow .3s;
}
.nivel.nuevo { border-color: var(--acento); box-shadow: 0 0 0 4px var(--acento-suave); }
.nivel .medalla { width: 58px; height: 58px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 1px solid var(--acento-linea); background: radial-gradient(circle at 30% 30%, var(--acento-suave), transparent 70%), #0c0d0f; }
.nivel .medalla b { font-family: var(--serif); font-size: 22px; color: var(--acento); line-height: 1; }
.nivel .medalla span { font-size: 10px; letter-spacing: .12em; color: var(--texto-2); text-transform: uppercase; }
.nivel .cuerpo { min-width: 0; }
.nivel .cuerpo .t { font-weight: 600; font-size: 16px; }
.nivel .cuerpo .d { color: var(--texto-2); font-size: 13.5px; margin-top: 2px; }
.nivel .acciones-nivel { display: flex; gap: 4px; }
.ciclo-nota { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--acento-suave); border: 1px solid var(--acento-linea); font-size: 14px; color: var(--texto); margin-top: 14px; }
.ciclo-nota svg { width: 20px; height: 20px; color: var(--acento); flex: none; }

.linea-ciclo { display: flex; align-items: stretch; gap: 0; margin: 6px 0 4px; overflow-x: auto; padding-bottom: 4px; }
.paso-ciclo { flex: 1; min-width: 90px; text-align: center; position: relative; padding-top: 26px; }
.paso-ciclo::before { content: ''; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--acento-linea); }
.paso-ciclo::after { content: ''; position: absolute; top: 4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 4px var(--fondo); }
.paso-ciclo b { display: block; font-family: var(--serif); color: var(--acento); }
.paso-ciclo span { font-size: 12.5px; color: var(--texto-2); }
.paso-ciclo.reinicio::after { background: var(--fondo); border: 2px dashed var(--acento); }

/* ---------- Tarjeta pública del cliente ---------- */
.publica-envoltura { max-width: 460px; margin: 0 auto; }
.tarjeta-leal {
  position: relative; overflow: hidden;
  border-radius: 26px;
  padding: 22px 20px 20px;
  background:
    radial-gradient(420px 240px at 110% -10%, var(--acento-medio), transparent 60%),
    radial-gradient(300px 200px at -20% 120%, var(--acento-suave), transparent 70%),
    linear-gradient(160deg, #1b1d22, #0d0e10 70%);
  border: 1px solid var(--acento-linea);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: entraCarta .7s var(--curva) both;
}
@keyframes entraCarta { from { opacity: 0; transform: translateY(18px) rotateX(8deg); } to { opacity: 1; transform: none; } }
.tarjeta-leal::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .07), transparent); transform: skewX(-18deg); animation: destello 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes destello { 0%, 60% { left: -60%; } 85%, 100% { left: 130%; } }
.tl-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tl-cab .m { display: flex; align-items: center; gap: 10px; }
.tl-cab .m img { width: 46px; height: 46px; border-radius: 50%; }
.tl-cab .m b { font-family: var(--serif); letter-spacing: .14em; text-transform: uppercase; font-size: 14px; display: block; }
.tl-cab .m span { font-size: 10.5px; letter-spacing: .2em; color: var(--acento); text-transform: uppercase; }
.tl-tipo { font-size: 10.5px; letter-spacing: .2em; color: var(--texto-2); text-transform: uppercase; text-align: right; }
.tl-nombre { margin-top: 26px; }
.tl-nombre span { font-size: 11px; letter-spacing: .2em; color: var(--texto-3); text-transform: uppercase; }
.tl-nombre h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; margin-top: 2px; }

.sellos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 20px; }
.sellos.con-premios-col { row-gap: 24px; }
.sello-corte { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed rgba(255, 255, 255, .18); color: var(--texto-3); font-size: 12px; font-weight: 600; position: relative; background: rgba(255, 255, 255, .02); }
.sello-corte.lleno { border-style: solid; border-color: var(--acento); background: radial-gradient(circle at 30% 30%, var(--acento-claro), var(--acento) 60%, var(--acento-hondo)); color: var(--acento-contraste); animation: sello .6s var(--curva) both; animation-delay: calc(var(--i, 0) * 70ms); box-shadow: 0 6px 16px -8px var(--acento); }
.sello-corte.lleno svg { width: 55%; height: 55%; }
.sello-corte.premio { border-color: var(--acento-linea); border-style: solid; color: var(--acento); }
.sello-corte.premio.lleno { color: var(--acento-contraste); }
.sello-corte .etq { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); font-size: 9.5px; white-space: nowrap; color: var(--acento); letter-spacing: .02em; }
.sellos.con-etiquetas { margin-bottom: 22px; row-gap: 26px; }

.tl-pie { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linea); }
.tl-pie .falta { font-size: 14px; color: var(--texto-2); }
.tl-pie .falta b { color: var(--acento); }
.tl-pie .cod { text-align: right; }
.tl-pie .cod span { display: block; font-size: 10px; letter-spacing: .18em; color: var(--texto-3); text-transform: uppercase; }
.tl-pie .cod b { font-family: var(--serif); font-size: 17px; letter-spacing: .12em; }

.qr-caja { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.qr { width: 132px; height: 132px; border-radius: 14px; background: #fff; padding: 8px; flex: none; }
.qr svg { width: 100%; height: 100%; }
.codigo-ref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--acento-linea); background: var(--acento-suave); }
.codigo-ref b { font-family: var(--serif); font-size: 22px; letter-spacing: .14em; color: var(--acento); }

/* ---------- Recordatorios ---------- */
.record-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px; border-radius: var(--r-m); background: var(--tarjeta); border: 1px solid var(--linea); animation: entra .4s var(--curva) both; animation-delay: calc(var(--i, 0) * 40ms); transition: opacity .3s, border-color .3s; }
.record-item.enviado { opacity: .62; border-style: dashed; }
.record-item .avatar { grid-row: span 2; }
.record-item .cab { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.record-item .nom { font-weight: 600; }
.record-item .meta { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.record-item .dias { font-family: var(--serif); font-size: 20px; color: var(--alerta); line-height: 1; text-align: right; }
.record-item .dias small { display: block; font-family: var(--fuente); font-size: 11px; color: var(--texto-3); margin-top: 2px; }
.record-item .pie { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.burbuja-mini { grid-column: 2; font-size: 13.5px; color: var(--texto-2); background: #0c0d0f; border: 1px solid var(--linea); border-radius: 12px 12px 12px 4px; padding: 9px 12px; }

.variables { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.variable { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--acento-linea); color: var(--acento); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; transition: transform .15s var(--curva), background .2s; }
.variable:active { transform: scale(.94); background: var(--acento-suave); }

/* Vista previa WhatsApp */
.wa-pantalla { border-radius: 18px; overflow: hidden; border: 1px solid var(--linea-fuerte); background: #0b141a; }
.wa-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #1f2c34; }
.wa-cab .avatar { width: 36px; height: 36px; font-size: 13px; color: #e9edef; background: #2a3942; border-color: transparent; }
.wa-cab b { display: block; font-size: 14.5px; color: #e9edef; }
.wa-cab span { font-size: 12px; color: #8696a0; }
.wa-cuerpo {
  padding: 16px 12px 18px; min-height: 120px;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 18px 18px;
  display: flex; justify-content: flex-end;
}
.wa-burbuja { max-width: 86%; background: #005c4b; color: #e9edef; padding: 8px 10px 6px; border-radius: 10px 0 10px 10px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.wa-burbuja .hora { display: block; text-align: right; font-size: 11px; color: #a7c3bb; margin-top: 3px; }
.wa-enlace { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #0c0d0f; border: 1px solid var(--linea); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--texto-2); word-break: break-all; }
.nota-proto { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--texto-2); margin-top: 10px; }
.nota-proto svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--acento); }

/* ---------- Agenda / reservas ---------- */
.dias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.dias::-webkit-scrollbar { display: none; }
.dia-btn { flex: none; width: 64px; padding: 10px 0; border-radius: 16px; border: 1px solid var(--linea-fuerte); background: var(--tarjeta); text-align: center; transition: transform .18s var(--curva), background .2s, border-color .2s; }
.dia-btn:active { transform: scale(.95); }
.dia-btn .s { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-3); }
.dia-btn .n { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; margin-top: 2px; }
.dia-btn .m { display: block; font-size: 11px; color: var(--texto-3); }
.dia-btn[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); }
.dia-btn[aria-pressed="true"] .s, .dia-btn[aria-pressed="true"] .m, .dia-btn[aria-pressed="true"] .n { color: var(--acento-contraste); }
.dia-btn.cerrado { opacity: .45; }
.dia-btn .pts { display: block; height: 5px; margin-top: 4px; }
.dia-btn .pts i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--acento); margin: 0 1px; }
.dia-btn[aria-pressed="true"] .pts i { background: var(--acento-contraste); }

.horas-libres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hora-btn { min-height: 52px; border-radius: 14px; border: 1px solid var(--linea-fuerte); background: var(--tarjeta); font-weight: 600; font-variant-numeric: tabular-nums; transition: transform .18s var(--curva), background .2s, border-color .2s, color .2s; position: relative; }
.hora-btn:active { transform: scale(.95); }
.hora-btn[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--acento-contraste); box-shadow: 0 10px 24px -12px var(--acento); }
.hora-btn.ocupada { color: var(--texto-3); background: transparent; border-style: dashed; cursor: not-allowed; }
.hora-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.hora-btn.ocupada::after { content: 'Ocupado'; font-size: 10px; font-weight: 500; letter-spacing: .06em; color: var(--texto-3); margin-top: 1px; }

.servicios { display: grid; gap: 8px; }
.servicio { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--linea-fuerte); background: var(--tarjeta); text-align: left; transition: border-color .2s, background .2s; }
.servicio[aria-pressed="true"] { border-color: var(--acento); background: var(--acento-suave); }
.servicio b { display: block; }
.servicio span { font-size: 13px; color: var(--texto-2); }
.servicio .p { font-family: var(--serif); color: var(--acento); font-size: 17px; }

.reserva-publica-cab { text-align: center; padding: 10px 0 18px; }
.reserva-publica-cab img { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; }
.reserva-publica-cab h1 { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: .12em; text-transform: uppercase; }
.reserva-publica-cab p { color: var(--texto-2); font-size: 14px; margin-top: 4px; }
.reserva-publica-cab .datos { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.paso-ind { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.paso-ind i { width: 28px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); transition: background .3s; }
.paso-ind i.on { background: var(--acento); }

.resumen-cita { display: grid; gap: 10px; }
.resumen-cita .r { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--linea); font-size: 15px; }
.resumen-cita .r span { color: var(--texto-2); }
.resumen-cita .r b { text-align: right; }

.check-ok { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); border: 1px solid var(--acento-linea); position: relative; }
.check-ok svg { width: 46px; height: 46px; color: var(--acento); }
.check-ok svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: dibujar .7s .2s var(--curva) forwards; }
@keyframes dibujar { to { stroke-dashoffset: 0; } }

.agenda-lista { display: grid; gap: 0; position: relative; }
.cita { display: grid; grid-template-columns: 82px 1fr; gap: 12px; position: relative; padding-bottom: 12px; }
.cita .h { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--texto-2); padding-top: 14px; font-size: 14px; white-space: nowrap; }
.cita .h small { display: block; font-size: 11.5px; font-weight: 500; color: var(--texto-3); }
.cita .bloque { padding: 12px 14px; border-radius: 14px; background: var(--tarjeta); border: 1px solid var(--linea); border-left: 3px solid var(--acento); transition: box-shadow .3s, border-color .3s; }
.cita.nueva .bloque { box-shadow: 0 0 0 3px var(--acento-suave); border-color: var(--acento); animation: pulso 1.6s ease-out 2; }
@keyframes pulso { 50% { box-shadow: 0 0 0 8px var(--acento-suave); } }
.cita.libre .bloque { background: transparent; border: 1px dashed var(--linea-fuerte); border-left: 3px dashed var(--linea-fuerte); color: var(--texto-3); }
.cita .bloque .nom { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cita .bloque .d { font-size: 13px; color: var(--texto-2); margin-top: 2px; }

/* ---------- Enlaces rápidos del prototipo ---------- */
.mapa-proto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mapa-proto a { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--linea); background: var(--tarjeta); color: var(--texto); font-size: 13.5px; }
.mapa-proto a svg { width: 17px; height: 17px; color: var(--acento); flex: none; }

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  .marco { display: grid; grid-template-columns: var(--ancho-lateral) 1fr; min-height: calc(100dvh - 31px); }
  .lateral {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 31px; height: calc(100dvh - 31px);
    padding: 22px 14px;
    border-right: 1px solid var(--linea);
    background: color-mix(in srgb, #0b0c0d 70%, transparent);
  }
  .lateral .marca-lat { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; border-bottom: 1px solid var(--linea); margin-bottom: 12px; }
  .lateral .marca-lat img { width: 46px; height: 46px; border-radius: 50%; }
  .lateral .marca-lat b { font-family: var(--serif); letter-spacing: .12em; text-transform: uppercase; font-size: 14px; display: block; }
  .lateral .marca-lat span { font-size: 12px; color: var(--texto-2); }
  .lateral a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--texto-2); font-weight: 500; transition: background .2s, color .2s; position: relative; }
  .lateral a svg { width: 20px; height: 20px; }
  .lateral a:hover { background: rgba(255, 255, 255, .04); color: var(--texto); }
  .lateral a.activo { background: var(--acento-suave); color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento-linea); }
  .lateral .grupo { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); padding: 16px 12px 6px; }
  .lateral .pie-lat { margin-top: auto; padding: 12px; border-top: 1px solid var(--linea); font-size: 12.5px; color: var(--texto-3); }
  .lateral .conteo { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acento); color: var(--acento-contraste); font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
  .barra-inf { display: none; }
  .contenido { padding: 30px 40px 60px; }
  .barra-sup .marca { visibility: hidden; }
  body.publica .marco { grid-template-columns: 1fr; }
  body.publica .lateral { display: none; }
  body.publica .barra-sup .marca { visibility: visible; }

  .rejilla-2 { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .rejilla-panel { display: grid; grid-template-columns: 1.5fr .9fr; gap: 22px; align-items: start; }
  .rejilla-igual { grid-template-columns: 1fr 1fr; }
  .fab { bottom: 28px; right: 32px; }
  .avisos { bottom: 28px; }
  .capa { align-items: center; }
  .hoja { border-radius: 26px; border-bottom: 1px solid var(--linea-fuerte); animation-name: apareceEscala; }
  @keyframes apareceEscala { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
  .hoja .agarre { display: none; }
  .acceso-doble { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100dvh - 31px); }
  .acceso-doble .lado-arte { display: flex; flex-direction: column; justify-content: center; padding: 60px; border-right: 1px solid var(--linea); position: relative; overflow: hidden; }
  .acceso { padding: 40px; }
  .horas-libres { grid-template-columns: repeat(4, 1fr); }
  .mapa-proto { grid-template-columns: repeat(3, 1fr); }
  .horario-fila { grid-template-columns: 180px 1fr auto; }
  .horario-fila .horas { grid-column: auto; }
}
.lado-arte { display: none; }
@media (min-width: 960px) { .lado-arte { display: flex; } }
.lado-arte h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 4.6vw, 68px); line-height: 1.02; text-transform: uppercase; margin-top: 16px; }
.lado-arte h2 .linea2 { display: block; color: transparent; -webkit-text-stroke: 1.2px var(--acento); }
.lado-arte p { color: var(--texto-2); margin-top: 18px; max-width: 40ch; font-size: 17px; }
.lado-arte .lista-benef { margin-top: 30px; display: grid; gap: 14px; }
.lado-arte .lista-benef li { display: flex; gap: 12px; align-items: center; color: var(--texto); }
.lado-arte .lista-benef svg { width: 22px; height: 22px; color: var(--acento); flex: none; }
.lado-arte .logo-grande { position: absolute; right: -80px; bottom: -80px; width: 380px; opacity: .08; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Ajustes adicionales ---------- */
.guardar-perfil { margin-top: 18px; display: flex; justify-content: flex-end; }
.barra-sup .acciones .btn-icono { position: relative; }

/* Cinta de prototipo en una sola línea en pantallas angostas */
.cinta-proto { white-space: nowrap; font-size: 11px; }
@media (max-width: 360px) { .cinta-proto { font-size: 10px; } }
/* Pantallas de acceso sin barra superior duplicada */
body.acceso .barra-sup { display: none; }
body.acceso .acceso-doble { min-height: calc(100dvh - 31px); }
.tl-pie .cod b { white-space: nowrap; }
.linea-ciclo { padding-right: 2px; }
.logo-editor { align-items: flex-start; }
.logo-lado { flex: 1; min-width: 0; }
.logo-lado p { font-size: 14px; color: var(--texto-2); }
.logo-opciones { align-items: center; }
@media (max-width: 420px) {
  .logo-editor { flex-direction: column; align-items: center; text-align: center; }
  .logo-opciones { justify-content: center; }
}
.guardar-perfil { margin-top: 18px; }
.anillo .centro .de { font-size: 17px; color: var(--texto-2); font-family: var(--fuente); font-weight: 500; }
@media (max-width: 480px) { .paso-ciclo { min-width: 0; } .paso-ciclo span { font-size: 12px; } }
.contenido { padding-bottom: calc(var(--alto-barra-inf) + 28px + env(safe-area-inset-bottom)); }

@media (max-width: 480px) { .acceso-marca h1 { letter-spacing: .1em; font-size: 28px; } .guardar-perfil .btn { width: 100%; } }
.capa { z-index: 80; }
.avisos { z-index: 60; top: 40px; bottom: auto; }
.aviso { background: #202329; }
.fab[hidden] { display: none; }
/* Insignias dentro del nombre: si no caben, bajan de línea completas */
.fila-cliente .info .nom .insignia { flex: none; }
@media (max-width: 420px) { .premio-acciones { grid-template-columns: 1fr !important; } .premio-acciones .btn-primario { order: -1; } }
.acciones .btn { white-space: nowrap; }
/* Filtros del panel: caben todos sin desplazamiento lateral */
#filtros .chips { flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 420px) {
  #filtros .chip { padding: 0 12px; font-size: 13.5px; gap: 6px; }
}
