/* Restaurantio · estilos comunes (marca Albahaca). Un solo color de acento; el resto son neutros.
   Cada restaurante puede cambiar --acento con su marca (semana 3). Espaciado en múltiplos de 4/8 px. */
:root {
  --acento: #1f7a55;
  --acento-hover: #1a6849;
  --acento-suave: #e3f1ea;
  --acento-texto: #14573c;
  --sobre-acento: #ffffff;
  --tinta: #14251d;
  --suave: #5d6b63;
  --tenue: #8a968f;
  --fondo: #eef3ef;
  --capa: #f8fbf9;
  --capa-2: #ffffff;
  --borde: rgba(20, 37, 29, 0.09);
  --borde-fuerte: rgba(20, 37, 29, 0.16);
  --peligro: #b3261e;
  --peligro-suave: #fbe9e7;
  --aviso: #8a5a00;
  --aviso-suave: #fdf3dc;
  --sombra: 0 16px 40px -24px rgba(20, 37, 29, 0.28);
  --r-tarjeta: 16px;
  --r-control: 10px;
  --fuente: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fuente);
  color: var(--tinta);
  background: radial-gradient(circle at 50% -20%, var(--capa-2) 0%, var(--fondo) 55%) fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- tipografía ---------- */
.titulo { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.subtitulo { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.texto-suave { color: var(--suave); font-size: 14px; }
.etiqueta { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tenue); }

/* ---------- marca ---------- */
.logo { display: flex; align-items: center; gap: 12px; }
.logo svg, .logo img { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: cover; }
.marca { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; }
.marca span { color: var(--acento); }

/* ---------- tarjetas ---------- */
.tarjeta {
  background: var(--capa);
  border: 1px solid var(--borde);
  border-radius: var(--r-tarjeta);
  box-shadow: var(--sombra);
  padding: 24px;
}
.tarjeta + .tarjeta { margin-top: 16px; }

/* ---------- botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-control);
  border: 1px solid var(--borde-fuerte); background: var(--capa-2);
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: normal; text-align: center; line-height: 1.2; padding-block: 8px;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.boton:hover { background: color-mix(in srgb, var(--tinta) 7%, var(--capa-2)); }
.boton:active { opacity: .85; }
.boton:disabled { opacity: .5; cursor: default; }
.boton { color: var(--tinta); }
.boton-primario {
  background: var(--acento); border-color: var(--acento); color: var(--sobre-acento);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(20, 37, 29, .2);
}
.boton-primario:hover { background: var(--acento-hover); }
.boton-peligro { color: var(--peligro); }
.boton-bloque { width: 100%; }
.boton-chico { min-height: 36px; padding: 0 12px; font-size: 14px; }
.boton-icono { min-width: 44px; padding: 0; }
:where(button, a, input, select, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--acento) 45%, transparent);
  outline-offset: 2px;
}

/* ---------- formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 8px; }
.campo + .campo { margin-top: 16px; }
.campo label { font-size: 14px; font-weight: 700; }
.campo small { color: var(--tenue); font-size: 13px; }
.entrada {
  min-height: 48px; padding: 0 16px; border-radius: var(--r-control);
  border: 1px solid var(--borde-fuerte); background: var(--capa-2); font-size: 16px; width: 100%;
}
.entrada:focus { border-color: var(--acento); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 18%, transparent); }
.fila { display: flex; gap: 12px; flex-wrap: wrap; }
.fila > * { flex: 1 1 160px; }

/* ---------- etiquetas de estado ---------- */
.pastilla {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--tinta) 9%, var(--capa-2)); color: var(--suave); white-space: nowrap;
}
.pastilla-verde { background: var(--acento-suave); color: var(--acento-texto); }
.pastilla-abierto { background: #e3f1ea; color: #14573c; } /* siempre verde, sea cual sea la marca */
.pastilla-aviso { background: var(--aviso-suave); color: var(--aviso); }
.pastilla-peligro { background: var(--peligro-suave); color: var(--peligro); }

/* ---------- mensajes ---------- */
.mensaje-error { color: var(--peligro); font-size: 14px; font-weight: 600; min-height: 20px; }
.aviso-flotante {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--tinta); color: var(--fondo); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .4); z-index: 50; max-width: calc(100% - 32px);
}

body.con-barra .aviso-flotante { bottom: calc(96px + env(safe-area-inset-bottom)); } /* que no tape la barra de pedido */

/* ---------- pantalla centrada (entrar) ---------- */
.centrada { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.centrada > .tarjeta { width: 100%; max-width: 400px; }

/* ---------- lista ---------- */
.lista { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--borde);
  background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; cursor: pointer;
}
.item:first-child { border-top: 0; }
.item .crece { flex: 1; min-width: 0; }
.item .nombre { font-weight: 700; }
.item .detalle { color: var(--suave); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .flecha { color: var(--tenue); font-size: 20px; }

.version { font-size: 12px; color: var(--tenue); }
.version.desfase { color: var(--aviso); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
