
/* El atributo hidden manda sobre cualquier display de clase.
   Sin esto, .panel { display:flex } pisa el display:none por defecto
   de [hidden] y el dialogo aparece vacio nada mas cargar. */
[hidden] { display: none !important; }

/* Backoffice - complementa styles.css de la tienda.
   Sin gris plano (Car, 30/10/2026; guia seccion 10, foodvac-ui v1.5.0): cajas blancas con
   esquinas de 14px, borde casi invisible y sombra suave; hovers con el tinte rojo; el gris
   solo en estados apagados (entregado, deshabilitado). */

.contenedor-ancho {
  width: 100%;
  margin: 0 auto;   /* sin tope de ancho (Car, 28/10; antes 1100px) */
  /* Solo los lados: la abreviada `padding: 0 20px` anularia el
     padding-top de .vista, que carga antes en styles.css. */
  padding-left: 20px;
  padding-right: 20px;
}
body.admin { padding-bottom: 40px; }

body.admin .vista { padding-top: 30px; }
.subcabecera { background: var(--bg-card); border-bottom: 1px solid var(--line); }
.enlace-salir { background: none; border: 0; color: var(--ink-mid); cursor: pointer; padding: 4px; }
.enlace-salir:hover { color: var(--brand); }

.usuario { margin-left: auto; font-size: 13px; color: var(--tinta-suave); }
.usuario + .enlace-salir { margin-left: 14px; }

/* --- Pestanas --- */
.pestanas { display: flex; gap: 4px; }
.pestana {
  font: inherit; font-size: 14px; font-weight: 600;
  background: none; border: 0; border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  padding: 10px 14px; cursor: pointer; color: var(--tinta-suave);
}
.pestana:hover { color: var(--brand); background: var(--brand-tint); }
.pestana.activa { color: var(--granate); border-bottom-color: var(--granate); }

/* --- Filtros --- */
.filtros, .barra-acciones {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  margin-bottom: 20px;
}
.filtros label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.filtros select, .filtros input {
  font: inherit; font-size: 14px; padding: 7px 9px;
  border: 1px solid var(--linea); border-radius: var(--radio); background: var(--blanco);
}
.check { font-size: 14px; font-weight: 400; display: flex; align-items: center; gap: 6px; }
.intro { color: var(--tinta-suave); font-size: 14px; margin: 0 0 18px; }

/* --- Tablas --- */
.tabla-caja {
  background: var(--blanco); border: 1px solid var(--line-hair);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow-x: auto;
}
table.datos { width: 100%; border-collapse: collapse; font-size: 14px; }
/* Cabecera (backoffice v0.4.3, Car 30/10): sin gris, texto rojo oscuro y linea roja, como foodvac-ui v1.4.0 */
table.datos th {
  text-align: left; font-size: 12px; text-transform: none; letter-spacing: 0.02em;
  color: var(--brand-dark); font-weight: 700;
  padding: 10px 12px; border-bottom: 2px solid var(--brand); white-space: nowrap;
}
table.datos td { padding: 9px 12px; border-bottom: 1px solid var(--linea); }
table.datos tr:last-child td { border-bottom: 0; }
table.datos tbody tr.clicable { cursor: pointer; }
table.datos tbody tr.clicable:hover { background: var(--brand-tint); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vacio { padding: 28px; text-align: center; color: var(--tinta-suave); }

/* --- Etiquetas de estado --- */
.etq {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; white-space: nowrap;
  border: 1px solid currentColor;
}
.etq-pagado    { color: #a2660a; }
.etq-preparado { color: #1f6b3a; }
.etq-entregado { color: #1f6b3a; } /* v0.4.5: entregado es estado positivo, verde como preparado (Car) */
.etq-parcial   { color: #9a4b00; }
.etq-cancelado { color: var(--error); }

/* --- Panel de detalle --- */
.panel {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto; z-index: 50;
}
.panel-caja {
  background: var(--blanco); border: 1px solid var(--line-hair);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  width: 100%; max-width: 640px; padding: 24px;
}
.panel-cabecera { display: flex; align-items: center; margin-bottom: 16px; }
.panel-cabecera h2 { margin: 0; font-size: 19px; }
.panel-cabecera .enlace-salir { margin-left: auto; font-size: 18px; }
.ficha { font-size: 14px; color: var(--tinta-suave); margin-bottom: 18px; line-height: 1.7; }
.ficha strong { color: var(--tinta); }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.boton-peligro {
  font: inherit; font-weight: 600; padding: 11px 22px; border-radius: var(--radio);
  cursor: pointer; background: var(--blanco); color: var(--error);
  border: 1px solid var(--error);
}
.boton-peligro:disabled { color: #cfc9c5; border-color: var(--linea); cursor: default; }

/* --- Edicion en linea del catalogo --- */
.celda-edit {
  font: inherit; font-size: 14px; width: 100%; min-width: 60px;
  border: 1px solid transparent; border-radius: 4px;
  padding: 4px 6px; background: transparent; color: inherit;
}
.celda-edit:hover { background: var(--brand-tint); }
.celda-edit:focus { border-color: var(--granate); background: var(--blanco); outline: none; }
.celda-edit:disabled { color: var(--tinta-suave); }
.guardado { animation: destello 1.2s ease-out; }
@keyframes destello { from { background: rgba(31, 107, 58, 0.18); } to { background: transparent; } }

/* --- Datos --- */
.tarjetas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.tarjeta {
  flex: 1 1 180px; background: var(--blanco); border: 1px solid var(--line-hair);
  border-top: 3px solid var(--granate); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 16px 18px;
}
.tarjeta span { display: block; font-size: 13px; color: var(--tinta-suave); }
.tarjeta strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.bloque-datos { margin-bottom: 28px; }
.bloque-datos h3 { font-size: 14px; margin: 0 0 10px; color: var(--granate); }

/* --- Explicacion al pie (v0.6.0): .que viene de styles.css; aqui su sitio en tarjetas y tablas --- */
.tarjeta .que { font-size: 11.5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-hair); }
.tabla-caja > .que { margin: 0; padding: 10px 12px; border-top: 1px solid var(--line-hair); }
.bloque-datos > .que { max-width: 110ch; }
#panel-cuerpo > .que { margin-top: 10px; }

@media (max-width: 700px) {
  .pestanas { overflow-x: auto; }
  .cabecera-fila { flex-wrap: wrap; }
}


