/* Moviliza Gestión Gastro · base común (carta, panel, cocina, cadete). Cada pantalla define sus colores. */
@font-face { font-family: Figtree; src: url(/figtree.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Figtree, system-ui, sans-serif; color: var(--tinta); background: var(--fondo); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; flex: none; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--foco, #1b6c80); outline-offset: 2px; }
::selection { background: var(--seleccion, #cde4ea); }

/* botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radio-control, 8px); border: 1px solid var(--control, #cdced1); background: var(--sup, #fff);
  color: var(--tinta); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s; }
.btn:hover { background: var(--hover, #f1f2f3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primario { background: var(--primario, #131416); border-color: var(--primario, #131416); color: var(--primario-tinta, #fff); }
.btn.primario:hover { background: var(--primario-hover, #2a2c2f); }
.btn.peligro { color: var(--negativo, #c4242a); border-color: var(--negativo-borde, #f0c4c4); }
.btn.peligro:hover { background: #fff3f2; }
.btn.chico { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.grande { min-height: 48px; padding: 0 20px; font-size: 16px; }
.btn.ancho { width: 100%; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: var(--hover, #f1f2f3); }
.btn .ico { width: 18px; height: 18px; }

.campo { display: grid; gap: 6px; font-size: 14px; }
.campo > span { font-weight: 500; }
.campo small { color: var(--tinta2); font-size: 12px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=search], input[type=time],
input[type=date], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--control, #cdced1); border-radius: var(--radio-control, 8px);
  background: var(--campo, #fff); font-size: 15px; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--foco, #1b6c80); outline-offset: -1px; border-color: transparent; }
.fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grilla2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* segmentado */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--seg-fondo, #ebedee); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  cursor: pointer; color: var(--tinta2); display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed=true] { background: var(--sup, #fff); color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* diálogos */
.dlg { border: 0; padding: 0; border-radius: 16px; background: var(--sup, #fff); color: var(--tinta); width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px); box-shadow: 0 24px 64px rgba(20, 16, 12, .28); }
.dlg::backdrop { background: rgba(20, 16, 12, .42); }
.dlg.chico { width: min(420px, calc(100vw - 24px)); }
.dlg.grande { width: min(860px, calc(100vw - 24px)); }
.dlg-cuerpo { padding: 22px; display: grid; gap: 16px; }
.dlg-cuerpo h2 { font-size: 20px; font-weight: 700; }
.dlg-cuerpo p { color: var(--tinta2); }
.dlg-acciones { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dlg[open] { animation: dlg-entra .18s ease-out; }
@keyframes dlg-entra { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* avisos */
#avisos { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.aviso { background: #1d1a17; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: dlg-entra .2s ease-out; transition: opacity .3s; max-width: min(92vw, 460px); }
.aviso.error { background: #8f1d1b; }
.aviso.ok { background: #1e5f3f; }
.aviso.fuera { opacity: 0; }

.oculto-impresion { position: fixed; width: 0; height: 0; border: 0; left: -9999px; }
.dibujo { width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
