/* Esqueleto. Estilo PROVISIONAL y neutro hasta que Mireia elija la dirección
   visual viendo tres capturas (D5). Lo que sí es definitivo: zonas seguras,
   botón principal al alcance del pulgar (Fitts) y hundido al pulsar. */

:root {
  --fondo: #FAF7F2;
  --tinta: #1A1917;
  --acento: #C4622D;
  --lineas: #E0DAD1;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--fondo); color: var(--tinta); }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

header {
  padding: 16px 16px 8px;
  border-bottom: 1px solid var(--lineas);
  display: flex;
  align-items: center;
  gap: 12px;
}
header h1 { font-size: 18px; font-weight: 600; margin: 0; }
header .negocio-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }

main { flex: 1; padding: 16px; max-width: 480px; width: 100%; margin: 0 auto; }

footer {
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: #6B655D;
  border-top: 1px solid var(--lineas);
  text-align: center;
}

h2 { font-size: 22px; font-weight: 600; margin: 8px 0 12px; }
p { margin: 0 0 12px; }

label { display: block; font-size: 15px; margin-bottom: 6px; }
input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--lineas);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 16px;
}
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 20px; }
.casilla input { margin-top: 4px; width: 20px; height: 20px; }

.boton {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 16px;
  border: 0;
  border-radius: 10px;
  background: var(--acento);
  color: #fff;
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.boton:active { transform: scale(0.97); }
.boton[disabled] { opacity: 0.5; cursor: default; }
.boton.secundario { background: transparent; color: var(--tinta); border: 1px solid var(--lineas); }

/* La acción principal del negocio vive abajo, al alcance del pulgar. */
.accion-principal {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: 24px;
}

.aviso {
  padding: 12px;
  border: 1px solid var(--lineas);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  margin-bottom: 16px;
}
.aviso.error { border-color: #B4453C; color: #B4453C; }
.aviso[hidden] { display: none; }

.tarjeta-saldo { font-size: 40px; font-weight: 700; margin: 12px 0 4px; }
.codigo { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.15em; font-size: 22px; }
.qr { width: 220px; height: 220px; margin: 16px auto; background: #fff; border: 1px solid var(--lineas); display: grid; place-items: center; color: #6B655D; font-size: 13px; }

.sellos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0; }
.sello { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--acento); }
.sello.lleno { background: var(--acento); }

.estado-esqueleto { font-size: 13px; color: #6B655D; margin-top: 24px; }
.estado-esqueleto dt { font-weight: 600; }
.estado-esqueleto dd { margin: 0 0 6px; font-family: ui-monospace, Menlo, Consolas, monospace; }

@media (prefers-reduced-motion: reduce) {
  .boton { transition: none; }
}
