/* SM Tours and Travels - office system styles.
   Design: deep harbour navy for structure, luggage-tag amber as the single accent, and one fixed colour per
   place a parcel can be (used everywhere kg are split). Motion answers actions; it is switched off for people
   who ask their device for reduced motion. */
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/instrument-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/instrument-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  color-scheme: light;
  --ink: #10222f;
  --ink-2: #33475a;
  --muted: #5d6f7e;
  --line: #dce3e9;
  --line-2: #e9eef2;
  --bg: #f2f5f7;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --harbour: #0d2b3e;         /* structure: sidebar, primary buttons */
  --harbour-2: #1a4a66;
  --primary: #0d2b3e;
  --primary-hover: #17455f;
  --primary-ink: #ffffff;
  --link: #1a4a66;
  --tag: #f0a030;             /* the accent */
  --tag-ink: #3a2708;
  --tag-soft: #fff3de;
  --tag-line: #f3d9a8;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --danger-ink: #8a1d16;
  --ok: #1f8a4c;
  --focus: rgba(240,160,48,.45);

  --c-amber: #d98a11;  --bg-amber: #fdf0d9;  --fg-amber: #7a4d06;    /* origin warehouse */
  --c-violet: #7a5fd0; --bg-violet: #efeafc; --fg-violet: #47339a;   /* assigned to a flight */
  --c-blue: #2b7bd0;   --bg-blue: #e3eefb;   --fg-blue: #17508f;     /* on the flight */
  --c-teal: #14958a;   --bg-teal: #dcf3ef;   --fg-teal: #0c5f56;     /* destination warehouse */
  --c-cyan: #0f7f9c;   --bg-cyan: #daf0f6;   --fg-cyan: #0a5468;     /* out for delivery */
  --c-green: #2c9450;  --bg-green: #def3e5;  --fg-green: #1a6534;    /* delivered */
  --c-grey: #8593a0;   --bg-grey: #eaeef2;   --fg-grey: #4c5a66;
  --bg-red: #fdecea;   --fg-red: #8a1d16;

  --shadow-1: 0 1px 2px rgba(13,43,62,.06), 0 1px 1px rgba(13,43,62,.03);
  --shadow-2: 0 10px 30px -8px rgba(13,43,62,.22), 0 2px 6px rgba(13,43,62,.06);
  --radius: 10px;
  --radius-sm: 8px;
  --display: "Bricolage Grotesque", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eff5; --ink-2: #c5d3de; --muted: #8fa4b4;
  --line: #24384a; --line-2: #1c2f3e;
  --bg: #0a151d; --surface: #112330; --surface-2: #152b3a;
  --harbour: #07111a; --harbour-2: #2f7aa8;
  --primary: #2d7bab; --primary-hover: #3a8cbf; --primary-ink: #fff;
  --link: #7ec0ea;
  --tag-soft: #33260d; --tag-line: #5a4213;
  --danger: #ef6b5d; --danger-soft: #3a1a17; --danger-ink: #ffb3aa;
  --ok: #4cc27d;
  --focus: rgba(240,160,48,.5);
  --bg-amber: #3a2a0c;  --fg-amber: #f4c576;
  --bg-violet: #2a2247; --fg-violet: #c2b3f5;
  --bg-blue: #14304f;   --fg-blue: #9ccbf5;
  --bg-teal: #0f3733;   --fg-teal: #7fdccf;
  --bg-cyan: #0d3542;   --fg-cyan: #8ad8ee;
  --bg-green: #133823;  --fg-green: #8fdcab;
  --bg-grey: #1e3140;   --fg-grey: #a9bac7;
  --bg-red: #3a1a17;    --fg-red: #ffb3aa;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 14px 34px -8px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s; }
body.no-scroll { overflow: hidden; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; margin: 0; font-family: var(--display); }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 14.5px; font-weight: 650; }
:focus-visible { outline: 2px solid var(--tag); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--tag); color: var(--tag-ink); }
.i { width: 18px; height: 18px; flex: none; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }

/* ================================================================ layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: none; background: var(--harbour); color: #cbd9e5; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 20px; display: flex; flex-direction: column; }
.side-title { color: #8fa9bc; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 12px 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 11px; color: #c3d2de; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-weight: 500; transition: background .15s, color .15s, transform .15s; }
.sidebar nav a .i { opacity: .8; transition: transform .2s var(--ease), opacity .15s; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a:hover .i { transform: translateX(1px) scale(1.06); opacity: 1; }
.sidebar nav a.active { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tag); animation: barIn .3s var(--ease); }
.sidebar nav a.active .i { color: var(--tag); opacity: 1; }
.side-back { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px; color: #86a1b5; font-size: 13px; text-decoration: none; border-top: 1px solid rgba(255,255,255,.09); border-radius: 0; transition: color .15s; }
.side-back:hover { color: #fff; }
body.home-mode .sidebar, body.home-mode .menu-btn { display: none !important; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 9px 26px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; line-height: 1.1; flex: none; }
.brand-name { max-width: 170px; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--tag); color: var(--tag-ink); font-weight: 800; font-size: 13px; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, var(--shadow-1); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sec-tabs { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.sec-tabs a { display: flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s, box-shadow .15s; }
.sec-tabs a:hover { color: var(--ink); }
.sec-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.sec-tabs a.on .i { color: var(--tag); }
.zones { display: flex; gap: 12px; margin-left: auto; font-size: 12px; color: var(--muted); line-height: 1.15; }
.zones div { display: flex; flex-direction: column; align-items: flex-start; }
.zones b { font: 700 15px/1.1 var(--display); color: var(--ink); letter-spacing: .01em; }
.zones i { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; }
.quick { flex: 0 1 300px; position: relative; }
.quick .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.quick input { width: 100%; padding-left: 36px; border-radius: 10px; background: var(--bg); }
.quick kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--surface); pointer-events: none; }
.quick input:focus + kbd { opacity: 0; }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 3px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); transition: border-color .15s, background .15s; }
.user-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--harbour); color: #fff; font-size: 12px; font-weight: 700; }
[data-theme="dark"] .avatar { background: var(--tag); color: var(--tag-ink); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 210px; box-shadow: var(--shadow-2); padding: 6px; transform-origin: top right; animation: pop .16s var(--ease); z-index: 30; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: none; border-radius: 8px; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: var(--bg); }
.user-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.user-menu .i { color: var(--muted); }
.menu-btn { display: none; }
main { padding: 26px 28px 56px; max-width: 1320px; width: 100%; }
main:focus, main:focus-visible { outline: none; }
.view-in { animation: viewIn .32s var(--ease) both; }
.scrim { display: none; }
@media (max-width: 1180px) { .zones { display: none; } .quick { margin-left: auto; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 8px 0 30px rgba(0,0,0,.3); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,18,26,.5); z-index: 30; animation: fade .2s; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand-name, .quick { display: none; }
  .sec-tabs a { padding: 6px 9px; }
  .sec-tabs a .i { display: none; }
  .user { margin-left: auto; }
  .user-btn .un { display: none; }
  .user-btn { padding: 3px; }
  main { padding: 18px 14px 44px; }
}

/* ================================================================ page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { margin: 5px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 6px; transition: color .15s, transform .15s; }
.crumb:hover { color: var(--ink); transform: translateX(-2px); }

/* ================================================================ buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1); transition: transform .12s var(--ease), border-color .15s, background .15s, box-shadow .15s, filter .15s; }
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.accent { background: var(--tag); border-color: var(--tag); color: var(--tag-ink); }
.btn.accent:hover { filter: brightness(1.06); background: var(--tag); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); background: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--bg); }
.btn.small { min-height: 30px; padding: 4px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { min-height: 48px; padding: 10px 22px; font-size: 15px; border-radius: 11px; }
.btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--primary-ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.accent):not(.danger).busy::after { border-color: var(--ink); border-right-color: transparent; }
.icon-btn { display: inline-grid; place-items: center; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; transition: background .15s, color .15s, transform .15s; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 11px; min-height: 40px; width: 100%; transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--line)); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; accent-color: var(--primary); }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tag); box-shadow: 0 0 0 3px var(--focus); }
input[type=file] { padding: 6px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
@media (max-width: 700px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 12px; cursor: pointer; font-weight: 500; }
.form-error { display: flex; gap: 8px; color: var(--danger-ink); background: var(--danger-soft); border-radius: var(--radius-sm); padding: 9px 12px; margin: 8px 0 0; animation: shake .35s; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { width: auto; min-width: 180px; flex: 0 1 260px; }

/* ================================================================ surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow-1); }
.panel > h2 { margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .cols, .cols.even { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 8px; }

/* ================================================================ tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.panel .table-wrap { border: 0; border-radius: 0; margin: 0 -20px; box-shadow: none; }
table.t { width: 100%; border-collapse: collapse; }
.t th, .t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.t th { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
.t tr:last-child td { border-bottom: 0; }
.t td.num, .t th.num { text-align: right; white-space: nowrap; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: color-mix(in srgb, var(--tag) 7%, var(--surface)); }
.t tbody tr.clickable { cursor: pointer; }
.t tbody tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--tag); }
.t tfoot td { font-weight: 650; background: var(--surface-2); }
.t td a { font-weight: 600; text-decoration: none; }
.t td a:hover { text-decoration: underline; }
tr.sub td { color: var(--muted); padding-left: 28px; font-size: 13px; }
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; background: var(--bg); display: block; }
.due { color: var(--danger); font-weight: 650; }

/* ================================================================ pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--bg-grey); color: var(--fg-grey); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill[data-live]::before { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.pill.amber { background: var(--bg-amber); color: var(--fg-amber); }
.pill.violet { background: var(--bg-violet); color: var(--fg-violet); }
.pill.blue { background: var(--bg-blue); color: var(--fg-blue); }
.pill.teal { background: var(--bg-teal); color: var(--fg-teal); }
.pill.teal-strong { background: var(--c-teal); color: #fff; }
.pill.cyan { background: var(--bg-cyan); color: var(--fg-cyan); }
.pill.green { background: var(--bg-green); color: var(--fg-green); }
.pill.grey { background: var(--bg-grey); color: var(--fg-grey); }
.pill.red { background: var(--bg-red); color: var(--fg-red); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--c-amber); color: var(--fg-amber); border-radius: 5px; padding: 0 5px; margin-left: 5px; vertical-align: 1px; }

/* ================================================================ the split bar: where every kg of a product is */
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line-2); gap: 2px; min-width: 120px; }
.seg { display: block; min-width: 4px; transform-origin: left; animation: growX .7s var(--ease) both; }
.seg.amber, .dot.amber { background: var(--c-amber); }
.seg.violet, .dot.violet { background: var(--c-violet); }
.seg.blue, .dot.blue { background: var(--c-blue); }
.seg.teal, .dot.teal { background: var(--c-teal); }
.seg.cyan, .dot.cyan { background: var(--c-cyan); }
.seg.green, .dot.green { background: var(--c-green); }
.split-legend { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.product-card { display: grid; grid-template-columns: 68px 1fr auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-2); align-items: start; }
.product-card:first-of-type { border-top: 0; }
.product-card img, .product-card .noimg { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.product-card .noimg { display: grid; place-items: center; color: var(--c-grey); }
.product-card h3 { font-size: 15.5px; }
.alloc-list { margin: 9px 0 0; padding: 0; list-style: none; font-size: 13px; }
.alloc-list li { padding: 3px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .product-card { grid-template-columns: 52px 1fr; } .product-card img, .product-card .noimg { width: 52px; height: 52px; } .product-card > .pc-actions { grid-column: 1 / -1; } }

/* ================================================================ staff parcel timeline */
.stages { list-style: none; margin: 0; padding: 0; }
.stages li { position: relative; padding: 0 0 16px 30px; }
.stages li::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.stages li:last-child::before { display: none; }
.stages li i { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-grey); background: var(--surface); }
.stages li.done i { background: var(--c-green); border-color: var(--c-green); }
.stages li.partial i { background: linear-gradient(90deg, var(--c-amber) 50%, var(--surface) 50%); border-color: var(--c-amber); }
.stages li.pending { color: var(--muted); }
.stages small { display: block; color: var(--muted); }

/* ================================================================ dashboard bits */
.dash-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1080px) { .dash-cards { grid-template-columns: 1fr; } }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.figures { display: flex; gap: 8px 26px; flex-wrap: wrap; margin-bottom: 14px; }
.figures div b { display: block; font: 700 24px/1.15 var(--display); letter-spacing: -.02em; }
.figures div span { font-size: 12.5px; color: var(--muted); }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { border-top: 1px solid var(--line-2); }
.tasks li:first-child { border-top: 0; }
.tasks a { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 11px 4px; text-decoration: none; color: var(--ink); border-radius: 8px; transition: background .12s, padding .15s; }
.tasks a:hover { background: var(--surface-2); padding-left: 10px; }
.tasks a:hover b { text-decoration: underline; }
.tasks .lv { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--c-blue); }
.tasks .lv.warn { background: var(--c-amber); }
.tasks .lv.danger { background: var(--danger); animation: pulse 1.8s ease-in-out infinite; }
.tasks small { display: block; color: var(--muted); }

.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .sum-grid { grid-template-columns: 1fr 1fr; } }
.sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.sum::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.sum.pos::after { background: var(--ok); }
.sum.neg::after { background: var(--danger); }
.sum span { font-size: 12.5px; color: var(--muted); }
.sum b { display: block; font: 700 22px/1.25 var(--display); letter-spacing: -.02em; }
.sum.pos b { color: var(--ok); }
.sum.neg b { color: var(--danger); }
.totals { margin-left: auto; min-width: 270px; }
.totals div { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 9px; font-weight: 700; font-size: 15px; }

.meter { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 90px; }
.meter i { display: block; height: 100%; background: var(--c-violet); border-radius: 4px; transform-origin: left; animation: growX .8s var(--ease) both; }
.meter.full i { background: var(--c-green); }
.meter.over i { background: var(--danger); }

.prow { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 3px; margin-bottom: 12px; background: var(--surface-2); animation: pop .22s var(--ease); }
.prow-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.prow-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 800px) { .prow-grid { grid-template-columns: 1fr 1fr; } .prow-grid .wide { grid-column: 1 / -1; } }
.img-pick { display: flex; align-items: center; gap: 10px; }
.img-pick img { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.img-prev { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.img-pick input[type=file] { max-width: 260px; min-height: 0; padding: 6px; }
.line-total { font: 700 15px var(--display); padding-top: 30px; }

.picker { position: relative; }
.picker-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 5px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); max-height: 290px; overflow-y: auto; padding: 4px; animation: pop .14s var(--ease); transform-origin: top; }
.picker-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; border-radius: 8px; }
.picker-list button:hover { background: var(--bg); }
.picker-list button span { color: var(--muted); }
.picker-list .add { color: var(--link); font-weight: 650; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 3px; }
.picker-list .none { padding: 10px 12px; color: var(--muted); }

/* ================================================================ modal + toast */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(8,18,26,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 12px; overflow-y: auto; animation: fade .18s; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 540px; box-shadow: var(--shadow-2); animation: modalIn .26s var(--ease); }
.modal.wide { max-width: 840px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal header h2 { font-size: 18px; }
.modal-body { padding: 18px 20px 6px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast { position: relative; display: flex; align-items: center; gap: 10px; background: var(--harbour); color: #fff; padding: 11px 16px 11px 13px; border-radius: 12px; box-shadow: var(--shadow-2); max-width: 400px; overflow: hidden; animation: toastIn .3s var(--ease); }
[data-theme="dark"] .toast { background: #1b3548; }
.toast .i { color: #7fe0a4; }
.toast.error { background: var(--danger); }
.toast.error .i { color: #fff; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.4); transform-origin: left; animation: shrink var(--life, 3s) linear forwards; }
.toast.out { animation: toastOut .2s ease forwards; }

/* ================================================================ misc */
.empty { text-align: center; color: var(--muted); padding: 44px 18px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .empty-ic { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; background: var(--bg); color: var(--muted); }
.empty .empty-ic .i { width: 26px; height: 26px; }
.empty.error { color: var(--danger); }
.empty p { margin: 0 0 12px; }
.loading { padding: 6px 0; }
.sk { height: 16px; border-radius: 8px; margin-bottom: 12px; background: linear-gradient(90deg, var(--line-2) 25%, var(--surface-2) 37%, var(--line-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk.h { height: 30px; width: 40%; margin-bottom: 22px; }
.sk.card { height: 120px; border-radius: var(--radius); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 13px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--muted); text-decoration: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--ink); font-weight: 650; border-bottom-color: var(--tag); }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px 3px; margin-bottom: 10px; }
.perm-group h3 { font-size: 13px; margin-bottom: 4px; }
.perm-group .check { display: flex; margin: 6px 0; }
.notice { background: var(--tag-soft); border: 1px solid var(--tag-line); color: var(--ink); border-radius: var(--radius); padding: 11px 15px; margin-bottom: 16px; }
.notice.info { background: var(--bg-blue); border-color: color-mix(in srgb, var(--c-blue) 30%, transparent); color: var(--fg-blue); }
.cust-group { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.cust-group:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.range input[type=date] { min-width: 0; flex: 0 0 150px; }
.seg-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 16px; }
.seg-toggle a { padding: 8px 22px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 650; transition: background .15s, color .15s; }
.seg-toggle a.on { background: var(--primary); color: var(--primary-ink); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.type-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; box-shadow: var(--shadow-1); transition: transform .18s var(--ease), border-color .15s, box-shadow .18s; }
.type-tile:hover { transform: translateY(-2px); border-color: var(--tag); box-shadow: var(--shadow-2); }
.type-tile b { font: 700 24px var(--display); }
.type-tile small { color: var(--muted); }
.inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.inline-row .check { margin: 0; }
.inline-row input, .inline-row select { width: auto; }
.form-page h2 { margin: 8px 0 12px; }
.sub-panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px 3px; margin-bottom: 12px; }
.big-due { font: 700 22px var(--display); padding-top: 6px; }
.mini-select { width: auto; min-height: 30px; padding: 3px 7px; }
.row-notice { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.big-action { background: var(--tag-soft); border-color: var(--tag); }
.flight-mini { list-style: none; margin: 0; padding: 0; }
.flight-mini li { border-top: 1px solid var(--line-2); }
.flight-mini li:first-child { border-top: 0; }
.flight-mini a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; border-radius: 8px; transition: background .12s; }
.flight-mini a:hover { background: var(--surface-2); }
.flight-mini small { display: block; color: var(--muted); }
.lug-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.lug-row:first-of-type { border-top: 0; }
.assign-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.assign-row input { width: 100px; display: inline-block; }
.assign-foot { position: sticky; bottom: 0; background: var(--surface); display: flex; gap: 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 13px 0 3px; border-top: 1px solid var(--line); margin-top: 10px; }
.assign-foot select { width: auto; }
.alert-panel { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); border-left: 4px solid var(--danger); }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { padding: 11px 0; border-top: 1px solid var(--line-2); }
.issues li:first-child { border-top: 0; }
.issues p { margin: 4px 0; }
.issues li.resolved { opacity: .65; }

/* the flight clock (4 steps of a flight) */
.clock { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.clock li { padding: 13px 16px; border-right: 1px solid var(--line); position: relative; color: var(--muted); transition: background .3s; }
.clock li:last-child { border-right: 0; }
.clock li b { display: block; font-size: 13.5px; }
.clock li small { font-size: 12px; }
.clock li.done { color: var(--ink); }
.clock li.done b::before { content: "✓ "; color: var(--c-green); }
.clock li.now { background: var(--harbour); color: #fff; }
[data-theme="dark"] .clock li.now { background: #1b3f58; }
.clock li.now::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tag); animation: growX .8s var(--ease) both; transform-origin: left; }
.clock li.now small { color: #c4d5e2; }
.clock-hint { color: var(--link) !important; font-size: 12.5px !important; }
@media (max-width: 700px) { .clock { grid-template-columns: 1fr 1fr; } .clock li:nth-child(2) { border-right: 0; } .clock li { border-bottom: 1px solid var(--line); } }

/* ================================================================ home: 3 big cards */
.home-head { margin: 8px 0 24px; }
.home-head h1 { font-size: 34px; }
.home-head p { margin: 6px 0 0; font-size: 15px; }
.big-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .big-cards { grid-template-columns: 1fr; } }
.big-card { --accent: var(--tag); --accent-soft: var(--bg-amber); position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-decoration: none; color: var(--ink); min-height: 280px; overflow: hidden; box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.big-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--accent); }
.big-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--accent-soft); opacity: .7; transition: transform .5s var(--ease); z-index: 0; }
.big-card > * { position: relative; z-index: 1; }
.big-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.big-card:hover::after { transform: scale(1.25); }
.big-card.courier { --accent: var(--c-amber); --accent-soft: var(--bg-amber); }
.big-card.services { --accent: var(--c-blue); --accent-soft: var(--bg-blue); }
.big-card.funds { --accent: var(--c-green); --accent-soft: var(--bg-green); }
.big-card.off { opacity: .55; pointer-events: none; }
.bc-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.bc-icon .i { width: 24px; height: 24px; }
.bc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.big-card h2 { font-size: 24px; letter-spacing: -.02em; }
.big-card .lede { color: var(--muted); margin: 5px 0 18px; }
.badge { background: var(--danger-soft); color: var(--danger-ink); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bc-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-weight: 650; color: var(--accent); }
.bc-go .i { transition: transform .25s var(--ease); }
.big-card:hover .bc-go .i { transform: translateX(5px); }

/* ================================================================ login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, #17455f 0%, var(--harbour) 60%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; }
.login-art .brand { color: #fff; }
.login-art h2 { font: 700 clamp(30px, 3.4vw, 46px)/1.08 var(--display); letter-spacing: -.03em; max-width: 14ch; }
.login-art p { color: #a9c0d1; max-width: 34ch; margin: 14px 0 0; font-size: 15px; }
.route { position: relative; flex: 1; width: 100%; min-height: 200px; max-height: 340px; margin: 12px 0; pointer-events: none; overflow: visible; }
.route path.arc { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; }
.route .city { fill: var(--tag); }
.route text { fill: #fff; font: 700 15px var(--display); letter-spacing: .1em; }
.login-side { display: grid; place-items: center; padding: 32px 22px; }
.login { width: 100%; max-width: 380px; animation: rise .6s var(--ease) both .1s; }
.login .brand-mark { width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px; }
.login h1 { font-size: 30px; margin-bottom: 4px; }
.login .lead { color: var(--muted); margin: 0 0 24px; }
.login .btn { width: 100%; margin-top: 8px; }
.login .foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 22px; min-height: 210px; }
  .login-art h2, .login-art p { display: none; }
  .route { min-height: 0; height: 90px; margin: 0; }
}

/* ================================================================ company logo (Settings) */
.logo-card { display: grid; grid-template-columns: 148px 1fr; gap: 22px; align-items: center; }
.logo-frame { position: relative; width: 148px; height: 148px; border-radius: 22px; border: 1px solid var(--line); overflow: hidden; background-color: var(--surface); background-image: linear-gradient(45deg, var(--line-2) 25%, transparent 25%, transparent 75%, var(--line-2) 75%), linear-gradient(45deg, var(--line-2) 25%, transparent 25%, transparent 75%, var(--line-2) 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.logo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.logo-frame .ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; padding: 10px; background: var(--surface); }
.logo-frame .ph .i { width: 30px; height: 30px; margin: 0 auto 6px; display: block; }
.logo-card ul { margin: 10px 0 14px; padding-left: 18px; color: var(--muted); }
.logo-crop { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.logo-crop canvas { width: 240px; height: 240px; border-radius: 18px; border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(45deg, var(--line-2) 25%, transparent 25%, transparent 75%, var(--line-2) 75%), linear-gradient(45deg, var(--line-2) 25%, transparent 25%, transparent 75%, var(--line-2) 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; touch-action: none; cursor: grab; }
.logo-crop canvas:active { cursor: grabbing; }
.logo-crop .seg-toggle { margin-bottom: 12px; }
.logo-crop .seg-toggle button { padding: 7px 16px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; }
.logo-crop .seg-toggle button.on { background: var(--primary); color: var(--primary-ink); }
@media (max-width: 640px) { .logo-card, .logo-crop { grid-template-columns: 1fr; justify-items: start; } }

/* ================================================================ keyframes */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes shrink { to { transform: scaleX(0); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes barIn { from { transform: scaleY(0); } to { transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .35; } }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  }
