:root {
  --ink: #172a3a;
  --muted: #526579;
  --navy: #122b49;
  --blue: #0067b9;
  --blue-dark: #004f8e;
  --cyan: #00a6c8;
  --yellow: #ffd600;
  --paper: #ffffff;
  --wash: #f2f6f9;
  --line: #d7e0e7;
  --success: #167447;
  --danger: #b4232c;
  --warning: #8b5d00;
  --radius: 10px;
  --shadow: 0 10px 28px rgba(18, 43, 73, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font: 16px/1.55 Arial, Helvetica, sans-serif;
}
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3 { line-height: 1.15; margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.035em; margin-bottom: .5rem; }
h2 { font-size: 1.35rem; }
p { margin-top: 0; }
small { color: var(--muted); }

.skip-link { position: absolute; left: -9999px; z-index: 100; padding: 12px; background: var(--yellow); color: #000; }
.skip-link:focus { left: 12px; top: 12px; }
.site-header { background: var(--navy); color: white; border-bottom: 5px solid var(--yellow); }
.header-inner { max-width: 1240px; margin: auto; min-height: 76px; padding: 10px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; min-width: max-content; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50% 50% 50% 10%; background: var(--yellow); color: var(--navy); font-weight: 900; }
.brand strong, .brand small { display: block; color: white; line-height: 1.2; }
.brand small { font-size: .76rem; opacity: .8; margin-top: 2px; }
.primary-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.primary-nav a, .nav-button { color: white; text-decoration: none; padding: 10px 11px; border-radius: 6px; font-size: .92rem; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a.active { background: rgba(255,255,255,.14); color: white; }
.primary-nav a.active { box-shadow: inset 0 -3px var(--yellow); }
.staff-link { border: 1px solid rgba(255,255,255,.4); }
.nav-button { background: transparent; border: 1px solid rgba(255,255,255,.4); cursor: pointer; margin-left: 6px; }
.nav-button:hover { background: white; color: var(--navy); }

.page-shell { max-width: 1240px; min-height: calc(100vh - 170px); margin: auto; padding: 38px 24px 64px; }
.content-narrow { max-width: 780px; margin: auto; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.eyebrow { display: block; color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 9px; }
.lead { font-size: 1.23rem; color: var(--muted); max-width: 650px; }
.hero { display: grid; grid-template-columns: 1.35fr .85fr; gap: 36px; align-items: center; padding: 28px 0 42px; }
.hero-copy { padding: 22px 0; }
.hero-card { background: var(--navy); color: white; border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.steps li { display: flex; gap: 14px; }
.steps li > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; }
.steps strong, .steps small { display: block; color: white; }
.steps small { opacity: .76; margin-top: 3px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { box-shadow: none; border-top: 5px solid var(--cyan); }
.card-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--blue); font-weight: bold; margin-bottom: 18px; }

.button { display: inline-block; border: 0; border-radius: 6px; background: var(--blue); color: white; padding: 12px 20px; cursor: pointer; font: inherit; font-weight: 700; }
.button:hover { background: var(--blue-dark); color: white; }
.button-link { text-decoration: none; }
.secondary-button { background: #465d72; }
.small-button { padding: 8px 13px; font-size: .9rem; }
.actions { margin-top: 10px; }
.action-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.report-form { display: grid; gap: 18px; margin-top: 24px; }
.report-form label, .filter-bar label { display: block; font-weight: 700; }
.report-form input, .report-form select, .report-form textarea, .filter-bar input, .filter-bar select {
  width: 100%; margin-top: 7px; padding: 11px 12px; border-radius: 6px; border: 2px solid #9babb8; background: white; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.grid-two, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-error { display: block; color: var(--danger); margin-top: 5px; font-weight: 700; }
.checkbox-label { display: flex !important; align-items: flex-start; gap: 10px; }
.checkbox-label input { width: auto !important; margin-top: 5px !important; }
.checkbox-label span { display: inline; }

.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.flash { padding: 13px 16px; border-left: 5px solid var(--blue); background: white; box-shadow: var(--shadow); }
.flash-error { border-color: var(--danger); }.flash-warning { border-color: var(--warning); }.flash-success { border-color: var(--success); }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 20px; font-size: .9rem; color: var(--muted); }
.confirmation-panel { text-align: center; }
.confirmation-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: #daf3e6; color: var(--success); font-size: 2rem; }
.reference { padding: 15px; background: var(--wash); border-radius: 6px; font-size: 1.1rem; }
.status-result { margin-top: 20px; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(2rem, 3vw, 2.7rem); }
.dashboard-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; }
.dashboard-grid > :last-child { grid-column: 1 / -1; }
.matches-panel { margin-top: 20px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.data-table th, .data-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.data-table tbody tr:hover { background: #f7fafc; }
.inline-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-bar { display: grid; grid-template-columns: 1fr 220px auto auto; align-items: end; gap: 12px; margin-bottom: 18px; }
.filter-bar .button { margin-bottom: 0; }
.pagination { display: flex; justify-content: center; gap: 20px; align-items: center; margin-top: 22px; }
.summary-list { margin: 0; }
.summary-list div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-list dt { font-weight: 700; color: var(--muted); }.summary-list dd { margin: 0; overflow-wrap: anywhere; }
.status-badge { display: inline-block; width: max-content; border-radius: 999px; padding: 4px 9px; background: #e7edf2; color: #34485a; font-size: .75rem; font-weight: 800; text-transform: capitalize; }
.status-open, .status-logged, .status-suggested { background: #e1f0fb; color: #07588f; }
.status-matched, .status-confirmed, .status-sent { background: #fff1bf; color: #714c00; }
.status-closed, .status-returned, .status-complete { background: #daf3e6; color: #12603d; }
.status-rejected, .status-disposed, .status-failed { background: #f9dfe1; color: #8d1c24; }
.timeline-item, .case-note { padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item strong, .timeline-item small, .case-note small { display: block; }
.note-list { display: grid; gap: 10px; }.case-note { border-left: 4px solid var(--cyan); padding-left: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 20px; }
.metric { padding: 22px; }.metric span, .metric strong { display: block; }.metric strong { font-size: 1.7rem; margin-top: 7px; }

.auth-shell { max-width: 520px; margin: 30px auto; }.auth-panel { padding: 34px; }
.customer-case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.customer-case { color: inherit; display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.customer-case:hover { border-color: var(--blue); transform: translateY(-2px); }.customer-case h2 { margin: 10px 0 5px; }
.empty-state { text-align: center; grid-column: 1 / -1; }
.progress-panel { margin-top: 20px; }
.progress-track { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.progress-track li { position: relative; display: flex; gap: 10px; padding-right: 20px; color: var(--muted); }
.progress-track li::after { content: ""; position: absolute; height: 3px; background: var(--line); top: 17px; left: 40px; right: 5px; z-index: 0; }
.progress-track li:last-child::after { display: none; }
.progress-track li > span { position: relative; z-index: 1; flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--line); font-weight: 800; }
.progress-track li.complete > span, .progress-track li.complete::after { background: var(--success); color: white; }
.progress-track strong, .progress-track small { display: block; }.progress-track small { margin-top: 3px; }
.site-footer { background: var(--navy); color: white; padding: 25px 24px; }.site-footer > div { max-width: 1240px; margin: auto; display: flex; justify-content: space-between; gap: 20px; }.site-footer span { opacity: .75; }

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; }.primary-nav { order: 3; width: 100%; overflow-x: auto; margin: 0; padding-bottom: 4px; }
  .staff-nav { gap: 0; }.hero { grid-template-columns: 1fr; }.service-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }.filter-bar { grid-template-columns: 1fr 180px auto; }
}
@media (max-width: 680px) {
  .page-shell { padding: 25px 15px 45px; }.header-inner { padding: 10px 15px; }.panel { padding: 20px; }
  .grid-two, .detail-grid, .dashboard-grid, .customer-case-grid { grid-template-columns: 1fr; }
  .dashboard-grid > :last-child { grid-column: auto; }.dashboard-hero, .page-heading { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.filter-bar { grid-template-columns: 1fr; }
  .progress-track { grid-template-columns: 1fr; gap: 20px; }.progress-track li::after { width: 3px; height: auto; left: 17px; right: auto; top: 38px; bottom: -18px; }
  .summary-list div { grid-template-columns: 1fr; gap: 2px; }.site-footer > div { flex-direction: column; }
}
