/*
 * m-ordeno-express-mejora.css — Ordeño Express (#m-ordeno-express)
 * Botones 38px · border-radius 9px · bloque sesión compacto.
 * SERIO V2 · tokens --manto-btn-gris-ok-* · solo apariencia.
 */

/* ═══ Contrato botones — 38px × 9px (excepto + Nuevo lote = 36px) ═══ */
:is(#m-ordeno-express, #m-pesexp-carne).ordexp-modal-serio-v1.bitacora-serio-v2
  .ani-serio-v2-footer-shell__row.bit-bitacora-footer-row > .btn.bitacora-btn,
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-buscar,
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-omitir,
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-guardar {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  border-radius: 9px !important;
  padding: 0 14px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

/* + Nuevo lote — anula padding alto de styles.css global */
:is(#m-ordeno-express, #m-pesexp-carne).bitacora-serio-v2 .pes-lote-row .pes-lote-nuevo-btn {
  margin: 0 !important;
  padding: 0 14px !important;
  width: 100%;
  font-size: 13px !important;
  font-weight: 800 !important;
  background: var(--manto-btn-gris-ok-bg) !important;
  border: var(--manto-btn-gris-ok-border) !important;
  color: var(--manto-btn-gris-ok-color) !important;
  -webkit-text-fill-color: var(--manto-btn-gris-ok-color) !important;
  box-shadow: var(--manto-btn-gris-ok-shadow) !important;
}

/* + Nuevo lote — esquina superior derecha del bloque Sesión, ancho al texto */
#m-ordeno-express .ordexp-sesion-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

#m-ordeno-express .ordexp-sesion-hd .ani-serio-v2-subl {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

#m-ordeno-express .ordexp-nuevo-lote-btn {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
  white-space: nowrap;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 9px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  background: var(--manto-btn-gris-ok-bg) !important;
  border: var(--manto-btn-gris-ok-border) !important;
  color: var(--manto-btn-gris-ok-color) !important;
  -webkit-text-fill-color: var(--manto-btn-gris-ok-color) !important;
  box-shadow: var(--manto-btn-gris-ok-shadow) !important;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-buscar,
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-guardar {
  background: var(--manto-btn-gris-ok-bg) !important;
  border: var(--manto-btn-gris-ok-border) !important;
  color: var(--manto-btn-gris-ok-color) !important;
  -webkit-text-fill-color: var(--manto-btn-gris-ok-color) !important;
  box-shadow: var(--manto-btn-gris-ok-shadow) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-ico,
:is(#m-ordeno-express, #m-pesexp-carne).ordexp-modal-serio-v1.bitacora-serio-v2
  .ani-serio-v2-footer-shell__row .bit-bitacora-foot-cancel-ico,
:is(#m-ordeno-express, #m-pesexp-carne).ordexp-modal-serio-v1.bitacora-serio-v2
  .ani-serio-v2-footer-shell__row .bit-bitacora-foot-save-ico {
  margin: 0 !important;
  flex-shrink: 0;
}

/* ═══ Bloque 1 — Sesión compacto ═══ */
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-serio-bloque:first-of-type {
  padding-bottom: 10px !important;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-serio-bloque:first-of-type .ani-serio-v2-subl {
  margin-bottom: 8px;
}

#m-ordeno-express .ordexp-serio-bloque:first-of-type .ordexp-sesion-hd .ani-serio-v2-subl {
  margin-bottom: 0;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-serio-bloque:first-of-type .fr > .fg {
  margin-bottom: 0 !important;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-serio-bloque:first-of-type .fr {
  gap: 8px;
}

/* Campos sesión — border-radius 9px */
#m-ordeno-express .ordexp-serio-bloque:first-of-type .fg .fi {
  border-radius: 9px !important;
}

/* Label ↔ campo: separación clara */
#m-ordeno-express .ordexp-serio-bloque:first-of-type .flbl {
  margin-bottom: 6px !important;
  display: block;
}

/* Fila lote: ancho completo + separación respecto a Fecha/Turno */
#m-ordeno-express .ordexp-lote-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  margin-top: 12px !important;
}

#m-ordeno-express .ordexp-lote-fg {
  grid-column: 1 / -1;
  flex: 1 1 100%;
  width: 100%;
}

#m-ordeno-express .ordexp-lote-fg .flbl {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

/* KPI sesión — pills 9px, más compactas */
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-sesion-stats {
  margin-top: 8px;
  gap: 6px;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-stat {
  padding: 6px 4px;
  border-radius: 9px;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-stat__val {
  font-size: 18px;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-stat__lbl {
  margin-top: 3px;
  font-size: 10px;
}

/* ═══ Bloque 2 — escaneo / búsqueda ═══ */
:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-stage--wait {
  padding: 10px 10px 12px;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-wait-cta-row {
  width: 100%;
  margin-top: 2px;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-btn-buscar {
  width: 100%;
}

:is(#m-ordeno-express, #m-pesexp-carne) .ordexp-acciones-row {
  margin-top: 4px;
}

/* Pie — padding ligeramente más compacto */
:is(#m-ordeno-express, #m-pesexp-carne).ordexp-modal-serio-v1.bitacora-serio-v2 .ani-serio-v2-footer-shell {
  padding: 8px 10px !important;
}
