:root {
  --fondo: #F6F5F2; --carta: #FFFFFF; --linea: #E4E2DC; --borde: #D6D3CC; --suave: #F1EFEA;
  --texto: #17181A; --gris: #5C5F66; --verde: #0E6E66; --verde-osc: #0A524C; --verde-cl: #E3F1EF;
  --ok: #11743A; --ok-cl: #E7F4EC; --ok-bd: #A9D6B8; --rojo: #B42318; --rojo-cl: #FDECEA; --rojo-bd: #F2B8B0;
  --nar: #8A4B00; --nar-cl: #FFF4E5; --nar-bd: #F5C98A; --mor: #6B3FA0; --mor-cl: #F1EAFB;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--verde); }
#app { max-width: 560px; margin: 0 auto; padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
.cargando { padding: 80px 20px; text-align: center; color: var(--gris); }
.pad { padding: 0 16px; }
.cab { padding: calc(14px + env(safe-area-inset-top)) 16px 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.cab h1 { margin: 2px 0 0; font-size: 23px; line-height: 1.15; }
.sub { font-size: 12px; color: var(--gris); font-weight: 500; }
.chipdia { border: none; background: transparent; padding: 0; color: var(--verde); font-weight: 700; font-size: 13px; }
.carta { background: var(--carta); border: 1px solid var(--linea); border-radius: 16px; padding: 12px 14px; margin: 10px 16px 0; }
.titsec { display: block; margin: 16px 16px 6px; font-size: 12px; font-weight: 700; color: var(--gris); letter-spacing: .04em; text-transform: uppercase; }
.fila { display: flex; gap: 8px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 6px; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.muted { color: var(--gris); font-size: 12px; line-height: 1.4; }
.chico { font-size: 12px; }
.campo, label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--gris); }
input.in, select.in, textarea.in { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--borde); padding: 0 12px; font-size: 16px; background: #fff; color: var(--texto); }
textarea.in { height: 80px; padding: 10px 12px; }
input.in:focus, select.in:focus { outline: 2px solid var(--verde); outline-offset: -1px; }
.btn { height: 48px; border-radius: 14px; border: none; padding: 0 16px; font-size: 15px; font-weight: 700; background: var(--texto); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn.verde { background: var(--verde); }
.btn.ok { background: var(--ok); }
.btn.rojo { background: var(--rojo); }
.btn.blanco { background: #fff; color: var(--texto); border: 1px solid var(--borde); }
.btn.borde-verde { background: #fff; color: var(--verde); border: 2px solid var(--verde); }
.btn.gris { background: var(--linea); color: var(--gris); }
.btn.punteado { background: #fff; color: var(--texto); border: 1px dashed #8A8D93; font-weight: 600; }
.btn.chico { height: 34px; border-radius: 10px; font-size: 12px; padding: 0 10px; }
.btn.ancho { width: 100%; }
.btn:disabled { opacity: .5; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.p-ok { color: var(--ok); background: var(--ok-cl); } .p-rojo { color: var(--rojo); background: var(--rojo-cl); }
.p-nar { color: var(--nar); background: var(--nar-cl); } .p-gris { color: var(--gris); background: var(--suave); }
.p-verde { color: var(--verde); background: var(--verde-cl); } .p-mor { color: var(--mor); background: var(--mor-cl); }
.seg { display: grid; gap: 4px; background: var(--suave); border-radius: 12px; padding: 4px; }
.seg button { height: 38px; border: none; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 600; color: var(--gris); }
.seg button.on { background: #fff; color: var(--texto); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg button.on.rojo { color: var(--rojo); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 16px 0; }
.chip { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--borde); }
.chip.on { background: var(--texto); color: #fff; border-color: var(--texto); }
.hero { margin: 12px 16px 0; background: var(--verde); color: #fff; border-radius: 20px; padding: 16px 18px; }
.hero .grande { font-size: 44px; font-weight: 700; line-height: 1; }
.hero input { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; height: 32px; padding: 0 8px; width: 84px; font-weight: 700; font-size: 15px; }
.item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 10px 12px; width: 100%; text-align: left; }
.lista { display: flex; flex-direction: column; gap: 6px; margin: 0 16px; }
.nom { font-size: 15px; font-weight: 700; }
.desc-roja { color: var(--rojo); }
.tachado { color: var(--gris); text-decoration: line-through; }
.check { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid #C9C6BF; background: #fff; }
.check.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.check.no { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.qty { display: flex; align-items: center; justify-content: space-between; height: 46px; border-radius: 12px; border: 1px solid var(--borde); padding: 0 4px; background: #fff; }
.qty button { width: 44px; height: 36px; border: none; background: var(--suave); border-radius: 10px; font-size: 20px; font-weight: 600; }
.qty span { font-size: 18px; font-weight: 700; }
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.14); overflow: hidden; max-height: 300px; overflow-y: auto; }
.sug button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 46px; padding: 0 14px; border: none; border-bottom: 1px solid var(--suave); background: #fff; text-align: left; font-size: 15px; font-weight: 600; }
.sug button .ag { font-size: 11px; color: var(--gris); font-weight: 500; }
.sug .nueva { background: var(--mor-cl); color: #3D1F66; font-size: 14px; }
.rel { position: relative; }
nav.abajo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom); }
nav.abajo div { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; align-items: center; }
nav.abajo a { text-align: center; font-size: 12px; font-weight: 500; color: var(--gris); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
nav.abajo a .ic { font-size: 19px; line-height: 1; }
nav.abajo a.on { color: var(--verde); font-weight: 700; }
.velo { position: fixed; inset: 0; z-index: 40; background: rgba(23,24,26,.45); display: flex; align-items: flex-end; justify-content: center; }
.hoja { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.hoja h2 { margin: 0; font-size: 18px; }
.opcion { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--borde); background: #fff; text-align: left; }
.opcion b { font-size: 15px; }
.opcion span { font-size: 12px; color: var(--gris); line-height: 1.35; }
.aviso { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; font-weight: 600; }
.aviso.ok { background: var(--ok-cl); color: var(--ok); border: 1px solid var(--ok-bd); }
.aviso.rojo { background: var(--rojo-cl); color: var(--rojo); border: 1px solid var(--rojo-bd); }
.aviso.nar { background: var(--nar-cl); color: var(--nar); border: 1px solid var(--nar-bd); }
.aviso.gris { background: var(--suave); color: var(--gris); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.cuadro4 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 12px 16px 0; }
.mini { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.mini b { font-size: 22px; }
.mini span { font-size: 12px; color: var(--gris); }
.imgcobro { width: 100%; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.12); display: block; }
.pie-botones { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 10px 16px 6px; background: linear-gradient(to top, var(--fondo) 75%, rgba(246,245,242,0)); display: flex; flex-direction: column; gap: 6px; z-index: 10; }
.tag-tienda { font-size: 12px; font-weight: 700; color: var(--gris); letter-spacing: .04em; text-transform: uppercase; }
.vacio { margin: 12px 16px 0; padding: 16px; text-align: center; color: var(--gris); font-size: 14px; background: #fff; border: 1px dashed #C9C6BF; border-radius: 14px; }
@media (min-width: 700px) { #app { padding-top: 10px; } }
