@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600;700;800&display=swap');

:root {
  --color-bg: #F6F7F9;
  --color-surface: #fff;
  --color-border: #E7E9EF;
  --color-border-strong: #DBDFE7;
  --color-text: #1A1D23;
  --color-text-2: #4A5266;
  --color-text-3: #7A8296;
  --color-text-4: #9AA1B2;
  --color-text-5: #B7BCC9;
  --color-primary: #2F5FDB;
  --color-primary-hover: #2854C4;
  --color-primary-soft: #EAF0FE;
  --color-success: #1E8E5A;
  --color-success-soft: #E7F7EE;
  --color-danger: #C0392B;
  --color-danger-soft: #FBEAEA;
  --color-warning: #B7791F;
  --color-warning-soft: #FFF4E0;
  --shadow-sm: 0 1px 2px rgba(20,30,60,.04), 0 1px 1px rgba(20,30,60,.03);
  --shadow-md: 0 2px 10px rgba(20,30,60,.06), 0 1px 2px rgba(20,30,60,.04);
  --shadow-lg: 0 10px 28px rgba(20,30,60,.09), 0 2px 6px rgba(20,30,60,.05);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.45;
}
::selection { background: rgba(47,95,219,.18); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
button { cursor: pointer; transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease, transform .08s ease, opacity .15s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,95,219,.25); }
input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(47,95,219,.12); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 28px 60px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 32px 28px 60px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand-name { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.role-badge { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--color-primary); background: var(--color-primary-soft); padding: 3px 8px; border-radius: 5px; text-transform: uppercase; }
.topbar .user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--color-text-2); }

.card {
  background: var(--color-surface);
  border: 1.5px solid #C7CCDA;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(20,30,60,.10), 0 1px 3px rgba(20,30,60,.08);
  padding: 24px 26px;
}
.eyebrow { font-size: 11px; font-weight: 700; color: var(--color-text-3); text-transform: uppercase; letter-spacing: .07em; }
h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.015em; }
.sub { margin: 4px 0 0; font-size: 13.5px; color: var(--color-text-3); }

.btn { display: inline-flex; align-items: center; gap: 7px; border: none; border-radius: 9px; padding: 11px 18px; font-size: 14px; font-weight: 700; letter-spacing: -.005em; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 1px 3px rgba(47,95,219,.22); }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); box-shadow: 0 4px 12px rgba(47,95,219,.3); }
.btn-dark { background: var(--color-text); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-outline { background: #fff; color: var(--color-text-2); border: 1px solid var(--color-border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--color-bg); border-color: var(--color-text-5); }
.btn-link { background: none; border: none; color: var(--color-primary); font-weight: 700; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 700; color: var(--color-text-3); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea { border: 1px solid var(--color-border-strong); border-radius: 8px; padding: 10px 12px; }
.field textarea { resize: vertical; min-height: 60px; }

/* Hide native number-input spinner arrows app-wide so number fields (parcel
   weight/pcs/fees, rate amounts, etc.) match the flat look of every other
   input instead of showing the browser's default up/down buttons (2026-09-09,
   per the user flagging the order-edit page "looking off"). Arrow-key
   increment/decrement and the mobile numeric keypad still work — only the
   visible spin buttons are removed. */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pill { font-size: 12px; font-weight: 700; padding: 5px 11px 5px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; flex: 0 0 auto; }
.badge-high { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--color-warning); background: var(--color-warning-soft); padding: 4px 9px; border-radius: 20px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-3); font-size: 12.5px; font-weight: 700; margin-bottom: 16px; transition: color .12s ease; }
.back-link:hover { color: var(--color-text-2); }

.error-box { background: var(--color-danger-soft); border: 1px solid #F3C9C9; color: #7A2020; border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.hint-box { background: var(--color-warning-soft); border-radius: 9px; padding: 11px 14px; font-size: 12.5px; color: #8A5A15; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1.5px solid #C7CCDA;
  border-radius: 12px;
  padding: 16px 18px 16px 20px;
  box-shadow: 0 3px 10px rgba(20,30,60,.08), 0 1px 2px rgba(20,30,60,.06);
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-primary); opacity: .85; }
.stat-card:hover { box-shadow: 0 6px 20px rgba(20,30,60,.12), 0 2px 4px rgba(20,30,60,.08); transform: translateY(-1px); }
.stat-card:nth-child(4)::before, .stat-card:nth-child(5)::before { background: var(--color-success); }
.stat-value { font-size: 22px; font-weight: 800; display: block; margin-top: 8px; letter-spacing: -.01em; }
.stat-label { font-size: 11.5px; color: var(--color-text-3); font-weight: 600; }

.type-cards { display: flex; gap: 16px; }
.type-card { flex: 1; background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: 14px; padding: 24px 22px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.type-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.type-card button { all: unset; display: block; width: 100%; cursor: pointer; }

.row-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px solid #EEF0F4; background: var(--color-surface); border-radius: 10px; transition: border-color .15s ease, background-color .15s ease; }
.row-card.clickable:hover { border-color: var(--color-primary); background: #FAFBFF; }

table.simple { width: 100%; border-collapse: collapse; }
table.simple th { text-align: left; font-size: 10.5px; font-weight: 700; color: var(--color-text-4); text-transform: uppercase; letter-spacing: .05em; padding: 9px 10px; border-bottom: 1px solid var(--color-border); background: #FAFBFC; }
table.simple thead th:first-child { border-top-left-radius: 8px; }
table.simple thead th:last-child { border-top-right-radius: 8px; }
table.simple td { padding: 11px 10px; font-size: 13.5px; border-bottom: 1px solid #F3F4F7; vertical-align: top; }
table.simple tbody tr { transition: background-color .12s ease; }
table.simple tbody tr:hover { background: #FAFBFF; }

details { border-radius: 10px; overflow: hidden; }
details > summary { transition: background-color .12s ease; }
details > summary:hover { background: #FAFBFF; }

.ship-progress-track { height: 6px; border-radius: 999px; background: #EEF0F4; overflow: hidden; }
.ship-progress-fill { height: 100%; border-radius: 999px; background: var(--color-primary); transition: width .6s ease; }

.orders-menu-item:hover { background: #F1F3F7; }
.orders-page-prev:not(:disabled):hover,
.orders-page-next:not(:disabled):hover { background: #F1F3F7; }
.orders-menu-toggle:hover { background: #F1F3F7; }
