/* Dairy receiving (white base, slice 1). Lot cards, product-group headers and
   the receive-line rows. Everything is single-column and sized for the ~448px
   .page box — no wide grid, and the only reflow (the receive line) keys off the
   content box via flex-wrap, never a viewport @media query. */

/* ---- product group header ------------------------------------------------- */
.dairy-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 10px;
}
.dairy-group-head:first-of-type { margin-top: 4px; }
.dairy-group-head .name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.dairy-group-head .total {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- lot card ------------------------------------------------------------- */
.lot-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 13px;
  margin-bottom: 10px;
  background: #fff;
}
.lot-card.use-first { border-color: var(--accent-text); background: var(--accent-bg); }
.lot-card.warn { border-color: #e3cfa4; background: var(--warning-bg); }
.lot-card.past { border-color: #e6b8b3; background: var(--danger-bg); }

.lot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lot-head .qty {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.lot-natural { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.lot-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lot-meta .ref { font-family: var(--font-mono); color: var(--text-muted); }

.lot-actions { margin-top: 11px; display: flex; gap: 8px; flex-wrap: wrap; }
.lot-actions button { flex: 1; min-width: 120px; }

/* ---- chips ---------------------------------------------------------------- */
.dairy-chip {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.dairy-chip.first { background: var(--accent-text); color: #fff; }
.dairy-chip.warn { background: var(--warning-text); color: #fff; }
.dairy-chip.past { background: var(--danger-text); color: #fff; }
.dairy-chip.quiet { background: var(--border); color: var(--text-secondary); }

/* ---- receive line --------------------------------------------------------- */
.dairy-line {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.dairy-line-top { display: flex; align-items: baseline; gap: 8px; }
.dairy-line-top .prod { font-weight: 600; font-size: 14px; }
.dairy-line-top .pack { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.dairy-line-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.dairy-line-fields > div { flex: 1; min-width: 120px; }
.dairy-line .remove-line {
  margin-top: 10px;
  font-size: 12px;
  color: var(--danger-text);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
}

/* ---- stepper -------------------------------------------------------------- */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; width: max-content; }
.stepper button {
  width: 40px;
  font-size: 18px;
  background: #fff;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.stepper button:active { background: var(--accent-bg); }
.stepper .val {
  width: 48px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  line-height: 40px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ---- summary bar ---------------------------------------------------------- */
.dairy-summary {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.dairy-summary strong { color: var(--text-primary); font-family: var(--font-mono); }

/* ---- history rows --------------------------------------------------------- */
.hist-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.hist-row:last-child { border-bottom: none; }
.hist-row .amt { margin-left: auto; font-family: var(--font-mono); font-weight: 600; }
.hist-row .amt.neg { color: var(--danger-text); }
.hist-row .amt.pos { color: var(--success-fill); }
.hist-note { font-size: 12px; color: var(--text-muted); margin: 0 2px 6px; }
