/* Paleta tomada del menu impreso de The Bowl */
:root {
  --azul: #2c56a3;
  --azul-osc: #1b3b75;
  --crema: #f8e7de;
  --celeste: #a8d4e8;
  --blanco: #fff;
  --rojo: #c0392b;
  --verde: #1e8449;
  --morado: #8e44ad;   /* hay que revisarlo, pero no es error */
  --ambar: #e0a800;    /* aviso antes de que algo cueste dinero */
  --naranja: #b9770e;  /* el turno es de otra persona */

  /* Versiones suaves y de texto de cada color de estado. Estaban sueltas por
     los HTML como hex a mano: aqui viven una sola vez. */
  --rojo-suave: #fdece9;
  --ambar-suave: #fdf0d5;
  --ambar-texto: #8a5a00;
  --morado-suave: #f6ecfa;
  --morado-texto: #6c3483;
  --gris-linea: var(--gris-linea);  /* solo en impresion, sobre papel blanco */
  --r: 22px;
  --sombra: 0 2px 0 rgba(27, 59, 117, .15);
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Un display: flex/grid de una clase le gana a [hidden]. Que no pase. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--azul-osc);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  overscroll-behavior-y: contain;
}

h1, h2, h3, .may { text-transform: uppercase; letter-spacing: .5px; margin: 0 0 .4em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }

.barra {
  background: var(--azul);
  color: var(--blanco);
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.barra h1 { margin: 0; font-size: 1.15rem; }
.barra .sep { margin-left: auto; }
.barra a { color: var(--celeste); text-decoration: none; font-weight: 700; }

.contenido { padding: 1rem; max-width: 1100px; margin: 0 auto; }

.tarjeta {
  background: var(--blanco);
  border-radius: var(--r);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--sombra);
  /* Las tablas anchas (menu, turnos) se desplazan dentro de la tarjeta
     en vez de desbordar la pagina en el celular. */
  overflow-x: auto;
}

button, .boton {
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.3rem;
  background: var(--azul);
  color: var(--blanco);
  cursor: pointer;
  min-height: 48px;
  transition: transform .06s;
}
button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.sec { background: var(--celeste); color: var(--azul-osc); }
button.fantasma { background: transparent; color: var(--azul); box-shadow: inset 0 0 0 2px var(--azul); }
button.peligro { background: var(--rojo); }
button.ok { background: var(--verde); }
button.pequeno { min-height: 38px; padding: .4rem .9rem; font-size: .8rem; }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: .8rem 1rem;
  border: 2px solid var(--celeste);
  border-radius: 16px;
  background: var(--blanco);
  color: var(--azul-osc);
  min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--azul); border-color: var(--azul); }
/* Las mayusculas se reservan para titulos y botones, que son cortos. Una
   etiqueta como "¿Que paso? (opcional, queda para el jefe)" en mayusculas se
   lee peor: se pierde la forma de las palabras. */
label { display: block; font-weight: 700; font-size: .82rem; margin: .8rem 0 .3rem; }

.fila { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rejilla { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.crece { flex: 1; }
.der { text-align: right; }
.chico { font-size: .8rem; opacity: .75; }
.grande { font-size: 2rem; font-weight: 800; }
.vacio { text-align: center; padding: 3rem 1rem; opacity: .6; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem .4rem; text-align: left; border-bottom: 1px solid var(--celeste); }
th { font-size: .75rem; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pastilla {
  display: inline-block;
  background: var(--celeste);
  color: var(--azul-osc);
  border-radius: 999px;
  padding: .15rem .7rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pos { color: var(--verde); font-weight: 800; }
.neg { color: var(--rojo); font-weight: 800; }

dialog {
  border: 0;
  border-radius: var(--r);
  padding: 0;
  width: min(560px, 94vw);
  max-height: 92vh;
  background: var(--crema);
  color: var(--azul-osc);
}
dialog::backdrop { background: rgba(27, 59, 117, .55); }
.dlg-cuerpo { padding: 1rem; overflow: auto; max-height: 68vh; }
.dlg-pie { padding: 1rem; border-top: 2px solid var(--celeste); display: flex; gap: .6rem; }

.aviso { background: var(--rojo); color: #fff; padding: .8rem 1rem; border-radius: 16px; margin: .6rem 0; font-weight: 700; }
.aviso.bien { background: var(--verde); }

@media print {
  .barra, button, .no-imprimir { display: none !important; }
  body { background: #fff; }
  .tarjeta { box-shadow: none; border: 1px solid var(--gris-linea); }
}
