/* Torna · estilos compartidos (alta, escáner, baja, invitar, privacidad y aviso legal)
   La marca de tornaclub.com: Inter muy compacta, grises cálidos, etiquetas monoespaciadas, botones pastilla con sombra suave
   y el signo naranja de Torna (/favicon.svg) en el pie.
   Cada página pone --color (color del negocio) y --sobre-color (texto encima de ese color) desde JS. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/vendor/inter/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/vendor/inter/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color: #0F0F0F;
  --sobre-color: #FFFFFF;
  --fondo: #FFFFFF;
  --fondo-2: #F4F4F1;
  --superficie: #FFFFFF;
  --texto: #0B0B0C;
  --texto-2: #55555C;
  --suave: #75757C;
  --linea: #E6E6E2;
  --panel: #F4F4F1;
  --torna: #C2410C;
  --ok: #157347;      --ok-fondo: #E3F4EA;
  --aviso: #8A5206;   --aviso-fondo: #FBEFD9;
  --error: #B42318;   --error-fondo: #FDE8E6;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sombra: 0 1px 1px -0.6px rgba(0,0,0,.09), 0 3px 1.3px -1.2px rgba(0,0,0,.086), 0 6px 2.3px -1.9px rgba(0,0,0,.082),
            0 10px 3.9px -2.5px rgba(0,0,0,.08), 0 16px 6px -3.1px rgba(0,0,0,.07), 0 26px 10px -3.8px rgba(0,0,0,.06);
  --sombra-suave: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -12px rgba(0,0,0,.12);
  color-scheme: light;
}
/* Las páginas de los clientes (alta, invitar, baja, privacidad) van siempre en claro, como tornaclub.com, aunque el móvil
   esté en modo oscuro. Solo el escáner del personal es oscuro (<html data-tema="oscuro">). */
:root[data-tema="oscuro"] {
  --fondo: #0B0B0C; --fondo-2: #141416; --superficie: #151517; --texto: #F4F4F5; --texto-2: #B4B4BB; --suave: #8B8B94; --linea: #2A2A2E; --panel: #1E1E21;
  --ok: #5DD39A; --ok-fondo: #11281D; --aviso: #F0B25A; --aviso-fondo: #2B2112; --error: #FF8A80; --error-fondo: #331816;
  --sombra-suave: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fondo); color: var(--texto);
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.011em; -webkit-font-smoothing: antialiased;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
}
main { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: clamp(30px, 8.4vw, 46px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; margin: 0; text-wrap: balance; }
h2 { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }
a { color: var(--texto); text-decoration-color: var(--color); text-decoration-thickness: 2px; text-underline-offset: 3px; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Etiqueta monoespaciada tipo «GRATIS · PASO 1» */
.chip {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--linea); background: var(--fondo-2); color: var(--texto-2);
}
.chip .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--color); flex: none; }
.chip.lleno { background: var(--color); border-color: var(--color); color: var(--sobre-color); }

.tarjeta {
  background: var(--superficie); border: 1px solid var(--linea); border-radius: 24px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sombra-suave);
}

/* ---------------------------------------------------------------- formularios */
label { font-weight: 600; font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }
label small { font-weight: 400; color: var(--suave); }
input[type=text], input[type=email], input[type=date], input[type=password], input[type=tel], select {
  font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--linea); background: var(--superficie); color: var(--texto); width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color) 22%, transparent); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--color); outline-offset: 3px; }

/* Campo con la etiqueta dentro, que sube al escribir (como el formulario de Fideloop) */
.campo { position: relative; display: block; font-weight: 400; }
.campo input { height: 60px; padding: 26px 16px 8px; font-size: 17px; }
.campo > span {
  position: absolute; left: 17px; top: 19px; font-size: 17px; font-weight: 400; color: var(--suave);
  pointer-events: none; transition: top .15s, font-size .15s, color .15s;
}
.campo input:focus + span, .campo input:not(:placeholder-shown) + span, .campo.fijo > span {
  top: 9px; font-size: 12px; font-weight: 500; color: var(--texto-2);
}
.campo .req { position: absolute; right: 14px; top: 8px; color: var(--suave); font-size: 13px; pointer-events: none; }
.campo small { display: block; margin: 6px 4px 0; font-size: 13px; color: var(--suave); font-weight: 400; }
.campo input[type=date] { min-height: 60px; -webkit-appearance: none; appearance: none; text-align: left; }
.campo input[type=date]::-webkit-date-and-time-value { text-align: left; }

.check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; font-size: 14.5px; color: var(--texto-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--color); }

/* Recuadro de ofertas: la casilla del alta y la invitación a activarlas (pantalla final del alta y /ofertes).
   Como los paneles de tornaclub.com: gris cálido, etiqueta monoespaciada con un punto del color del negocio, titular compacto
   y botón pastilla con flecha. Nunca va marcado de entrada. */
.ofertas {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 20px; text-align: left;
  background: var(--panel); color: var(--texto-2); font-weight: 400; font-size: 14.5px;
  box-shadow: inset 0 0 0 1px var(--linea); transition: box-shadow .15s;
}
label.ofertas { cursor: pointer; }
.ofertas:has(input:checked) { box-shadow: inset 0 0 0 2px var(--color); }
.ofertas .etiqueta-ofertas {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 2px;
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--texto-2);
}
.ofertas .etiqueta-ofertas i { width: 7px; height: 7px; border-radius: 50%; background: var(--color); flex: none; }
.ofertas .fila { display: flex; align-items: flex-start; gap: 14px; }
.ofertas b { flex: 1; min-width: 0; font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -0.03em; color: var(--texto); text-wrap: balance; }
.ofertas small { display: block; font-size: 13.5px; line-height: 1.45; color: var(--texto-2); }
.ofertas input[type=checkbox] { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--color); }
.ofertas button { margin-top: 8px; min-height: 50px; padding: 12px 20px; font-size: 15.5px; box-shadow: none; }
.ofertas .mensaje { margin-top: 8px; }

/* ---------------------------------------------------------------- botones */
button, .boton {
  font: inherit; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em;
  border: none; border-radius: 999px; min-height: 56px; padding: 14px 22px;
  background: var(--color); color: var(--sobre-color); cursor: pointer; text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  box-shadow: var(--sombra); transition: transform .15s, opacity .15s;
}
button:active, .boton:active { transform: scale(.98); }
button.secundario { background: transparent; color: var(--texto); border: 1px solid var(--linea); box-shadow: none; font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
.flecha { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- mensajes */
.mensaje { border-radius: 16px; padding: 14px 16px; font-weight: 600; }
.mensaje.ok { background: var(--ok-fondo); color: var(--ok); }
.mensaje.aviso { background: var(--aviso-fondo); color: var(--aviso); }
.mensaje.error { background: var(--error-fondo); color: var(--error); }

.pie { font-size: 12.5px; color: var(--suave); text-align: center; padding: 8px 0 24px; }
.pie .marca-torna { font: 600 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; opacity: .7; }

/* Firma de Torna en el pie: el signo naranja y el nombre en monoespaciada */
.marca-torna { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; }
.marca-torna::before { content: ""; width: 15px; height: 15px; flex: none; background: url(/favicon.svg) center / contain no-repeat; }
a.marca-torna:hover { opacity: 1; }

/* Cabecera de las páginas de Torna (privacidad, aviso legal) */
.cab-torna { width: 100%; max-width: 680px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 18px; }
.logo-torna { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: 0; text-decoration: none; color: var(--texto); }
.logo-torna img { width: 28px; height: 28px; display: block; }

/* Botones de idioma (privacidad) */
.idiomas { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.idiomas button { width: auto; min-height: 0; padding: 7px 12px; font-size: 13px; font-weight: 600; background: transparent; color: var(--suave); border-radius: 999px; box-shadow: none; }
.idiomas button[aria-pressed="true"] { background: var(--fondo-2); color: var(--texto); border: 1px solid var(--linea); }

/* Cabecera antigua (index.html) */
.cabecera { background: var(--color); color: var(--sobre-color); border-radius: 24px; padding: 22px 20px; display: flex; gap: 14px; align-items: center; }
.cabecera .nombre { font-size: 21px; font-weight: 700; line-height: 1.2; }
.cabecera .sub { font-size: 14px; opacity: .9; }

/* Puntos de sellos (cuando el negocio no tiene diseño propio) */
.puntos { display: flex; flex-wrap: wrap; gap: 6px; }
.puntos span { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed var(--linea); }
.puntos span.lleno { background: var(--color); border-color: var(--color); }

/* Logo redondo del negocio */
.marca-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--fondo-2); flex: none; }

/* ---------------------------------------------------------------- maqueta de la tarjeta del Wallet */
.wallet {
  --tx: #FFFFFF; --tx2: rgba(255, 255, 255, .72);
  width: 100%; max-width: 350px; border-radius: 18px; overflow: hidden; text-align: left;
  background: var(--color); color: var(--tx);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .12);
  transform: rotate(-2.5deg);
}
.wallet.claro { --tx: #1C1C1E; --tx2: rgba(0, 0, 0, .58); }
.wallet-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.wallet-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; flex: none; }
.wallet-nombre { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-cab { text-align: right; line-height: 1.15; }
.wallet-cab b { font-weight: 400; font-size: 20px; }
.wallet small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--tx2); }
.wallet-franja img { display: block; width: 100%; aspect-ratio: 1125 / 432; object-fit: cover; }
.wallet-franja .puntos { justify-content: center; padding: 18px 14px; }
.wallet .puntos span { border-color: var(--tx2); }
.wallet .puntos span.lleno { background: var(--tx); border-color: var(--tx); }
.wallet-campos { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px 16px; }
.wallet-campos span { font-size: 17px; }
.wallet-campos .dcha { text-align: right; }
@media (prefers-reduced-motion: no-preference) {
  .wallet { animation: entrar .7s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes entrar { from { opacity: 0; transform: translateY(18px) rotate(-7deg); } }
}

[hidden] { display: none !important; }
