.mw-head { margin-bottom: 14px; }
.mw-title { font-size: 20px; font-weight: 600; margin: 0; }
.mw-sub { font-size: 13px; color: var(--text-secondary); margin: 4px 0 0; max-width: 70ch; }

.mw-shopnote {
  background: var(--warning-bg, #fbf3e2);
  color: var(--warning-text);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.mw-flash {
  background: var(--success-bg, #e2f0e7);
  color: var(--success-fill, #2e7d5b);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.mw-list { display: flex; flex-direction: column; gap: 10px; }

/* Two halves — why (left) and what (right) — with an arrow between. */
.mw-row {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr;
  align-items: stretch;
  gap: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.mw-arrow { align-self: center; color: var(--text-muted); font-size: 18px; }

.mw-why { min-width: 0; }
.mw-flav { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-common { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Fullness bar (left half + inline). */
.mw-bar { display: block; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.12); overflow: hidden; margin-top: 6px; max-width: 180px; }
.mw-bar-fill { display: block; height: 100%; border-radius: 3px; }

.mw-what { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mw-cand { display: flex; gap: 8px; align-items: flex-start; }
.mw-swatch { width: 16px; height: 22px; border-radius: 4px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.mw-cand-body { min-width: 0; display: flex; flex-direction: column; }
.mw-cand-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-cand-common { font-size: 12px; color: var(--text-secondary); }
.mw-cand-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.mw-dest { font-size: 13px; font-weight: 500; }
.mw-unplaced { color: var(--warning-text); font-weight: 500; }

.mw-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.mw-pick { background: none; border: none; color: var(--accent, #205e66); font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.mw-confirm { border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.mw-confirm:disabled { opacity: 0.5; cursor: default; }
/* Armed = second tap commits (mirrors the movement delete control's danger tint). */
.mw-confirm.armed { background: var(--danger-bg); color: var(--danger-text); box-shadow: inset 0 0 0 1px var(--danger-text); }

/* Picker — group members / same-flavour trays, next-out preselected. */
.mw-picker { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; border-top: 1px solid var(--border); padding-top: 8px; }
.mw-alt { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; cursor: pointer; }
.mw-alt.sel { background: var(--accent-bg, #e5f0f1); }
.mw-alt input { flex-shrink: 0; }
.mw-alt-body { min-width: 0; display: flex; flex-direction: column; }
.mw-alt-name { font-size: 13px; font-weight: 500; }
.mw-alt-meta { font-size: 11px; color: var(--text-muted); }
.mw-notfull { font-size: 10px; color: var(--warning-text); font-weight: 600; }

/* Inert: a cabinet tray with no full replacement — shown, never hidden. */
.mw-what.inert { justify-content: center; }
.mw-none-head { font-size: 14px; font-weight: 600; color: var(--warning-text); }
.mw-none-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.35; }

/* Satisfied: a suitable replacement is already up in the WF — shown done, dimmed,
   not hidden (a vanished row reads as a bug; a satisfied one reads as done). */
.mw-row-satisfied { opacity: 0.6; }
.mw-what.mw-satisfied { flex-direction: row; align-items: center; gap: 8px; justify-content: center; font-size: 13px; color: var(--text-secondary); }
.mw-sat-tick { color: var(--accent-text); font-weight: 700; }

/* Quiet toward end of day — the whole replenishment section dims, actions stay. */
.mw-replenish-section.mw-dim { opacity: 0.55; }

/* --- Sections (morning changeover + replenishment) --- */
.co-section { margin-bottom: 22px; }
.mw-replenish-section { margin-top: 4px; }
.mw-section-title { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.co-section .mw-list, .mw-replenish-section .mw-list { margin-top: 10px; }

/* Move all — a single batched action above the changeover list. */
.co-move-all { border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; margin-bottom: 10px; }

/* Changeover row buttons + picker. The armed (second-tap) tint mirrors the
   replenishment confirm control. */
.co-move, .co-move-manual { border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.co-move:disabled, .co-move-manual:disabled { opacity: 0.5; cursor: default; }
.co-move.armed, .co-move-manual.armed, .co-move-all.armed {
  background: var(--danger-bg); color: var(--danger-text); box-shadow: inset 0 0 0 1px var(--danger-text);
}
.co-pick { padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; background: var(--surface-2); color: var(--text-primary); }

@media (max-width: 640px) {
  .mw-row { grid-template-columns: 1fr; }
  .mw-arrow { display: none; }
}
