/* CCA Clearing and Warehouse Tracker (demo) - screens (redesign approved 26-11-2026). Built into public/app.css by tools/make_app_js.py. */

:root {
  --navy: #0b1b33; --navy-2: #13294b; --navy-3: #1d3a66; --ink: #0f1a2b; --ink-2: #4a5568; --ink-3: #8592a6;
  --bg: #f3f5f9; --card: #fff; --line: #e4e8ef; --line-2: #eef1f6;
  --tint: #1f6feb; --tint-soft: #e8f0fe;
  --green: #12804a; --green-soft: #e3f5ea; --orange: #b45309; --orange-soft: #fdf0dc; --red: #c42b2b; --red-soft: #fde8e8; --blue: #1f6feb; --blue-soft: #e6effd; --grey: #556070; --grey-soft: #eef1f5;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --r-card: 22px; --r-in: 14px;
  --sh-1: 0 1px 2px rgba(11, 27, 51, .05), 0 2px 6px -2px rgba(11, 27, 51, .06);
  --sh-2: 0 1px 2px rgba(11, 27, 51, .05), 0 12px 32px -14px rgba(11, 27, 51, .22);
  --sh-3: 0 2px 4px rgba(11, 27, 51, .06), 0 24px 60px -20px rgba(11, 27, 51, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Scala Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { font-synthesis: none; margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.num, td.n, .n { font-variant-numeric: tabular-nums; }
/* Scala Sans has old-style figures: every figure (0-9) comes from the system font (the font-face leaves digits out) */
/* Scala Sans has one weight (Regular): everything is set in one weight so letters and figures match; hierarchy comes from size and colour */
body, body * { font-weight: 400 !important; }
.t td.n, .hbar .vv, .rows .r .v, .tile .stats b, .bcard .nums b, .chart .ax, .tip em, .zipl em { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
.nowrap { white-space: nowrap; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: linear-gradient(180deg, #0b1b33 0%, #0e2242 60%, #10284d 100%); color: #dbe4f3; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.side::after { content: ""; position: absolute; inset: auto -60px -80px -60px; height: 280px; background: radial-gradient(closest-side, rgba(64, 132, 255, .22), transparent); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; }
.brand img { height: 15px; filter: brightness(0) invert(1); }
.brand .tag { font-size: 12px; color: #9fb2d3; padding: 3px 9px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 99px; color: #c4d1e8; font-weight: 500; transition: background .2s var(--ease), color .2s; position: relative; }
.nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav.on { background: #fff; color: var(--navy); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .5); }
.nav .ct { margin-left: auto; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #dbe4f3; font-variant-numeric: tabular-nums; }
.nav.on .ct { background: var(--tint-soft); color: var(--tint); }
.side .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 12px 8px; }
.side .foot { margin-top: auto; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .06); font-size: 12.5px; color: #a9b9d4; position: relative; z-index: 1; }
.side .foot b { color: #fff; font-weight: 600; display: block; font-size: 13px; }
.side .foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d27b; margin-right: 6px; box-shadow: 0 0 0 3px rgba(52, 210, 123, .18); }
.main { min-width: 0; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 32px 64px; }

/* ---------- hero band ---------- */
.hero { position: relative; color: #fff; background: radial-gradient(120% 140% at 85% 0%, #24518f 0%, rgba(36, 81, 143, 0) 55%), linear-gradient(160deg, #0b1b33 0%, #10284d 70%, #143260 100%); padding: 34px 0 96px; overflow: hidden; }
.hero .wrap { padding-bottom: 0; position: relative; z-index: 1; }
.hero .texture { position: absolute; inset: 0; opacity: .13; pointer-events: none; }
.hero .texture path { fill: none; stroke: #8fb6ff; stroke-width: .7; }
.hero h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 6px; font-weight: 700; }
.hero .sub { color: #b4c4de; font-size: 15px; }
.hero .eyebrow { color: #8fb6ff; font-size: 13px; font-weight: 600; }
.hero .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lift { margin-top: -70px; position: relative; z-index: 2; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.kpi { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; padding: 16px 18px; backdrop-filter: blur(6px); position: relative; overflow: hidden; }
.kpi .l { color: #a9bbd8; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { color: #a9bbd8; font-size: 12.5px; margin-top: 2px; }
.kpi .spark { position: absolute; right: 12px; bottom: 12px; width: 84px; height: 32px; opacity: .9; }
.kpi .ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(143, 182, 255, .16); color: #b9d1ff; }
.kpi .ic svg { width: 15px; height: 15px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-2); padding: 22px; position: relative; }
.card.flat { box-shadow: var(--sh-1); }
.card h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.card .h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card .h .muted { font-size: 13px; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g-7-5 { grid-template-columns: 7fr 5fr; } .g-8-4 { grid-template-columns: 8fr 4fr; }
.sec-t { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 2px 12px; }
.sec-t h2 { font-size: 20px; margin: 0; letter-spacing: -.015em; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--grey); }
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--green-soft); color: var(--green); } .pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.navy { background: var(--navy); color: #fff; } .pill.line { background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.pill.glass { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.pill.sm { height: 22px; padding: 0 9px; font-size: 12px; }
.pill svg.i { width: 13px; height: 13px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px; font-weight: 600; font-size: 14.5px; transition: transform .16s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--tint); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 111, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.pri:hover { background: #1a63d6; }
.btn.sec { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.btn.white { background: #fff; color: var(--navy); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: #e9edf3; gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, box-shadow .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 27, 51, .1), 0 4px 10px -4px rgba(11, 27, 51, .2); }
.seg.dark { background: rgba(255, 255, 255, .1); }
.seg.dark button { color: #c4d1e8; } .seg.dark button.on { background: #fff; color: var(--navy); }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 99px; background: #fff; box-shadow: var(--sh-2); color: var(--ink-3); }
.search input { border: 0; outline: 0; background: none; flex: 1; font-size: 15px; color: var(--ink); min-width: 0; }
.search kbd { font: 12px var(--font); color: var(--ink-3); padding: 2px 8px; border-radius: 99px; background: var(--grey-soft); }
.fbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.fp { height: 36px; padding: 0 12px 0 14px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); position: relative; transition: box-shadow .2s, background .2s; }
.fp:hover { box-shadow: inset 0 0 0 1px #c9d2df; }
.fp svg.i { width: 14px; height: 14px; color: var(--ink-3); }
.fp.act { background: var(--navy); color: #fff; box-shadow: none; } .fp.act svg.i { color: #9fb6da; }
.fp .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--tint); color: #fff; font-size: 11.5px; display: inline-grid; place-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.chip { height: 30px; padding: 0 6px 0 12px; border-radius: 99px; background: var(--tint-soft); color: var(--tint); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip .x { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 111, 235, .14); }
.chip .x svg { width: 11px; height: 11px; stroke-width: 2.4; }
.clear { font-size: 13px; color: var(--ink-2); font-weight: 600; padding: 0 8px; }
.qs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-top: 16px; }
.qs::-webkit-scrollbar { display: none; }
.q { height: 38px; padding: 0 8px 0 15px; border-radius: 99px; background: #fff; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line-2); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; white-space: nowrap; color: var(--ink-2); }
.q b { font-weight: 650; height: 24px; min-width: 24px; padding: 0 8px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--grey-soft); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.q .d { width: 8px; height: 8px; border-radius: 50%; }
.q.on { background: var(--navy); color: #fff; box-shadow: 0 8px 18px -8px rgba(11, 27, 51, .6); }
.q.on b { background: rgba(255, 255, 255, .16); color: #fff; }

.pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 300px; background: #fff; border-radius: 20px; box-shadow: var(--sh-3), 0 0 0 1px rgba(11, 27, 51, .05); padding: 14px; transform-origin: top left; animation: pop .18s var(--ease); text-align: left; cursor: default; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.pop h4 { margin: 2px 4px 10px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pop .opts { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; }
.pop .opt { height: 32px; padding: 0 12px; border-radius: 99px; background: var(--grey-soft); font-size: 13px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.pop .opt i { font-style: normal; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.pop .opt.on { background: var(--tint); color: #fff; } .pop .opt.on i { color: #cfe0ff; }
.pop .opt .flag { width: 18px; height: 18px; }

/* ---------- flags ---------- */
.flag { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex: none; display: inline-grid; place-items: center; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(11, 27, 51, .25); background: var(--grey-soft); font-size: 9px; font-weight: 700; color: var(--ink-2); }
.flag svg { width: 100%; height: 100%; display: block; }
.flag.lg { width: 34px; height: 34px; } .flag.xl { width: 46px; height: 46px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 6px 14px rgba(0, 0, 0, .3); }

/* ---------- shipment tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.tile { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-2); padding: 18px 18px 16px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease); position: relative; overflow: hidden; text-align: left; width: 100%; }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); box-shadow: var(--sh-3); } }
.tile .t1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .no { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.tile .dt { color: var(--ink-3); font-size: 12.5px; }
.tile .by { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; font-size: 15px; }
.tile .by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route { position: relative; margin: 16px 0 6px; height: 30px; }
.route .ln { position: absolute; left: 7px; right: 7px; top: 9px; height: 2px; background: repeating-linear-gradient(90deg, #cdd6e3 0 5px, transparent 5px 9px); }
.route .fill { position: absolute; left: 7px; top: 9px; height: 2px; background: var(--tint); border-radius: 2px; }
.route .a, .route .b { position: absolute; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--navy); }
.route .a { left: 0; } .route .b { right: 0; }
.route .b.done { background: var(--navy); }
.route .sh { position: absolute; top: -3px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--tint); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(31, 111, 235, .16), 0 4px 10px rgba(31, 111, 235, .45); }
.route .sh svg { width: 14px; height: 14px; }
.route .la, .route .lb { position: absolute; top: 18px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.route .lb { right: 0; text-align: right; }
.tile .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.tile .stats div { font-size: 12px; color: var(--ink-3); }
.tile .stats b { display: block; font-size: 15px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 1px; }
.tile .stats div:nth-child(3) { text-align: right; }
.tile .ft { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.tile .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.mini-rail { display: flex; gap: 3px; margin-top: 12px; }
.mini-rail i { flex: 1; height: 4px; border-radius: 4px; background: #e6eaf1; }
.mini-rail i.on { background: var(--navy); } .mini-rail i.now { background: var(--tint); }

/* ---------- table ---------- */
.tcard { background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-2); margin-top: 18px; overflow: auto; max-height: calc(100vh - 120px); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; z-index: 2; background: #f8fafc; text-align: left; font-weight: 600; color: var(--ink-2); padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th button { width: 100%; height: 46px; padding: 0 10px; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); text-align: inherit; }
.t th.n button { justify-content: flex-end; }
.t th .ar { opacity: 0; width: 12px; height: 12px; transition: opacity .15s, transform .2s; }
.t th:hover .ar { opacity: .4; }
.t th.on button { color: var(--ink); } .t th.on .ar { opacity: 1; color: var(--tint); }
.t th.on.desc .ar { transform: rotate(180deg); }
.t td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
.t td.n { text-align: right; }
.t tbody tr { cursor: pointer; transition: background .12s; }
.t tbody tr:hover { background: #f6f9ff; }
.t .bn { display: flex; align-items: center; gap: 10px; font-weight: 600; max-width: 215px; } .t .bn > div { min-width: 0; } .t .bn span { overflow: hidden; text-overflow: ellipsis; display: block; } .t .bn .left { font-weight: 400; }
.t .inv b { font-weight: 700; } .t .inv div { font-size: 12px; color: var(--ink-3); }
.t .stg { display: flex; flex-direction: column; gap: 6px; }
.t .stg .mini-rail { margin: 0; width: 110px; }
.t .left { font-size: 12px; color: var(--ink-3); }

/* ---------- shipment page ---------- */
.crumb { display: flex; align-items: center; gap: 8px; color: #b4c4de; font-size: 13.5px; margin-bottom: 18px; }
.crumb button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; font-size: 13px; }
.sh-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.sh-head h1 { font-size: 38px; }
.sh-head .who { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.sh-head .who b { font-size: 19px; font-weight: 650; display: block; }
.sh-head .who span { color: #b4c4de; font-size: 14px; }
.sh-head .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.voyage { margin-top: 26px; position: relative; height: 70px; margin-bottom: 44px; }
.vlab { position: absolute; left: 0; right: 0; top: 100%; display: flex; justify-content: space-between; margin-top: 6px; }
.vlab b { display: block; color: #fff; font-size: 14px; } .vlab span { color: #8fa6cb; font-size: 12.5px; }
.voyage svg { width: 100%; height: 100%; overflow: visible; }
.voyage .pl { font-size: 13px; fill: #dbe4f3; font-weight: 600; }
.voyage .ps { font-size: 12px; fill: #8fa6cb; }

.rail-card { padding: 22px 26px 20px; }
.rail { display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.rail .track { position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 21px; height: 4px; border-radius: 4px; background: #e6eaf1; }
.rail .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--navy), var(--tint)); width: 0; transition: width 1.1s var(--ease) .15s; }
.rail .st { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; z-index: 1; }
.rail .bub { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink-3); box-shadow: inset 0 0 0 2px #e1e6ee; transition: background .3s, color .3s, box-shadow .3s; }
.rail .bub svg { width: 21px; height: 21px; }
.rail .st.done .bub { background: var(--navy); color: #fff; box-shadow: 0 6px 14px -6px rgba(11, 27, 51, .6); }
.rail .st.now .bub { background: var(--tint); color: #fff; box-shadow: 0 0 0 6px rgba(31, 111, 235, .15), 0 8px 18px -6px rgba(31, 111, 235, .7); }
.rail .st b { font-size: 13px; font-weight: 650; }
.rail .st span { font-size: 12px; color: var(--ink-3); margin-top: -6px; }

.figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.fig { background: #fff; border-radius: 20px; box-shadow: var(--sh-1); padding: 16px 18px; position: relative; overflow: hidden; }
.fig .l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.fig .v { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fig .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.fig .ring { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }

.secnav { position: sticky; top: 0; z-index: 20; padding: 12px 0; margin: 18px 0 4px; background: linear-gradient(var(--bg) 70%, rgba(243, 245, 249, 0)); }
.secnav .seg { background: #fff; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line-2); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.secnav .seg button.on { background: var(--navy); color: #fff; }
.secnav .seg b { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--grey-soft); color: var(--ink-2); }
.secnav .seg button.on b { background: rgba(255, 255, 255, .18); color: #fff; }
.blk { scroll-margin-top: 70px; margin-top: 18px; }

.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.dl > div { padding: 13px 4px; border-bottom: 1px solid var(--line-2); }
.dl dt { font-size: 12.5px; color: var(--ink-3); }
.dl dd .src { flex: none; }
.dl dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.src { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--grey-soft); color: var(--ink-3); }
.src.mail { background: #f1ecfd; color: #6a4bd1; } .src.exp { background: var(--orange-soft); color: var(--orange); }

.boxes { display: flex; gap: 12px; flex-wrap: wrap; }
.box { width: 132px; }
.box .c { height: 66px; border-radius: 10px; position: relative; overflow: hidden; background: repeating-linear-gradient(90deg, #eef2f8 0 7px, #e4eaf3 7px 9px); box-shadow: inset 0 0 0 1.5px #d3dbe7; }
.box .c i { position: absolute; left: 0; bottom: 0; top: 0; background: repeating-linear-gradient(90deg, #1d3a66 0 7px, #16305a 7px 9px); width: 0; transition: width .9s var(--ease); }
.box .c em { position: absolute; right: 12px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--navy); background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 99px; }
.box .c .doors { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; background: rgba(255, 255, 255, .25); }
.box b { display: block; font-size: 13px; margin-top: 7px; }
.box span { font-size: 12px; color: var(--ink-3); }
.photo { width: 132px; height: 66px; border-radius: 10px; overflow: hidden; background: #e9edf3; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.checklist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ck { padding: 13px 14px; border-radius: 16px; background: #f7f9fc; display: flex; gap: 11px; align-items: center; }
.ck .bx { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-3); flex: none; }
.ck.ok .bx { background: var(--green); color: #fff; box-shadow: none; }
.ck b { font-size: 13px; display: block; line-height: 1.25; } .ck span { font-size: 12px; color: var(--ink-3); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.file { border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .2s, transform .2s var(--ease); display: flex; flex-direction: column; }
@media (hover: hover) { .file:hover { box-shadow: inset 0 0 0 1px #c9d4e4, var(--sh-2); transform: translateY(-2px); } }
.file .th { height: 112px; background: linear-gradient(160deg, #f5f7fb, #e9eef6); position: relative; display: grid; place-items: center; overflow: hidden; }
.file .th img { width: 100%; height: 100%; object-fit: cover; }
.file .th .doc { width: 64px; height: 82px; border-radius: 6px; background: #fff; box-shadow: 0 6px 16px -6px rgba(11, 27, 51, .3); position: relative; padding: 14px 9px; }
.file .th .doc i { display: block; height: 3px; border-radius: 2px; background: #e3e8f0; margin-bottom: 5px; }
.file .th .doc i:nth-child(2) { width: 70%; } .file .th .doc i:nth-child(4) { width: 55%; }
.file .th .ext { position: absolute; left: -8px; bottom: 12px; font-size: 10px; font-weight: 800; color: #fff; padding: 2px 6px; border-radius: 5px; letter-spacing: .02em; }
.ext.pdf { background: #d93a3a; } .ext.xlsx, .ext.xls { background: #1d7a45; } .ext.doc, .ext.docx { background: #2b5fc7; } .ext.jpg, .ext.jpeg, .ext.png { background: #7a4bd1; } .ext.zip { background: #6b7280; }
.file .th .kind { position: absolute; left: 10px; top: 10px; }
.file .bd { padding: 11px 13px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.file .bd b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .bd span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .ac { display: flex; gap: 6px; padding: 0 12px 12px; }
.file .ac button { flex: 1; height: 30px; border-radius: 99px; background: var(--grey-soft); font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.file .ac button svg { width: 14px; height: 14px; }

.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl .ev { position: relative; padding: 0 0 16px; }
.tl .ev::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--c, var(--navy)); }
.tl .ev b { font-size: 14px; font-weight: 600; } .tl .ev div { font-size: 12.5px; color: var(--ink-3); }

.rows .r { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); }
.rows .r:last-child { border-bottom: 0; }
.rows .r .m { flex: 1; min-width: 0; } .rows .r .m b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rows .r .m span { font-size: 12.5px; color: var(--ink-3); }
.rows .r .v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; } .rows .r .v span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.rows .r.click { cursor: pointer; border-radius: 12px; } .rows .r.click:hover { background: #f6f9ff; }
.ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ico.blue { background: var(--blue-soft); color: var(--blue); } .ico.green { background: var(--green-soft); color: var(--green); } .ico.orange { background: var(--orange-soft); color: var(--orange); } .ico.red { background: var(--red-soft); color: var(--red); } .ico.grey { background: var(--grey-soft); color: var(--grey); } .ico.navy { background: var(--navy); color: #fff; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: #e9ecf1; stroke-width: 1; }
.chart .ax { font-size: 11.5px; fill: #8592a6; font-variant-numeric: tabular-nums; }
.chart .bar { transition: opacity .15s; }
.chart .hit:hover + .bar, .chart g:hover > .bar { opacity: .82; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--navy); color: #fff; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; box-shadow: var(--sh-3); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; min-width: 130px; }
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; margin-bottom: 4px; font-size: 13px; }
.tip .rw { display: flex; justify-content: space-between; gap: 14px; color: #c4d1e8; } .tip .rw em { font-style: normal; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: 150px 1fr 92px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.hbar .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; } .hbar .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .tr { height: 12px; border-radius: 6px; background: #eef1f6; overflow: hidden; display: flex; gap: 2px; }
.hbar .tr i { display: block; height: 100%; border-radius: 4px; width: 0; transition: width .9s var(--ease); }
.hbar .vv { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.stack { height: 14px; border-radius: 7px; display: flex; gap: 2px; overflow: hidden; background: #eef1f6; }
.stack i { height: 100%; display: block; }

/* ---------- buyers ---------- */
.buyers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.bcard { background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-2); padding: 20px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; text-align: left; width: 100%; }
@media (hover: hover) { .bcard:hover { transform: translateY(-3px); box-shadow: var(--sh-3); } }
.bcard .t1 { display: flex; gap: 12px; align-items: center; }
.bcard .t1 b { font-size: 16px; display: block; line-height: 1.25; } .bcard .t1 span { color: var(--ink-3); font-size: 13px; }
.bcard .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 12px; }
.bcard .nums div { font-size: 12px; color: var(--ink-3); } .bcard .nums b { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bcard .ft { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- map ---------- */
.mapcard { position: relative; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-3); background: #0d2140; touch-action: none; }
.mapcard svg.map { display: block; width: 100%; height: 100%; cursor: grab; user-select: none; }
.mapcard svg.map.drag { cursor: grabbing; }
.map .sea { fill: url(#seaG); }
.map .land { fill: #1c3559; stroke: #2c4a75; stroke-width: .6; }
.map .bd { fill: none; stroke: #2a4670; stroke-width: .45; }
.map .buy { fill: #2a5694; stroke: #4c7cc0; stroke-width: .6; }
.map .lane { fill: none; stroke: #6f9de0; stroke-width: 1.6; stroke-dasharray: 5 6; opacity: .55; vector-effect: non-scaling-stroke; }
.map .lane.live { stroke: #9fd0ff; opacity: 1; stroke-width: 2.2; animation: flow 2.4s linear infinite; }
.map .lane.sel { stroke: #fff; opacity: 1; stroke-width: 2.4; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.map .grat { stroke: rgba(143, 182, 255, .07); stroke-width: 1; }
.map .port { cursor: pointer; }
.map .port .halo { fill: rgba(143, 182, 255, .18); }
.map .port .core { fill: #fff; stroke: #0b1b33; stroke-width: 2.5; }
.map .port.home .core { fill: #ffb547; }
.map .port.sel .core { fill: #4da3ff; }
.map .port text { fill: #e6eefb; font-size: 13px; font-weight: 650; paint-order: stroke; stroke: #0d2140; stroke-width: 4px; stroke-linejoin: round; }
.map .port text.s { font-size: 11px; fill: #9fb6da; font-weight: 500; }
.map .ocean { fill: rgba(159, 182, 218, .35); font-size: 14px; font-style: italic; letter-spacing: .08em; }
.map .ship { cursor: pointer; }
.map .ship .pulse { fill: rgba(77, 163, 255, .35); animation: pulse 2.2s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.mapui { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; }
.mapui button { width: 40px; height: 40px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--navy); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); backdrop-filter: blur(8px); }
.maplegend { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.maplegend .pill { background: rgba(11, 27, 51, .7); color: #dbe4f3; backdrop-filter: blur(8px); }
.portpanel { position: absolute; left: 14px; top: 14px; width: 300px; max-height: calc(100% - 28px); overflow: auto; background: rgba(255, 255, 255, .96); border-radius: 20px; box-shadow: var(--sh-3); padding: 16px; backdrop-filter: blur(12px); animation: pop .2s var(--ease); }

/* ---------- sheet / modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(11, 27, 51, .45); backdrop-filter: blur(3px); display: grid; place-items: center; animation: fade .2s; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(880px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 28px; box-shadow: var(--sh-3); animation: rise .28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal .mh { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal .mh h3 { margin: 0; font-size: 19px; flex: 1; }
.modal .mb { padding: 10px 22px 22px; }
.xbtn { width: 34px; height: 34px; border-radius: 50%; background: var(--grey-soft); display: grid; place-items: center; color: var(--ink-2); }
.exp { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.sheetpage { aspect-ratio: 1 / 1.414; background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(11, 27, 51, .45); padding: 16px 16px; font-size: 6.2px; line-height: 1.45; color: #1b2433; overflow: hidden; }
.sheetpage .hd { display: flex; justify-content: space-between; align-items: center; border-bottom: 1.5px solid var(--navy); padding-bottom: 6px; }
.sheetpage .hd img { height: 7px; }
.sheetpage h5 { font-size: 10px; margin: 8px 0 2px; } .sheetpage h6 { font-size: 6.5px; margin: 8px 0 3px; color: var(--navy); }
.sheetpage .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.sheetpage .kv div { display: flex; justify-content: space-between; border-bottom: .5px solid #e6eaf0; padding: 1.5px 0; } .sheetpage .kv span { color: #7a8599; }
.sheetpage .rl { display: flex; gap: 2px; margin: 4px 0; } .sheetpage .rl i { flex: 1; height: 3px; border-radius: 2px; background: #e2e7ef; } .sheetpage .rl i.on { background: var(--navy); }
.zipl .grp { margin-bottom: 12px; }
.zipl .grp h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; display: flex; justify-content: space-between; }
.zipl .f { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: #f7f9fc; margin-bottom: 4px; font-size: 13px; }
.zipl .f .ext { font-size: 9.5px; font-weight: 800; color: #fff; padding: 2px 5px; border-radius: 4px; min-width: 32px; text-align: center; }
.zipl .f .ext { flex: none; }
.zipl .f span:not(.ext) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .zipl .f em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.zipbar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--navy); color: #fff; margin-top: 14px; }
.zipbar .m { flex: 1; } .zipbar .m b { display: block; } .zipbar .m span { font-size: 12.5px; color: #a9bbd8; }
.preview { display: grid; place-items: center; background: #0f1a2b; border-radius: 18px; min-height: 380px; overflow: hidden; }
.preview img { max-width: 100%; max-height: 70vh; display: block; }

/* ---------- phone bits ---------- */
.tabbar { display: none; }
.ph-top { display: none; }
.fab { display: none; }
.sheetbtn { display: none; }

/* ---------- motion ---------- */
.rise { animation: rise .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.static *, .static *::before, .static *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }

/* ---------- tablet and open folds: icon rail ---------- */
@media (max-width: 1099px) {
  .shell { grid-template-columns: 84px 1fr; }
  .side { padding: 18px 12px; align-items: center; }
  .brand { padding: 4px 0 18px; } .brand img { display: none; } .brand .tag { display: none; }
  .brand::before { content: "CCA"; font-size: 12px; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--navy); background: #fff; }
  .nav { width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 18px; flex-direction: column; gap: 2px; font-size: 10.5px; }
  .nav .lb { display: none; } .nav .ct { position: absolute; top: 3px; right: 1px; margin: 0; font-size: 10px; padding: 0 5px; background: var(--tint); color: #fff; }
  .side .foot { display: none; }
  .wrap { padding: 0 22px 48px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g-7-5, .g-8-4 { grid-template-columns: 1fr; }
  .figs { grid-template-columns: repeat(2, 1fr); }
  .checklist { grid-template-columns: repeat(2, 1fr); }
  .dl { grid-template-columns: repeat(2, 1fr); }
  .sh-head { grid-template-columns: 1fr; } .sh-head .acts { justify-content: flex-start; }
  .exp { grid-template-columns: 240px 1fr; }
}

/* ---------- phones ---------- */
@media (max-width: 679px) {
  html, body { font-size: 15px; }
  .shell { display: block; }
  .side { display: none; }
  .wrap { padding: 0 16px calc(110px + var(--safe-b)); }
  .hero { padding: calc(14px + env(safe-area-inset-top, 0px)) 0 84px; }
  .hero h1 { font-size: 30px; }
  .hero .top { align-items: flex-start; }
  .ph-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .ph-top img { height: 12px; filter: brightness(0) invert(1); }
  .ph-top .av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
  .kpi { padding: 13px 14px; border-radius: 18px; } .kpi .v { font-size: 22px; } .kpi .spark { display: none; }
  .lift { margin-top: -62px; }
  .card { padding: 18px; border-radius: 20px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .tabbar { display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); height: 66px; padding: 6px; border-radius: 99px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 12px 34px -12px rgba(11, 27, 51, .45), inset 0 0 0 1px rgba(255, 255, 255, .7), 0 0 0 1px rgba(11, 27, 51, .06); justify-content: space-between; }
  .tabbar button { flex: 1; border-radius: 99px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.on { background: var(--navy); color: #fff; }
  .search { height: 44px; min-width: 0; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line-2); } .search kbd { display: none; }
  .desk { display: none !important; }
  .kpis { display: flex; overflow-x: auto; scrollbar-width: none; margin: 18px -16px 0; padding: 0 16px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 62%; scroll-snap-align: start; }
  .rail .bub { width: 38px; height: 38px; } .rail .bub svg { width: 18px; height: 18px; } .rail .track { top: 17px; } .rail .st b { font-size: 11px; line-height: 1.2; } .rail .st span { font-size: 10.5px; margin-top: -4px; }
  .vlab b { font-size: 13px; } .vlab span { font-size: 11.5px; }
  .sh-head .acts { margin-top: 4px; }
  .sheetbtn { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; place-items: center; justify-content: center; align-items: center; position: relative; box-shadow: 0 8px 18px -8px rgba(11, 27, 51, .7); }
  .sheetbtn .n { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--tint); font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
  .fbar { display: none; }
  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tile { padding: 16px; border-radius: 20px; }
  .sh-head h1 { font-size: 30px; }
  .sh-head .acts .btn.sec { display: none; }
  .crumb { margin-bottom: 12px; }
  .voyage { height: 78px; margin-top: 18px; }
  .rail-card { padding: 16px 6px; }
  .figs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fig { padding: 14px; border-radius: 18px; } .fig .v { font-size: 20px; } .fig .ring { width: 40px; height: 40px; right: 10px; top: 14px; transform: none; }
  .dl { grid-template-columns: 1fr 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .files { grid-template-columns: 1fr 1fr; gap: 10px; }
  .file .th { height: 92px; } .file .ac button span { display: none; }
  .box, .photo { width: calc(50% - 6px); }
  .hbar { grid-template-columns: 110px 1fr 78px; }
  .buyers { grid-template-columns: 1fr; }
  .exp { grid-template-columns: 1fr; } .exp .sheetwrap { max-width: 230px; margin: 0 auto; }
  .scrim { align-items: end; padding: 0; }
  .modal { border-radius: 28px 28px 0 0; max-height: 92vh; animation: up .32s var(--ease); }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
  .portpanel { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 45%; }
  .mapui { top: 10px; right: 10px; }
  #bigMap { height: 460px !important; }
  .maplegend { top: 10px; left: 10px; bottom: auto; }
  .sec-t { margin-top: 24px; }
  .secnav { margin-top: 10px; }
}
@media (max-width: 679px) and (max-height: 760px) { .kpis .kpi .s { display: none; } }

/* CCA Clearing and Warehouse Tracker (demo) - working app extras (redesign 26-11-2026): sign-in, sheets, forms, toast, action buttons.
   The previous version is kept in design/app-v1-backup-26-11/. */
body.app { background: var(--bg); }
.stagewrap { min-height: 100vh; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 15px; }

/* sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 140% at 85% 0%, #24518f 0%, rgba(36, 81, 143, 0) 55%), linear-gradient(160deg, #0b1b33 0%, #10284d 70%, #143260 100%); }
.signin .card { width: 100%; max-width: 400px; background: #fff; border-radius: 28px; padding: 36px 30px 28px; box-shadow: var(--sh-3); }
.signin img { height: 18px; display: block; margin: 0 auto 26px; }
.signin h1 { font-size: 28px; font-weight: 700; text-align: center; margin: 0; letter-spacing: -.01em; }
.signin p { font-size: 15px; color: var(--ink-2); text-align: center; margin: 6px 0 24px; }

/* form fields */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--ink-2); margin: 0 0 6px 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 18px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 80px; resize: vertical; border-radius: 18px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--tint); box-shadow: 0 0 0 4px rgba(31, 111, 235, .14); }
.btn.wide { width: 100%; justify-content: center; height: 48px; font-size: 16px; background: var(--tint); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 111, 235, .7); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: 8px 6px 0; }

/* sheets (papers, upload, receipts, bills, password) */
.sheet-bg { position: fixed; inset: 0; background: rgba(11, 27, 51, .45); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease both; }
.hsheet { width: 100%; max-width: 580px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); animation: rise .3s var(--ease) both; }
@media (min-width: 680px) { .sheet-bg { align-items: center; } .hsheet { border-radius: 28px; padding-bottom: 22px; } }
.hsheet .grab { width: 38px; height: 5px; border-radius: 3px; background: #c9d1dd; margin: 0 auto 12px; }
.hsheet .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hsheet .hd b { font-size: 17px; font-weight: 650; }
.hsheet .hd button { color: var(--tint); font-size: 15px; font-weight: 600; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--tint-soft); }
.hsheet .grp { margin-bottom: 14px; background: #fff; border-radius: 20px; box-shadow: var(--sh-1); overflow: hidden; }
.hsheet .kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; font-size: 15px; }
.hsheet .kv + .kv { border-top: 1px solid var(--line-2); }
.hsheet .kv span { color: var(--ink-2); }
.hsheet .opt { display: flex; align-items: center; gap: 12px; padding: 12px 18px; font-size: 15px; cursor: pointer; width: 100%; text-align: left; }
.hsheet .opt + .opt { border-top: 1px solid var(--line-2); }
.hsheet .opt i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9d1dd; flex: none; }
.hsheet .opt.on i { border-color: var(--tint); background: var(--tint); box-shadow: inset 0 0 0 3px #fff; }
.hsheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.hsheet .foot { font-size: 13px; color: var(--ink-2); margin: 2px 6px 14px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 15px; padding: 11px 20px; border-radius: 99px; z-index: 200; box-shadow: var(--sh-3); }

/* additions to the screens */
.side .acct { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.side .acct span { width: 100%; color: #dbe4f3; font-size: 12.5px; }
.side .acct button { height: 28px; padding: 0 11px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 12px; font-weight: 600; }
.ph-top .av { color: #fff; }
.ckadd { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--tint); display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); flex: none; }
.ckadd svg { width: 15px; height: 15px; }
.box.addph { text-align: left; cursor: pointer; }
.box.addph .photo { display: grid; place-items: center; color: var(--tint); background: var(--tint-soft); box-shadow: inset 0 0 0 1.5px rgba(31, 111, 235, .3); }
.file .ac a { flex: 1; height: 30px; border-radius: 99px; background: var(--grey-soft); font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.file .ac a svg { width: 14px; height: 14px; }
.rows .r.wide { width: 100%; text-align: left; }
.rows .r .alc { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 260px; }
.advhd { margin: 16px 0 4px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.advr { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 13.5px; border-radius: 12px; }
.advr .m { flex: 1; font-weight: 600; } .advr b { font-variant-numeric: tabular-nums; }
button.pill { cursor: pointer; }
@media (max-width: 679px) { .rows .r .alc { display: none; } .hsheet .two { grid-template-columns: 1fr; } }

/* papers by stage (every paper, whoever issued it) */
.dstages { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dst { background: #f7f9fc; border-radius: 18px; padding: 14px; }
.dsh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dsh b { font-size: 14px; font-weight: 600; }
.dk { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-top: 1px solid var(--line-2); }
.dk:first-child { border-top: 0; }
.dk .bx { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-3); flex: none; }
.dk .bx svg { width: 14px; height: 14px; }
.dk.ok .bx { background: var(--green); color: #fff; box-shadow: none; }
.dk.pend .bx { box-shadow: inset 0 0 0 1.5px #f2c48a; color: var(--orange); background: var(--orange-soft); }
.dk .nm { flex: 1; font-size: 13.5px; min-width: 0; }
.dk .nm i { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); }
.dk.pend .nm i { color: var(--orange); }
.dk .ckadd { width: 28px; height: 28px; margin: 0; }

/* tiles are buttons: older Android WebViews (Chrome 124) shrink a button's flex children - stretch every row */
.tile, .bcard { align-items: stretch; }
.tile > *, .bcard > * { width: 100%; box-sizing: border-box; }
/* the sign-in page uses the system font: Scala Sans is only served after sign-in, so asking for it earlier fails until a reload */
.signin, .signin *, .boot { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif; }

/* CCA demo: wordmark sizes */
.signin img { height: 46px; }
.brand img { height: 30px; }
.ph-top img { height: 24px; }
.hd img { height: 18px; }

/* CCA demo v2 */
.signin img { height: 64px; }
.brand img { height: 34px; }
.ph-top img { height: 28px; }
