@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/static/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/static/fonts/nunito-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;
  --bg: #fafbfe; --surface: #ffffff; --surface-2: #f3f4f9; --border: #e3e6ef;
  --text: #1b1b1a; --text-2: #52514e; --muted: #85847f;
  --accent: #2a3660; --accent-ink: #ffffff; --accent-soft: #e9ecf4; --brand-ink: #323232;
  --ok: #1d7a3a; --ok-bg: #e3f3e7; --warn: #8a5a00; --warn-bg: #fdf1d6; --bad: #b42323; --bad-bg: #fbe4e2;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --radius: 10px;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --surface-2: #242422; --border: #33332f;
    --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e88;
    --accent: #9aa8e0; --accent-ink: #10142a; --accent-soft: #232a45; --brand-ink: #f0efec;
    --ok: #5fc27a; --ok-bg: #16301e; --warn: #f0b84a; --warn-bg: #3a2c0d; --bad: #f07a72; --bad-bg: #3d1a18;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --surface-2: #242422; --border: #33332f;
  --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e88;
  --accent: #9aa8e0; --accent-ink: #10142a; --accent-soft: #232a45; --brand-ink: #f0efec;
  --ok: #5fc27a; --ok-bg: #16301e; --warn: #f0b84a; --warn-bg: #3a2c0d; --bad: #f07a72; --bad-bg: #3d1a18;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }

/* layout */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; gap: 16px; padding: 0 20px; min-height: 56px; max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; text-decoration: none; color: var(--text); }
.brand img { height: 38px; width: auto; display: block; }
.brand-t { font-weight: 600; font-size: 13px; line-height: 1.2; padding-left: 12px; border-left: 1px solid var(--border); color: var(--brand-ink); }
.brand-t small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.logo-d { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none !important; } :root:not([data-theme="light"]) .logo-d { display: block !important; } }
:root[data-theme="dark"] .logo-l { display: none !important; }
:root[data-theme="dark"] .logo-d { display: block !important; }
.login .logo { height: 48px; width: auto; margin: 0 0 22px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tabs a { padding: 18px 12px 16px; text-decoration: none; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .sep { width: 1px; background: var(--border); margin: 14px 6px; }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.who select { max-width: 220px; }
main { max-width: 1600px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-height: 36px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters input[type=search] { min-width: 240px; flex: 1 1 240px; max-width: 360px; }
.filters .grow { flex: 1; }
.filters .lbl { color: var(--muted); font-size: 12px; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-align: left; cursor: pointer; transition: border-color .15s; }
.kpi:hover { border-color: var(--accent); }
.kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--text-2); font-size: 13px; }
.kpi.static { cursor: default; }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* table */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card .body { padding: 16px; }
.tablewrap { overflow: auto; max-height: calc(100vh - 290px); border-radius: var(--radius); }
.tablewrap.free { max-height: none; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; vertical-align: top; }
.grid th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; z-index: 1; }
.grid th.sorted::after { content: " ▲"; font-size: 9px; }
.grid th.sorted.desc::after { content: " ▼"; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: var(--accent-soft); }
.grid tbody tr.sel td { background: var(--accent-soft); }
.grid td.num, .grid th.num { text-align: right; }
.grid tr.sub td { background: var(--surface-2); cursor: default; }
.grid.plain tbody tr { cursor: default; }
.grid.plain tbody tr:hover td { background: none; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.count { color: var(--muted); font-size: 13px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.green, .badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.yellow { background: var(--warn-bg); color: var(--warn); }
.badge.red, .badge.late { background: var(--bad-bg); color: var(--bad); }
.badge.none::before { display: none; }
.st { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); }
.st.s-in-transit { color: var(--s1); }
.st.s-on-hold-exam { background: var(--bad-bg); color: var(--bad); }
.st.s-arrived { color: var(--warn); }
.st.s-customs-released { color: var(--s7); }
.st.s-picked-up, .st.s-delivered { color: var(--ok); }
.st.s-empty-returned { color: var(--muted); }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); z-index: 41; box-shadow: var(--shadow); overflow-y: auto; border-left: 1px solid var(--border); }
.drawer header { position: sticky; top: 0; background: var(--surface); padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer header h2 { margin: 0; font-size: 18px; }
.drawer section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer section h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: minmax(130px, min(40%, 220px)) 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--text-2); }
dl.kv dd { margin: 0; word-break: break-word; white-space: pre-line; }
.ic { width: 16px; height: 16px; flex: none; }
.btn .ic { width: 15px; height: 15px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; }
.tabs a .ic { opacity: .75; }
.tabs a.on .ic { opacity: 1; color: var(--accent); }
a.ext { display: inline-flex; align-items: center; gap: 4px; }
a.ext .ic { width: 14px; height: 14px; }
.kpi { position: relative; padding-right: 60px; }
.kpi.static { padding-right: 16px; }
.kpi.static:hover { border-color: var(--border); }
.kico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; }
.kico .ic { width: 20px; height: 20px; }
.kpi .kico { position: absolute; top: 14px; right: 14px; }
.kico.blue { background: color-mix(in srgb, var(--s1) 14%, transparent); color: var(--s1); }
.kico.violet { background: color-mix(in srgb, var(--s7) 14%, transparent); color: var(--s7); }
.kico.yellow { background: var(--warn-bg); color: var(--warn); }
.kico.red { background: var(--bad-bg); color: var(--bad); }
.drawer section h3 { display: flex; align-items: center; gap: 7px; }
.drawer section h3 .ic { width: 14px; height: 14px; }
.drawer .dh { display: flex; gap: 12px; align-items: center; }
.dprog { height: 4px; background: var(--surface-2); }
.dprog div { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .4s; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; position: relative; padding-bottom: 18px; }
.tl li:last-child { padding-bottom: 0; }
.tl li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px; width: 2px; background: var(--border); border-radius: 2px; }
.tl li.done:not(:last-child)::after { background: var(--accent); }
.tl-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); background: var(--surface); color: var(--muted); position: relative; z-index: 1; }
.tl-ico .ic { width: 18px; height: 18px; }
.tl li.done .tl-ico { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tl li.expected .tl-ico { border-style: dashed; border-color: var(--s1); color: var(--s1); }
.tl li.next.todo .tl-ico { border-color: var(--accent); color: var(--accent); }
.tl-l { font-weight: 600; }
.tl li.todo .tl-l { color: var(--text-2); font-weight: 500; }
.tl-s { font-size: 12px; color: var(--muted); }
.tl li.expected .tl-s, .tl li.expected .tl-d { color: var(--s1); }
.tl-d { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.tl-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2px solid var(--border); }
.tl-legend .lg.done { background: var(--accent); border-color: var(--accent); }
.tl-legend .lg.expected { border: 2px dashed var(--s1); }
.ftbox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.ft .t { font-size: 12px; color: var(--muted); }
.ft .d { font-size: 12px; color: var(--text-2); margin-top: 6px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login h1 { font-size: 20px; margin: 0 0 4px; }
.login p.sub { color: var(--muted); margin: 0 0 20px; }
.login label { display: block; font-size: 13px; color: var(--text-2); margin: 12px 0 4px; }
.login input { width: 100%; }
.login .btn { width: 100%; justify-content: center; margin-top: 20px; padding: 10px; }
.login .err { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 18px; }
.login img.qr { display: block; margin: 12px auto; border-radius: 8px; background: #fff; padding: 6px; }
.login code { font-size: 12px; word-break: break-all; }
.otp { letter-spacing: .4em; font-size: 20px; text-align: center; }

/* auth layout: photo + form */
.auth { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 2fr); min-height: 100vh; min-height: 100dvh; }
.auth-hero { order: 2; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px 52px; color: #fff;
  background: #1b2346; overflow: hidden; isolation: isolate; }
/* the photo is a real <img> (not a CSS background) so dark-mode / blocking extensions leave it alone */
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; z-index: -2; display: block; }
.auth-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,20,46,.55) 0%, rgba(14,20,46,.05) 38%, rgba(14,20,46,.25) 62%, rgba(14,20,46,.85) 100%); }
.hero-logo { display: none; }
.panel-logo { height: 84px; width: auto; display: block; margin: 0 auto; }
.auth-head { width: min(360px, 100%); padding-top: 12px; }
.hero-copy { max-width: 620px; align-self: center; text-align: center; }
.hero-copy h2 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 700; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-copy p { margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.85); }
.auth-panel.login { margin: 0; max-width: none; width: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 32px 24px; background: var(--surface); }
.auth-panel.login form { width: min(360px, 100%); border: 0; box-shadow: none; padding: 0; background: transparent; margin: auto 0; }
.auth-panel h1 { font-size: 26px; letter-spacing: -.01em; }
.auth-foot { color: var(--muted); font-size: 12px; margin-top: 32px; text-align: center; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-hero { order: 0; min-height: 200px; padding: 24px 20px; }
  .hero-img { object-position: 60% 30%; }
  .auth-hero::after { background: linear-gradient(180deg, rgba(14,20,46,.5) 0%, rgba(14,20,46,.1) 45%, rgba(14,20,46,.8) 100%); }
  .panel-logo { height: 44px; }
  .auth-head { padding-top: 0; margin-bottom: 24px; }
  .hero-copy h2 { font-size: 22px; margin: 0; }
  .hero-copy p { display: none; }
  .auth-panel.login { padding: 28px 20px 20px; justify-content: flex-start; }
  .auth-panel.login form { margin: 0 0 auto; }
}

/* upload */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 180px; border: 2px dashed var(--border); border-radius: 14px; padding: 32px 20px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 4px; }
.drop strong { display: block; font-size: 16px; }
.drop span { color: var(--muted); font-size: 13px; }
.drop .types { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.drop .types em { font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.drop.busy { pointer-events: none; opacity: .6; }
.res { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.res:last-child { border-bottom: 0; }
.res .name { font-weight: 600; }
.res .meta { color: var(--text-2); font-size: 13px; }
.res ul { margin: 6px 0 0; padding-left: 18px; color: var(--warn); font-size: 13px; }

/* dashboard */
.summary { font-size: 17px; line-height: 1.5; margin: 0 0 18px; max-width: 900px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart text.lbl { fill: var(--muted); font-size: 11px; }
.chart .grid-l { stroke: var(--border); stroke-width: 1; }
.chart .tot { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 5; display: none; box-shadow: var(--shadow); }
.tip b { display: block; margin-bottom: 2px; }
details.notes { margin-top: 16px; }
details.notes summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 12px 16px; }
details.notes dl { padding: 0 16px 16px; }

.preview-bar { position: sticky; top: 56px; z-index: 15; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--border); font-size: 13px; }

a.ext { white-space: nowrap; font-weight: 500; }

.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.track-btn { border-color: var(--accent); color: var(--accent); }
.track-btn:hover { background: var(--accent-soft); }

.awb-track { margin-left: 6px; font-size: 13px; }
.dtrack { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
.dtrack .awb-track { margin: 0; font-size: 14px; font-weight: 600; }

.anom-hint { color: var(--warn); margin-top: 4px; }
.anom-hint .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.anom-refs { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }

.dash-filters { margin-bottom: 18px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* admin dropdown in the header */
.menu { position: relative; flex: none; }
.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; padding: 18px 12px 16px; color: var(--text-2); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .ic { opacity: .75; }
.menu summary.on { color: var(--text); border-bottom-color: var(--accent); }
.menu summary.on .ic { opacity: 1; color: var(--accent); }
.menu .chev { width: 14px; height: 14px; transition: transform .15s; }
.menu[open] .chev { transform: rotate(180deg); }
.menu-pop { position: absolute; top: calc(100% + 4px); left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.menu-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.menu-pop a:hover { background: var(--surface-2); }
.menu-pop a.on { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 1600px) { .who .uname { display: none; } }
.brand-t { white-space: normal; max-width: 130px; }
.tabs a { padding-left: 10px; padding-right: 10px; }
@media (min-width: 761px) and (max-width: 1320px) { .top.staff .tabs a span, .top.staff .menu summary span { display: none; } .top.staff .tabs a, .top.staff .menu summary { padding-left: 12px; padding-right: 12px; } .top.staff .tabs a .ic, .top.staff .menu summary .ic { width: 18px; height: 18px; } }

/* admin */
.notice { padding: 12px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: 12px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; display: none; z-index: 60; max-width: 90vw; }
.copy { display: flex; gap: 8px; margin-top: 8px; }
.copy input { flex: 1; }
.pill-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.pill-tabs button { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.pill-tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

@media (max-width: 760px) {
  .top-inner { flex-wrap: wrap; padding: 0 16px; gap: 0 12px; }
  .brand { padding-top: 10px; gap: 10px; }
  .brand img { height: 32px; }
  .brand-t { padding-left: 10px; }
  .who { margin-left: auto; padding-top: 10px; }
  .tabs { order: 3; flex: 1 1 calc(100% - 120px); min-width: 0; }
  .who { order: 2; }
  .who select { max-width: 150px; }
  .menu { order: 4; }
  .menu summary { padding: 12px 10px; }
  .menu-pop { left: auto; right: 0; }
  .tabs a { padding: 12px 10px; }
  main { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 46px 10px 12px; }
  .kpi .kico { width: 30px; height: 30px; top: 10px; right: 10px; border-radius: 9px; }
  .kpi .kico .ic { width: 16px; height: 16px; }
  .kpi .v { font-size: 22px; }
  .tablewrap { max-height: none; }
  .filters input[type=search] { max-width: none; }
  .who .uname { display: none; }
}

/* SDI Portal – COVIM statuses */
.st.s-in-arrivo { color: var(--s1); }
.st.s-arrivato { color: var(--warn); }
.st.s-in-dogana { color: var(--s7); }
.st.s-liberato { color: var(--s3); }
.st.s-consegnato { color: var(--ok); }
.st.s-da-campionare { background: var(--warn-bg); color: var(--warn); }
.st.s-in-analisi { color: var(--s1); }
.st.s-certificato-emesso { color: var(--ok); }
.grid tr.grp td { border-top: 2px solid var(--border); }
.grid tr.archived td { color: var(--muted); }
.note-cell { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--text-2); }
