/* steps-crew.css — OPSV4-SPINE-001 · lane L4 · steps 6, 7, 9-12 (crew, travel, offers, replies, gaps, agency).
 *
 * House rules (OPSV4_SPINE_RUN_LANES.md, "Every lane obeys", rule 5):
 *   · use ONLY the kit, web/js/ops-v4/kit/lres-ops-v4-kit.js;
 *   · four status colours and nothing else —
 *       done      #009A42
 *       needs you #F59E0B
 *       blocked / missed #DC2626, missed fill #FDECEC
 *       not yet   #D1D5DB
 *   · one big green button per panel;
 *   · sheets slide over the page;
 *   · Inter.
 *
 * Scoped under .ov4-crew so nothing here can reach a surface that is not one
 * of this lane's six steps. Shared across all six — they are one family of
 * screens (building and running a crew) and look like siblings on purpose.
 */

.ov4-crew {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #0F1419;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── The reason / facts strip every panel opens with ─────────────────────
   Not a duplicate of the shell's fallback: once a step registers a panel the
   shell stops drawing it, so the panel draws its own, briefer version — the
   WHY, in the flow API's own words, never a paraphrase. */
.ov4-crew-reason {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #4B5563;
}
.ov4-crew-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.ov4-crew-fact {
  flex: 1 1 140px;
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ov4-crew-fact dt { font-size: 11px; font-weight: 700; color: #4B5563; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.ov4-crew-fact dd { font-size: 16px; font-weight: 800; color: #0F1419; margin: 0; }
.ov4-crew-fact.is-warn dd { color: #B45309; }

/* ── Sub-tabs — identical shape to step 8's, deliberately ─────────────── */
.ov4-crew-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #EEF0F3;
  align-self: flex-start;
  flex-wrap: wrap;
}
.ov4-crew-tab {
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #4B5563;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.ov4-crew-tab[aria-selected="true"] {
  background: #FFFFFF;
  color: #0F1419;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* ── Cards, lists, rows ───────────────────────────────────────────────── */
.ov4-crew-card {
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov4-crew-card h3 { margin: 0; font-size: 15px; font-weight: 800; }
.ov4-crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #F4F5F7;
  font-size: 13px;
}
.ov4-crew-row:last-child { border-bottom: none; }
.ov4-crew-row-main { flex-grow: 1; min-width: 0; }
.ov4-crew-row-name { font-weight: 700; color: #1F2937; }
.ov4-crew-row-sub { font-size: 11.5px; color: #6B7280; }

/* ── Empty states — honest, with the action that fills them ──────────── */
.ov4-crew-empty {
  padding: 18px 16px;
  border: 1px dashed #D1D5DB;
  border-radius: 14px;
  background: #F4F5F7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov4-crew-empty-t { font-size: 14px; font-weight: 800; color: #1F2937; }
.ov4-crew-empty-p { margin: 0; font-size: 13px; color: #4B5563; }

/* ── Chips — the four states and nothing else ────────────────────────── */
.ov4-crew-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.ov4-crew-chip[data-state="done"]      { background: #E3F5EA; color: #006B2E; }
.ov4-crew-chip[data-state="needs_you"] { background: #FEF3C7; color: #92400E; }
.ov4-crew-chip[data-state="missed"],
.ov4-crew-chip[data-state="blocked"]   { background: #FDECEC; color: #991B1B; }
.ov4-crew-chip[data-state="not_yet"]   { background: #F4F5F7; color: #4B5563; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.ov4-crew-field { display: flex; flex-direction: column; gap: 4px; }
.ov4-crew-field label { font-size: 12px; font-weight: 700; color: #4B5563; }
.ov4-crew-field input[type="text"],
.ov4-crew-field input[type="number"],
.ov4-crew-field input[type="date"],
.ov4-crew-field select,
.ov4-crew-field textarea {
  min-height: 40px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  background: #FFFFFF;
}
.ov4-crew-field textarea { min-height: 72px; padding: 10px 12px; resize: vertical; }
.ov4-crew-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ov4-crew-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ── Buttons — one big green per panel; everything else is secondary ─── */
.ov4-crew-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #1F2937;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.ov4-crew-btn:disabled { color: #9CA3AF; cursor: not-allowed; border-color: #E5E7EB; }
.ov4-crew-btn-danger { border-color: #DC2626; color: #991B1B; }
.ov4-crew-link-btn {
  border: none;
  background: none;
  color: #006B2E;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ── Where another module mounts ──────────────────────────────────────── */
.ov4-crew-mount { min-height: 60px; }
.ov4-crew-mount[data-loading="true"]::before {
  content: "Loading…";
  font-size: 13px;
  color: #6B7280;
}
