:root {
  font-family: Aptos, "Segoe UI", system-ui, sans-serif;
  color: #111111; background: #f5f6f8; font-size: 14px; line-height: 1.5;
  --navy: #0F4C5C; --white: #fff; --line: #dce0e6; --muted: #596474; --soft: #edf0f4;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.skip-link { position: fixed; left: 235px; top: -80px; padding: 12px 18px; background: var(--white); z-index: 4; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; padding: 26px 16px 18px; display: flex; flex-direction: column; overflow-y: auto; background: var(--navy); color: var(--white); }
.sidebar a { color: inherit; text-decoration: none; }
.sidebar :focus-visible { outline-color: var(--white); }
.brand { padding: 0 8px; }
.brand-logo { display: block; width: 100%; min-width: 120px; height: auto; }
.brand-name { display: block; margin-top: 22px; font-size: 24px; font-weight: 700; letter-spacing: -.6px; }
.brand-company { margin: 3px 0 0; font-size: 11px; color: var(--white); }
.nav-list { display: grid; gap: 5px; margin: 24px 0; }
.nav-heading { margin: 8px 12px 6px; color: var(--line); font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; }
.nav-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.nav-list svg { flex: none; }
.nav-list a:hover, .nav-list a[aria-current] { background: var(--white); color: var(--navy); }
.account { margin-top: auto; border-top: 1px solid #596474; padding: 18px 8px 0; overflow-wrap: anywhere; }
.account strong, .account > span { display: block; }
.account strong { font-size: 12px; }
.account > span { margin-top: 4px; color: var(--line); font-size: 11px; }
.account button { display: flex; justify-content: space-between; width: 100%; margin-top: 14px; border-color: #7b8492; background: transparent; color: var(--white); }
.account button:hover { background: var(--white); color: var(--navy); }
.app { margin-left: 220px; }
.topbar { min-height: 72px; padding: 16px 30px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 12px; }
.fixture { border: 1px solid var(--line); border-radius: 4px; padding: 5px 9px; }
main { max-width: 1760px; margin: auto; padding: 28px 30px 40px; }
h1 { margin: 4px 0 8px; font-size: 29px; line-height: 1.25; letter-spacing: -.65px; }
h2 { font-size: 18px; line-height: 1.35; margin: 0 0 12px; }
h3 { font-size: 15px; }
p { color: var(--muted); line-height: 1.6; margin: 10px 0 18px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; margin: 24px 0; }
.card { display: block; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); text-decoration: none; color: var(--navy); }
main > .card + .card, main > section + section { margin-top: 18px; }
.card > :last-child { margin-bottom: 0; }
.product-card { display: flex; flex-direction: column; align-items: start; overflow-wrap: anywhere; }
.product-card h2 { margin: 10px 0 0; }
.product-card .text-link { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 12px; }
.product-card:hover, .order-row:hover { border-color: #7b8492; }
.login { max-width: 440px; margin: 40px auto; padding: 30px; }
label { display: block; margin: 18px 0 6px; font-size: 13px; font-weight: 600; }
input, select { width: 100%; min-height: 40px; border: 1px solid #7b8492; border-radius: 4px; padding: 9px 11px; font: inherit; color: var(--navy); background: var(--white); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--navy); }
button { cursor: pointer; border: 1px solid #7b8492; border-radius: 5px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--navy); background: var(--white); }
button:hover { background: var(--soft); }
.primary { background: var(--navy); color: var(--white); border-color: var(--navy); margin-top: 22px; }
.primary:hover { background: var(--navy); text-decoration: underline; }
.login .primary { width: 100%; }
button:disabled { opacity: .55; cursor: default; }
.record-form { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
.record-form summary { cursor: pointer; font-weight: 600; }
.record-form fieldset { margin: 24px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.product-history { padding-left: 20px; }
.product-history li { padding: 8px 0; }
.status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; color: #4e5a6b; background: #eef0f3; }
.status svg, .status > [aria-hidden] { flex: none; }
:is(.status, .status-banner):is(.ready, .done, .released) { color: #17613c; background: #eaf5ed; }
:is(.status, .status-banner):is(.waiting, .hold, .withdrawn) { color: #7a4800; background: #fff5df; }
:is(.status, .status-banner):is(.blocked, .held, .refused) { color: #a4252b; background: #fff0f0; }
:is(.status, .status-banner):is(.neutral, .dispatched, .sent, .filed, .not_started) { color: #4e5a6b; background: #eef0f3; }
.status-banner { border: 1px solid currentColor; padding: 18px 22px; border-radius: 7px; margin: 24px 0; overflow-wrap: anywhere; }
.status-banner h2 { margin-top: 0; }
.status-banner p { color: inherit; }
.error { color: var(--navy); background: var(--soft); border-left: 3px solid var(--navy); border-radius: 4px; padding: 12px; overflow-wrap: anywhere; }
.filters, .row-heading, .check-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters { margin: 22px 0; }
.filters a { padding: 8px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 5px; text-decoration: none; font-size: 13px; }
.filters a[aria-current] { color: var(--white); background: var(--navy); border-color: var(--navy); }
.order-list, .order-sections { display: grid; gap: 16px; }
.row-heading h2, .row-heading h3 { margin: 0; }
.row-heading .status { margin-left: auto; }
.reference { font-variant-numeric: tabular-nums; font-weight: 600; }
.check-summary { list-style: none; padding: 0; font-size: 12px; color: var(--muted); }
.order-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin: 24px 0; align-items: start; }
.order-columns > * { min-width: 0; }
.check { border-top: 1px solid var(--line); padding: 16px 0; }
.check p { font-size: 13px; }
dl { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px 16px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
address { font-style: normal; line-height: 1.6; }
li { line-height: 1.6; overflow-wrap: anywhere; }
small { color: var(--muted); }
.recipient-layout { display: grid; grid-template-columns: 1.6fr 1fr; align-items: start; gap: 22px; margin-top: 24px; }
.recipient-layout > * { min-width: 0; }
.table-scroll { overflow-x: auto; }
.recipient-matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.recipient-matrix th, .recipient-matrix td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.recipient-matrix thead th { background: #f5f6f8; }
.recipient-matrix td[data-value="source"] { font-weight: 600; }
.recipient-matrix td[data-value="none"] { color: var(--muted); }
.matrix-legend { font-size: 12px; }
.broker-preview dl { display: block; }
.broker-preview dt { margin-top: 12px; }
.broker-preview dd > dl { border-left: 2px solid var(--line); padding-left: 12px; }
.broker-preview ol { padding-left: 20px; }
.review-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.review-heading > span { font-size: 12px; color: var(--muted); }
.review-queue { border: 1px solid var(--line); border-radius: 8px; background: var(--white); overflow: hidden; margin-top: 24px; }
.queue-tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.queue-tabs a { display: flex; gap: 8px; align-items: center; padding: 16px 2px 13px; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--muted); }
.queue-tabs a[aria-current] { color: var(--navy); border-bottom-color: var(--navy); }
.queue-tabs span { padding: 1px 6px; border-radius: 3px; background: var(--soft); font-size: 11px; }
.queue-tabs a[aria-current] span { color: var(--white); background: var(--navy); }
.review-columns, .review-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(150px, 1.2fr) 100px minmax(240px, 2.8fr); gap: 18px; padding: 16px 20px; }
.review-columns { background: #f5f6f8; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.review-orders { list-style: none; margin: 0; padding: 0; }
.review-orders > li { border-top: 1px solid var(--line); }
.review-row { text-decoration: none; align-items: start; font-size: 13px; }
.review-row:hover { background: #f5f6f8; }
.review-row:focus-visible { outline-offset: -3px; }
.review-row > * { min-width: 0; overflow-wrap: anywhere; }
.review-row h2 { font: inherit; font-weight: 700; margin: 0; }
.review-open, .review-line { color: var(--muted); font-size: 12px; }
.review-line { display: block; }
.review-row time { font-size: 12px; font-variant-numeric: tabular-nums; }
.review-waiting { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.review-waiting li + li { margin-top: 8px; }
.review-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.review-empty { padding: 24px; color: var(--muted); }
.review-help { font-size: 12px; margin-top: 16px; }
@media (max-width: 1200px) { .recipient-layout { grid-template-columns: 1fr; } }
@media (max-width: 1000px) {
  main, .topbar { padding-left: 20px; padding-right: 20px; }
  .order-columns { grid-template-columns: 1fr; }
  .review-columns, .review-row { grid-template-columns: 100px 130px 85px minmax(180px, 1fr); gap: 12px; padding: 14px; }
}
@media (max-width: 850px) {
  .sidebar { position: static; width: auto; padding: 18px; }
  .brand { max-width: 220px; padding: 0; }
  .brand-name { margin-top: 10px; }
  .nav-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0; }
  .nav-heading { width: 100%; margin-left: 0; }
  .account { padding: 12px 0 0; }
  .account button { width: auto; gap: 24px; }
  .app { margin-left: 0; }
  .skip-link { left: 16px; }
}
@media (max-width: 650px) {
  main { padding: 22px 16px; }
  h1 { font-size: 26px; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 10px; }
  .card { padding: 18px; }
  .review-columns { display: none; }
  .review-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .review-row > :last-child { grid-column: 1 / -1; }
  .review-label { position: static; display: block; width: auto; height: auto; clip-path: none; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
}
