/* App de meseros: hecha para usarse con una mano, de pie y con prisa. Botones grandes, estados por color. */
body { min-height: 100dvh; background: var(--fachada); color: var(--txt); }
body.m-fija { overflow: hidden; }
.display { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }

/* Entrada */
.m-login { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.m-login-foto { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(15,10,8,.15), rgba(15,10,8,.75)), url(/img/gen/hero-trompo.webp) center / cover; z-index: -1; animation: m-ken 18s ease-in-out infinite alternate; }
@keyframes m-ken { to { transform: scale(1.08); } }
.m-login-caja { align-self: end; margin: 0 auto; width: min(440px, 100%); background: var(--fachada-2); border-radius: 28px 28px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); display: grid; gap: 12px; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.5); animation: m-sube .6s var(--resorte) both; }
@media (min-width: 700px) { .m-login-caja { align-self: center; border-radius: 28px; } }
@keyframes m-sube { from { transform: translateY(40px); opacity: 0; } }
.m-login-caja img { border-radius: 50%; margin-top: -64px; box-shadow: 0 0 0 6px var(--fachada-2), var(--brillo-rojo); }
.m-login-caja h1 { margin: 0; font-size: 2.8rem; line-height: .9; }
.m-login-caja p { margin: 0; color: var(--txt-2); }
.m-login-caja label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.m-login-caja input, .mo-res input { min-height: 50px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fachada-3); color: var(--txt); font: inherit; padding: 0 14px; font-size: 1rem; }
.m-error { color: var(--trompo) !important; font-weight: 700; }

/* Cabecera y pestañas */
.m-cab { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--fachada) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--linea); }
.m-cab img { border-radius: 50%; }
.m-quien { flex: 1; line-height: 1.15; } .m-quien b { display: block; font-size: 1.05rem; } .m-quien small { color: var(--txt-2); font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; }
.m-vivo { width: 8px; height: 8px; border-radius: 50%; background: var(--pasto); animation: m-late 1.6s infinite; }
@keyframes m-late { 50% { opacity: .3; } }
.m-ico { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); display: grid; place-items: center; cursor: pointer; flex: none; }
.m-ico .ico { width: 20px; height: 20px; }
.m-ico.activo { background: var(--pasto); border-color: transparent; color: #fff; }
.m-ico-alerta { color: var(--trompo); display: grid; animation: m-late 1.2s infinite; }
.m-ico.mini { width: 32px; height: 32px; }
.m-main { max-width: 980px; margin: 0 auto; padding: 14px 16px calc(110px + env(safe-area-inset-bottom)); }
.m-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--fachada-2) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--linea); }
.m-tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; color: var(--txt-2); text-decoration: none; font-size: .78rem; font-weight: 700; min-height: 54px; }
.m-tabs a .ico { width: 24px; height: 24px; }
.m-tabs a.on { color: var(--trompo); background: color-mix(in srgb, var(--trompo) 10%, transparent); }
.m-tabs em { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 20px; height: 20px; border-radius: 10px; background: var(--trompo); color: #fff; font-style: normal; font-size: .72rem; display: grid; place-items: center; padding: 0 5px; animation: m-pulso 1.4s infinite; }
@keyframes m-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,38,47,.5); } 50% { box-shadow: 0 0 0 7px rgba(227,38,47,0); } }
@media (min-width: 900px) { .m-tabs { left: 50%; right: auto; transform: translateX(-50%); width: 560px; bottom: 14px; border-radius: 22px; border: 1px solid var(--linea); box-shadow: var(--sombra); } }

.m-h { font-size: 2.3rem; line-height: .95; margin: 6px 0 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.m-h span { font-family: var(--f-texto); text-transform: none; font-size: .95rem; font-weight: 700; color: var(--txt-2); }
.m-btn { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s; }
.m-btn:active { transform: scale(.96); }
.m-btn .ico { width: 18px; height: 18px; }
.m-btn.rojo { background: linear-gradient(135deg, #ff5a2a, #e3262f 60%, #b5121b); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(227,38,47,.9); }
.m-btn.verde { background: var(--pasto); color: #fff; border-color: transparent; }
.m-btn.oro { background: #ffc56a; color: #24180f; border-color: transparent; }
.m-btn.grande { min-height: 56px; font-size: 1.05rem; width: 100%; }
.m-btn.mini { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.m-btn:disabled { opacity: .55; cursor: not-allowed; }
.m-btn:focus-visible, .m-ico:focus-visible, .m-tabs a:focus-visible, .mt:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

.m-activar { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; margin-bottom: 14px; border-radius: 18px; border: 0; background: linear-gradient(135deg, #e3262f, #ff5a2a); color: #fff; font: inherit; cursor: pointer; box-shadow: 0 14px 30px -14px rgba(227,38,47,.9); animation: m-sube .5s var(--resorte) both; }
.m-activar .ico { width: 26px; height: 26px; flex: none; }
.m-activar span { flex: 1; } .m-activar b { display: block; font-size: 1.05rem; } .m-activar small { opacity: .9; }

/* Llamados */
.m-lista { display: grid; gap: 12px; }
@media (min-width: 760px) { .m-lista { grid-template-columns: 1fr 1fr; } }
.ll { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px; border-radius: 20px; background: var(--fachada-2); border: 1px solid var(--linea); box-shadow: var(--sombra); animation: m-entra .45s var(--resorte) both; transition: opacity .25s, transform .25s; }
@keyframes m-entra { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.ll.sale { opacity: 0; transform: translateX(40px); }
.ll.mio { border-color: color-mix(in srgb, var(--trompo) 45%, var(--linea)); }
.ll.tarde { box-shadow: 0 0 0 2px var(--trompo), 0 14px 30px -14px rgba(227,38,47,.7); }
.ll-mesa { width: 74px; border-radius: 16px; border: 0; display: grid; place-items: center; align-content: center; background: var(--fachada-3); color: var(--txt); cursor: pointer; padding: 8px 0; }
.ll-mesa small { font-size: .7rem; font-weight: 800; color: var(--txt-2); }
.ll-mesa b { font-size: 2.6rem; line-height: .85; }
.ll.cuenta .ll-mesa { background: #ffc56a; color: #24180f; } .ll.mesero .ll-mesa, .ll.ayuda .ll-mesa { background: var(--trompo); color: #fff; } .ll.mesero .ll-mesa small, .ll.ayuda .ll-mesa small { color: rgba(255,255,255,.85); }
.ll.lista .ll-mesa { background: var(--pasto); color: #fff; } .ll.lista .ll-mesa small { color: rgba(255,255,255,.85); }
.ll-txt b { display: flex; align-items: center; gap: 6px; font-size: 1.05rem; } .ll-txt b .ico { width: 18px; height: 18px; }
.ll-txt p { margin: 4px 0; font-size: .95rem; } .ll-txt small { color: var(--txt-2); font-size: .82rem; }
.ll-acc { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }

.m-vacio { text-align: center; padding: 40px 16px; }
.m-vacio img { border-radius: 28px; animation: m-flota 4s ease-in-out infinite; }
@keyframes m-flota { 50% { transform: translateY(-8px) rotate(-2deg); } }
.m-vacio h2 { font-size: 2rem; margin: 12px 0 6px; } .m-vacio p { color: var(--txt-2); max-width: 36ch; margin: 0 auto 14px; }

/* Mesas */
.m-leyenda { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: .8rem; color: var(--txt-2); margin-bottom: 6px; }
.m-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--c); }
.m-zona { font-size: .85rem; font-weight: 800; color: var(--txt-2); margin: 16px 0 8px; }
.m-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.mt, .m-leyenda span { --c: var(--txt-3); }
.mt.libre, .m-leyenda .libre { --c: #3c9a5f; } .mt.ocupada, .m-leyenda .ocupada { --c: #e3262f; } .mt.ordenando, .m-leyenda .ordenando { --c: #ff8a2a; } .mt.cuenta, .m-leyenda .cuenta { --c: #d99a1e; } .mt.limpieza, .m-leyenda .limpieza { --c: #6aa9ff; }
.mt { position: relative; min-height: 118px; border-radius: 18px; border: 1px solid var(--linea); border-top: 5px solid var(--c); background: var(--fachada-2); color: var(--txt); display: grid; align-content: start; justify-items: start; gap: 2px; padding: 10px 12px; text-align: left; font: inherit; cursor: pointer; transition: transform .15s; }
.mt:active { transform: scale(.96); }
.mt b { font-size: 2.2rem; line-height: .9; }
.mt-est { font-size: .78rem; font-weight: 800; color: var(--c); }
.mt-info { font-size: .75rem; color: var(--txt-2); } .mt-total { font-weight: 800; font-size: .92rem; }
.mt.mia { background: color-mix(in srgb, var(--c) 9%, var(--fachada-2)); }
.mt.llama { animation: m-llama 1.2s ease-in-out infinite; }
@keyframes m-llama { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--trompo) 35%, transparent); } }
.mt-campana { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--trompo); color: #fff; display: grid; place-items: center; } .mt-campana .ico { width: 14px; height: 14px; }
.mt-cocina { position: absolute; bottom: 8px; right: 8px; font-size: .72rem; font-weight: 800; color: #ff8a2a; display: inline-flex; align-items: center; gap: 2px; } .mt-cocina .ico { width: 13px; height: 13px; }
.mt-mesero { position: absolute; top: 8px; right: 8px; font-size: .68rem; font-weight: 800; color: var(--txt-3); }
.mt.llama .mt-mesero { display: none; }

/* Hojas (mesa, cobro, orden) */
.m-velo { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,8,6,0); transition: background .3s; }
.m-velo.on { background: rgba(12,8,6,.5); }
.m-velo.encima { z-index: 70; }
.m-hoja { width: min(640px, 100%); max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--fachada); border-radius: 26px 26px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .45s var(--resorte); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.5); }
.m-velo.on .m-hoja { transform: none; }
@media (min-width: 760px) { .m-velo { align-items: center; } .m-hoja { border-radius: 26px; } }
.m-asa { display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--linea); margin: 4px auto 10px; }
.mh-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: sticky; top: -8px; background: var(--fachada); padding: 6px 0 10px; z-index: 2; }
.mh-cab small { color: var(--txt-2); font-weight: 700; } .mh-cab h2 { margin: 0 0 6px; font-size: 2.4rem; line-height: .9; }
.m-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--fachada-3); color: var(--txt-2); }
.m-chip.ocupada { background: rgba(227,38,47,.12); color: #c21c25; } .m-chip.cuenta { background: rgba(217,154,30,.18); color: #8a5a06; } .m-chip.libre { background: rgba(60,154,95,.14); color: #2b7a49; } .m-chip.limpieza { background: rgba(106,169,255,.16); color: #2c66b8; } .m-chip.ordenando { background: rgba(255,138,42,.16); color: #b3550d; }
.m-chip.etapa-listo { background: rgba(60,154,95,.16); color: #2b7a49; } .m-chip.etapa-preparando { background: rgba(255,138,42,.16); color: #b3550d; }
.mh-llamados { display: grid; gap: 8px; margin: 6px 0 12px; }
.mh-llamados > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: rgba(227,38,47,.08); border: 1px solid rgba(227,38,47,.25); }
.mh-llamados .ico { width: 18px; height: 18px; color: var(--trompo); } .mh-llamados button { margin-left: auto; }
.mh-pers { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.mh-pers > span { font-weight: 800; }
.m-cant { display: inline-flex; align-items: center; gap: 10px; background: var(--fachada-3); border-radius: 999px; padding: 4px; }
.m-cant button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fachada-2); color: var(--txt); display: grid; place-items: center; cursor: pointer; } .m-cant .ico { width: 18px; height: 18px; }
.m-cant b { min-width: 24px; text-align: center; font-size: 1.15rem; }
.mh-cuenta { padding: 10px 0; }
.mh-orden { padding: 10px 0; border-bottom: 1px dashed var(--linea); }
.mh-o-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mh-l { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .95rem; }
.mh-l small { display: block; color: var(--txt-2); font-size: .8rem; }
.mh-total { display: flex; justify-content: space-between; padding: 8px 0; font-weight: 700; }
.mh-total b { font-size: 1.15rem; } .mh-total.grande b { font-size: 1.6rem; font-family: var(--f-display); }
.mh-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mh-acc .grande { grid-column: 1 / -1; }
.m-nota { color: var(--txt-2); font-size: .88rem; text-align: center; margin: 8px 0; }
.m-sub { font-weight: 800; margin: 12px 0 8px; }
.m-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--fachada-3); padding: 5px; border-radius: 16px; }
.m-seg button { min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--txt-2); font: inherit; font-weight: 800; cursor: pointer; }
.m-seg button.on { background: var(--fachada-2); color: var(--txt); box-shadow: 0 4px 12px -6px rgba(0,0,0,.3); }

/* Tomar orden */
.m-hoja.orden { width: min(760px, 100%); height: 92dvh; display: flex; flex-direction: column; }
.mo-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; flex: none; }
.mo-cats button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); font: inherit; font-weight: 800; cursor: pointer; }
.mo-cats button.on { background: var(--txt); color: var(--fachada); border-color: transparent; }
.mo-prods { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding-bottom: 10px; }
.mo-p { position: relative; display: grid; grid-template-rows: 92px auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); text-align: left; font: inherit; cursor: pointer; padding: 0; }
.mo-p img { width: 100%; height: 92px; object-fit: cover; }
.mo-p span { padding: 8px 10px; } .mo-p b { display: block; font-size: .9rem; line-height: 1.2; } .mo-p small { color: var(--txt-2); font-weight: 700; }
.mo-p > .ico, .mo-p em { position: absolute; top: 62px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--txt); color: var(--fachada); display: grid; place-items: center; padding: 6px; font-style: normal; font-weight: 800; }
.mo-p em { background: var(--trompo); color: #fff; padding: 0; }
.mo-barra { flex: none; display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--linea); }
.mo-res summary { cursor: pointer; font-weight: 800; padding: 4px 0; }
.mo-res input { width: 100%; margin-top: 6px; }
.m-hoja.opciones { width: min(560px, 100%); }
.mo-g { padding: 10px 0; border-bottom: 1px solid var(--linea); }
.mo-g.falta .mo-g-cab b::after { content: ' · falta'; color: var(--trompo); }
.mo-g-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .mo-g-cab span { font-size: .78rem; font-weight: 800; color: var(--txt-2); background: var(--fachada-3); padding: 3px 9px; border-radius: 999px; }
.mo-ops { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-ops button { min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); font: inherit; font-weight: 700; cursor: pointer; }
.mo-ops button.on { background: var(--trompo); color: #fff; border-color: transparent; }
.mo-ops small { opacity: .75; }
.mo-pie { position: sticky; bottom: -18px; background: var(--fachada); display: flex; gap: 10px; align-items: center; padding: 12px 0 4px; }
.mo-pie .m-btn { flex: 1; }

/* Turno */
.m-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 760px) { .m-kpis { grid-template-columns: repeat(4, 1fr); } }
.m-kpis div { background: var(--fachada-2); border: 1px solid var(--linea); border-radius: 18px; padding: 14px; }
.m-kpis small { color: var(--txt-2); font-weight: 700; font-size: .8rem; } .m-kpis b { display: block; font-size: 2rem; line-height: 1; margin-top: 4px; } .m-kpis .verde { color: var(--pasto); }
.m-tarjeta { margin-top: 12px; background: var(--fachada-2); border: 1px solid var(--linea); border-radius: 18px; padding: 14px; display: grid; gap: 8px; }
.m-tarjeta p { margin: 0; color: var(--txt-2); }
.m-enlaces { display: grid; gap: 8px; margin: 12px 0; }
.m-enlaces a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--fachada-2); border: 1px solid var(--linea); color: var(--txt); text-decoration: none; font-weight: 800; } .m-enlaces .ico { width: 20px; height: 20px; }
#bSalir { width: 100%; }

.m-toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: #1d1813; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--sombra); animation: m-sube .35s var(--resorte) both; max-width: calc(100vw - 32px); }
.m-toast.error { background: var(--trompo); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
