/* Estilos compartidos de Marka (app del trabajador) y Marka Central (panel).
   Colores y tipografías de la guía de marca: Azul Marka #0F2A44, Naranja Marka #F26B1D,
   Inter para textos y Space Grotesk para títulos (licencia OFL, en /fuentes). */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fuentes/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fuentes/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/fuentes/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fuentes/SpaceGrotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/fuentes/SpaceGrotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 800; font-display: swap; src: url('/fuentes/Outfit-800.woff2') format('woff2'); }
:root {
  --azul: #0F2A44;
  --azul-2: #1D4266;
  --naranja: #F26B1D;
  --naranja-claro: #F7924F;
  --fondo: #F4F1EA;
  --tarjeta: #FBFAF7;
  --linea: #DDD8CC;
  --texto: #16243A;
  --gris: #586273;
  --verde: #2E7D4F;
  --amarillo: #B7791F;
  --rojo: #B3261E;
  --radio: 14px;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--texto);
  background: var(--fondo);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif; letter-spacing: -.01em; }
a { color: var(--azul-2); }
button, input, select, textarea { font: inherit; }

.boton {
  border: 0; border-radius: 10px; padding: .7rem 1.1rem; cursor: pointer;
  background: var(--azul); color: #fff; font-weight: 600;
}
.boton:disabled { opacity: .5; cursor: not-allowed; }
.boton.secundario { background: transparent; color: var(--azul); border: 1px solid var(--linea); }
.boton.peligro { background: var(--rojo); }
.boton.acento { background: var(--naranja); }
.boton.chico { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }

.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.campo label { font-size: .85rem; font-weight: 600; color: var(--gris); }
.campo input, .campo select, .campo textarea {
  padding: .6rem .7rem; border: 1px solid var(--linea); border-radius: 10px; background: #fff; color: var(--texto);
}
.campo small { color: var(--gris); }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 .8rem; }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1rem; }
.oculto { display: none !important; }
.texto-gris { color: var(--gris); }
.error { color: var(--rojo); font-weight: 600; }

.insignia { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.e-trabajando { background: #E3F1E8; color: var(--verde); }
.e-en_comida { background: #FCF0DC; color: var(--amarillo); }
.e-en_paro { background: #FBE4D9; color: var(--naranja); }
.e-fuera { background: #ECEDEF; color: var(--gris); }
.i-alerta { background: #FBE4D9; color: var(--naranja); }
.i-anulada { background: #F6DCDA; color: var(--rojo); }
.i-ok { background: #E3F1E8; color: var(--verde); }

.aviso { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--azul); color: #fff;
  padding: .8rem 1.2rem; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50; max-width: 92vw; text-align: center; }
.aviso.mal { background: var(--rojo); }

dialog { border: 0; border-radius: var(--radio); padding: 1.2rem; width: min(560px, 94vw); max-height: 90vh; overflow: auto; }
dialog::backdrop { background: rgba(20, 36, 59, .55); }
dialog .acciones { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th { text-align: left; background: var(--azul); color: #fff; padding: .55rem .6rem; font-weight: 600; position: sticky; top: 0; }
td { padding: .5rem .6rem; border-bottom: 1px solid var(--linea); vertical-align: top; }
tr:nth-child(even) td { background: #FBFAF7; }
.tabla-envoltura { overflow: auto; border: 1px solid var(--linea); border-radius: 10px; background: #fff; }
.barra { height: 6px; background: var(--linea); border-radius: 3px; overflow: hidden; margin-top: .25rem; }
.barra > div { height: 100%; background: var(--verde); }
.barra > div.alto { background: var(--naranja); }
.barra > div.excede { background: #C0392B; }
.insignia.i-error { background: #FADBD8; color: #922B21; }
