/*
 * m-leche-lote-mejora.css — Modernización bloques 1 (Fecha y lote) y 2 (Ordeños por vaca)
 * Modal #m-leche-lote (Registro de Lotes). SERIO V2 · tokens SLATE.
 * Solo apariencia; no reordena DOM. Reglas: serio-v2-por-defecto / paleta-unificada.
 */

/* ═══ Bloque 1 — Fecha y lote (compacto) ═══ */
#m-leche-lote.bitacora-serio-v2 .modal-serio-body > .ani-serio-v2-card:first-of-type {
  padding-bottom: 10px !important;
}

#m-leche-lote.bitacora-serio-v2 .modal-serio-body > .ani-serio-v2-card:first-of-type .ani-serio-v2-subl {
  margin-bottom: 8px;
}

#m-leche-lote.bitacora-serio-v2 .modal-serio-body > .ani-serio-v2-card:first-of-type .fr {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

/* Sin margin-bottom residual de .fg global (13px) */
#m-leche-lote.bitacora-serio-v2 .modal-serio-body > .ani-serio-v2-card:first-of-type .fr > .fg {
  margin-bottom: 0 !important;
}

/* "+ Nuevo lote" ocupa toda la fila inferior (sin reordenar el DOM) */
#m-leche-lote.bitacora-serio-v2 .fr > .fg.pes-lote-row__btn {
  grid-column: 1 / -1;
  flex: none;
}
/* El label espaciador (&nbsp;) del botón no debe dejar hueco */
#m-leche-lote.bitacora-serio-v2 .fr > .fg.pes-lote-row__btn > .flbl[aria-hidden="true"] {
  display: none;
}

/* Botón + Nuevo lote: 38px (NEW MODAL body) · piel gris-ok */
#m-leche-lote.bitacora-serio-v2 .fr .pes-lote-nuevo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  line-height: 1;
  background: var(--manto-btn-gris-ok-bg) !important;
  border: var(--manto-btn-gris-ok-border) !important;
  border-radius: 12px !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;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
#m-leche-lote.bitacora-serio-v2 .fr .pes-lote-nuevo-btn:hover {
  border: var(--manto-btn-gris-ok-border-hover) !important;
  box-shadow: var(--manto-btn-gris-ok-shadow-hover) !important;
}
#m-leche-lote.bitacora-serio-v2 .fr .pes-lote-nuevo-btn:active {
  transform: scale(.98);
}

/* ═══ Bloque 2 — Ordeños por vaca ═══ */

/* Resumen en vivo (N vacas · Total X L) */
#m-leche-lote.bitacora-serio-v2 .llote-sum {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--gris-300, #cbd5e1);
  border-radius: 10px;
  background: var(--gris-50, #f8fafc);
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-suave, #64748b);
}
#m-leche-lote.bitacora-serio-v2 .llote-sum b {
  color: var(--texto-fuerte, #0f172a);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
#m-leche-lote.bitacora-serio-v2 .llote-sum__dot { opacity: .5; }
#m-leche-lote.bitacora-serio-v2 .llote-sum__tot { margin-left: auto; }

/* Lista de vacas */
#m-leche-lote.bitacora-serio-v2 .llote-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Fila vaca */
#m-leche-lote.bitacora-serio-v2 .llote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--gris-300, #cbd5e1);
  border-radius: 12px;
  background: var(--gris-0, #ffffff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#m-leche-lote.bitacora-serio-v2 .llote-row--filled {
  border-color: var(--gris-400, #94a3b8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

/* Identidad de la vaca */
#m-leche-lote.bitacora-serio-v2 .llote-row__ani {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#m-leche-lote.bitacora-serio-v2 .llote-row__avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(168deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid var(--gris-300, #cbd5e1);
  color: var(--texto-base, #334155);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}
#m-leche-lote.bitacora-serio-v2 .llote-row__id { min-width: 0; }
#m-leche-lote.bitacora-serio-v2 .llote-row__nom {
  font-size: 13px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#m-leche-lote.bitacora-serio-v2 .llote-row__raza {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--texto-suave, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inputs AM/PM + total */
#m-leche-lote.bitacora-serio-v2 .llote-row__inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
#m-leche-lote.bitacora-serio-v2 .llote-io {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
#m-leche-lote.bitacora-serio-v2 .llote-io__lbl {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--texto-suave, #64748b);
}
#m-leche-lote.bitacora-serio-v2 .llote-io__in.fi {
  width: 56px;
  height: 40px;
  padding: 0 6px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
}

/* Total por vaca */
#m-leche-lote.bitacora-serio-v2 .llote-row__tot {
  flex: 0 0 auto;
  min-width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--gris-100, #f1f5f9);
  border: 1px solid var(--gris-300, #cbd5e1);
}
#m-leche-lote.bitacora-serio-v2 .llote-row__tot-val {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  color: var(--texto-fuerte, #0f172a);
  font-variant-numeric: tabular-nums;
}
#m-leche-lote.bitacora-serio-v2 .llote-row__tot-u {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--texto-suave, #64748b);
}
#m-leche-lote.bitacora-serio-v2 .llote-row--filled .llote-row__tot {
  background: linear-gradient(168deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: var(--gris-400, #94a3b8);
}

/* Estado vacío */
#m-leche-lote.bitacora-serio-v2 .llote-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 14px;
  text-align: center;
}
#m-leche-lote.bitacora-serio-v2 .llote-empty__ico { opacity: .35; }
#m-leche-lote.bitacora-serio-v2 .llote-empty__txt {
  font-size: 13px;
  font-weight: 700;
  color: var(--texto-base, #334155);
}

/* Pantallas muy estrechas: inputs un pelín menores */
@media (max-width: 360px) {
  #m-leche-lote.bitacora-serio-v2 .llote-io__in.fi { width: 48px; }
  #m-leche-lote.bitacora-serio-v2 .llote-row__tot { min-width: 38px; }
}
