/* Qafila: an operations-room look. Dark control surfaces for dispatch, driver and admin; bright paper for merchant and customer. */
.q-dark {
  --d-bg: #0a1020; --d-fg: #e8eef9; --d-mute: #9aaac6; --d-line: #26345a; --d-card: #111a2e; --d-brand: #ff7a1a; --d-brand-fg: #0b1220; --d-focus: #4cc3ff; --d-danger: #ff6b6b;
  --panel2: #16213a; --brand: #ff7a1a; --ok: #35d08a; --bad: #ff6b6b; --warn: #ffc24a; --info: #4cc3ff; --chart2: #3f5f9a;
  --map-sea1: #0f1c38; --map-sea2: #0a1328; --map-land: #15244a; --map-coast: #4f74b8; --map-edge: #35508a; --map-grid: #ffffff0d; --map-dot: #1b2c52; --map-ring: #6f93d6; --map-txt: #dbe6fb; --map-n: #ffffff;
  --shadow: 0 18px 40px -22px #000;
}
.q-light {
  --d-bg: #eef1f6; --d-fg: #0c1424; --d-mute: #526079; --d-line: #d6dce8; --d-card: #ffffff; --d-brand: #c43d00; --d-brand-fg: #fff; --d-focus: #0b6bcb; --d-danger: #b3261e;
  --panel2: #f4f6fb; --brand: #c43d00; --ok: #11794a; --bad: #b3261e; --warn: #8a5a00; --info: #0b5cab; --chart2: #7e97c4;
  --map-sea1: #e4ecf8; --map-sea2: #d3dff2; --map-land: #f4f7fc; --map-coast: #6b86b8; --map-edge: #a5b6d3; --map-grid: #0b1a3a10; --map-dot: #ffffff; --map-ring: #3a5a96; --map-txt: #182540; --map-n: #0c1424;
  --shadow: 0 14px 30px -22px #0b1a3a;
}
body { background: #0a1020; }
body:has(.q-light) { background: #eef1f6; }
.q-app { min-block-size: calc(100vh - var(--bar-h)); background: var(--d-bg); color: var(--d-fg); font-size: 15px; }
.q-app h1, .q-app h2, .q-app h3 { font-family: var(--d-font); }
.q-app a { text-decoration-thickness: 1px; }
.q-tn { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .86em; letter-spacing: .02em; }
.q-dim { color: var(--d-mute); }
.q-grow { flex: 1; }
.q-left { justify-content: flex-start; margin-block-start: .5rem; }
.q-hint { color: var(--d-mute); font-size: .85rem; margin-block-start: .4rem; }
.mjx-input { background: var(--panel2); border-color: var(--d-line); }
.q-light .mjx-input { background: #fff; }
.q-app .mjx-btn--ghost { color: var(--d-fg); border-color: var(--d-line); }
.q-app .mjx-btn--ghost:hover { background: var(--panel2); }
.q-app .mjx-btn { border-radius: 10px; font-weight: 600; }
.mjx-btn:focus-visible, .q-app a:focus-visible, .q-app select:focus-visible, .q-app input:focus-visible { outline: 3px solid var(--d-focus); outline-offset: 2px; }
.q-app .mjx-dialog { background: var(--d-card); color: var(--d-fg); border: 1px solid var(--d-line); }
.q-app .mjx-table th { color: var(--d-mute); border-color: var(--d-line); }
.q-app .mjx-table td { border-color: var(--d-line); }
.q-link { display: inline-flex; align-items: center; background: none; border: 0; padding: 0 .25rem; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font: inherit; min-block-size: 34px; }
.q-link.q-tn { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; }

/* header */
.q-head { position: sticky; inset-block-start: var(--bar-h); z-index: 60; background: #0b1220; border-block-end: 1px solid #1d2a4a; }
.q-head__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-inline-size: 1560px; margin-inline: auto; padding: .5rem clamp(.75rem, 3vw, 2rem); }
.q-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; min-block-size: 44px; }
.q-logo span { display: grid; line-height: 1.15; }
.q-logo b { font-size: 1.25rem; font-family: var(--d-font); }
.q-logo small { color: #9fb0cf; font-size: .72rem; }
.q-roles { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.q-roles a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 10px; color: #b8c6e0; text-decoration: none; font-size: .9rem; white-space: nowrap; min-block-size: 40px; border: 1px solid transparent; }
.q-roles a:hover { background: #16213a; color: #fff; }
.q-roles a.is-on { background: #1c2b4d; color: #fff; border-color: #34497c; box-shadow: inset 0 -2px 0 #ff7a1a; }
@media (max-width: 780px) { .q-roles a span { display: none; } .q-roles a { padding: .5rem .7rem; } .q-logo small { display: none; } }

/* pages */
.q-page { max-inline-size: 1180px; margin-inline: auto; padding: clamp(.9rem, 2.5vw, 1.75rem) clamp(.75rem, 3vw, 2rem) 4rem; display: grid; gap: 1.1rem; align-content: start; }
.q-page--wide { max-inline-size: 1560px; }
.q-page > *, .q-ctl > * { min-inline-size: 0; }
.q-who { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--d-mute); font-size: .9rem; }
.q-who select { inline-size: auto; min-inline-size: 14rem; }
.q-tabs { display: flex; gap: .25rem; overflow-x: auto; border-block-end: 1px solid var(--d-line); scrollbar-width: thin; }
.q-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1rem; text-decoration: none; color: var(--d-mute); font-weight: 500; white-space: nowrap; border-block-end: 3px solid transparent; margin-block-end: -1px; min-block-size: 44px; }
.q-tabs a:hover { color: var(--d-fg); }
.q-tabs a.is-on { color: var(--d-fg); border-color: var(--brand); }
.q-tabs em { font-style: normal; font-size: .75rem; background: var(--panel2); border: 1px solid var(--d-line); border-radius: 99px; padding: 0 .5rem; color: var(--d-mute); }
.q-phead { margin-block-end: .4rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-end; justify-content: space-between; }
.q-phead h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; }
.q-phead p { color: var(--d-mute); margin-block-start: .2rem; max-inline-size: 46rem; }
.q-phead__a { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.q-phead__a .q-sel { inline-size: auto; }
.q-card { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 16px; padding: clamp(.9rem, 2vw, 1.25rem); min-inline-size: 0; box-shadow: var(--shadow); }
.q-card h2 { font-size: 1.05rem; margin-block-end: .6rem; } .q-card h3 { font-size: .95rem; margin-block-end: .5rem; }
.q-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-block-end: .75rem; }
.q-bar h2, .q-bar h3 { margin: 0; }
.q-bar--top { margin: 0; }
.q-search { flex: 1 1 14rem; inline-size: auto; }
.q-sel { inline-size: auto; min-inline-size: 9rem; }
.q-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.q-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.q-stack, .q-side { display: grid; gap: 1.1rem; min-inline-size: 0; }
.q-grid2, .q-grid3 { align-items: start; }
.q-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.q-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.q-grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.1rem; align-items: start; }
.q-card--wide { grid-column: 1 / -1; }
.q-form { display: grid; gap: .85rem; align-content: start; }
.q-form h3 { margin-block-start: .4rem; }
.mjx-field.has-err .mjx-input { border-color: var(--d-danger); }
.mjx-err { color: var(--bad); }
.q-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; }
.q-money { max-inline-size: 8rem; min-block-size: 40px; }
.q-check { display: flex; align-items: center; gap: .6rem; min-block-size: 44px; cursor: pointer; }
.q-check input { inline-size: 20px; block-size: 20px; accent-color: var(--brand); }
.q-count { font-style: normal; margin-inline-start: .5rem; font-size: .8rem; background: var(--panel2); border: 1px solid var(--d-line); padding: 0 .55rem; border-radius: 99px; color: var(--d-mute); }
input[type=checkbox] { accent-color: var(--brand); inline-size: 18px; block-size: 18px; }
@media (max-width: 960px) { .q-split, .q-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .q-grid2, .q-grid3 { grid-template-columns: minmax(0, 1fr); } }

/* KPIs */
.q-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.q-kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.q-kpis--wallet { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .q-kpis--6, .q-kpis--wallet { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .q-kpis, .q-kpis--6, .q-kpis--wallet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.q-kpi { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .1rem; position: relative; overflow: hidden; }
.q-kpi::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 4px; background: var(--d-line); }
.q-kpi.is-ok::before { background: var(--ok); } .q-kpi.is-bad::before { background: var(--bad); } .q-kpi.is-warn::before { background: var(--warn); } .q-kpi.is-info::before { background: var(--info); }
.q-kpi__l { color: var(--d-mute); font-size: .8rem; }
.q-kpi__v { font-size: clamp(1.25rem, 2vw, 1.75rem); font-family: var(--d-font); font-variant-numeric: tabular-nums; line-height: 1.3; }
.q-kpi__s { color: var(--d-mute); font-size: .75rem; }

/* chips, sla */
.q-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .08rem .65rem; border-radius: 99px; font-size: .78rem; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, var(--cc, var(--d-mute)) 18%, transparent); color: color-mix(in srgb, var(--cc, var(--d-mute)) 75%, var(--d-fg)); border: 1px solid color-mix(in srgb, var(--cc, var(--d-mute)) 40%, transparent); }
.q-chip i { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--cc, var(--d-mute)); }
.q-st-new { --cc: #8aa0c8; } .q-st-picked { --cc: #3cc8d8; } .q-st-hub { --cc: #9a7bff; } .q-st-transit { --cc: #4c8dff; } .q-st-out { --cc: #ff9a2e; }
.q-st-delivered { --cc: #2fc77f; } .q-st-failed { --cc: #ff5d5d; } .q-st-returning { --cc: #e868c8; } .q-st-returned { --cc: #8793a8; }
.q-pk-requested, .q-po-requested { --cc: #ffb02e; } .q-pk-assigned { --cc: #4c8dff; } .q-pk-done, .q-po-paid { --cc: #2fc77f; } .q-po-rejected { --cc: #ff5d5d; }
.q-light .q-st-new { --cc: #4d6490; } .q-light .q-st-picked { --cc: #0a7f8c; } .q-light .q-st-hub { --cc: #5b3fd1; } .q-light .q-st-transit { --cc: #1558c9; } .q-light .q-st-out { --cc: #b45a00; }
.q-light .q-st-delivered { --cc: #11794a; } .q-light .q-st-failed { --cc: #b3261e; } .q-light .q-st-returning { --cc: #a3207f; } .q-light .q-st-returned { --cc: #5d6a80; }
.q-light .q-pk-requested, .q-light .q-po-requested { --cc: #8a5a00; } .q-light .q-pk-assigned { --cc: #1558c9; } .q-light .q-pk-done, .q-light .q-po-paid { --cc: #11794a; } .q-light .q-po-rejected { --cc: #b3261e; }
.q-sla { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-sla.is-ok { color: var(--ok); } .q-sla.is-warn { color: var(--warn); } .q-sla.is-late { color: var(--bad); font-weight: 700; }
.q-flag { display: inline-block; font-size: .75rem; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); padding: 0 .5rem; border-radius: 6px; }
.q-light .q-flag { background: #fff6e3; }
.q-diff { font-style: normal; color: var(--warn); font-weight: 600; }
.q-held { font-style: normal; color: var(--warn); font-size: .8rem; }
.q-empty { text-align: center; color: var(--d-mute); padding: 2rem 1rem; display: grid; gap: .4rem; justify-items: center; }
.q-empty svg { opacity: .6; }

/* tables and lists */
.q-table tr.is-sel td { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.q-table tr.is-bad td { background: color-mix(in srgb, var(--bad) 8%, transparent); }
.q-table tr.is-off { opacity: .55; }
.q-table--tight td, .q-table--tight th { padding-block: .45rem; }
.neg { color: var(--bad); } .pos { color: var(--ok); }
.q-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.q-list { display: grid; }
.q-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .65rem 0; border-block-end: 1px solid var(--d-line); }
.q-list li:last-child { border-block-end: 0; }
.q-list small { display: block; color: var(--d-mute); font-size: .78rem; }
.q-right { display: grid; justify-items: end; gap: .15rem; }
.q-li-col { flex-direction: column; align-items: stretch !important; }
.q-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.q-statement .q-kvs--row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-block-end: .75rem; }
@media (max-width: 700px) { .q-statement .q-kvs--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.q-kvs { display: grid; gap: .1rem; }
.q-kv { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr; gap: .75rem; padding: .35rem 0; border-block-end: 1px dashed var(--d-line); }
.q-kvs--row .q-kv { grid-template-columns: 1fr; border: 0; background: var(--panel2); border-radius: 10px; padding: .5rem .7rem; }
.q-kv dt { color: var(--d-mute); font-size: .82rem; } .q-kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.q-print-only { display: none; }

/* quote */
.q-quote { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 16px; padding: 1rem 1.15rem; display: grid; gap: .35rem; border-inline-start: 4px solid var(--brand); }
.q-qrow { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .9rem; }
.q-qrow b { font-variant-numeric: tabular-nums; }
.q-qrow.is-sub { border-block-start: 1px solid var(--d-line); padding-block-start: .5rem; }
.q-qrow.is-total { font-size: 1.05rem; border-block-start: 2px solid var(--d-line); padding-block-start: .5rem; }
.q-qrow.is-net { color: var(--ok); }
.q-quote__empty { color: var(--d-mute); }

/* map */
.q-mapwrap { overflow-x: auto; border-radius: 16px; }
.q-map { display: block; inline-size: 100%; min-inline-size: 560px; block-size: auto; }
.q-grid line { stroke: var(--map-grid); }
.q-land { fill: var(--map-land); } .q-coast { fill: none; stroke: var(--map-coast); stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.q-edge { stroke: var(--map-edge); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.q-edge.is-lit { stroke: var(--brand); stroke-dasharray: none; stroke-width: 4; opacity: .55; }
.q-flow { stroke: var(--brand); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 12; animation: q-flow 1.4s linear infinite; }
[dir=rtl] .q-flow { animation-direction: reverse; }
@keyframes q-flow { to { stroke-dashoffset: -30; } }
.q-cap { fill: var(--map-txt); opacity: .6; font-size: 11px; }
.q-node { cursor: default; outline: none; }
.q-node[role=button] { cursor: pointer; }
.q-hit { fill: transparent; }
.q-halo { fill: none; stroke: transparent; stroke-width: 3; }
.q-dot { fill: var(--map-dot); stroke: var(--map-ring); stroke-width: 2.5; transition: fill .2s; }
.q-node.has-n .q-dot { fill: color-mix(in srgb, var(--info) 35%, var(--map-dot)); }
.q-node.is-hot .q-hit { fill: transparent; }
.q-halo { stroke: var(--bad); stroke-dasharray: 4 4; }
.q-node.is-sel .q-dot { fill: var(--brand); stroke: #fff; }
.q-node.is-sel .q-n { fill: #0b1220; }
.q-node.is-origin .q-dot { stroke: var(--ok); stroke-width: 4; }
.q-node.is-off { opacity: .35; }
.q-node[role=button]:hover .q-dot, .q-node:focus-visible .q-dot { stroke: var(--brand); }
.q-node:focus-visible .q-hit { fill: transparent; }
.q-halo { stroke: var(--d-focus); stroke-width: 3; }
.q-n { fill: var(--map-n); font: 700 13px var(--d-font); font-variant-numeric: tabular-nums; pointer-events: none; }
.q-pin { fill: var(--map-ring); }
.q-name { fill: var(--map-txt); font: 600 13px var(--d-font); pointer-events: none; paint-order: stroke; stroke: var(--map-sea2); stroke-width: 3px; stroke-linejoin: round; }

/* landing */
.q-hero { max-inline-size: 1360px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem) clamp(.75rem, 3vw, 2rem); }
.q-eyebrow { color: var(--brand); font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.q-hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.2; margin-block: .5rem 1rem; text-wrap: balance; font-weight: 700; }
.q-lead { color: var(--d-mute); font-size: 1.05rem; max-inline-size: 36rem; }
.q-hero__stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-block-start: 1.75rem; }
.q-hero__stats b { display: block; font-size: 2.2rem; font-family: var(--d-font); line-height: 1.1; font-variant-numeric: tabular-nums; }
.q-hero__stats small { color: var(--d-mute); }
.q-hero__stats div:nth-child(3) b { color: var(--bad); }
.q-pick-role { max-inline-size: 1360px; margin-inline: auto; padding: 0 clamp(.75rem, 3vw, 2rem) 4rem; }
.q-pick-role h2 { margin-block-end: 1rem; font-size: 1.1rem; color: var(--d-mute); font-weight: 500; }
.q-rolegrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; }
.q-rolecard { display: grid; gap: .35rem; align-content: start; padding: 1.1rem; border-radius: 16px; background: var(--d-card); border: 1px solid var(--d-line); text-decoration: none; transition: transform .15s, border-color .2s; min-block-size: 8.5rem; }
.q-rolecard:hover { transform: translateY(-3px); border-color: var(--brand); }
.q-rolecard svg { color: var(--brand); } .q-rolecard b { font-size: 1.05rem; } .q-rolecard span { color: var(--d-mute); font-size: .85rem; }
@media (max-width: 1100px) { .q-rolegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .q-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .q-rolegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* control room */
.q-ctl { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.1rem; align-items: stretch; }
@media (max-width: 1000px) { .q-ctl { grid-template-columns: minmax(0, 1fr); } }
.q-card--map { padding: .9rem; }
.q-board { display: grid; grid-template-columns: repeat(7, minmax(11.5rem, 1fr)); gap: .7rem; overflow-x: auto; padding-block-end: .5rem; align-items: start; }
.q-col { background: color-mix(in srgb, var(--d-card) 70%, transparent); border: 1px solid var(--d-line); border-radius: 14px; padding: .6rem; border-block-start: 3px solid var(--cc); min-inline-size: 0; }
.q-col header { display: flex; justify-content: space-between; align-items: center; margin-block-end: .5rem; }
.q-col__n { font-family: var(--d-font); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.q-col__empty, .q-col__more { color: var(--d-mute); text-align: center; font-size: .8rem; padding: .5rem; }
.q-cards { display: grid; gap: .45rem; }
.q-card2 { display: grid; gap: .15rem; inline-size: 100%; text-align: start; background: var(--panel2); border: 1px solid var(--d-line); border-radius: 10px; padding: .55rem .65rem; cursor: pointer; color: inherit; font: inherit; }
.q-card2:hover { border-color: var(--brand); }
.q-card2.is-late { border-inline-start: 4px solid var(--bad); }
.q-card2__top { flex-wrap: wrap; display: flex; justify-content: space-between; gap: .4rem; align-items: baseline; }
.q-card2__n { font-weight: 600; font-size: .9rem; } .q-card2__m { color: var(--d-mute); font-size: .78rem; }
.q-cards--flat { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.q-feed { display: grid; gap: .5rem; align-content: start; }
.q-group { padding-block: .6rem; border-block-end: 1px solid var(--d-line); }
.q-pick { display: grid; max-block-size: 30rem; overflow: auto; }
.q-pick li label { display: grid; grid-template-columns: auto 6.5rem 1fr auto; gap: .6rem; align-items: center; padding: .45rem .2rem; border-block-end: 1px solid var(--d-line); min-block-size: 44px; cursor: pointer; }
.q-pick__z { font-size: .78rem; color: var(--info); } .q-light .q-pick__z { color: var(--info); }
.q-drivers li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-block-end: 1px solid var(--d-line); }
.q-drivers li > div { display: grid; gap: .25rem; flex: 1; min-inline-size: 0; } .q-drivers small { color: var(--d-mute); }
.q-meter { display: block; block-size: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; border: 1px solid var(--d-line); min-inline-size: 5rem; }
.q-meter i { display: block; block-size: 100%; background: var(--info); border-radius: 99px; } .q-meter.is-full i { background: var(--bad); }
.q-route li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; padding: .4rem 0; border-block-end: 1px solid var(--d-line); }
.q-seq { display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--brand); color: var(--d-brand-fg); font-size: .85rem; font-variant-numeric: tabular-nums; }
.q-mv { display: flex; gap: .25rem; }
.q-ic { inline-size: 40px; block-size: 40px; border-radius: 10px; border: 1px solid var(--d-line); background: var(--panel2); color: inherit; cursor: pointer; font-size: 1.1rem; }
.q-ic:disabled { opacity: .35; cursor: not-allowed; }
.q-diffv { font-variant-numeric: tabular-nums; } .q-diffv.is-ok { color: var(--ok); } .q-diffv.is-bad { color: var(--bad); } .q-diffv.is-warn { color: var(--warn); }
.q-hbars { display: grid; gap: .5rem; }
.q-hbars li { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; }
.q-hbar { display: block; block-size: 10px; background: var(--panel2); border-radius: 99px; overflow: hidden; } .q-hbar i { display: block; block-size: 100%; background: var(--brand); border-radius: 99px; }
.q-recon { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-block: .75rem 1.25rem; padding: 1rem 1.25rem; background: var(--panel2); border-radius: 14px; }
.q-recon div { display: grid; } .q-recon small { color: var(--d-mute); } .q-recon b { font-size: 1.35rem; font-family: var(--d-font); font-variant-numeric: tabular-nums; }
.q-recon > span { font-size: 1.5rem; color: var(--d-mute); } .q-recon__x { margin-inline-start: auto; text-align: end; }
.q-switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; position: relative; min-block-size: 40px; }
.q-switch i { pointer-events: none; }
.q-switch input { z-index: 1; position: absolute; opacity: 0; inline-size: 44px; block-size: 28px; margin: 0; cursor: pointer; }
.q-switch i { inline-size: 44px; block-size: 26px; border-radius: 99px; background: var(--panel2); border: 1.5px solid var(--d-line); position: relative; transition: background .2s; flex: none; }
.q-switch i::after { content: ''; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 17px; block-size: 17px; border-radius: 50%; background: var(--d-mute); transition: transform .2s, background .2s; }
.q-switch input:checked + .sr + i { background: color-mix(in srgb, var(--ok) 30%, transparent); border-color: var(--ok); }
.q-switch input:checked + .sr + i::after { transform: translateX(18px); background: var(--ok); }
[dir=rtl] .q-switch input:checked + .sr + i::after { transform: translateX(-18px); }
.q-switch input:focus-visible + .sr + i { outline: 3px solid var(--d-focus); outline-offset: 2px; }
.q-switch em { font-style: normal; font-size: .85rem; color: var(--d-mute); }

/* sheet and timeline */
.q-sheet { display: grid; gap: .75rem; }
.q-sheet__top { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.q-sheet__h { margin-block-start: .5rem; font-size: .95rem; }
.q-tl { display: grid; gap: 0; position: relative; }
.q-tl__i { display: grid; grid-template-columns: 18px 1fr; gap: .75rem; padding-block-end: 1rem; position: relative; }
.q-tl__i::before { content: ''; position: absolute; inset-block: 14px 0; inset-inline-start: 8px; inline-size: 2px; background: var(--d-line); }
.q-tl__i:last-child::before { display: none; }
.q-tl__i > i { inline-size: 14px; block-size: 14px; border-radius: 50%; background: var(--cc, var(--d-mute)); margin-block-start: 5px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc, var(--d-mute)) 22%, transparent); position: relative; }
.q-tl__i.is-now b { font-size: 1.02rem; }
.q-tl small { display: block; color: var(--d-mute); font-size: .8rem; }
.q-call { display: grid; justify-items: center; gap: .4rem; text-align: center; }
.q-call__av { inline-size: 64px; block-size: 64px; border-radius: 50%; background: var(--brand); color: var(--d-brand-fg); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }

/* driver */
.q-driver { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 22rem); gap: clamp(1rem, 4vw, 4rem); justify-content: center; align-items: start; padding: clamp(.5rem, 3vw, 2rem); }
.q-phone { display: grid; grid-template-rows: auto 1fr auto; min-block-size: min(46rem, calc(100vh - 7rem)); background: var(--d-card); border: 1px solid var(--d-line); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -30px #000, 0 0 0 6px #0f1830; position: relative; }
.q-phone__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .9rem 1rem; background: #0e1730; border-block-end: 1px solid var(--d-line); }
.q-phone__head small { display: block; color: var(--d-mute); font-size: .75rem; }
.q-phone__sel { background: transparent; border: 0; color: var(--d-fg); font: 700 1.05rem var(--d-font); max-inline-size: 15rem; min-block-size: 40px; padding: 0; cursor: pointer; }
.q-phone__sel option { color: #000; }
.q-phone__date { font-size: .78rem; color: var(--d-mute); text-align: end; }
.q-phone__body { padding: 1rem; overflow-y: auto; display: grid; gap: .85rem; align-content: start; }
.q-phone__nav { display: grid; grid-template-columns: repeat(3, 1fr); background: #0e1730; border-block-start: 1px solid var(--d-line); position: sticky; inset-block-end: 0; }
.q-phone__nav a { display: grid; justify-items: center; align-content: center; gap: .15rem; padding: .55rem 0; min-block-size: 60px; text-decoration: none; color: var(--d-mute); font-size: .78rem; }
.q-phone__nav a.is-on { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.q-driver__note { padding-block-start: 2rem; color: var(--d-mute); } .q-driver__note h2 { color: var(--d-fg); margin-block-end: .5rem; font-size: 1.2rem; }
@media (max-width: 900px) { .q-driver__note { display: none; } .q-driver { grid-template-columns: minmax(0, 28rem); padding: 0; } .q-phone { border-radius: 0; box-shadow: none; border-inline: 0; min-block-size: calc(100vh - var(--bar-h) - 57px); } }
.q-dsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.q-dsum div { background: var(--panel2); border-radius: 12px; padding: .6rem .5rem; text-align: center; display: grid; } .q-dsum b { font-size: 1.15rem; font-family: var(--d-font); font-variant-numeric: tabular-nums; } .q-dsum small { color: var(--d-mute); font-size: .72rem; }
.q-stops { display: grid; gap: .6rem; }
.q-stop { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .8rem; background: var(--panel2); border: 1px solid var(--d-line); border-radius: 14px; text-decoration: none; min-block-size: 72px; color: inherit; }
.q-stop:hover { border-color: var(--brand); } .q-stop.is-scanned { border-inline-start: 4px solid var(--ok); }
.q-stop--pickup { grid-template-columns: 1fr auto; border-color: var(--info); }
.q-stop__main { display: grid; gap: .15rem; min-inline-size: 0; } .q-stop__main small { color: var(--d-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .q-stop__row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.q-stop__cod { font-weight: 700; font-size: .9rem; text-align: end; font-variant-numeric: tabular-nums; }
.q-back { display: inline-flex; align-items: center; min-block-size: 44px; color: var(--d-mute); text-decoration: none; }
[dir=rtl] .q-back { direction: rtl; }
.q-sd__head { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; } .q-sd__head h1 { font-size: 1.35rem; }
.q-stopdetail { display: grid; gap: .85rem; }
.q-bigcod { font-size: 1.4rem; font-family: var(--d-font); color: var(--brand); }
.q-acts { display: grid; gap: .5rem; }
.q-big { min-block-size: 54px; font-size: 1.05rem; inline-size: 100%; border-radius: 14px !important; }
.q-big-in { min-block-size: 54px; font-size: 1.3rem; text-align: center; }
.q-ok { background: var(--ok) !important; color: #05150d !important; }
.q-bad { border-color: var(--bad) !important; color: var(--bad) !important; }
.q-dsec { background: var(--panel2); border-radius: 14px; padding: .9rem; display: grid; gap: .65rem; } .q-dsec h2 { font-size: 1rem; }
.q-dflag { display: none; } .q-dflag.is-on { display: block; color: var(--warn); font-weight: 600; font-size: .9rem; border: 1px solid var(--warn); border-radius: 10px; padding: .5rem .7rem; }
.q-verified { color: var(--ok); font-weight: 600; font-size: .9rem; }
.q-viewfinder { position: relative; aspect-ratio: 4/3; border-radius: 16px; background: repeating-linear-gradient(90deg, #0c1428 0 18px, #101a34 18px 36px); overflow: hidden; }
.q-viewfinder i { position: absolute; inline-size: 36px; block-size: 36px; border: 4px solid var(--brand); } .q-viewfinder i:nth-child(1) { inset: 14px auto auto 14px; border-width: 4px 0 0 4px; border-start-start-radius: 10px; } .q-viewfinder i:nth-child(2) { inset: 14px 14px auto auto; border-width: 4px 4px 0 0; } .q-viewfinder i:nth-child(3) { inset: auto auto 14px 14px; border-width: 0 0 4px 4px; } .q-viewfinder i:nth-child(4) { inset: auto 14px 14px auto; border-width: 0 4px 4px 0; }
.q-laser { position: absolute; inset-inline: 12%; block-size: 3px; background: var(--bad); box-shadow: 0 0 14px 2px var(--bad); inset-block-start: 20%; animation: q-scan 2.4s ease-in-out infinite alternate; }
@keyframes q-scan { to { inset-block-start: 78%; } }
.q-scanform { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.q-scanok { display: grid; gap: .4rem; padding: .9rem; border: 1px solid var(--ok); border-radius: 14px; color: var(--ok); } .q-scanok span { color: var(--d-fg); }
.q-err { color: var(--bad); }
.q-h1 { font-size: 1.3rem; } .q-h2 { font-size: 1rem; margin-block-start: .5rem; }
.q-nav__map { inline-size: 100%; block-size: auto; border-radius: 12px; }

/* tracking */
.q-track { max-inline-size: 1080px; }
.q-sampleflag { background: #fff6e3; color: #6b4600; border: 1px dashed #c38a00; border-radius: 12px; padding: .6rem .9rem; font-size: .9rem; }
.q-trackform h1 { font-size: 1.6rem; } .q-trackform p { color: var(--d-mute); margin-block: .25rem 1rem; } 
.q-hero2 { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center; background: linear-gradient(135deg, #0b1220, #1a2a4f); color: #fff; border: 0; }
.q-hero2 h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-block: .3rem .6rem; } .q-hero2 .q-hint { grid-column: 1 / -1; color: #b4c3e0; } .q-hero2 .q-chip { --cc: #ffb05c; }
.q-hero2 .q-st-delivered { --cc: #4de39a; } .q-hero2 small { color: #b4c3e0; }
.q-eta { display: grid; gap: .1rem; background: #ffffff14; padding: .8rem 1.1rem; border-radius: 14px; } .q-eta b { font-size: 1.15rem; } .q-eta span { color: #ffd2a8; font-size: .9rem; }
.q-cod { grid-column: 1 / -1; font-weight: 600; color: #ffd2a8; }
@media (max-width: 640px) { .q-hero2 { grid-template-columns: 1fr; } }

/* labels */
.q-labelpage { max-inline-size: 1180px; margin-inline: auto; padding: 1rem clamp(.75rem, 3vw, 2rem) 4rem; }
.q-labelbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-block-end: 1rem; }
.q-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(0, 105mm)); gap: 1rem; justify-content: center; }
.q-label { inline-size: min(105mm, 100%); min-block-size: 148mm; background: #fff; color: #000; border: 2px solid #000; border-radius: 6px; padding: 5mm; display: grid; grid-template-rows: auto auto auto auto auto 1fr; gap: 3mm; font-size: 11pt; box-shadow: 0 10px 30px -15px #0008; max-inline-size: 100%; break-inside: avoid; }
.q-label__top { display: flex; align-items: center; justify-content: space-between; gap: 3mm; border-block-end: 2px solid #000; padding-block-end: 2mm; }
.q-label__brand { font-size: 17pt; } .q-label__sample { font-size: 8pt; border: 1.5px solid #000; padding: 0 2mm; letter-spacing: .15em; } .q-label__code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12pt; direction: ltr; }
.q-label__dest { display: grid; } .q-label__dest small { font-size: 8pt; } .q-label__dest b { font-size: 30pt; line-height: 1.15; } .q-label__dest span { font-size: 13pt; font-weight: 600; }
.q-label__rcv { display: grid; gap: 1mm; border-block: 1px solid #000; padding-block: 2mm; } .q-label__rcv b { font-size: 14pt; }
.q-label__codes { display: grid; grid-template-columns: 1fr 26mm; gap: 4mm; align-items: center; direction: ltr; }
.q-barcode { inline-size: 100%; block-size: 17mm; fill: #000; } .q-qr { inline-size: 26mm; block-size: 26mm; fill: #000; }
.q-label__tn { font-family: ui-monospace, Menlo, monospace; font-size: 16pt; font-weight: 700; text-align: center; letter-spacing: .08em; }
.q-label__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm; align-content: end; border-block-start: 2px solid #000; padding-block-start: 2mm; }
.q-label__foot div { display: grid; } .q-label__foot small { font-size: 7.5pt; color: #444; } .q-label__foot b { font-size: 11pt; } .q-label__foot div:nth-child(3) { grid-column: 1 / -1; }

@media print {
  @page label { size: 105mm 148mm; margin: 0; }
  .mjx-bar, .mjx-toasts, .q-head, .mjx-skip { display: none !important; }
  body, .q-app { background: #fff !important; }
  .q-role-label .q-labelbar { display: none; }
  .q-role-label .q-labels { display: block; page: label; }
  .q-role-label .q-label { box-shadow: none; border-radius: 0; margin: 0; page-break-after: always; inline-size: 105mm; block-size: 148mm; border-width: 2px; }
  .q-role-merchant .q-who, .q-role-merchant .q-tabs, .q-role-merchant .q-phead, .q-role-merchant .q-kpis, .q-role-merchant .q-side, .q-role-merchant .q-bar .mjx-btn, .q-role-merchant .q-bar select { display: none !important; }
  .q-role-merchant .q-split { display: block; } .q-role-merchant .q-card { box-shadow: none; border: 0; }
  .q-print-only { display: block; font-weight: 700; margin-block-end: .5rem; }
  .q-role-merchant { color: #000; --d-fg: #000; --d-mute: #333; --d-line: #999; --panel2: #fff; }
}
.q-app .mjx-scroll, .q-app .q-table { position: relative; }
