/* Self-hosted fonts (Latin only; Chinese falls back to PingFang SC / Microsoft YaHei on the device). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-display: swap; src: url("/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); }

/* Cirrus tokens and components, adapted for the TSH Shipment Tracking screens. */
:root {
  --sky: #edf2f7;
  --horizon: #b8d4f1;
  --cloud: #ffffff;
  --ink: #0e1116;
  --deep: #222b36;
  --mist: #5b6472;
  --mist-soft: #8a93a3;
  --edge: #e3e8ee;
  --edge-soft: #eef2f6;
  --sunken: #f3f6fa;
  --signal: #2e7def;
  --citrus: #ff7a3d;
  --meadow: #2bc48a;
  --teal: #12a594;
  --violet: #7c5cfc;
  --accent: #ff7a3d;
  --accent-strong: #f0601c;
  --accent-soft: #fff1e8;
  --font-display: "Inter Tight", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --shadow-1: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
  --shadow-2: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.22), 0 2px 6px rgba(14, 17, 22, 0.06);
  --focus-ring: 0 0 0 3px rgba(46, 125, 239, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sky);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i-sm { width: 14px; height: 14px; }
svg.i-lg { width: 22px; height: 22px; }

/* Signature sky */
.sky {
  background-color: var(--sky);
  background-image:
    radial-gradient(62% 38% at 18% 78%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 62%),
    radial-gradient(52% 34% at 82% 70%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(48% 30% at 50% 18%, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, var(--horizon) 0%, var(--sky) 78%);
  background-repeat: no-repeat;
}
.sky-soft {
  background-color: var(--sky);
  background-image:
    radial-gradient(60% 40% at 20% 80%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 65%),
    radial-gradient(55% 38% at 85% 30%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #cfe1f6 0%, var(--sky) 80%);
  background-repeat: no-repeat;
}
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 32px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; }
.brand-sub { font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--mist); }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: var(--cloud); }
.nav-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px; background: var(--cloud); border: 1px solid var(--edge); border-radius: 999px; box-shadow: var(--shadow-1); flex-wrap: wrap; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; white-space: nowrap; flex-shrink: 0; border-radius: 999px; font-weight: 500; color: var(--mist); transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); background: var(--sunken); }
.nav-link:focus-visible, .btn:focus-visible, .tab:focus-visible, .seg button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 999px; background: var(--ink); color: var(--cloud); font-size: 12px; font-weight: 600; }
.who { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mist); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sunken); border: 1px solid var(--edge); color: var(--ink); font-size: 13px; font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding-inline: 22px; border-radius: 999px; border: 0; font: 500 15px/1 var(--font-sans); cursor: pointer; white-space: nowrap; transition: background-color 220ms var(--ease), transform 140ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--cloud); }
.btn-primary:hover { background: #1a1f28; }
.btn-secondary { background: var(--cloud); color: var(--ink); border: 1px solid var(--edge); }
.btn-secondary:hover { background: var(--sunken); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(14, 17, 22, 0.04); }
.btn-sm { height: 36px; padding-inline: 16px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--mist); }
.input { display: flex; align-items: center; gap: 10px; height: 44px; padding-inline: 18px; background: var(--cloud); border: 1px solid var(--edge); border-radius: 999px; transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease); }
.input:focus-within { border-color: var(--signal); box-shadow: var(--focus-ring); }
.input input, .input select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 15px var(--font-sans); color: var(--ink); }
.input input::placeholder { color: var(--mist-soft); }
.input svg.i { width: 16px; height: 16px; color: var(--mist); }
.textarea { display: block; width: 100%; min-height: 112px; padding: 14px 18px; border: 1px solid var(--edge); border-radius: 22px; font: 400 15px/1.55 var(--font-sans); color: var(--ink); resize: vertical; background: var(--cloud); }
.textarea:focus { outline: none; border-color: var(--signal); box-shadow: var(--focus-ring); }

/* Surfaces */
.card { background: var(--cloud); border: 1px solid var(--edge); border-radius: 28px; box-shadow: var(--shadow-1); padding: 32px; }
.card-compact { padding: 22px 24px; }
.card-flush { padding: 0; overflow: hidden; }
.slab { background: var(--cloud); border: 1px solid var(--edge); border-radius: 36px; box-shadow: var(--shadow-2); padding: 28px; }
.tile { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 20px; background: var(--ink); color: var(--cloud); flex-shrink: 0; }
.tile-soft { background: var(--sunken); color: var(--ink); border: 1px solid var(--edge); }
.muted { color: var(--mist); }
.deep { color: var(--deep); }
.small { font-size: 13px; line-height: 1.45; }
.divider { height: 1px; background: var(--edge); }

/* Chips carry real status only */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 12px; border-radius: 999px; background: var(--cloud); border: 1px solid var(--edge); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chip-ink { background: var(--ink); color: var(--cloud); border-color: var(--ink); }
.chip-sunken { background: var(--sunken); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-signal { background: var(--signal); }
.dot-citrus { background: var(--citrus); }
.dot-meadow { background: var(--meadow); }
.dot-edge { background: var(--mist-soft); }
.dot-teal { background: var(--teal); }
.dot-violet { background: var(--violet); }

/* Tabs and segmented choice */
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding-inline: 16px; border-radius: 999px; border: 0; background: transparent; font: 500 15px var(--font-sans); color: var(--ink); cursor: pointer; white-space: nowrap; }
.tab:hover { background: rgba(14, 17, 22, 0.04); }
.tab.is-active { background: var(--ink); color: var(--cloud); box-shadow: var(--shadow-2); }
.tab .n { font-size: 13px; color: var(--mist); }
.tab.is-active .n { color: rgba(255, 255, 255, 0.72); }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--edge); }
.seg button { height: 32px; padding-inline: 14px; border: 0; border-radius: 999px; background: transparent; font: 500 13px var(--font-sans); color: var(--mist); cursor: pointer; white-space: nowrap; }
.seg button.is-on { background: var(--cloud); color: var(--ink); box-shadow: var(--shadow-2); }

/* Checkbox */
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--cloud); display: inline-grid; place-items: center; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 10px; height: 10px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat; }
.check input:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Stats */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-value.sm { font-size: 20px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 24px; border-right: 1px solid var(--edge); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--mist); }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.025em; line-height: 1.1; }
.stat-note { font-size: 13px; font-weight: 500; color: var(--mist); }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--sunken); gap: 2px; }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--mist); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Tables */
.scroll { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--mist); padding: 0 16px 12px; white-space: nowrap; }
.table td { padding: 14px 16px; border-top: 1px solid var(--edge-soft); vertical-align: middle; }
.table th, .table td { white-space: nowrap; }
.table td.wrap { white-space: normal; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tr.is-picked td { background: var(--sunken); }
.table .num { text-align: right; }
.code { font-weight: 600; }

/* Notice: a quiet row with an icon tile, never a coloured border */
.notice { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 22px; background: var(--sunken); border: 1px solid var(--edge); }



/* ---- App layout ---- */
a:hover { color: var(--signal); }
.band { position: relative; padding-bottom: 112px; overflow: hidden; }
.band .nav { position: relative; z-index: 2; }
/* Full-width banner behind the band; its right side holds the picture, the left fades under the title. */
.page-hero.has-band-art { position: static; min-height: 240px; }
.band-art { position: absolute; z-index: 0; right: 0; bottom: 48px; width: max(100%, 1280px); height: auto; pointer-events: none; }
.has-band-art .page-hero-text { max-width: min(48%, 600px); }
/* Narrow screens: the banner moves under the title instead of behind it, cropped to its picture side. */
@media (max-width: 880px) {
  .has-band-art .page-hero-text { max-width: none; }
  .band-art { position: static; display: block; width: calc(100% + 32px); max-width: none; height: 150px; margin: 20px -16px -40px; object-fit: cover; object-position: 85% center; }
}
.lift { position: relative; z-index: 1; margin-top: -72px; padding-bottom: 96px; } /* sits over the bottom of the hero picture */
.page-head { padding-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.page-head.split-head { flex-direction: row; }
.back { align-self: flex-start; margin-left: -16px; }
.h-hero { font-size: clamp(34px, 5.6vw, 72px); line-height: 1.1; text-wrap: balance; }
.h-page { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; text-wrap: balance; }
.h-section { font-size: 20px; line-height: 1.3; }
.h-item { font-size: 22px; line-height: 1.25; }
.lede { margin: 20px auto 0; max-width: 34em; font-size: 17px; color: var(--deep); }
.lg { font-size: 17px; }
.code.lg { font-size: 17px; }
.code.xl { font-size: 20px; }
.ink { color: var(--ink); }
.link:hover { color: var(--signal); }
.stack-2 { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stack-3 { display: flex; flex-direction: column; gap: 12px; }
.stack-6 { display: flex; flex-direction: column; gap: 28px; }
.row-gap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.gap-top { margin-top: 20px; }
.gap-top-sm { margin-top: 12px; }
.who form { margin: 0; }
.notice { margin: 0; align-items: center; }
.notice svg.i { color: var(--ink); }
.input.is-bad { border-color: var(--citrus); }

/* Login */

.brand-mark-lg { width: 52px; height: 52px; }


/* Sales search */
.hero { text-align: center; padding-top: 64px; padding-bottom: 24px; }
.search { margin-top: 12px; width: min(100%, 560px); display: flex; gap: 12px; }
.search .input { flex: 1; }
.examples { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip-link:hover { background: var(--sunken); color: var(--ink); }
.narrow { max-width: 880px; margin-inline: auto; }
.results { max-width: 980px; }
.hit { padding: 24px 0; border-top: 1px solid var(--edge); }
.hit:first-of-type { border-top: 0; padding-top: 12px; }
.hit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.hit-title { display: flex; align-items: center; gap: 16px; }
.hit-total { font-size: 16px; }
.hit-total .code { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-left: 6px; }
.thumb-lg { width: 88px; height: 60px; }
/* Each lot hangs off a thin rail; the dot takes the lot's status colour. */
.lots { position: relative; list-style: none; margin: 18px 0 0; padding: 0 0 0 28px; display: flex; flex-direction: column; gap: 10px; }
.lots::before { content: ""; position: absolute; left: 7px; top: 26px; bottom: 26px; width: 2px; background: var(--edge); }
.lot { position: relative; }
.lot-dot { position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px var(--cloud); }
.lot-card { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: 20px; background: var(--sunken); border: 1px solid transparent; transition: border-color 160ms var(--ease); }
.lot-card:hover { border-color: var(--edge); }
.lot-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--cloud); color: var(--deep); flex-shrink: 0; }
.lot-date { font-weight: 600; font-size: 17px; }
.lot-qty { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lot-qty .code { font-weight: 700; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footnote { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--edge); }

/* Container list */
.list-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.list-tools .input { flex: 1 1 280px; max-width: 420px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.filter { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding-inline: 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--cloud); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.filter:hover { background: var(--sunken); color: var(--ink); }
.filter .n { color: var(--mist); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--cloud); }
.filter.is-active .n { color: rgba(255, 255, 255, 0.72); }
.stat-rule { border-bottom: 1px solid var(--edge); }
.boxes { list-style: none; margin: 12px 0 0; padding: 0; }
.box { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--edge-soft); }
.box-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.saved { color: var(--signal); }
.empty-line { padding: 24px 0 8px; }
.tracking { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.tracking .field { width: 180px; }
.input-sm { height: 40px; }
.tracking .btn { height: 40px; }
.tracking-actions { display: flex; gap: 8px; }
.select select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.select svg.i { pointer-events: none; }

/* Container detail */
.table tfoot td { border-top: 1px solid var(--edge); font-weight: 600; }
.log { list-style: none; margin: 12px 0 0; padding: 0; }
.log li { display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--edge-soft); }

/* Announcements */
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-item { position: relative; display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--edge-soft); }
.ann-list li:first-child { border-top: 0; }
.ann-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 16px 12px; border-radius: 18px; color: var(--ink); }
.ann-row:hover { background: var(--sunken); color: var(--ink); }
.ann-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--tone-soft); color: var(--tone); flex-shrink: 0; }
.ann-priority { min-width: 52px; justify-content: center; background: var(--tone-soft); color: var(--tone-ink); border-color: transparent; font-weight: 700; }
.ann-main { flex: 1; min-width: 0; }
.ann-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.ann-title.is-unread { font-weight: 700; }
.ann-meta { white-space: nowrap; }
.chip-xs { height: 24px; font-size: 12px; padding-inline: 10px; }
.row-gap.tight { gap: 6px; }
.prewrap { white-space: pre-wrap; }
.only-narrow { display: none; }
.right { align-items: flex-end; text-align: right; }
.seg { flex-wrap: wrap; }
.seg-option { position: relative; }
.seg-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-option span { display: inline-flex; align-items: center; height: 32px; padding-inline: 14px; border-radius: 999px; font: 500 13px var(--font-sans); color: var(--mist); }
.seg-option input:checked + span { background: var(--cloud); color: var(--ink); box-shadow: var(--shadow-2); }
.seg-option input:focus-visible + span { box-shadow: var(--focus-ring); }

/* Container picker above the announcement form */
.picker { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.picker .field { flex: 1 1 360px; }
.picker select { width: 100%; }

/* File import */
.import-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.file { display: flex; flex-direction: column; gap: 6px; }
.file input { font: inherit; font-size: 13px; color: var(--mist); }
.file input::file-selector-button { height: 36px; padding-inline: 16px; margin-right: 12px; border-radius: 999px; border: 1px solid var(--edge); background: var(--cloud); font: 500 13px var(--font-sans); color: var(--ink); cursor: pointer; }
.file input::file-selector-button:hover { background: var(--sunken); }
.fields-end { align-items: flex-end; }
.fields .field-wide { flex: 2 1 280px; }
.fields .field-narrow { flex: 1 1 150px; }
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.import-card { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; padding: 18px 20px; border: 1px solid var(--edge); border-radius: 22px; background: var(--cloud); box-shadow: var(--shadow-1); }
.import-thumb { width: 72px; height: 50px; object-fit: contain; flex-shrink: 0; }
.import-text { flex: 1 1 240px; }
.import-text .link-signal { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.import-actions { display: flex; gap: 8px; align-items: center; }
.file-pick { cursor: pointer; max-width: 200px; }
.file-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick:focus-within { box-shadow: var(--focus-ring); }
.import-title { font-weight: 600; }

/* Item master list tools */
.item-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.item-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 520px; }
.item-search { flex: 1 1 240px; max-width: 360px; }
.filter-select { flex: 0 0 auto; padding-right: 10px; }
.filter-select select { padding-right: 4px; }
.filter-label { font-size: 13px; color: var(--mist); white-space: nowrap; }
.item-count { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-step { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--edge); border-radius: 50%; color: var(--ink); background: var(--cloud); }
.page-step:hover { background: var(--sunken); color: var(--ink); }
.page-step.is-off { color: var(--mist-soft); }
.state { display: inline-flex; align-items: center; height: 24px; padding-inline: 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.state-on { background: #e7f8f0; color: #12865a; }
.state-off { background: #f1f3f6; color: var(--mist); }
.js .add-panel:not([open]) { display: none; }
.add-panel { padding: 20px 22px; border: 1px solid var(--edge); border-radius: 22px; background: var(--sunken); }
.table tr.is-inactive td { color: var(--mist); }
.list-search { width: 260px; max-width: 100%; }

/* Day/month/year calendar (public/datepicker.js) */
.calendar-trigger { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: -8px; border: 0; border-radius: 999px; background: transparent; color: var(--mist); cursor: pointer; flex-shrink: 0; }
.calendar-trigger:hover { background: var(--sunken); color: var(--ink); }
.calendar-trigger:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cell-date { display: flex; align-items: center; gap: 2px; }
.cell-date .calendar-trigger { margin-right: 0; }
.calendar { position: absolute; z-index: 30; width: 296px; padding: 14px; background: var(--cloud); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow-2); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.calendar-nav { width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.calendar-nav:hover { background: var(--sunken); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-weekday { text-align: center; font-size: 12px; color: var(--mist); padding: 6px 0; }
.calendar-day { height: 36px; border: 0; border-radius: 12px; background: transparent; font: 500 14px var(--font-sans); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.calendar-day:hover { background: var(--sunken); }
.calendar-day:focus-visible, .calendar-nav:focus-visible, .calendar-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.calendar-day.is-today { box-shadow: inset 0 0 0 1px var(--edge); }
.calendar-day.is-selected { background: var(--ink); color: var(--cloud); }
.calendar-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--edge-soft); }
.calendar-link { border: 0; background: transparent; font: 500 13px var(--font-sans); color: var(--signal); cursor: pointer; padding: 6px 8px; border-radius: 10px; }

/* Item suggestions under the code / description inputs */
.suggest { position: absolute; z-index: 20; margin: 0; padding: 6px; list-style: none; width: min(640px, calc(100vw - 16px)); max-height: 320px; overflow-y: auto; background: var(--cloud); border: 1px solid var(--edge); border-radius: 20px; box-shadow: var(--shadow-2); }
.suggest li { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 14px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--sunken); }

/* Container form */
.fields { display: flex; gap: 20px; flex-wrap: wrap; }
.fields .field { flex: 1 1 200px; }
.paste { margin-top: 12px; }
.paste summary { list-style: none; display: inline-flex; }
.paste summary::-webkit-details-marker { display: none; }
.paste[open] summary { background: var(--sunken); }
.table-entry { min-width: 680px; }
.table-entry td { padding-block: 6px; }
.w-code { width: 18%; }
.w-pack { width: 18%; }
.w-qty { width: 14%; }
.w-x { width: 44px; }
.cell { width: 100%; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; font: inherit; color: inherit; }
.cell:hover { border-color: var(--edge); }
.cell:focus { outline: none; border-color: var(--signal); box-shadow: var(--focus-ring); background: var(--cloud); }
.cell.num { text-align: right; font-weight: 600; }

/* Container form: import card, tips, numbered goods lines */
.import-panel { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.drop-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border: 1.5px dashed var(--edge); border-radius: 22px; background: linear-gradient(180deg, #fbfdff, var(--cloud)); }
.drop-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--tone-soft); color: var(--tone); flex-shrink: 0; }
.drop-text { flex: 1 1 220px; }
.download-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drop-actions label.btn { cursor: pointer; }
.drop-actions label.btn:focus-within { box-shadow: var(--focus-ring); }
.tips { padding: 16px 20px; border-radius: 22px; background: #eef5fe; }
.tips-title { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tips-title .i { color: #f2b01e; }
.tips ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--deep); }
.js .paste-panel:not([open]) { display: none; }
.js .paste-panel > summary { display: none; }
.paste-panel { margin-top: 0; padding: 16px 20px; border: 1px solid var(--edge); border-radius: 22px; }
.entry-box { border: 1px solid var(--edge); border-radius: 20px; }
.entry-box thead th { background: var(--sunken); }
.table-entry tbody { counter-reset: line; }
.table-entry tbody tr { counter-increment: line; }
.row-no::before { content: counter(line); color: var(--mist); font-size: 13px; }
.w-no { width: 44px; }
.w-match { width: 32px; }
.row-no { text-align: center; }
.cell-box { display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid var(--edge); border-radius: 12px; background: var(--cloud); }
.cell-box .i { color: var(--mist); flex-shrink: 0; }
.cell-box .cell { padding-left: 2px; }
.cell-box .cell:focus { box-shadow: none; border-color: transparent; }
.cell-box:focus-within { border-color: var(--signal); box-shadow: var(--focus-ring); }
.cell-item { display: flex; align-items: center; gap: 10px; }
.row-art { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.match { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--meadow); color: #fff; }
/* Tick and carton picture show only once the line has a goods name. */
tr:has(input[name="description"]:placeholder-shown) .match,
tr:has(input[name="description"]:placeholder-shown) .row-art { visibility: hidden; }
.table-entry input[name="packSize"], .table-entry input[name="cartons"] { border-color: var(--edge); background: var(--cloud); }
@media (max-width: 1100px) {
  .import-panel { grid-template-columns: 1fr; }
}
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--edge); }


/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr); background: var(--cloud); }
/* Picture side: the port photo fills it; a white wash on the upper left keeps the title readable. */
.auth-brand { position: relative; display: flex; flex-direction: column; gap: 32px; padding: clamp(32px, 4.5vw, 72px); padding-right: calc(clamp(32px, 4.5vw, 72px) + 40px); padding-bottom: clamp(220px, 26vw, 380px); overflow: hidden;
  background: linear-gradient(180deg, #d6e9fb 0%, #e6f1fc 55%, #eef5fd 100%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .h-display { font-size: clamp(38px, 4.4vw, 68px); line-height: 1.12; }
.auth-brand .lede-left { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6; }
.auth-brand > .auth-art, .auth-brand > .auth-photo { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; width: 100%; }
.auth-brand > .auth-art { height: auto; }
.auth-brand > .auth-photo { top: 0; height: 100%; object-fit: cover; object-position: center bottom; }
.auth-brand.has-photo::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 38%, rgba(255, 255, 255, 0.35) 62%, rgba(255, 255, 255, 0) 78%); }
.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; max-width: 480px; }
/* Over the photo the feature list sits on frosted glass so it stays readable above the cranes. */
.has-photo .auth-features { padding: 18px 20px; border-radius: 24px; background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(10px); box-shadow: 0 16px 40px -24px rgba(20, 40, 80, 0.4); }
.has-photo .feature-icon { box-shadow: none; background: var(--cloud); }
.auth-features li { display: flex; gap: 18px; align-items: center; }
.auth-features strong { font-size: 17px; }
.feature-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, 0.88); color: var(--tone); flex-shrink: 0; box-shadow: 0 10px 24px -14px rgba(20, 40, 80, 0.35); }
.feature-icon.is-art { padding: 8px; object-fit: contain; }
.feature-icon svg { width: 28px; height: 28px; }
.auth-panel { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 40px clamp(24px, 4vw, 72px);
  margin-left: -40px; background: var(--cloud); border-radius: 36px 0 0 36px; box-shadow: -24px 0 60px -40px rgba(20, 40, 80, 0.35); }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.link-signal { color: var(--signal); font-weight: 500; font-size: 15px; }
.link-signal:hover { text-decoration: underline; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.auth-title { font-size: 40px; letter-spacing: -0.01em; }
.auth-card .input { flex: none; height: 52px; }
.auth-help { text-align: center; }
.auth-foot { text-align: center; }
.btn-block { width: 100%; }
.input-action { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: -8px; border: 0; border-radius: 999px; background: transparent; color: var(--mist); cursor: pointer; }
.input-action:hover { background: var(--sunken); color: var(--ink); }
.input-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.input-action[aria-pressed="true"] { color: var(--accent); }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; align-content: start; }
  .auth-brand { gap: 20px; padding: 28px 24px clamp(150px, 40vw, 300px); }
  .auth-features { display: none; }
  .auth-panel { justify-content: flex-start; margin: -32px 0 0; padding: 32px 24px 24px; border-radius: 32px 32px 0 0; box-shadow: none; }
}

/* ===== Logistics UI layer: status tones, accent, cards (container list and detail) ===== */
.tone-blue { --tone: var(--signal); --tone-soft: #eaf2fe; --tone-ink: #1c5fc4; }
.tone-grey { --tone: var(--mist-soft); --tone-soft: #f1f3f6; --tone-ink: #4a5361; }
.tone-orange { --tone: var(--accent); --tone-soft: var(--accent-soft); --tone-ink: #c2470e; }
.tone-teal { --tone: var(--teal); --tone-soft: #e5f6f3; --tone-ink: #0b7a6d; }
.tone-violet { --tone: var(--violet); --tone-soft: #f0edff; --tone-ink: #5b3fd6; }
.tone-green { --tone: var(--meadow); --tone-soft: #e7f8f0; --tone-ink: #12865a; }
.tone-red { --tone: #e5484d; --tone-soft: #fdecec; --tone-ink: #c22d32; }
.tone-done { --tone: var(--accent); --tone-soft: var(--accent-soft); --tone-ink: #c2470e; }
.tone-upcoming { --tone: var(--mist-soft); --tone-soft: #f1f3f6; --tone-ink: var(--mist); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding-inline: 10px; border-radius: 999px; background: var(--tone-soft); color: var(--tone-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill .dot { background: var(--tone); }
.pill-lg { height: 34px; padding-inline: 14px; font-size: 15px; }
.accent { color: var(--accent); }
.baseline { align-items: baseline; }
.stack-5 { display: flex; flex-direction: column; gap: 22px; }

.btn-ink { background: var(--ink); color: var(--cloud); box-shadow: 0 8px 20px -10px rgba(14, 17, 22, 0.5); }
.btn-ink:hover { background: #1a1f28; color: var(--cloud); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(240, 96, 28, 0.6); }
.btn-accent:hover { background: var(--accent-strong); color: #fff; }

/* Hero with optional illustration */
.page-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 40px; min-height: 200px; }
.page-hero-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.page-hero-art { position: absolute; right: -24px; bottom: 16px; width: min(48%, 640px); height: auto; pointer-events: none; }
.h-display { font-size: clamp(32px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.lede-left { font-size: 17px; color: var(--deep); }

.page-hero.has-art .page-hero-text { max-width: min(56%, 620px); }
.page-hero-text .back { margin-left: -12px; }

/* Item master list: scrolls inside its own box, header stays visible */
.item-box { max-height: min(560px, 62vh); overflow: auto; border: 1px solid var(--edge); border-radius: 20px; overscroll-behavior: contain; }
.item-box:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.item-box thead th { position: sticky; top: 0; z-index: 1; background: var(--sunken); }
.table-compact th, .table-compact td { padding-block: 10px; }
.table-compact td { font-size: 14px; }
.table-compact th:first-child, .table-compact td:first-child { padding-left: 18px; }
.table-compact td.num { padding-right: 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pager-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-num { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding-inline: 8px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--deep); }
.page-num:hover { background: var(--sunken); color: var(--ink); }
.page-num.is-active { background: var(--ink); color: var(--cloud); }

/* Activity log */
.log-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.log-range { flex: 0 1 320px; gap: 8px; }
.log-type { flex: 0 1 200px; }
.log-search { flex: 1 1 240px; }
.log-table td { vertical-align: middle; }
.log-dot { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--tone-soft); }
.nowrap { white-space: nowrap; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--edge); border-radius: 22px; background: var(--cloud); color: var(--ink); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.stat-card:hover { color: var(--ink); border-color: #ffd2b8; box-shadow: var(--shadow-1); }
.stat-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.stat-card.is-static:hover { border-color: var(--edge); box-shadow: none; }
.stat-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--tone-soft); color: var(--tone); flex-shrink: 0; }
.stat-card .stat-value { font-size: 30px; }
.stat-icon.is-art, .ann-icon.is-art { background: none; object-fit: contain; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-unit { font-weight: 600; color: var(--deep); }
.stat-go { margin-left: auto; color: var(--mist); transform: rotate(-90deg); }

/* Search + filters */
.toolbar { display: flex; flex-direction: column; gap: 14px; }
.toolbar .list-tools { margin-top: 0; }
.filter .dot { background: var(--tone, var(--mist-soft)); }

/* Container rows */
.c-list { border: 1px solid var(--edge-soft); border-radius: 22px; overflow: visible; }
.c-head, .c-row { display: grid; grid-template-columns: minmax(280px, 1.6fr) minmax(170px, 1fr) minmax(170px, 1fr) auto 44px; align-items: center; gap: 16px; padding-inline: 20px; }
.c-head { height: 44px; background: var(--sunken); border-radius: 22px 22px 0 0; font-size: 12px; font-weight: 500; color: var(--mist); }
.c-head span:nth-child(4) { grid-column: 4 / 6; }
.c-rows { list-style: none; margin: 0; padding: 0; }
.c-row { padding-block: 16px; border-top: 1px solid var(--edge-soft); }
.c-row:first-child { border-top: 0; }
.c-row:hover { background: #fbfcfe; }
.c-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.c-no { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.saved { display: inline-flex; align-items: center; gap: 4px; }
.tracking-compact { display: contents; }
.tracking-compact .field { width: auto; }
.select .dot { flex-shrink: 0; }

/* Container picture (public/img/container-<tone>.webp) */
.thumb { width: 64px; height: 52px; object-fit: contain; flex-shrink: 0; }

/* Overflow menu */
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; min-width: 160px; padding: 6px; background: var(--cloud); border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.menu-list a { padding: 9px 12px; border-radius: 10px; font-size: 14px; white-space: nowrap; }
.menu-list a:hover { background: var(--sunken); color: var(--ink); }

@media (max-width: 1100px) {
  .c-head { display: none; }
  .c-row { grid-template-columns: 1fr 1fr auto; grid-template-areas: "main main menu" "eta status status" "act act act"; row-gap: 12px; }
  .c-main { grid-area: main; }
  .c-row .field-eta { grid-area: eta; }
  .c-row .field-status { grid-area: status; }
  .c-row .tracking-actions { grid-area: act; justify-content: flex-end; }
  .c-row .menu { grid-area: menu; }
  .page-hero-art { opacity: 0.35; }
}
@media (max-width: 880px) {
  .page-hero-art { display: none; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 44px; height: 44px; border-radius: 14px; }
  .stat-card .stat-value { font-size: 24px; }
}
@media (max-width: 640px) {
  .stat-cards { grid-template-columns: 1fr; }
  .c-row { grid-template-columns: 1fr auto; grid-template-areas: "main menu" "eta eta" "status status" "act act"; padding-inline: 14px; }
}

/* Container detail */
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--mist); }
.crumbs a { color: var(--deep); font-weight: 500; }
.h-card { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.h-card svg.i { color: var(--deep); }
.btn-xs { width: 28px; height: 28px; }
.is-copied { color: var(--meadow); }

.route { position: relative; display: flex; align-items: center; gap: 16px; padding: 28px 28px; min-height: 150px; border: 1px solid var(--edge); border-radius: 28px; overflow: hidden;
  background: radial-gradient(70% 120% at 0% 100%, #e3eefb 0%, rgba(227, 238, 251, 0) 60%), radial-gradient(60% 120% at 100% 0%, #fff1e8 0%, rgba(255, 241, 232, 0) 55%), var(--cloud); box-shadow: var(--shadow-1); }
.route.has-art { min-height: 240px; align-items: flex-start; }
.route-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.route-place { position: relative; display: flex; gap: 6px; align-items: flex-start; color: var(--accent); flex-shrink: 0; }
.route-place > span { display: flex; flex-direction: column; color: var(--ink); line-height: 1.3; }
.route-place .small { color: var(--mist); }
.route-steps { position: relative; flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.route-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.route-step::before { content: ""; position: absolute; top: 19px; left: -50%; right: 50%; height: 3px; background: var(--edge); }
.route-step:first-child::before { display: none; }
.route-step.is-done::before, .route-step.is-current::before { background: var(--accent); }
.route-step.is-upcoming::before { background: repeating-linear-gradient(90deg, var(--mist-soft) 0 6px, transparent 6px 12px); }
.route-node { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--cloud); color: var(--tone); border: 2px solid var(--tone); }
.route-step.is-done .route-node { background: var(--accent); border-color: var(--accent); color: #fff; }
.route-step.is-current .route-node { background: var(--tone); color: #fff; box-shadow: 0 0 0 6px var(--tone-soft); }
.route-label { font-weight: 600; font-size: 14px; }
.route-step.is-current .route-label { color: var(--tone-ink); }
.route-date { font-size: 12px; color: var(--mist); }
.route.has-art .route-steps { background: rgba(255, 255, 255, 0.86); border-radius: 20px; padding: 14px 8px; backdrop-filter: blur(6px); }
.route.has-art .route-place { background: rgba(255, 255, 255, 0.9); padding: 8px 12px; border-radius: 14px; backdrop-filter: blur(6px); }

.update-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; box-shadow: none; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "info timeline ops" "goods goods ops"; gap: 20px; align-items: start; }
.area-info { grid-area: info; } .area-timeline { grid-area: timeline; } .area-ops { grid-area: ops; } .area-goods { grid-area: goods; }
.detail-grid .card { box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px; }

.kv { display: grid; grid-template-columns: 7em 1fr; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--edge-soft); font-size: 14px; }
.kv dt { color: var(--mist); }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }

.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 22px 9.5em 1fr; gap: 12px; padding-bottom: 20px; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--accent); }
.tl-item:last-child::before { display: none; }
.tl-item.is-current::before, .tl-item.is-future::before { background: repeating-linear-gradient(180deg, var(--mist-soft) 0 4px, transparent 4px 8px); }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 5px var(--accent), inset 0 0 0 7px #fff; }
.tl-item.is-current .tl-dot { background: var(--tone); box-shadow: 0 0 0 5px var(--tone-soft), inset 0 0 0 6px var(--tone), inset 0 0 0 8px #fff; }
.tl-item.is-future .tl-dot { background: #e6e9ee; box-shadow: inset 0 0 0 6px #e6e9ee, inset 0 0 0 8px var(--mist-soft); }
.tl-when { font-size: 13px; color: var(--mist); padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl-item.is-current .tl-when, .tl-item.is-current .tl-title { color: var(--tone-ink); }
.tl-title { font-weight: 600; }

.ops { list-style: none; margin: 0; padding: 0; }
.op { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--edge-soft); }
.ops .op:first-child { border-top: 0; }
.op-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tone-soft); color: var(--tone); }
.op-title { font-weight: 600; font-size: 14px; }
.op-time { text-align: right; line-height: 1.5; }
.ops-more summary { list-style: none; margin-top: 6px; }
.ops-more summary::-webkit-details-marker { display: none; }
.ops-more[open] summary { display: none; }
.table-soft thead th { background: var(--sunken); padding-top: 10px; padding-bottom: 10px; }
.table-soft thead th:first-child { border-radius: 12px 0 0 12px; padding-left: 12px; }
.table-soft thead th:last-child { border-radius: 0 12px 12px 0; padding-right: 12px; }
.table-soft td:first-child { padding-left: 12px; }
.table-soft td:last-child { padding-right: 12px; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "info timeline" "goods goods" "ops ops"; }
  .route { flex-wrap: wrap; }
  .route-place { display: none; }
}
@media (max-width: 640px) {
  .page-hero.has-art .page-hero-text { max-width: none; }
  .search { flex-wrap: wrap; }
  .search .btn { width: 100%; }
  .hit-total .code { font-size: 24px; }
  .lot-qty { margin-left: 0; width: 100%; }
  .lot-qty .thumb { display: none; }
  .ann-row { flex-wrap: wrap; gap: 8px 12px; }
  .ann-priority { display: none; }
  .ann-main { flex-basis: calc(100% - 64px); }
  .ann-meta { width: 100%; padding-left: 60px; white-space: normal; }
  .log-range, .log-type, .log-search { flex: 1 1 100%; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "timeline" "goods" "ops"; }
}
@media (max-width: 880px) {
  .route { padding: 20px 12px; overflow-x: auto; }
  .route-steps { min-width: 520px; }
  .tl-item { grid-template-columns: 22px 1fr; }
  .tl-item .stack-2 { grid-column: 2; }
}

@media (max-width: 880px) {
  .container { padding-inline: 16px; }
  .stat-row, .stat-row.cols-3, .stat-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; padding-inline: 0; }
  .nav-pill { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .who-name { display: none; }
  .slab { padding: 20px; border-radius: 28px; }
  .card { padding: 22px; }
  .only-wide { display: none; }
  .only-narrow { display: flex; }
  .stat-value.sm { font-size: 17px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tracking { width: 100%; }
  .tracking .field { flex: 1 1 140px; width: auto; }
  .tracking:not(.tracking-compact) .tracking-actions { width: 100%; }
  .tracking:not(.tracking-compact) .tracking-actions .btn { flex: 1; }
  .hero { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
