/**
 * Pesaje Express Carne — identidad visual v3
 * Gris botones propio · BLE compacto · Responsable legible
 */

#m-pesexp-carne.modal.modal-pebble-vida {
  --pev-radius-block: 16px;
  --pev-radius-btn: 14px;
  --pev-radius-card: 16px;
  --pev-radius-input: 12px;
  --pesexp-r: 14px;
  --pesexp-r-lg: 16px;
  --pesexp-btn-h: 42px;
  --pesexp-btn-h-sm: 34px;
  --pesexp-pad: 14px;
  /* Gris propio (más piedra/azulada que #f1f5f9 genérico) */
  --pesexp-btn-bg: #d8dee8;
  --pesexp-btn-bg-hover: #cfd6e2;
  --pesexp-btn-bg-strong: #c5cedc;
  --pesexp-btn-border: 1px solid #8b97a8;
  --pesexp-btn-ink: #1e293b;
  --pesexp-btn-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
  --pesexp-btn-sec-bg: #eceff4;
  --pesexp-btn-sec-border: 1px solid #a8b3c4;
}

#m-pesexp-carne.modal.modal-pebble-vida > .mbox.bitacora-mbox {
  max-width: min(400px, 94vw) !important;
  border-radius: var(--pesexp-r-lg) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 16px 40px rgba(15, 23, 42, 0.18) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .manto-header-serio-v1 {
  border-radius: var(--pesexp-r-lg) var(--pesexp-r-lg) 0 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .modal-serio-body.ordexp-body {
  padding: var(--pesexp-pad) !important;
  gap: 0 !important;
  background: #e8edf4 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida
  .modal-serio-body.ordexp-body
  > .ani-serio-v2-card
  + .ani-serio-v2-card {
  margin-top: 10px !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque.ani-serio-v2-card,
#m-pesexp-carne.modal.modal-pebble-vida .m-ani-serio-bloque.ani-serio-v2-card {
  border-radius: var(--pesexp-r-lg) !important;
  border: 1px solid rgba(148, 163, 184, 0.5) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  padding: 12px 12px 10px !important;
  overflow: hidden;
}

#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-subl {
  margin: 0 0 10px !important;
  font-size: 11px !important;
  letter-spacing: 0.05em !important;
  color: #334155 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-num {
  border-radius: 10px !important;
  min-width: 24px !important;
  height: 24px !important;
  background: #e8edf4 !important;
  border: 1px solid #d0d7e2 !important;
  color: #475569 !important;
}

/* Campos: en móvil, apilar Fecha + Responsable (texto completo) */
#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque:first-of-type .fr {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque:first-of-type .fr > .fg {
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque .fi,
#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque select.fi,
#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque input.fi {
  border-radius: var(--pev-radius-input) !important;
  min-height: 44px !important;
  height: 44px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 12px !important;
  border: 1px solid #c5cedc !important;
  background: #f4f6f9 !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  text-overflow: ellipsis;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque .fi:focus {
  border-color: #8b97a8 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(139, 151, 168, 0.28) !important;
  outline: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque .flbl {
  margin: 0 0 5px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-field-hint {
  margin: 5px 2px 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #64748b !important;
}

/* ── Botones: gris identidad ── */
#m-pesexp-carne.modal.modal-pebble-vida .modal-serio-body .btn,
#m-pesexp-carne.modal.modal-pebble-vida .modal-serio-body button.btn,
#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-footer-shell .btn,
#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-footer-shell button {
  border-radius: var(--pesexp-r) !important;
  background: var(--pesexp-btn-bg) !important;
  background-image: none !important;
  border: var(--pesexp-btn-border) !important;
  color: var(--pesexp-btn-ink) !important;
  -webkit-text-fill-color: var(--pesexp-btn-ink) !important;
  box-shadow: var(--pesexp-btn-shadow) !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  gap: 8px !important;
  text-shadow: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .modal-serio-body .btn:hover,
#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-footer-shell .btn:hover {
  background: var(--pesexp-btn-bg-hover) !important;
  background-image: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .modal-serio-body .btn img,
#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-footer-shell .btn img {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

/* Tools: sin crecer en altura */
#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-tools {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin-top: 10px !important;
  flex: 0 0 auto !important;
}

/* BLE: compacto — el hueco venía de flex:1 en styles.css */
#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-blebar {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: #f4f6f9 !important;
  border: 1px solid #d0d7e2 !important;
  box-shadow: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-blebar__status {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-blebar__acts {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-mini-btn {
  width: 100% !important;
  height: var(--pesexp-btn-h-sm) !important;
  min-height: var(--pesexp-btn-h-sm) !important;
  max-height: var(--pesexp-btn-h-sm) !important;
  border-radius: 12px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  background: var(--pesexp-btn-sec-bg) !important;
  background-image: none !important;
  border: var(--pesexp-btn-sec-border) !important;
  box-shadow: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .pesexp-carne-lote-btn {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: var(--pesexp-r) !important;
  background: var(--pesexp-btn-sec-bg) !important;
  background-image: none !important;
  border: 1px dashed #8b97a8 !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  box-shadow: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-sesion-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: 10px !important;
  padding: 2px !important;
  border-radius: 12px !important;
  background: #e8edf4 !important;
  border: 1px solid #d0d7e2 !important;
  box-shadow: none !important;
  overflow: hidden;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stat {
  padding: 10px 6px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stat + .ordexp-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: #c5cedc;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stat__val {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stat__lbl {
  margin-top: 3px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

/* Escaneo: menos aire muerto */
#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stage-card {
  min-height: 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-stage--wait {
  padding: 4px 4px 2px !important;
  gap: 6px !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-wait-ico {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  border: 1px solid #d0d7e2 !important;
  background: #f4f6f9 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-wait-svg {
  width: 36px !important;
  height: 36px !important;
  color: #475569 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-wait-tit {
  font-size: 13px !important;
  font-weight: 800 !important;
  max-width: 240px;
  margin: 0 !important;
  line-height: 1.3 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-wait-sub {
  font-size: 11px !important;
  color: #64748b !important;
  max-width: 230px !important;
  margin: 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-wait-cta-row {
  width: 100%;
  max-width: 260px;
  margin: 4px auto 0 !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-btn-buscar {
  width: 100% !important;
  max-width: 260px;
  height: var(--pesexp-btn-h) !important;
  min-height: var(--pesexp-btn-h) !important;
  max-height: var(--pesexp-btn-h) !important;
  margin-inline: auto;
  background: var(--pesexp-btn-bg) !important;
  background-image: none !important;
  border: var(--pesexp-btn-border) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-acciones-row {
  display: grid !important;
  grid-template-columns: 1fr 1.35fr !important;
  gap: 8px !important;
  margin-top: 6px !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-btn-omitir,
#m-pesexp-carne.modal.modal-pebble-vida .ordexp-btn-guardar {
  height: var(--pesexp-btn-h) !important;
  min-height: var(--pesexp-btn-h) !important;
  max-height: var(--pesexp-btn-h) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-hist-lista {
  border-radius: 12px !important;
  background: #f4f6f9 !important;
  border: 1px solid #d0d7e2 !important;
  padding: 10px !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-hist-vacio {
  padding: 6px 4px !important;
  text-align: center;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ani-serio-v2-footer-shell {
  padding: 12px 14px 14px !important;
  border-radius: 0 0 var(--pesexp-r-lg) var(--pesexp-r-lg) !important;
  background: #e8edf4 !important;
  border-top: 1px solid #c5cedc !important;
}

#m-pesexp-carne.modal.modal-pebble-vida
  .ani-serio-v2-footer-shell__row.bit-bitacora-footer-row
  > .btn.bitacora-btn {
  height: var(--pesexp-btn-h) !important;
  min-height: var(--pesexp-btn-h) !important;
  max-height: var(--pesexp-btn-h) !important;
  border-radius: var(--pesexp-r) !important;
  background: var(--pesexp-btn-sec-bg) !important;
  background-image: none !important;
  border: var(--pesexp-btn-sec-border) !important;
  box-shadow: var(--pesexp-btn-shadow) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida
  .ani-serio-v2-footer-shell__row
  > .bit-bitacora-foot-save {
  background: var(--pesexp-btn-bg) !important;
  background-image: none !important;
  border: var(--pesexp-btn-border) !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-dictado-pill {
  border-radius: var(--pesexp-r-lg) !important;
  border: 1px solid #c5cedc !important;
  box-shadow: none !important;
}

#m-pesexp-carne.modal.modal-pebble-vida .ordexp-vaca-card {
  border-radius: var(--pesexp-r) !important;
  border: 1px solid #d0d7e2 !important;
  background: #f4f6f9 !important;
  box-shadow: none !important;
}

@media (min-width: 420px) {
  #m-pesexp-carne.modal.modal-pebble-vida .ordexp-serio-bloque:first-of-type .fr {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  #m-pesexp-carne.modal.modal-pebble-vida
    .ordexp-serio-bloque:first-of-type
    .fr
    > .fg:last-child {
    grid-column: 1 / -1;
  }
}
