/* css/ari-ultimas-comandas.css — ASC-ARI-AVISOS-PERSISTEN-ULTIMAS-V1 · «Últimas comandas» (js/ari-ultimas-comandas.js)
   Panel casi a pantalla completa con las 8 últimas comandas de cocina, con el aire del monitor de cocina
   (cocina.html): tarjeta con cabecera (mesa, sala, camarero, hora y «hace N min») y líneas con cantidad,
   formato y comentario; anulación en terracota y tachada. Ember Dark: carbón + brasa, sin azul.
   Rejilla 4 × 2; en 768 px o menos, 2 columnas con scroll vertical (siempre 8 tarjetas). */
.auc-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: stretch; justify-content: center;
  padding: 16px; background: rgba(13, 12, 10, .72); }
.auc-caja { width: 100%; max-width: 1800px; display: flex; flex-direction: column; gap: 12px; min-height: 0;
  background: #131210; color: #F3EDE4; border: 1px solid rgba(255, 200, 140, .12); border-radius: 18px; padding: 16px;
  font-family: 'Figtree', 'Inter', system-ui, sans-serif; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.auc-cab { display: flex; align-items: center; gap: 12px; }
.auc-titulos { flex: 1; min-width: 0; }
.auc-titulo { font-family: 'Syne', 'Figtree', sans-serif; font-size: 22px; font-weight: 700; }
.auc-sub { font-size: 14px; font-weight: 600; color: #B9AA9C; margin-top: 2px; }
.auc-btn { min-height: 48px; min-width: 120px; padding: 0 22px; border-radius: 12px; border: 2px solid #6F6A5F;
  background: #232019; color: #F3EDE4; font: 800 16px 'Figtree', 'Inter', sans-serif; cursor: pointer; touch-action: manipulation; }
.auc-btn:active { background: #302C29; }
.auc-btn:focus-visible { outline: 3px solid #F56820; outline-offset: 2px; }
.auc-estado { font-size: 16px; font-weight: 600; color: #D6CCBC; padding: 24px 8px; text-align: center; }
.auc-estado[hidden] { display: none; }
.auc-estado--error { color: #E8705F; }
.auc-reintentar { margin-top: 14px; border-color: #F56820; }
.auc-rejilla { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; overflow: hidden; }
.auc-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  background: #1A1814; border: 2px solid #3A342A; border-radius: 14px; }
.auc-card--anulada { border-color: rgba(232, 112, 95, .7); }
.auc-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: #232019;
  border-bottom: 1px solid rgba(255, 200, 140, .10); }
.auc-info { flex: 1; min-width: 0; }
.auc-mesa { font-size: 18px; font-weight: 800; line-height: 1.15; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  overflow-wrap: anywhere; }
.auc-sala { font-size: 13px; font-weight: 600; color: #B9AA9C; margin-top: 2px; }
.auc-camarero { font-size: 13px; font-weight: 700; color: #D6CCBC; margin-top: 2px; }
.auc-chip { font-size: 12px; font-weight: 800; letter-spacing: .4px; padding: 2px 8px; border-radius: 8px;
  background: rgba(245, 104, 32, .16); color: #F56820; }
.auc-chip--anul { background: rgba(232, 112, 95, .16); color: #E8705F; }
.auc-tiempo { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.auc-hora { font-size: 15px; font-weight: 800; }
.auc-hace { font-size: 13px; font-weight: 700; color: #D6CCBC; }
.auc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.auc-linea { display: flex; align-items: baseline; gap: 8px; }
.auc-qty { flex: none; min-width: 32px; text-align: right; font-size: 17px; font-weight: 900; color: #F56820;
  font-variant-numeric: tabular-nums; }
.auc-nom { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.auc-linea--anulada .auc-nom { text-decoration: line-through; color: #E8705F; }
.auc-linea--anulada .auc-qty { color: #E8705F; }
.auc-com { font-size: 14px; font-weight: 600; color: #D6CCBC; padding-left: 40px; overflow-wrap: anywhere; }
.auc-com::before { content: '→ '; color: #8A7F6E; }
.auc-com--formato { color: #B9AA9C; }
@media (max-width: 768px) {
  .auc-overlay { padding: 8px; }
  .auc-caja { padding: 12px; }
  .auc-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(220px, auto);
    overflow-y: auto; }
  .auc-body { overflow: visible; }
}
/* R2 · «y N más» solo en el móvil (en tablet se ven todas las líneas). */
.auc-mas { display: none; font-size: 13px; font-weight: 700; color: #B9AA9C; padding-left: 40px; }
/* R2 · EN VIVO: la que entra, con una animación corta (sin ella con reduce-motion). */
.auc-card--nueva { animation: auc-entra 320ms cubic-bezier(0.16, 1, 0.3, 1); border-color: #F56820; }
@keyframes auc-entra { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
/* R2 · MÓVIL (≤480): reescalado. Mesa y sala grandes (lo que busca el camarero), el resto compacto (≥13 px),
   2 columnas, 3 líneas por tarjeta + «y N más», y la cabecera con Cerrar siempre a la vista (la rejilla es lo
   único que se desplaza). */
@media (max-width: 480px) {
  .auc-overlay { padding: 0; }
  .auc-caja { border-radius: 0; border: 0; padding: 10px; gap: 8px; height: 100%; max-height: 100dvh; }
  .auc-cab { position: sticky; top: 0; z-index: 1; gap: 8px; }
  .auc-titulo { font-size: 18px; }
  .auc-sub { font-size: 13px; }
  .auc-cerrar { min-width: 96px; min-height: 48px; padding: 0 14px; }
  .auc-rejilla { gap: 8px; grid-auto-rows: auto; }
  .auc-card { border-radius: 12px; }
  .auc-head { flex-direction: column; gap: 2px; padding: 8px 9px; }
  .auc-mesa { font-size: 19px; }
  .auc-sala { font-size: 15px; font-weight: 700; color: #D6CCBC; }
  .auc-camarero { font-size: 13px; }
  .auc-tiempo { text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .auc-hora { font-size: 13px; }
  .auc-hace { font-size: 13px; }
  .auc-chip { font-size: 13px; padding: 1px 6px; }
  .auc-body { padding: 6px 9px 8px; gap: 2px; }
  .auc-qty { font-size: 14px; min-width: 24px; }
  .auc-nom { font-size: 14px; }
  .auc-com { font-size: 13px; padding-left: 32px; }
  .auc-extra { display: none; }
  .auc-mas { display: block; padding-left: 32px; }
}
@media (prefers-reduced-motion: reduce) { .auc-btn { transition: none; } .auc-card--nueva { animation: none; } }
