/* Freight Demo — application styles */
:root {
  --navy: #0B1F3A;
  --navy-2: #13294A;
  --navy-3: #1C3557;
  --navy-line: #22395C;
  --navy-text: #A9B6CA;
  --orange: #FF6B2C;
  --orange-d: #E85A1D;
  --orange-soft: #FFF1EA;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --line: #E3E8EF;
  --line-2: #EEF1F5;
  --ink: #142235;
  --ink-2: #44546A;
  --ink-3: #6B7A90;
  --ink-4: #98A3B3;
  --st-booked: #64748B;  --st-booked-bg: #EEF1F5;
  --st-transit: #2563EB; --st-transit-bg: #EAF1FE;
  --st-customs: #B45309; --st-customs-bg: #FEF4E2;
  --st-delivered: #15803D; --st-delivered-bg: #E8F5EC;
  --bar-booked: #8593A6; --bar-transit: #2563EB; --bar-customs: #E09A1B; --bar-delivered: #22A05A;
  --m-ok: #15803D; --m-ok-bg: #E8F5EC;
  --m-low: #B45309; --m-low-bg: #FEF4E2;
  --m-neg: #C2281D; --m-neg-bg: #FDECEA;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 56, .06);
  --shadow-md: 0 6px 20px rgba(16, 32, 56, .10);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --sidebar: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.tnum, table.dt td, table.dt th, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mono { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--navy); color: #fff; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .25s ease; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--navy-line); }
.brand-mark { width: 28px; height: 28px; border-radius: 5px; background: var(--orange); display: grid; place-items: center; color: #fff; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--navy-text); margin-top: 1px; }
.tenant { margin: 12px 12px 4px; padding: 9px 10px; border: 1px solid var(--navy-line); border-radius: var(--radius); display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.tenant b { display: block; font-weight: 600; font-size: 12.5px; }
.tenant span { color: var(--navy-text); font-size: 11.5px; }
.tenant .t-logo { width: 26px; height: 26px; border-radius: 4px; background: var(--navy-3); display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #fff; }
.nav { padding: 10px 10px; flex: 1; overflow-y: auto; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6F82A0; padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); color: #C9D3E1; font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.on { background: var(--navy-3); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--orange); }
.nav .cnt { margin-left: auto; font-size: 11.5px; font-weight: 600; background: var(--navy-3); color: #DCE4EF; padding: 1px 7px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.nav a.on .cnt { background: var(--navy-line); }
.nav .cnt.hot { background: var(--orange); color: #fff; }
.side-foot { border-top: 1px solid var(--navy-line); padding: 10px; }
.side-foot button { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: #C9D3E1; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.side-foot button:hover { background: var(--navy-2); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 4px; }
.me b { display: block; font-size: 12.5px; font-weight: 600; }
.me span { font-size: 11.5px; color: var(--navy-text); }

.topbar { height: 56px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a:hover { color: var(--ink); }
.crumbs .ic { color: var(--ink-4); }
.crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.gsearch { position: relative; width: 300px; }
.gsearch input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 0 12px 0 34px; font-size: 13px; transition: border-color .15s, background .15s; }
.gsearch input:focus { outline: none; border-color: #9DB2CF; background: #fff; }
.gsearch > .ic { position: absolute; left: 10px; top: 8px; color: var(--ink-4); }
.gsearch kbd { position: absolute; right: 8px; top: 8px; font: 500 11px var(--font); color: var(--ink-4); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; background: #fff; }
.gs-drop { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px; display: none; z-index: 50; max-height: 360px; overflow: auto; }
.gs-drop.open { display: block; }
.gs-drop a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; font-size: 13px; }
.gs-drop a:hover, .gs-drop a.hl { background: var(--bg); }
.gs-drop .gs-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); padding: 6px 8px 4px; font-weight: 600; }
.updated { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.updated .dot { width: 7px; height: 7px; border-radius: 50%; background: #22A05A; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: var(--radius); color: var(--ink-2); position: relative; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--bg); border-color: var(--line); }
.icon-btn .badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; line-height: 15px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 9.5px; font-weight: 700; text-align: center; padding: 0 3px; border: 2px solid #fff; box-sizing: border-box; min-width: 19px; height: 19px; line-height: 15px; }
.burger { display: none; }

.content { padding: 22px 24px 48px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; }
.page-head p { color: var(--ink-3); margin-top: 3px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; font-weight: 550; font-size: 13px; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { background: var(--bg); border-color: #CDD5E0; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-d); border-color: var(--orange-d); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-3); border-color: var(--navy-3); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; gap: 5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { color: #1D4ED8; font-weight: 500; }
.link:hover { text-decoration: underline; }
.input, .select, textarea.input { height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 10px; font-size: 13px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 64px; }
.input:focus, .select:focus { outline: none; border-color: #7F9BC2; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.field label { display: block; font-size: 12px; font-weight: 550; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.input-affix { position: relative; }
.input-affix span { position: absolute; right: 10px; top: 8px; font-size: 12.5px; color: var(--ink-3); pointer-events: none; }
.input-affix .input { padding-right: 40px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 4px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { background: var(--bg); }
.seg button.on { background: var(--navy); color: #fff; }
.seg-lg button { height: 36px; padding: 0 16px; font-size: 13px; }

.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #CBD3DE; border-radius: 10px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(14px); }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h3 { font-size: 14px; }
.panel-head .sub { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.panel-body { padding: 16px; }
.panel-flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-1-1 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt { margin-top: 16px; }

/* KPI strip: one panel, divided cells */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.kpi { padding: 14px 16px; border-left: 1px solid var(--line-2); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .k-l { font-size: 12px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .k-v { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .k-s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.kpi .up { color: var(--m-ok); font-weight: 600; }
.kpi .down { color: var(--m-neg); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dt th { text-align: left; font-weight: 600; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 9px 11px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dt th.sortable { cursor: pointer; user-select: none; }
table.dt th.sortable:hover { color: var(--ink); }
table.dt th .ic { margin-left: 3px; opacity: .6; }
table.dt td { padding: 10px 11px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.dt tbody tr { transition: background .12s; }
table.dt tbody tr.click { cursor: pointer; }
table.dt tbody tr.click:hover { background: #F7F9FC; }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt td.r, table.dt th.r { text-align: right; }
table.dt tfoot td { font-weight: 650; border-top: 1px solid var(--line); background: var(--surface-2); }
table.dt .id { font-weight: 600; color: var(--ink); }
table.dt .sub2 { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.dt-compact td { padding: 8px 12px; }
.cell-client { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 340px; }
.toolbar .search .ic { position: absolute; left: 10px; top: 8px; color: var(--ink-4); }
.toolbar .search .input { padding-left: 33px; }
.toolbar .select { width: auto; min-width: 128px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 550; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.chip:hover { border-color: #C3CCD8; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip .n { font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.chip.on .n { color: #A9B6CA; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; gap: 10px; flex-wrap: wrap; }
.pg-btns { display: flex; gap: 4px; }
.pg { min-width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 4px; font-size: 12.5px; font-weight: 550; display: grid; place-items: center; padding: 0 6px; font-variant-numeric: tabular-nums; }
.pg:hover { background: var(--bg); }
.pg.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pg[disabled] { opacity: .4; pointer-events: none; }
.pg-gap { min-width: 18px; text-align: center; color: var(--ink-4); align-self: center; }

/* ---------- pills, tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-booked { color: var(--st-booked); background: var(--st-booked-bg); }
.st-transit { color: var(--st-transit); background: var(--st-transit-bg); }
.st-customs { color: var(--st-customs); background: var(--st-customs-bg); }
.st-delivered { color: var(--st-delivered); background: var(--st-delivered-bg); }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.q-draft { background: var(--line-2); color: var(--ink-2); }
.q-sent { background: #EAF1FE; color: #1D4ED8; }
.q-approved { background: var(--orange-soft); color: #C2410C; }
.q-converted { background: var(--m-ok-bg); color: var(--m-ok); }
.q-expired { background: #fff; color: var(--ink-3); border-color: var(--line); }
.q-declined { background: #fff; color: var(--m-neg); border-color: #F3C9C4; }
.tag-neutral { background: var(--line-2); color: var(--ink-2); }
.tag-outline { border-color: var(--line); color: var(--ink-2); background: #fff; }
.mtag { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 12.5px; padding: 1px 6px; border-radius: 4px; }
.m-ok { color: var(--m-ok); background: var(--m-ok-bg); }
.m-low { color: var(--m-low); background: var(--m-low-bg); }
.m-neg { color: var(--m-neg); background: var(--m-neg-bg); }
.t-ok { color: var(--m-ok); } .t-low { color: var(--m-low); } .t-neg { color: var(--m-neg); }
.mode { width: 28px; height: 28px; border-radius: 5px; display: inline-grid; place-items: center; background: var(--line-2); color: var(--navy); flex: none; }
.route-txt { display: inline-block; font-size: 13px; color: var(--ink-2); }
.route-txt .sub2 { display: block; font-size: 12px; color: var(--ink-3); }
.route-txt b { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.route-txt .arr { color: var(--ink-4); margin: 0 5px; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 650; letter-spacing: .02em; flex: none; }
.av-sm { width: 22px; height: 22px; font-size: 9.5px; }
.av-lg { width: 36px; height: 36px; font-size: 13px; }
.who { display: inline-flex; align-items: center; gap: 8px; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius); border: 1px solid #D5DEEA; background: #F1F5FA; font-size: 13px; color: var(--ink-2); }
.banner .ic { color: #3B5B85; margin-top: 1px; }
.banner b { color: var(--ink); }
.banner-warn { background: #FEF7EC; border-color: #F5DDB4; }
.banner-warn .ic { color: var(--m-low); }
.banner-neg { background: #FDF1EF; border-color: #F3C9C4; }
.banner-neg .ic { color: var(--m-neg); }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .ic { color: var(--ink-4); }
.empty h4 { margin-top: 10px; color: var(--ink); font-size: 14px; }
.empty p { margin: 4px auto 14px; max-width: 360px; font-size: 13px; }

/* ---------- dashboard specifics ---------- */
.stackbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--surface); }
.stackbar span { display: block; height: 100%; min-width: 3px; transition: opacity .15s; }
.stackbar span:first-child { border-radius: 3px 0 0 3px; }
.stackbar span:last-child { border-radius: 0 3px 3px 0; }
.stackbar-lg { height: 26px; border-radius: 4px; }
.sb-booked { background: var(--bar-booked); } .sb-transit { background: var(--bar-transit); } .sb-customs { background: var(--bar-customs); } .sb-delivered { background: var(--bar-delivered); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; 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: 2px; display: inline-block; }
.status-tiles { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.status-tiles a { padding: 10px 12px; border-left: 1px solid var(--line-2); transition: background .15s; }
.status-tiles a:first-child { border-left: 0; }
.status-tiles a:hover { background: var(--surface-2); }
.status-tiles .n { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; display: block; margin-top: 2px; }
.status-tiles .l { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.status-tiles .l i { width: 8px; height: 8px; border-radius: 2px; }
.office-row td .stackbar { width: 100%; min-width: 120px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .f-txt { flex: 1; min-width: 0; color: var(--ink-2); }
.feed .f-txt b { color: var(--ink); font-weight: 600; }
.feed .f-txt a.ref { font-weight: 600; color: #1D4ED8; }
.feed time { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }
.arrivals li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.arrivals li:last-child { border-bottom: 0; }
.arrivals { list-style: none; margin: 0; padding: 0; }
.arrivals .eta { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.arrivals .eta b { display: block; color: var(--ink); font-size: 13px; }
.hover-tip { position: fixed; pointer-events: none; background: var(--navy); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 4px; z-index: 100; opacity: 0; transition: opacity .1s; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hover-tip.on { opacity: 1; }

/* ---------- shipment detail ---------- */
.sh-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.sh-title { display: flex; gap: 12px; align-items: center; }
.sh-title .mode { width: 40px; height: 40px; border-radius: 6px; }
.sh-title h1 { font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-title p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px 10px; font-weight: 550; font-size: 13.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 7px; transition: color .15s, border-color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--orange); }
.tabs .cnt { font-size: 11px; background: var(--line-2); color: var(--ink-2); padding: 0 6px; border-radius: 9px; font-weight: 600; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv > div { padding: 11px 16px; border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2); min-width: 0; }
.kv > div:nth-child(4n+1) { border-left: 0; }
.kv dt { font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-bottom: 3px; }
.kv dd { margin: 0; font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.kv dd.mono { font-weight: 500; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 16px 16px; }
.step { position: relative; padding-top: 30px; text-align: left; }
.step::before { content: ''; position: absolute; top: 10px; left: 0; right: 0; height: 2px; background: var(--line); }
.step:first-child::before { left: 10px; }
.step:last-child::before { right: auto; width: 10px; }
.step .dot { position: absolute; top: 2px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #CBD3DE; display: grid; place-items: center; z-index: 1; }
.step.done::before { background: var(--c); }
.step.done .dot { background: var(--c); border-color: var(--c); color: #fff; }
.step.cur .dot { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.step.cur .dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.step.cur::before { background: linear-gradient(90deg, var(--c) 0 12px, var(--line) 12px); }
.step b { font-size: 13px; display: block; }
.step span { font-size: 12px; color: var(--ink-3); }
.step.s-booked { --c: var(--st-booked); } .step.s-in_transit { --c: var(--st-transit); } .step.s-in_customs { --c: #D08A12; } .step.s-delivered { --c: var(--st-delivered); }
.events { list-style: none; margin: 0; padding: 4px 16px 10px; }
.events li { position: relative; padding: 9px 0 9px 26px; display: flex; gap: 12px; }
.events li::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.events li:first-child::before { top: 16px; }
.events li:last-child::before { bottom: calc(100% - 16px); }
.events li .ed { position: absolute; left: 1px; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--ink-4); }
.events li.done .ed { background: var(--navy); border-color: var(--navy); }
.events li.plan { color: var(--ink-3); }
.events li.plan .et b { font-weight: 500; }
.events .et { flex: 1; min-width: 0; }
.events .et b { display: block; font-size: 13px; font-weight: 600; }
.events .et span { font-size: 12px; color: var(--ink-3); }
.events time { font-size: 12px; color: var(--ink-3); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.route-svg { display: block; max-width: 100%; height: auto; }
.route-meta { display: flex; justify-content: space-between; padding: 0 16px 14px; gap: 16px; font-size: 12.5px; }
.route-meta b { display: block; font-size: 13.5px; }
.route-meta .r { text-align: right; }
.progress-line { font-size: 12px; color: var(--ink-3); text-align: center; }

.cost-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.cost-sum > div { padding: 14px 16px; border-left: 1px solid var(--line-2); }
.cost-sum > div:first-child { border-left: 0; }
.cost-sum span { font-size: 12px; color: var(--ink-3); display: block; }
.cost-sum b { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mbar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; display: flex; margin-top: 8px; }
.mbar span { display: block; height: 100%; }

.doc-row { display: flex; align-items: center; gap: 12px; }
.doc-ic { width: 32px; height: 38px; border: 1px solid var(--line); border-radius: 3px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #B42318; background: #fff; position: relative; flex: none; }
.doc-ic::after { content: ''; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; background: linear-gradient(225deg, var(--bg) 50%, var(--line) 50%); }
.doc-row b { display: block; font-weight: 550; font-size: 13px; }
.doc-row span { font-size: 12px; color: var(--ink-3); }
.vis { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); }
.vis.on { color: var(--m-ok); }

/* ---------- quotes form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span4 { grid-column: 1 / -1; }
.form-sec { padding: 16px; border-bottom: 1px solid var(--line-2); }
.form-sec:last-child { border-bottom: 0; }
.form-sec h4 { font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.form-sec h4 .n { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; display: grid; place-items: center; }
.ins-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); }
.ins-box.on { border-color: #F5C7AF; background: #FFF8F4; }
.ins-box b { display: block; font-size: 13px; }
.ins-box p { font-size: 12.5px; color: var(--ink-3); }
.qsum { position: sticky; top: 72px; }
.qsum .lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.qsum .lines td { padding: 7px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.qsum .lines td:last-child { text-align: right; }
.qsum .lines tr.tot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 700; font-size: 15px; padding-top: 10px; }
.qsum .mrow { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); margin-top: 12px; }

/* ---------- profitability ---------- */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 18px 16px 0; position: relative; }
.bars .gridline { position: absolute; left: 16px; right: 16px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--ink-4); }
.bars .gridline span { position: absolute; top: -8px; right: 0; background: #fff; padding-left: 4px; font-variant-numeric: tabular-nums; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; z-index: 1; cursor: default; }
.bars .bar { width: 100%; max-width: 46px; background: var(--navy-3); border-radius: 4px 4px 0 0; transition: opacity .15s; min-height: 2px; }
.bars .bcol:hover .bar { opacity: .82; }
.bars .bcol.cur .bar { background: repeating-linear-gradient(135deg, var(--navy-3) 0 5px, #3A5478 5px 8px); }
.bars .bv { font-size: 11.5px; font-weight: 600; margin-bottom: 5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bars-x { display: flex; gap: 14px; padding: 8px 16px 14px; border-top: 1px solid var(--line); margin: 0; }
.bars-x span { flex: 1; text-align: center; font-size: 12px; color: var(--ink-3); }
.bars-x span b { display: block; color: var(--ink); font-weight: 600; font-size: 12px; }
.hbar { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.hbar .track { flex: 1; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; border-radius: 3px; }
.aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line-2); }
.aging > div { padding: 12px 16px; border-left: 1px solid var(--line-2); }
.aging > div:first-child { border-left: 0; }
.aging span { font-size: 12px; color: var(--ink-3); display: block; }
.aging b { font-size: 16px; font-variant-numeric: tabular-nums; }
.aging .late b { color: var(--m-neg); }

/* ---------- dropdowns ---------- */
.dropdown { position: absolute; right: 0; top: 44px; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 60; display: none; }
.dropdown.open { display: block; animation: drop .15s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.dd-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.dd-head b { font-size: 13.5px; }
.notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; transition: background .12s; }
.notif:hover { background: var(--surface-2); }
.notif .nd { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.notif.unread .nd { background: var(--orange); }
.notif b { display: block; font-weight: 600; }
.notif p { color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.notif time { font-size: 11.5px; color: var(--ink-4); }
.dd-foot { padding: 9px 14px; text-align: center; font-size: 12.5px; }
.pos-rel { position: relative; }

/* ---------- modal & toast ---------- */
#modal-root { position: fixed; inset: 0; z-index: 200; display: none; }
#modal-root.open { display: block; }
.modal-back { position: absolute; inset: 0; background: rgba(11, 31, 58, .45); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: absolute; left: 50%; top: 6vh; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 88vh; background: #fff; border-radius: var(--radius); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(11, 31, 58, .25); animation: pop .18s ease; }
.modal-wide { width: min(900px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-head p { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.doc-preview-wrap { background: #E9EDF2; margin: -18px; padding: 24px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; display: flex; gap: 9px; align-items: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(8px); transition: all .22s ease; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: none; }
.toast .ic { color: #6EE7A0; }
.toast.warn .ic { color: #FBBF24; }

/* ---------- tour ---------- */
.tour-spot { position: fixed; z-index: 400; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(11, 31, 58, .55); transition: all .3s ease; pointer-events: none; outline: 2px solid var(--orange); outline-offset: 2px; }
.tour-block { position: fixed; inset: 0; z-index: 399; }
.tour-tip { position: fixed; z-index: 401; width: 330px; background: #fff; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(11, 31, 58, .28); padding: 16px 18px 14px; transition: top .3s ease, left .3s ease, opacity .2s; }
.tour-tip .tt-step { font-size: 11.5px; font-weight: 600; color: var(--orange-d); text-transform: uppercase; letter-spacing: .06em; }
.tour-tip h4 { font-size: 15px; margin: 4px 0 6px; }
.tour-tip p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.tour-tip .tt-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-tip .tt-foot .skip { margin-right: auto; }
.tour-tip .tt-dots { display: flex; gap: 4px; margin-top: 12px; }
.tour-tip .tt-dots i { width: 16px; height: 3px; border-radius: 2px; background: var(--line); }
.tour-tip .tt-dots i.on { background: var(--orange); }
.tour-tip::before { content: ''; position: absolute; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.tour-tip.arrow-left::before { left: -6px; top: 22px; }
.tour-tip.arrow-top::before { top: -6px; left: 28px; }
.tour-tip.arrow-bottom::before { bottom: -6px; left: 28px; }
.tour-tip.arrow-none::before { display: none; }

/* ---------- print container (hidden on screen) ---------- */
#print-root { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .gsearch { width: 220px; }
  .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kv > div:nth-child(4n+1) { border-left: 1px solid var(--line-2); }
  .kv > div:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 960px) {
  .g-3-1, .g-2, .g-1-1-1 { grid-template-columns: minmax(0, 1fr); }
  .qsum { position: static; }
  .updated { display: none; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .nav-scrim { display: block; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(11,31,58,.4); z-index: 35; }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .gsearch { display: none; }
  .content { padding: 16px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(n) { border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv > div:nth-child(n) { border-left: 1px solid var(--line-2); }
  .kv > div:nth-child(odd) { border-left: 0; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-sum, .aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-sum > div:nth-child(n), .aging > div:nth-child(n) { border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }
  .cost-sum > div:nth-child(odd), .aging > div:nth-child(odd) { border-left: 0; }
  .status-tiles { grid-template-columns: repeat(2, 1fr); }
  .status-tiles a:nth-child(3) { border-left: 0; }
  .status-tiles a:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .dropdown { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; }
  .page-head h1 { font-size: 19px; }
  .stepper { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .bars { gap: 8px; } .bars-x { gap: 8px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .toolbar .select { flex: 1; min-width: 0; }
  .crumbs .hide-sm { display: none; }
  .tour-tip { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 10px 10px 0 0; padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); }
  .tour-tip::before { display: none; }
}
@media (max-width: 480px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span2 { grid-column: auto; }
  .sh-title h1 { font-size: 17px; }
  .route-meta { font-size: 12px; }
}

/* ---------- misc ---------- */
.nav .muted-ic { margin-left: auto; opacity: .5; }
tr.sel td { background: #F4F7FB; }
@media (max-width: 820px) { .hide-sm { display: none !important; } }

/* ---------- client portal ---------- */
body.portal-mode { background: #F6F7F9; }
.demo-bar { background: var(--navy); color: #C9D3E1; font-size: 12.5px; display: flex; align-items: center; gap: 14px; padding: 7px 24px; flex-wrap: wrap; }
.demo-bar > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.demo-sel { display: inline-flex; align-items: center; gap: 7px; }
.demo-sel select { background: var(--navy-3); color: #fff; border: 1px solid var(--navy-line); border-radius: 4px; height: 26px; padding: 0 6px; font-size: 12.5px; }
.demo-sp { flex: 1; }
.demo-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--navy-line); color: #DCE4EF; height: 26px; padding: 0 10px; border-radius: 4px; font-size: 12.5px; font-weight: 500; transition: background .15s; }
.demo-btn:hover { background: var(--navy-2); }
.demo-btn.strong { background: var(--orange); border-color: var(--orange); color: #fff; }
.demo-btn.strong:hover { background: var(--orange-d); }
.p-top { background: #fff; border-bottom: 1px solid var(--line); }
.p-top-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.p-brand { display: flex; align-items: center; gap: 10px; }
.p-logo { width: 32px; height: 32px; border-radius: 6px; background: var(--navy); color: #fff; display: grid; place-items: center; }
.p-brand b { display: block; font-size: 14.5px; }
.p-brand > span > span { font-size: 12px; color: var(--ink-3); }
.p-nav { display: flex; gap: 4px; }
.p-nav a { padding: 8px 12px; border-radius: 6px; font-weight: 550; color: var(--ink-3); font-size: 14px; transition: background .15s, color .15s; }
.p-nav a:hover { background: var(--bg); color: var(--ink); }
.p-nav a.on { color: var(--ink); background: var(--bg); }
.p-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.p-user b { display: block; font-size: 13px; }
.p-user > span > span { font-size: 12px; color: var(--ink-3); }
.p-main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; }
.p-hello h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.p-hello p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.p-hello { margin-bottom: 24px; }
.p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.p-tabs { display: inline-flex; gap: 4px; background: #EBEEF2; padding: 3px; border-radius: 6px; margin-bottom: 14px; }
.p-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 5px; font-weight: 600; font-size: 13.5px; color: var(--ink-3); transition: all .15s; }
.p-tabs button span { font-size: 12px; color: var(--ink-4); margin-left: 4px; }
.p-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.p-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.p-card { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.p-card:hover { border-color: #C6D0DD; box-shadow: 0 4px 14px rgba(11, 31, 58, .07); transform: translateY(-1px); }
.p-mode { width: 44px; height: 44px; border-radius: 50%; background: #EEF2F7; color: var(--navy); display: grid; place-items: center; flex: none; }
.p-mode.lg { width: 52px; height: 52px; }
.p-card-main { flex: 1; min-width: 0; }
.p-route { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.p-route span { color: var(--ink-4); font-weight: 400; margin: 0 4px; }
.p-ref { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-eta { text-align: right; min-width: 116px; }
.p-eta-l { display: block; font-size: 12px; color: var(--ink-3); }
.p-eta b { display: block; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.p-eta-s { font-size: 12.5px; color: var(--st-transit); font-weight: 600; }
.p-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 12px; max-width: 460px; }
.p-st i { display: block; height: 5px; border-radius: 3px; background: #E3E8EF; }
.p-st span { display: block; font-size: 11.5px; color: var(--ink-4); margin-top: 5px; font-weight: 500; }
.p-st.on i { background: var(--c); }
.p-st.cur span { color: var(--ink); font-weight: 650; }
.p-st.k-booked { --c: var(--bar-booked); } .p-st.k-in_transit { --c: var(--bar-transit); } .p-st.k-in_customs { --c: var(--bar-customs); } .p-st.k-delivered { --c: var(--bar-delivered); }
.p-box { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; }
.p-box h3 { font-size: 14.5px; margin-bottom: 12px; }
.p-coord { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.p-coord b { display: block; }
.p-coord div span { font-size: 12.5px; color: var(--ink-3); }
.p-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.p-btn { margin-top: 14px; width: 100%; height: 40px; border-radius: 6px; border: 0; background: var(--orange); color: #fff; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.p-btn:hover { background: var(--orange-d); }
.p-doc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 6px; border-radius: 5px; color: var(--ink-2); transition: background .15s; }
.p-doc:hover { background: var(--bg); }
.p-doc > span:nth-child(2) { flex: 1; min-width: 0; }
.p-doc b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.p-doc > span > span { font-size: 12px; color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-doc-row { padding: 12px 20px; border-bottom: 1px solid var(--line-2); border-radius: 0; }
.p-doc-row:last-child { border-bottom: 0; }
.p-doc-meta { font-size: 12.5px; color: var(--ink-3); min-width: 120px; text-align: right; }
.p-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #1D4ED8; margin-top: 8px; }
.p-empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--line); border-radius: 6px; color: var(--ink-3); }
.p-empty h4 { color: var(--ink); margin: 10px 0 4px; font-size: 15px; }
.p-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-3); font-size: 13.5px; margin-bottom: 16px; }
.p-back:hover { color: var(--ink); }
.p-detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.p-detail-head h1 { font-size: 25px; font-weight: 650; letter-spacing: -0.02em; }
.p-detail-head p { font-size: 15px; color: var(--ink-2); margin-top: 3px; }
.p-route-box { padding: 10px 6px 18px; }
.p-route-box .p-steps { max-width: none; padding: 0 16px; margin-top: 6px; }
.p-next { display: flex; gap: 10px; align-items: flex-start; background: var(--st-transit-bg); color: #1E40AF; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.p-tl { list-style: none; margin: 0; padding: 0; }
.p-tl li { display: flex; gap: 12px; position: relative; padding: 0 0 16px 22px; }
.p-tl li::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: #E3E8EF; }
.p-tl li:last-child::before { display: none; }
.p-tl li i { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); }
.p-tl li:first-child i { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.p-tl li div { flex: 1; }
.p-tl b { display: block; font-size: 14px; }
.p-tl span { font-size: 12.5px; color: var(--ink-3); }
.p-tl time { font-size: 12px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.p-dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 13px; }
.p-dl dt { color: var(--ink-3); }
.p-dl dd { margin: 0; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.p-foot { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 0 24px 32px; }
@media (max-width: 900px) {
  .p-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .demo-bar { padding: 7px 16px; gap: 8px 12px; }
  .demo-sp { display: none; }
  .p-top-in { padding: 0 16px; gap: 12px; height: 58px; }
  .p-user > span, .p-brand > span > span { display: none; }
  .p-nav a { padding: 7px 8px; font-size: 13.5px; }
  .p-main { padding: 22px 16px 40px; }
  .p-hello h1, .p-detail-head h1 { font-size: 21px; }
  .p-card { flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
  .p-card .p-mode { width: 38px; height: 38px; }
  .p-card-main { flex-basis: calc(100% - 54px); }
  .p-eta { text-align: left; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding-left: 50px; }
  .p-eta b { font-size: 15px; }
  .p-doc-row .p-doc-meta { display: none; }
  .p-detail-head { align-items: flex-start; }
}
