/* feedback
   Flash messages and status badges.

   Loaded by `stylesheet_link_tag :app`, which includes every .css under
   app/assets sorted by filename — so the NUMBER PREFIX IS THE CASCADE ORDER.
   Renaming a file moves it in the cascade. */

/* ---------------- flash + badges ---------------- */
/* Only rendered when there is something in it — see shared/_flash. `:empty`
   was doing this job and never matched, because the div held the newline
   between its own tags. */
.flash-stack { margin-bottom: 18px; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px 11px 15px;
  border-radius: var(--r);
  margin-bottom: 10px;
  font-size: 14px;
  border: 1px solid transparent;
  opacity: 1;
  transform: translateY(0);
}
.flash:last-child { margin-bottom: 0; }
.flash-message { flex: 1; }

.flash-close {
  background: none;
  border: none;
  color: currentColor;
  opacity: .5;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.flash-close:hover { opacity: 1; background: none; }

@media (prefers-reduced-motion: no-preference) {
  .flash { transition: opacity .25s ease, transform .25s ease; }
}
.flash.is-leaving { opacity: 0; transform: translateY(-4px); }
.flash-notice {
  background: var(--ok-bg); color: var(--ok); border-color: #CADCD2;
  display: flex; align-items: center; gap: 14px;
}
.flash-alert { background: var(--danger-bg); color: var(--danger); border-color: #EFD0CA; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font: 500 11px var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink-2);
  border: 1px solid var(--line);
  vertical-align: middle;
}
.badge-draft     { background: var(--paper); }
/* An order somebody placed and nobody here has answered. Signal, and not a
   colour of its own: it means what `sent` and an AI draft mean — somebody is
   waiting on somebody — and this is the palette that already says so. Filled
   rather than tinted, because of the three it is the one where the person
   waiting is a customer. */
.badge-checking  { background: var(--signal); color: var(--surface); border-color: var(--signal); }
.badge-sent      { background: var(--signal-bg); color: var(--signal); border-color: var(--signal-line); }
.badge-accepted  { background: var(--ok-bg); color: var(--ok); border-color: #CADCD2; }
.badge-rejected, .badge-expired { background: var(--danger-bg); color: var(--danger); border-color: #EFD0CA; }
.badge-superseded{ background: var(--sunken); color: var(--ink-3); }
/* A JOB'S LIFECYCLE, which its badge did not carry: `stage_label` names the
   station a job is at, so a cancelled job and one at the Cutting bench were
   the same grey pill. The words stay the station's; the colour is the state's.
   Deliberately quiet for pending and in_progress — most of the board is one
   of those two, and a board that is all colour is a board with none. */
.badge-pending     { background: var(--paper); }
.badge-in-progress { background: var(--signal-bg); color: var(--signal); border-color: var(--signal-line); }
.badge-complete    { background: var(--ok-bg); color: var(--ok); border-color: #CADCD2; }
.badge-cancelled   { background: var(--danger-bg); color: var(--danger); border-color: #EFD0CA; }

.badge-role      { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge-internal  { background: var(--sunken); color: var(--ink-3); }

.muted { color: var(--ink-3); }
.empty {
  text-align: center;
  padding: 52px 20px;
  color: var(--ink-3);
}
.empty p { margin: 0 0 16px; }
