/* CIC order status: quiet, uniform rows. Light and dark follow the system. */
:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1d1d1b; --muted: #6b6b66; --line: #e4e4df;
  --accent: #1f5fa8; --accent-soft: #e8f0fa; --attention: #c98a00; --late: #c0392b;
  --green-soft: #e6f4ea; --green: #1e7b3c; --blue-soft: #e8f0fa; --blue: #1f5fa8; --gray-soft: #efefec;
  --radius: 8px; --control: 36px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413; --surface: #1d1d1b; --text: #ecebe6; --muted: #9b9a93; --line: #2f2f2c;
    --accent: #7fb0e8; --accent-soft: #1f2a37; --attention: #d9a93a; --late: #e07a6e;
    --green-soft: #1d2b21; --green: #8fcf9f; --blue-soft: #1f2a37; --blue: #8db8ea; --gray-soft: #262624;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.late { color: var(--late); }

.staff-banner { background: var(--accent-soft); color: var(--accent); text-align: center; padding: 6px 16px; font-size: 13px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 600; }
.brand-sep { margin: 0 8px; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-right form { margin: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 24px; }
.flash { background: var(--accent-soft); padding: 8px 12px; border-radius: var(--radius); }

.heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.crumb { margin: 0 0 8px; font-size: 13px; }

.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }
.input, .btn { height: var(--control); border-radius: var(--radius); font: inherit; }
.input { border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 12px; }
.btn { border: 0; background: var(--accent); color: #fff; padding: 0 16px; cursor: pointer; }
.btn-quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); height: 30px; padding: 0 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 460px; margin: 64px auto; }
.narrow h1 { margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); font: inherit; cursor: pointer; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab-on { color: var(--text); border-bottom-color: var(--accent); }
.count { font-size: 12px; color: var(--muted); margin-left: 4px; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--bg); }
.edge-attention td:first-child { box-shadow: inset 3px 0 var(--attention); }
.edge-late td:first-child { box-shadow: inset 3px 0 var(--late); }
.empty { padding: 24px 0; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 24px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--gray-soft); }
.pill-attention { box-shadow: inset 0 0 0 1px var(--attention); }

.status { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--gray-soft); white-space: nowrap; }
.status-received, .status-customer_supplied { background: var(--green-soft); color: var(--green); }
.status-in_progress, .status-shipped { background: var(--blue-soft); color: var(--blue); }

.modal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; width: min(480px, 92vw); }
.modal::backdrop { background: rgb(0 0 0 / 35%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.history, .updates { list-style: none; padding: 0; margin: 12px 0 0; }
.history li, .updates li { padding: 8px 0; border-top: 1px solid var(--line); }
.history-date { display: inline-block; min-width: 120px; color: var(--muted); font-size: 13px; }
.updates p { margin: 4px 0 0; }

@media (max-width: 720px) {
  .page { padding: 16px; }
  .table { display: block; overflow-x: auto; }
}
