:root {
  --blue: #1264a3;
  --navy: #102a43;
  --gold: #f6b800;
  --bg: #f5f7fa;
  --line: #dfe5ec;
  --muted: #6b7a8c;
  --text: #182b3a;
  --red: #cf3346;
}

* { box-sizing: border-box; }

body {
  background: #f5f7fa;
  color: var(--text);
  font-family: Aptos, "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  border-bottom: 1px solid #e5eaf0;
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 12px rgba(16,42,67,.05);
}

.topbar-inner {
  height: 72px;
  max-width: 1440px;
  padding: 0 28px;
}

.brand img { height: 36px; }
.brand-copy { margin-left: 15px; padding-left: 15px; }
.brand-copy strong { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.brand-copy span { font-size: 9px; font-weight: 600; letter-spacing: .11em; }
.sync { font-size: 11px; font-weight: 600; padding: 7px 11px; }
.user-badge { background: #f0f4f8; padding: 5px 10px; }
.user-badge strong { font-size: 11px; font-weight: 700; }

main {
  max-width: 1440px;
  padding: 24px 28px 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  margin-bottom: 18px;
  padding: 28px 30px;
  border-radius: 20px;
  background: linear-gradient(120deg, #102a43 0%, #145c91 70%, #1975b8 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(16,42,67,.16);
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 48px solid rgba(255,255,255,.045);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }
.eyebrow { color: #8fd0ff; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.hero h1 { margin: 8px 0 7px; font-size: clamp(28px, 3vw, 38px); font-weight: 720; letter-spacing: -.035em; }
.hero p { color: rgba(255,255,255,.72); font-size: 13px; }
.hero-actions { gap: 10px; }
.hero-actions {
  align-items: flex-end;
  padding-top: 4px;
  overflow: visible;
}
.hero-actions label {
  display: flex;
  min-width: 168px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
  white-space: nowrap;
}
.hero-actions select, .hero-actions input {
  width: 100%;
  min-width: 168px;
  height: 40px;
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.96);
  color: #17324a;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(5,24,41,.12);
}
.hero .primary {
  height: 40px;
  margin-top: 0;
  background: #f6b800;
  color: #2e2600;
  box-shadow: 0 8px 20px rgba(246,184,0,.22);
}

.metrics { gap: 12px; margin-bottom: 18px; }
.metrics article {
  min-height: 92px;
  padding: 17px 19px;
  border: 1px solid #e2e8ef;
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(16,42,67,.045);
}
.metrics span { color: #718096; font-size: 11px; font-weight: 600; }
.metrics b { margin-top: 5px; font-size: 28px; font-weight: 720; letter-spacing: -.03em; }
.metrics i { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }

.tabs {
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid #e1e7ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16,42,67,.04);
}
.tabs button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: transparent;
  color: #667789;
  font-size: 11px;
  font-weight: 650;
}
.tabs button:hover { background: #f2f5f8; }
.tabs button.active { background: #1264a3; color: #fff; box-shadow: 0 4px 10px rgba(18,100,163,.18); }

.board {
  border: 1px solid #dfe6ed;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(16,42,67,.065);
}
.board-head { min-height: 76px; padding: 16px 20px; background: #fff; }
.board-kicker { color: #2376b5; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.board-head h2 { margin-top: 3px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.search { border-color: #dce3ea; background: #f8fafc; }
.search input { width: min(320px, 34vw); background: transparent; color: #334e68; font-family: inherit; }
.tools button { border-color: #dce3ea; background: #f8fafc; color: #526b80; }
.tools .export-btn { width: auto; padding: 0 13px; font: 700 12px/1 "Segoe UI", Arial, sans-serif; white-space: nowrap; }
.hero-actions input[readonly] { background: #f3f6f9; color: #425b70; cursor: default; }

.filters { min-height: 52px; align-items: center; padding: 9px 18px; background: #fbfcfd; }
.filters button { padding: 7px 11px; background: transparent; color: #718096; font-weight: 600; }
.filters button:hover { background: #edf3f8; }
.filters button.active { background: #e7f1f9; color: #1264a3; }

.order-row {
  min-height: 92px;
  padding: 17px 20px;
  grid-template-columns: minmax(260px,1.25fr) minmax(130px,.75fr) minmax(155px,.75fr) 160px 18px;
  gap: 18px;
  border-bottom-color: #e9edf2;
}
.order-row:hover { background: #f7fafc; }
.code {
  color: #0d5b96;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}
.customer { margin-top: 7px; color: #334e68; font-size: 13px; font-weight: 500; }
.sub { color: #8291a2; font-size: 10px; }
.cell-label { color: #99a5b2; font-size: 8px; font-weight: 650; }
.cell-value { color: #425b70; font-size: 11px; font-weight: 600; }
.tag { margin-left: 7px; font-weight: 650; }
.status { padding: 5px 9px; font-weight: 650; }

.order-row.needs-action { background: #fff9df; border-left: 4px solid #eab308; box-shadow: none; }
.order-row.needs-action:hover { background: #fff5ca; }
.action-flag { background: #f2c94c; color: #483800; font-weight: 700; }
.order-row.warehouse-late, .order-row.warehouse-late:hover { background: #fff0f1; border-left: 4px solid #cf3346; box-shadow: none; }
.order-row.handoff-late { background: #fff0f1; border-left: 4px solid #cf3346; }
.order-row.complete-order,
.order-row.complete-order:hover {
  background: #f1f3f5;
  color: #7d8793;
  opacity: .72;
  filter: saturate(.3);
}

.primary { border-radius: 10px; font-family: inherit; font-weight: 700; }
.modal { border-radius: 20px; box-shadow: 0 24px 70px rgba(16,42,67,.24); }
.modal h2 { font-size: 22px; font-weight: 720; letter-spacing: -.02em; }
.form-grid label, .login-modal label { font-weight: 650; }
.form-grid input, .form-grid select, .form-grid textarea, .login-modal input { font-family: inherit; border-color: #dce3ea; }
.drawer h2 { font-weight: 720; letter-spacing: -.02em; }
.drawer-code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 14px; font-weight: 700; }

@media (max-width: 900px) {
  main { padding: 18px 18px 42px; }
  .hero { align-items: flex-start; padding: 24px; }
  .order-row { grid-template-columns: minmax(220px,1.2fr) minmax(130px,.8fr) 145px 18px; }
}

@media (max-width: 720px) {
  .topbar-inner { padding: 0 16px; }
  main { padding: 14px 14px 38px; }
  .hero { border-radius: 16px; padding: 22px 18px; }
  .hero-actions { margin-top: 8px; }
  .hero-actions label { min-width: 0; }
  .hero-actions select, .hero-actions input { min-width: 0; }
  .metrics { gap: 8px; }
  .metrics article { min-height: 82px; padding: 13px; }
  .metrics b { font-size: 24px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; }
  .board { border-radius: 15px; }
  .search input { width: calc(100% - 22px); }
  .order-row { min-height: 84px; padding: 15px 16px; }
}

/* Readability pass for counter and warehouse displays. */
body { font-size: 16px; }
.hero-actions label { font-size: 12px; }
.hero-actions select, .hero-actions input { font-size: 14px; }
.hero .primary { font-size: 13px; }
.metrics span { font-size: 12px; }
.metrics b { font-size: 30px; }
.tabs button { font-size: 13px; }
.board-head h2 { font-size: 20px; }
.search input { font-size: 14px; }
.filters button { font-size: 12px; }
.order-row { min-height: 108px; }
.code {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: .01em;
}
.customer { font-size: 15px; }
.sub { font-size: 12px; }
.cell-label { font-size: 13px; }
.cell-value { font-size: 15px; }
.tag { font-size: 10px; }
.status { font-size: 13px; }
.action-flag { font-size: 10px; }
.form-grid label, .login-modal label { font-size: 12px; }
.form-grid input, .form-grid select, .form-grid textarea, .login-modal input { font-size: 14px; }
