:root {
  --ink: #243037;
  --muted: #6f675f;
  --line: #efe6db;
  --cream: #f6f1ea;
  --paper: #fffaf5;
  --teal: #0f6e6b;
  --teal-dark: #0c5552;
  --teal-soft: #e7f4f2;
  --ok-bg: #e5f6ec;
  --ok-fg: #157a3c;
  --low-bg: #fdecec;
  --low-fg: #c23434;
  --banner: 0px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-top: var(--banner);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }

a { color: var(--teal); }

.pagina, .marco {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--paper);
  min-height: calc(100dvh - var(--banner));
}

.marco {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--banner));
  min-height: 0;
  background: #fff;
}

.hero, .marca {
  text-align: center;
  padding: 28px 20px 12px;
}

.logo {
  width: 168px;
  height: 168px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(36, 48, 55, 0.08);
}

.logo img { width: 142px; height: auto; display: block; }

.negocio { margin: 0; color: var(--muted); font-size: 13px; }

h1, .marca h2 {
  margin: 6px 0 0;
  font-size: 34px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.sucursal { margin: 2px 0 0; color: var(--teal); font-weight: 700; }

.intro {
  margin: 18px 20px 6px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.producto-publico {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0 16px;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
}

.producto-publico .nombre {
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
}

.producto-publico .precio {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.vacio, .estado {
  margin: 28px 24px;
  text-align: center;
  color: #4d463f;
  line-height: 1.45;
}

.pie {
  padding: 12px 20px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.pie a { color: var(--muted); }

.encabezado {
  flex: none;
  height: 56px;
  display: grid;
  grid-template-columns: 88px 1fr 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.encabezado h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.btn-mas, .btn-salir {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
}

.btn-mas {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 0;
}

.btn-salir { font-size: 14px; padding: 8px 0 8px 12px; text-align: left; }

.contenido { flex: 1; overflow-y: auto; background: #fff; }

.navegacion {
  flex: none;
  display: flex;
  border-top: 1px solid var(--line);
  background: #fff;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.nav-item.activa { color: var(--teal); }

.pin {
  padding: 8px 20px 28px;
}

.pin .logo { width: 132px; height: 132px; }
.pin .logo img { width: 112px; }

.campo-pin {
  display: block;
  margin: 18px 0 8px;
}

.campo-pin input {
  width: 100%;
  height: 56px;
  border: 1px solid #e4d9cc;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  font-size: 28px;
  letter-spacing: 0.28em;
  font-weight: 700;
}

.btn {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 16px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.pin .btn { width: 100%; margin: 12px 0 0; }

.btn:disabled { opacity: 0.45; }
.btn.secundario { background: var(--teal-soft); color: var(--teal-dark); }
.aviso .btn, .grupo-botones .btn { width: 100%; margin: 8px 0 0; }
.grupo-botones { margin: 4px 16px 16px; }

.error-form, .ayuda, .nota-baja {
  margin: 0 16px 8px;
  font-size: 13px;
  line-height: 1.4;
}

.error-form, .aviso.error {
  background: #fde8e8;
  color: #9f1239;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}

.pin .error-form { margin: 12px 0 0; }

.nota-baja { color: var(--low-fg); font-weight: 700; }
.ayuda { color: var(--muted); }

.aviso {
  margin: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #e7f6ee;
  color: #14532d;
}

.aviso p { margin: 0 0 8px; line-height: 1.4; }
.aviso .alerta { color: var(--low-fg); font-weight: 700; }

.buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 16px 6px;
  height: 42px;
  padding: 0 14px;
  background: #f3f4f6;
  border-radius: 999px;
}

.buscador input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  width: 100%;
}

.producto, .opcion {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f0f2f5;
  text-align: left;
}

.opcion:disabled { opacity: 0.48; }
.foto { width: 48px; height: 48px; border-radius: 8px; background: #e4e7ec; flex: none; }
.info { min-width: 0; flex: 1; }
.nombre-caja, .precio-caja { display: block; }
.nombre-caja { margin: 0; color: var(--teal); font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.precio-caja { margin: 2px 0 0; font-weight: 600; font-size: 14px; color: var(--ink); }

.pastilla {
  margin-left: auto;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}

.pastilla.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pastilla.baja { background: var(--low-bg); color: var(--low-fg); }
.pastilla .bandera { font-size: 10.5px; }

.bloque-titulo {
  margin: 16px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #5c564e;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 16px;
}

.stepper button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #d0d5dd;
  background: #fff;
  font-size: 26px;
  color: var(--teal);
}

.stepper button:disabled { color: #c5cad3; }

.stepper input {
  width: 84px;
  height: 48px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
}

.resumen { display: flex; gap: 12px; margin: 8px 16px 12px; }
.resumen div { flex: 1; background: #f8fafc; border-radius: 12px; padding: 10px 12px; }
.resumen .etiqueta { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.resumen .valor { margin: 2px 0 0; font-size: 20px; font-weight: 700; }

.quienes, .modos { display: flex; gap: 8px; }
.quienes { padding: 0 16px; }
.modos { margin: 12px 16px; padding: 4px; background: #f3f4f6; border-radius: 12px; }

.quienes button, .modos button {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #fff;
  font-weight: 700;
}

.modos button { border: 0; color: var(--muted); border-radius: 9px; }
.quienes button.activa, .modos button.activa { background: var(--teal); color: #fff; border-color: var(--teal); }
.modos button.activa { box-shadow: none; }

.campo { display: block; margin: 0 16px 12px; }
.campo span { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #5c564e; }
.campo input {
  width: 100%;
  height: 46px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 16px;
}

.texto-btn { border: 0; background: transparent; color: var(--teal); font-weight: 700; padding: 8px 16px; }

.tarjeta {
  margin: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #f4fbfa;
  border: 1px solid #d5eeeb;
}

.cifra { margin: 4px 0; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.sub { margin: 0; color: #475467; }

.mov { padding: 12px 16px; border-bottom: 1px solid #f0f2f5; }
.mov-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mov h2 { margin: 6px 0 0; font-size: 16px; }
.mov p, .mov time { margin: 2px 0 0; color: #475467; font-size: 14px; }
.tipo { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
.tipo.venta { background: var(--teal-soft); color: var(--teal-dark); }
.tipo.entrada { background: #eef2ff; color: #3730a3; }

.rol { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
