/* ═══════════════════════════════════════════════════════════════════════
   Logistics Platform: Design System (v1.2)
   Loads AFTER frontend.css (declared dependency), so it can restyle shared
   primitives without !important wars. Everything is scoped to the plugin's
   own containers (.lp-dash-wrap, .lp-wrap, .lpx) so themes, wp-admin and other
   plugins are unaffected.

   Sections
     1. Tokens
     2. Application shell (sidebar, topbar, off-canvas drawer, skeleton)
     3. Shared components (card, KPI, badge, segmented control, table, bar,
        alert rows, empty state, buttons)
     4. Overview page layout
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ──────────────────────────────────────────────────────── */
.lp-dash-wrap, .lp-wrap, .lpx {
    --lpx-navy:        #101B2D;
    --lpx-sidebar:     #0D192B;
    --lpx-green:       #079B55;
    --lpx-green-hover: #078448;
    --lpx-green-soft:  #E7F6EE;
    --lpx-bg:          #F4F7FB;
    --lpx-card:        #FFFFFF;
    --lpx-text:        #14233F;
    --lpx-text-2:      #64748B;
    --lpx-border:      #E5EBF3;
    --lpx-success:     #16A34A;
    --lpx-warning:     #F59E0B;
    --lpx-danger:      #DC2626;
    --lpx-info:        #2563EB;
    --lpx-purple:      #7C3AED;
    --lpx-teal:        #0D9488;

    --lpx-radius-sm:   8px;
    --lpx-radius:      12px;
    --lpx-radius-lg:   16px;
    --lpx-shadow:      0 1px 2px rgba(16,27,45,.04), 0 2px 8px rgba(16,27,45,.04);
    --lpx-shadow-pop:  0 8px 24px rgba(16,27,45,.12);

    --lpx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --lpx-z-topbar: 10;
    --lpx-z-sidebar: 100;
    --lpx-z-scrim: 99;
    --lpx-ease: cubic-bezier(.4,0,.2,1);
}

/* ── 2. Application shell ───────────────────────────────────────────── */
.lp-dash-wrap {
    --lp-sb-w:      240px;
    --lp-sb-w-coll:  68px;
    --lp-topbar-h:   64px;
    /* --lp-sb-bg / --lp-sb-accent are injected inline from the saved
       "Dashboard colours" settings; these are only fallbacks. */
    --lp-sb-bg:      var(--lpx-sidebar);
    --lp-sb-accent:  var(--lpx-green);

    display: flex; width: 100%;
    /* The wrap is the scroll boundary: height:100vh + overflow:hidden keeps the
       sidebar pinned and lets .lp-dash-main / .lp-dash-nav scroll internally. */
    height: 100vh; overflow: hidden;
    font-family: var(--lpx-font); color: var(--lpx-text);
    background: var(--lpx-bg); box-sizing: border-box;
}
.lp-dash-wrap *, .lp-dash-wrap *::before, .lp-dash-wrap *::after { box-sizing: inherit; }

/* Sidebar */
.lp-dash-sidebar {
    width: var(--lp-sb-w); flex-shrink: 0; height: 100%;
    background: var(--lp-sb-bg);
    display: flex; flex-direction: column;
    z-index: var(--lpx-z-sidebar);
    transition: width .22s var(--lpx-ease), transform .22s var(--lpx-ease);
}
.lp-sidebar-collapsed { width: var(--lp-sb-w-coll) !important; }

.lp-dash-brand {
    flex-shrink: 0; height: var(--lp-topbar-h); padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.lp-dash-brand-circle {
    width: 34px; height: 34px; border-radius: 10px; background: var(--lp-sb-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.lp-dash-brand-logo { max-height: 34px; max-width: 150px; object-fit: contain; flex-shrink: 0; }
.lp-dash-brand-name { font-size: 17px; font-weight: 700; color: #fff; white-space: nowrap; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.lp-sidebar-collapsed .lp-dash-brand { justify-content: center; padding: 0 8px; }
.lp-sidebar-collapsed .lp-dash-brand-logo,
.lp-sidebar-collapsed .lp-dash-brand-name { display: none; }

/* The sidebar chevron stays in the DOM (the collapse logic and its title
   attribute are driven through it) but the topbar hamburger is the visible control. */
#lp-sidebar-toggle { display: none; }

.lp-dash-nav { flex: 1; min-height: 0; padding: 12px 10px; overflow-y: auto; overflow-x: visible; }
.lp-dash-nav::-webkit-scrollbar { width: 3px; }
.lp-dash-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.lp-dash-nav-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 2px;
    font-size: 14px; font-weight: 500; color: rgba(255,255,255,.72);
    border-radius: 10px; cursor: pointer; user-select: none; white-space: nowrap;
    transition: background .14s, color .14s; position: relative; overflow: visible; text-decoration: none;
}
.lp-dash-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.lp-dash-nav-item:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.lp-dash-nav-item.active { background: var(--lp-sb-accent); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(7,155,85,.28); }
.lp-dash-nav-icon { flex-shrink: 0; width: 22px; display: flex; align-items: center; justify-content: center; }
.lp-dash-nav-icon svg { display: block; width: 19px; height: 19px; stroke: currentColor; }
.lp-dash-nav-label { transition: opacity .18s; overflow: hidden; text-overflow: ellipsis; }

.lp-sidebar-collapsed .lp-dash-nav { padding: 12px 8px; }
.lp-sidebar-collapsed .lp-dash-nav-item { justify-content: center; padding: 12px 6px; gap: 0; }
.lp-sidebar-collapsed .lp-dash-nav-label { opacity: 0; width: 0; }

/* Collapsed tooltips (position set from JS via --tt-top) */
.lp-sidebar-collapsed .lp-dash-nav-item::after {
    content: attr(title); position: fixed; top: var(--tt-top, 50%); left: calc(var(--lp-sb-w-coll) + 14px);
    transform: translateY(-50%) scale(.9); transform-origin: left center;
    background: #1B2A44; color: #fff; font-size: 12px; font-weight: 500; font-family: var(--lpx-font);
    padding: 6px 12px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0;
    box-shadow: var(--lpx-shadow-pop); border: 1px solid rgba(255,255,255,.08);
    transition: opacity .15s, transform .15s; z-index: 99999;
}
.lp-sidebar-collapsed .lp-dash-nav-item:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }

/* Sidebar footer */
.lp-dash-sidebar-foot {
    flex-shrink: 0; margin: 10px; padding: 10px; border-radius: 12px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.lp-sidebar-collapsed .lp-dash-sidebar-foot { justify-content: center; padding: 8px 4px; }
.lp-sidebar-collapsed .lp-dash-foot-meta,
.lp-sidebar-collapsed .lp-dash-foot-logout { display: none; }
.lp-dash-foot-meta { flex: 1; min-width: 0; }
.lp-dash-foot-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-dash-foot-role { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 2px; }
.lp-dash-foot-logout {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; color: rgba(255,255,255,.6); text-decoration: none;
    transition: background .14s, color .14s;
}
.lp-dash-foot-logout:hover { background: rgba(255,255,255,.12); color: #fff; }
.lp-dash-foot-logout svg { width: 17px; height: 17px; stroke: currentColor; }

/* Avatars (shared by sidebar footer and topbar chip) */
.lp-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.lp-avatar-ini { display: flex; align-items: center; justify-content: center; background: var(--lp-sb-accent); color: #fff; font-size: 12px; font-weight: 700; }

/* Main column */
.lp-dash-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; overflow-y: auto; background: var(--lpx-bg); }

.lp-dash-topbar {
    flex-shrink: 0; height: var(--lp-topbar-h); background: var(--lpx-card);
    border-bottom: 1px solid var(--lpx-border); padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: sticky; top: 0; z-index: var(--lpx-z-topbar);
}
.lp-dash-topbar-left, .lp-dash-topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lp-icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent;
    color: var(--lpx-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .14s; flex-shrink: 0;
}
.lp-icon-btn:hover { background: var(--lpx-bg); }
.lp-icon-btn:focus-visible { outline: 2px solid var(--lpx-green); outline-offset: 1px; }
.lp-icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lp-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--lpx-text-2); }
.lp-crumb-root { white-space: nowrap; }
.lp-crumb-sep { opacity: .5; }
.lp-dash-page-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--lpx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bell badge: frontend.js already sets data-count / .lp-has-notif on #lp-notif-bell */
#lp-notif-bell[data-count]::after {
    content: attr(data-count); position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: var(--lpx-danger); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--lpx-card); box-sizing: border-box;
}

.lp-userchip { display: flex; align-items: center; gap: 10px; padding-left: 14px; margin-left: 4px; border-left: 1px solid var(--lpx-border); min-width: 0; }
.lp-userchip .lp-avatar { width: 36px; height: 36px; }
.lp-userchip-meta { min-width: 0; line-height: 1.25; }
.lp-userchip-name { font-size: 13px; font-weight: 600; color: var(--lpx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.lp-userchip-role { font-size: 11px; color: var(--lpx-text-2); }

.lp-dash-content { flex-shrink: 0; padding: 24px; min-width: 0; min-height: calc(100% - var(--lp-topbar-h)); }

/* Scrim for the mobile drawer */
.lp-dash-scrim { display: none; }

/* Skeleton */
@keyframes lp-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.lp-dash-skeleton { padding: 4px 0; }
.lp-skel { height: 14px; border-radius: 6px; margin-bottom: 14px; background: linear-gradient(90deg,#e8ecf0 25%,#f4f6f8 50%,#e8ecf0 75%); background-size: 600px 100%; animation: lp-shimmer 1.4s infinite linear; }
.lp-skel-h { height: 22px; width: 40%; } .lp-skel-m { width: 75%; } .lp-skel-l { width: 100%; }

/* Mobile: sidebar becomes an off-canvas drawer */
@media (max-width: 768px) {
    .lp-dash-wrap { height: auto; min-height: 100vh; overflow: visible; display: block; }
    .lp-dash-sidebar, .lp-sidebar-collapsed {
        position: fixed; top: 0; left: 0; bottom: 0; height: 100%;
        width: min(290px, 86vw) !important; transform: translateX(-102%); box-shadow: none;
    }
    .lp-dash-wrap.lp-nav-open .lp-dash-sidebar { transform: none; box-shadow: var(--lpx-shadow-pop); }
    .lp-dash-wrap.lp-nav-open .lp-dash-scrim {
        display: block; position: fixed; inset: 0; background: rgba(13,25,43,.5); z-index: var(--lpx-z-scrim);
    }
    /* A collapsed desktop preference must not hollow out the drawer */
    .lp-sidebar-collapsed .lp-dash-nav-label { opacity: 1; width: auto; }
    .lp-sidebar-collapsed .lp-dash-nav-item { justify-content: flex-start; padding: 11px 14px; gap: 12px; }
    .lp-sidebar-collapsed .lp-dash-foot-meta, .lp-sidebar-collapsed .lp-dash-foot-logout { display: flex; }
    .lp-sidebar-collapsed .lp-dash-brand-logo, .lp-sidebar-collapsed .lp-dash-brand-name { display: block; }
    .lp-sidebar-collapsed .lp-dash-nav-item::after { display: none; }

    .lp-dash-main { height: auto; overflow-y: visible; min-height: 100vh; }
    .lp-dash-topbar { padding: 0 12px; }
    .lp-userchip { border-left: 0; padding-left: 0; margin-left: 0; }
    .lp-userchip-meta, .lp-crumb-root, .lp-crumb-sep { display: none; }
    .lp-dash-content { padding: 16px; min-height: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-dash-sidebar, .lp-dash-nav-item, .lp-skel { transition: none; animation: none; }
}

/* ── 3. Shared components ───────────────────────────────────────────── */
.lpx { font-family: var(--lpx-font); color: var(--lpx-text); }
.lpx h1, .lpx h2, .lpx h3 { color: var(--lpx-text); letter-spacing: -.01em; }

.lpx-card { background: var(--lpx-card); border: 1px solid var(--lpx-border); border-radius: var(--lpx-radius-lg); box-shadow: var(--lpx-shadow); padding: 20px; min-width: 0; }
.lpx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lpx-card-title { margin: 0; font-size: 17px; font-weight: 700; }
.lpx-link { color: var(--lpx-green); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.lpx-link:hover { color: var(--lpx-green-hover); text-decoration: underline; }

/* Buttons */
.lpx-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font: 600 13px var(--lpx-font); cursor: pointer; text-decoration: none; transition: background .14s, border-color .14s; }
.lpx-btn-primary { background: var(--lpx-green); color: #fff; }
.lpx-btn-primary:hover { background: var(--lpx-green-hover); color: #fff; }
.lpx-btn-ghost { background: #fff; color: var(--lpx-text); border-color: var(--lpx-border); }
.lpx-btn-ghost:hover { background: var(--lpx-bg); }

/* KPI cards */
.lpx-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.lpx-kpi { display: flex; flex-direction: column; gap: 10px; }
.lpx-kpi-top { display: flex; align-items: center; gap: 12px; }
.lpx-kpi-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lpx-kpi-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpx-ico-green  { background: #DCFCE7; color: #16A34A; }
.lpx-ico-blue   { background: #DBEAFE; color: #2563EB; }
.lpx-ico-amber  { background: #FEF3C7; color: #D97706; }
.lpx-ico-purple { background: #EDE9FE; color: #7C3AED; }
.lpx-ico-teal   { background: #CCFBF1; color: #0D9488; }
.lpx-ico-red    { background: #FEE2E2; color: #DC2626; }
.lpx-kpi-label { font-size: 13px; color: var(--lpx-text-2); font-weight: 500; }
.lpx-kpi-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.lpx-kpi-value small { font-size: 13px; font-weight: 600; color: var(--lpx-text-2); }
.lpx-kpi-sub { font-size: 12px; color: var(--lpx-text-2); line-height: 1.4; }
.lpx-delta { font-weight: 700; }
.lpx-delta.up   { color: var(--lpx-success); }
.lpx-delta.down { color: var(--lpx-danger); }

/* Status badges */
.lpx-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lpx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lpx-badge-success { background: #DCFCE7; color: #15803D; }
.lpx-badge-info    { background: #DBEAFE; color: #1D4ED8; }
.lpx-badge-warning { background: #FEF3C7; color: #B45309; }
.lpx-badge-danger  { background: #FEE2E2; color: #B91C1C; }
.lpx-badge-muted   { background: #F1F5F9; color: #475569; }

/* Segmented control */
.lpx-seg { display: inline-flex; padding: 3px; gap: 2px; background: #fff; border: 1px solid var(--lpx-border); border-radius: 10px; }
.lpx-seg a, .lpx-seg button { padding: 7px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--lpx-text-2); font: 600 13px var(--lpx-font); cursor: pointer; text-decoration: none; }
.lpx-seg a:hover, .lpx-seg button:hover { color: var(--lpx-text); }
.lpx-seg .is-active { background: var(--lpx-green); color: #fff; }

/* Tables (stack into cards on small screens) */
.lpx-table-wrap { overflow-x: auto; }
.lpx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lpx-table th { text-align: left; padding: 10px 12px; background: var(--lpx-bg); color: var(--lpx-text-2); font-weight: 600; font-size: 12px; }
.lpx-table th:first-child { border-radius: 8px 0 0 8px; } .lpx-table th:last-child { border-radius: 0 8px 8px 0; }
.lpx-table td { padding: 13px 12px; border-bottom: 1px solid var(--lpx-border); vertical-align: middle; }
.lpx-table tbody tr:last-child td { border-bottom: 0; }
.lpx-table .lpx-strong { font-weight: 700; color: var(--lpx-text); }
.lpx-table .lpx-muted { color: var(--lpx-text-2); font-size: 12px; }
.lpx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
    .lpx-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .lpx-table--stack, .lpx-table--stack tbody, .lpx-table--stack tr, .lpx-table--stack td { display: block; width: 100%; }
    .lpx-table--stack tr { padding: 12px 0; border-bottom: 1px solid var(--lpx-border); }
    .lpx-table--stack tbody tr:last-child { border-bottom: 0; }
    .lpx-table--stack td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
    .lpx-table--stack td::before { content: attr(data-label); color: var(--lpx-text-2); font-weight: 600; text-align: left; }
}

/* Progress bars */
.lpx-meter { display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 16px; }
.lpx-meter-ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; grid-row: span 2; }
.lpx-meter-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpx-meter-label { font-size: 13px; font-weight: 600; }
.lpx-meter-val { font-size: 13px; font-weight: 700; }
.lpx-meter-track { grid-column: 2 / 4; height: 8px; border-radius: 4px; background: #EEF2F7; overflow: hidden; }
.lpx-meter-fill { height: 100%; border-radius: 4px; background: var(--lpx-green); }
.lpx-meter-fill.blue { background: var(--lpx-info); } .lpx-meter-fill.purple { background: var(--lpx-purple); }
.lpx-meter-note { grid-column: 2 / 4; font-size: 12px; color: var(--lpx-text-2); margin-top: -2px; }

/* Attention list */
.lpx-attn { border: 1px solid #FECACA; border-radius: 10px; overflow: hidden; margin-top: 8px; }
.lpx-attn-head { background: #FEF2F2; color: var(--lpx-danger); font-weight: 700; font-size: 13px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; }
.lpx-attn-head svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpx-attn-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; font-size: 13px; color: var(--lpx-text); text-decoration: none; border-top: 1px solid var(--lpx-border); }
.lpx-attn-row:hover { background: var(--lpx-bg); }
.lpx-attn-row b { color: var(--lpx-danger); }
.lpx-attn-row .lpx-chev { margin-left: auto; color: var(--lpx-text-2); }
.lpx-allclear { border-color: #BBF7D0; } .lpx-allclear .lpx-attn-head { background: #F0FDF4; color: #15803D; }

/* Driver list (Live Dispatch card) */
.lpx-drv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--lpx-border); }
.lpx-drv:last-of-type { border-bottom: 0; }
.lpx-drv-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--lpx-green-soft); color: var(--lpx-green); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lpx-drv-name { font-size: 14px; font-weight: 600; }
.lpx-drv-meta { font-size: 12px; color: var(--lpx-text-2); }
.lpx-drv .lpx-badge { margin-left: auto; }

/* Empty state */
.lpx-empty { text-align: center; padding: 28px 12px; color: var(--lpx-text-2); font-size: 14px; }
.lpx-empty svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 1.6; margin-bottom: 8px; opacity: .6; }

/* ── 4. Overview page layout ────────────────────────────────────────── */
.lpx-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.lpx-hero h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.lpx-hero p { margin: 0; color: var(--lpx-text-2); font-size: 14px; }
.lpx-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.lpx-grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.lpx-chart { width: 100%; height: auto; display: block; }
.lpx-chart text { font: 11px var(--lpx-font); fill: var(--lpx-text-2); }
.lpx-chart .grid { stroke: var(--lpx-border); stroke-width: 1; }
.lpx-chart .line { fill: none; stroke: var(--lpx-green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.lpx-chart .area { fill: var(--lpx-green); opacity: .1; }
.lpx-chart .dot  { fill: #fff; stroke: var(--lpx-green); stroke-width: 2.5; }

@media (max-width: 1280px) { .lpx-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1024px) { .lpx-grid-main { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 640px)  { .lpx-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; } .lpx-kpi-value { font-size: 22px; } .lpx-hero h2 { font-size: 22px; } .lpx-card { padding: 16px; } }

/* ── 5. Driver dashboard (v1.2) ─────────────────────────────────────── */
.lpx [hidden], .lpx-dd [hidden], .lp-dash-wrap [hidden] { display: none !important; }
.lpx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lpx-muted { color: var(--lpx-text-2); font-size: 13px; }

/* Status pill (also the availability switch) */
.lpx-online { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #E7F6EE; border: 1px solid #BFE6CF; color: #0B7A45; font: 600 13px var(--lpx-font); cursor: pointer; user-select: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.lpx-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.2); flex-shrink: 0; }
.lpx-online:not(.is-online):not(.is-suspended):not(.is-pending) { background: #F1F5F9; border-color: var(--lpx-border); color: #475569; }
.lpx-online:not(.is-online) .lpx-online-dot { background: #94A3B8; box-shadow: none; }
.lpx-online.is-suspended { background: #FEE2E2; border-color: #FECACA; color: #B91C1C; cursor: default; }
.lpx-online.is-suspended .lpx-online-dot { background: #DC2626; box-shadow: none; }
.lpx-online.is-pending { background: #FEF3C7; border-color: #FDE68A; color: #92400E; cursor: default; }
.lpx-online.is-pending .lpx-online-dot { background: #F59E0B; box-shadow: none; }
.lpx-online:has(input:focus-visible) { outline: 2px solid var(--lpx-green); outline-offset: 2px; }

/* Driver topbar */
.lpx-greet { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lpx-wave { font-size: 26px; line-height: 1; }
.lpx-greet-t { font-size: 16px; font-weight: 700; color: var(--lpx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpx-greet-s { font-size: 13px; color: var(--lpx-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpx-clock { text-align: right; line-height: 1.3; padding-left: 14px; margin-left: 4px; border-left: 1px solid var(--lpx-border); white-space: nowrap; }
.lpx-clock b { display: block; font-size: 13px; font-weight: 600; } .lpx-clock small { font-size: 12px; color: var(--lpx-text-2); }
@media (max-width: 768px) {
    .lpx-greet-s, .lpx-clock { display: none; } .lpx-wave { font-size: 22px; }
    /* Let the greeting shrink + truncate so pill and bell always stay on-screen */
    .lp-dash-topbar-left { flex: 1 1 auto; min-width: 0; } .lp-dash-topbar-right { flex: 0 0 auto; gap: 6px; }
    .lpx-greet { flex: 1 1 auto; min-width: 0; gap: 8px; } .lpx-greet > div { min-width: 0; } .lpx-greet-t { font-size: 14px; }
    .lpx-online { padding: 7px 11px; font-size: 12px; gap: 6px; }
}

/* Driver sidebar extras */
.lp-dash-nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: rgba(255,255,255,.14); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.lp-dash-nav-item.active .lp-dash-nav-badge { background: rgba(255,255,255,.25); }
.lp-sidebar-collapsed .lp-dash-nav-badge { position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; background: var(--lp-sb-accent); }
.lpx-vcard { margin: 0 12px 10px; padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.03); display: flex; gap: 12px; align-items: center; color: #fff; }
.lpx-vcard-ico { width: 42px; height: 42px; flex-shrink: 0; color: #22C55E; }
.lpx-vcard-ico svg { width: 100%; height: 100%; fill: rgba(34,197,94,.15); stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lpx-vcard-txt b { display: block; font-size: 14px; } .lpx-vcard-txt span { display: block; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.72); margin-top: 3px; }
.lp-sidebar-collapsed .lpx-vcard { justify-content: center; padding: 10px 4px; margin: 0 8px 10px; } .lp-sidebar-collapsed .lpx-vcard-txt { display: none; }
.lpx-foot-status { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 2px; color: rgba(255,255,255,.6); }
.lpx-foot-status i { width: 7px; height: 7px; border-radius: 50%; background: #94A3B8; }
.lpx-foot-status.is-online { color: #4ADE80; } .lpx-foot-status.is-online i { background: #22C55E; }
.lp-dash-wrap[data-role="lp_driver"] .lp-dash-foot-logout { display: none; }
.lpx-logout-row { flex-shrink: 0; display: flex; align-items: center; gap: 12px; margin: 0 12px 14px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 10px; }
.lpx-logout-row:hover { background: rgba(255,255,255,.07); color: #fff; }
.lpx-logout-row svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-sidebar-collapsed .lpx-logout-row { justify-content: center; margin: 0 8px 14px; padding: 12px 6px; } .lp-sidebar-collapsed .lpx-logout-row span { display: none; }
@media (max-width: 768px) { .lp-sidebar-collapsed .lpx-vcard-txt, .lp-sidebar-collapsed .lpx-logout-row span { display: block; } .lp-sidebar-collapsed .lpx-logout-row { justify-content: flex-start; } }

/* Page scaffold (cancel frontend.css .lp-wrap spacing inside the new layout) */
.lpx-dd.lp-wrap { max-width: none; margin: 0; padding: 0; background: transparent; }
.lpx-dd .lp-notice { border-radius: var(--lpx-radius); margin-bottom: 16px; }
.lpx-dd .lp-btn-primary { background: var(--lpx-green); border-color: var(--lpx-green); color: #fff; border-radius: 10px; font-weight: 600; }
.lpx-dd .lp-btn-primary:hover { background: var(--lpx-green-hover); border-color: var(--lpx-green-hover); }
.lpx-dd-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lpx-dd-hero h2 { margin: 0; font-size: 24px; font-weight: 800; } .lpx-dd-hero p { margin: 2px 0 0; color: var(--lpx-text-2); }
.lpx-zone-warn { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lpx-zone-warn p { margin: 2px 0 0; }

/* KPI row */
.lpx-dk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.lpx-dk { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px; }
.lpx-dk-top { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.lpx-dk-label { font-size: 13px; font-weight: 500; }
.lpx-dk-val { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 4px 0 2px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.lpx-dk-sub { font-size: 12px; color: var(--lpx-text-2); line-height: 1.4; }
.lpx-dk-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--lpx-text-2); }
.lpx-dk-bar .lpx-meter-track { flex: 1; grid-column: auto; }
.lpx-meter-fill.amber { background: var(--lpx-warning); }
.lpx-spark { width: 100%; height: 34px; display: block; }
.lpx-spark .a { fill: var(--lpx-purple); opacity: .12; } .lpx-spark .l { fill: none; stroke: var(--lpx-purple); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lpx-stars { display: inline-flex; gap: 3px; } .lpx-stars svg { width: 18px; height: 18px; stroke-width: 1.5; stroke-linejoin: round; }
.lpx-stars .on { fill: #F59E0B; stroke: #F59E0B; } .lpx-stars .off { fill: #E5EBF3; stroke: #E5EBF3; } .lpx-stars.sm svg { width: 14px; height: 14px; }

.lpx-dd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.lpx-dd-main, .lpx-dd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Current delivery */
.lpx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lpx-chip { border: 1px solid var(--lpx-border); background: #fff; border-radius: 999px; padding: 6px 14px; font: 600 12px var(--lpx-font); color: var(--lpx-text-2); cursor: pointer; }
.lpx-chip.is-active { background: var(--lpx-green); border-color: var(--lpx-green); color: #fff; }
.lpx-job-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lpx-job-head .lpx-link { margin-left: auto; } .lpx-linkbtn { background: none; border: 0; cursor: pointer; font-family: inherit; padding: 0; }
.lpx-job-grid { position: relative; border-radius: var(--lpx-radius); overflow: hidden; border: 1px solid var(--lpx-border); background: #EEF2F7; }
.lpx-mapbox { position: relative; height: 330px; } .lpx-map { height: 100%; width: 100%; z-index: 0; }
.lpx-map-msg { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px 24px 24px 300px; color: var(--lpx-text-2); font-size: 13px; }
.lpx-route { position: absolute; z-index: 500; top: 14px; left: 14px; width: 262px; max-height: calc(100% - 28px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: var(--lpx-shadow-pop); padding: 16px; }
.lpx-route hr { border: 0; border-top: 1px solid var(--lpx-border); margin: 12px 0; }
.lpx-rp { display: flex; gap: 10px; align-items: flex-start; }
.lpx-rp + .lpx-rp.sm { margin-top: 8px; }
.lpx-rp b { display: block; font-size: 14px; } .lpx-rp span { font-size: 13px; color: var(--lpx-text-2); line-height: 1.35; display: block; }
.lpx-rp .lpx-strong { color: var(--lpx-text); font-weight: 600; } .lpx-rp small { display: block; font-size: 11px; color: var(--lpx-text-2); }
.lpx-rp-ico { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lpx-rp-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpx-rp-ico.g { background: #DCFCE7; color: #16A34A; } .lpx-rp-ico.r { background: #FEE2E2; color: #DC2626; } .lpx-rp-ico.n { background: var(--lpx-bg); color: var(--lpx-text-2); }
.lpx-rline { border-left: 2px dashed #FCA5A5; height: 16px; margin: 2px 0 2px 12px; }
.lpx-locate { position: absolute; right: 12px; bottom: 28px; z-index: 600; width: 40px; height: 40px; border-radius: 10px; border: 0; background: #fff; box-shadow: var(--lpx-shadow-pop); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--lpx-text); }
.lpx-locate svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linejoin: round; }
.lpx-pin-wrap, .lpx-me-wrap { background: none; border: 0; }
.lpx-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lpx-pin-lbl { background: #fff; border-radius: 8px; padding: 3px 9px; font: 600 12px var(--lpx-font); color: var(--lpx-text); box-shadow: 0 2px 8px rgba(16,27,45,.2); white-space: nowrap; }
.lpx-pin i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(16,27,45,.35); }
.lpx-pin.g i { background: #16A34A; } .lpx-pin.r i { background: #DC2626; }
.lpx-me { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--lpx-info); border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(37,99,235,.25); }
.lpx-job-details { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; padding: 12px 14px; background: var(--lpx-bg); border-radius: 10px; font-size: 13px; }
.lpx-job-details span { display: inline-flex; align-items: center; gap: 6px; }
.lpx-job-details svg { width: 15px; height: 15px; stroke: var(--lpx-text-2); fill: none; stroke-width: 2; }
.lpx-job .lp-job-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.lpx-job .lp-pickup-panel { margin-top: 14px; }

/* Deliveries */
.lpx-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.lpx-tab { padding: 8px 16px; border: 0; border-radius: 8px; background: transparent; font: 600 13px var(--lpx-font); color: var(--lpx-text-2); cursor: pointer; text-decoration: none; }
.lpx-tab:hover { color: var(--lpx-text); } .lpx-tab.is-active { background: var(--lpx-green); color: #fff; }
.lpx-deliveries .lpx-link-ish { color: var(--lpx-text); }
.lpx-view-btn { padding: 6px 18px; border: 1px solid #BFE6CF; background: #fff; color: var(--lpx-green); border-radius: 8px; font: 600 13px var(--lpx-font); cursor: pointer; }
.lpx-view-btn:hover { background: var(--lpx-green-soft); }
.lpx-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--lpx-text-2); }

/* Safety banner / call to action */
.lpx-safety { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--lpx-radius-lg); overflow: hidden; background: linear-gradient(90deg, #FBEBD3 0%, #F3EBDD 38%, #E7ECF2 100%); border: 1px solid #F0E3CC; }
.lpx-safety-ico { width: 56px; height: 56px; flex-shrink: 0; color: var(--lpx-green); position: relative; z-index: 1; }
.lpx-safety-ico svg { width: 100%; height: 100%; fill: rgba(7,155,85,.16); stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lpx-safety-txt { position: relative; z-index: 1; min-width: 0; }
.lpx-safety-txt h3 { margin: 0 0 3px; font-size: 18px; font-weight: 800; } .lpx-safety-txt p { margin: 0; font-size: 13px; color: var(--lpx-text-2); max-width: 340px; }
.lpx-safety-art { position: absolute; right: 190px; bottom: 0; height: 88px; width: auto; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.lpx-safety-cta { position: relative; z-index: 1; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--lpx-green); background: rgba(255,255,255,.88); color: var(--lpx-green); font: 600 13px var(--lpx-font); cursor: pointer; white-space: nowrap; }
.lpx-safety-cta:hover { background: var(--lpx-green); color: #fff; } .lpx-safety-cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Profile card */
.lpx-prof { padding: 0; overflow: hidden; }
.lpx-prof-top { display: flex; gap: 16px; padding: 20px; background: linear-gradient(135deg, #C8EBD6 0%, #E4F5EA 55%, #F4FAF6 100%); }
.lpx-prof-ava { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.lpx-prof-ava img, .lpx-prof-ava > span { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; background: var(--lpx-green); color: #fff; font-size: 24px; font-weight: 700; box-shadow: var(--lpx-shadow); }
.lpx-tick { position: absolute; right: -2px; bottom: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--lpx-green); border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.lpx-tick svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lpx-tick svg path { display: none; }
.lpx-prof-id { min-width: 0; } .lpx-prof-id h3 { margin: 4px 0 4px; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.lpx-prof-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--lpx-text-2); }
.lpx-vbadge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.85); color: #0B7A45; font-size: 12px; font-weight: 600; }
.lpx-vbadge i { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; } .lpx-vbadge.off { color: #B45309; } .lpx-vbadge.off i { background: #F59E0B; }
.lpx-prof-rate { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; } .lpx-prof-rate b { font-size: 14px; } .lpx-prof-rate small { color: var(--lpx-text-2); }
.lpx-prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--lpx-border); }
.lpx-prof-stats > div { padding: 14px 16px; border-left: 1px solid var(--lpx-border); } .lpx-prof-stats > div:first-child { border-left: 0; }
.lpx-prof-stats small { display: block; font-size: 12px; color: var(--lpx-text-2); } .lpx-prof-stats b { display: block; font-size: 20px; margin-top: 4px; font-weight: 800; }
.lpx-prof-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--lpx-border); color: var(--lpx-text); text-decoration: none; }
.lpx-prof-stats + .lpx-prof-row { border-top: 0; } .lpx-prof-row:hover { background: var(--lpx-bg); }
.lpx-prof-ri { width: 36px; height: 36px; border-radius: 10px; background: var(--lpx-bg); color: var(--lpx-text-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lpx-prof-ri svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lpx-prof-row small { display: block; font-size: 12px; color: var(--lpx-text-2); } .lpx-prof-row b { font-size: 14px; } .lpx-prof-row em { font-style: normal; color: var(--lpx-text-2); font-weight: 500; }
.lpx-prof-row .lpx-chev { margin-left: auto; color: var(--lpx-text-2); } .lpx-chev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.lpx-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; } .lpx-status i { width: 8px; height: 8px; border-radius: 50%; }
.lpx-status.ok { color: #15803D; } .lpx-status.ok i { background: #22C55E; } .lpx-status.warn { color: #B45309; } .lpx-status.warn i { background: #F59E0B; }

/* Earnings overview */
.lpx-eo { max-width: 760px; }
.lpx-eo .lpx-card-title { display: inline-flex; align-items: center; gap: 10px; }
.lpx-eo-ico { width: 32px; height: 32px; border-radius: 50%; background: var(--lpx-green-soft); color: var(--lpx-green); display: inline-flex; align-items: center; justify-content: center; }
.lpx-eo-ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lpx-select { border: 1px solid var(--lpx-border); border-radius: 8px; padding: 7px 10px; font: 600 13px var(--lpx-font); background: #fff; color: var(--lpx-text); }
.lpx-eo-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lpx-eo-amt { font-size: 30px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; } .lpx-eo-cap { font-size: 12px; color: var(--lpx-text-2); }
.lpx-eo-delta { text-align: right; font-size: 11px; color: var(--lpx-text-2); }
.lpx-pill { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.lpx-eo-delta.up .lpx-pill { background: #DCFCE7; color: #15803D; } .lpx-eo-delta.down .lpx-pill { background: #FEE2E2; color: #B91C1C; }
.lpx-bars { width: 100%; height: auto; display: block; } .lpx-bars text { font: 11px var(--lpx-font); fill: var(--lpx-text-2); }
.lpx-bars .g { stroke: var(--lpx-border); } .lpx-bars .bar { fill: var(--lpx-green); } .lpx-bars .bar.f { fill: #BDE5CC; }

/* Quick actions */
.lpx-qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lpx-qa a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border: 1px solid var(--lpx-border); border-radius: 12px; text-align: center; font-size: 12px; font-weight: 600; color: var(--lpx-text); text-decoration: none; line-height: 1.25; }
.lpx-qa a:hover { background: var(--lpx-bg); border-color: #CBD5E1; }
.lpx-qa svg { width: 22px; height: 22px; stroke: var(--lpx-text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Dialogs */
.lpx-dialog { border: 0; border-radius: var(--lpx-radius-lg); padding: 0; width: min(520px, 92vw); box-shadow: var(--lpx-shadow-pop); color: var(--lpx-text); font-family: var(--lpx-font); }
.lpx-dialog::backdrop { background: rgba(13,25,43,.5); }
.lpx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--lpx-border); }
.lpx-dialog-head h3 { margin: 0; font-size: 17px; font-weight: 700; } .lpx-dialog-head .lp-icon-btn { font-size: 24px; line-height: 1; }
.lpx-dl { margin: 0; padding: 16px 20px; display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; }
.lpx-dl dt { font-size: 13px; color: var(--lpx-text-2); } .lpx-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.lpx-dialog-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; }
.lpx-tips { margin: 0; padding: 18px 22px 22px 40px; } .lpx-tips li { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }

/* Support + Settings tabs */
.lpx-sup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.lpx-sup { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--lpx-text); }
.lpx-sup:hover { border-color: #CBD5E1; } .lpx-sup b { display: block; font-size: 15px; } .lpx-sup small { color: var(--lpx-text-2); font-size: 13px; overflow-wrap: anywhere; }
.lpx-faq { border-bottom: 1px solid var(--lpx-border); padding: 12px 0; } .lpx-faq:last-child { border-bottom: 0; }
.lpx-faq summary { cursor: pointer; font-weight: 600; font-size: 14px; } .lpx-faq p { margin: 8px 0 0; color: var(--lpx-text-2); font-size: 14px; line-height: 1.55; }
.lpx-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.lpx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lpx-tag { background: var(--lpx-green-soft); color: #0B7A45; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

@media (max-width: 1400px) { .lpx-dk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .lpx-dd-grid { grid-template-columns: minmax(0, 1fr); } .lpx-safety-art { display: none; } }
@media (max-width: 900px) {
    .lpx-route { position: static; width: auto; max-height: none; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--lpx-border); }
    .lpx-map-msg { padding: 24px; } .lpx-mapbox { height: 260px; }
}
@media (max-width: 640px) {
    .lpx-dk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .lpx-dk { padding: 14px; } .lpx-dk-val { font-size: 24px; overflow-wrap: normal; }
    /* Icon above the figure so amounts get the card's full width and never split mid-number */
    .lpx-dk-top { flex-direction: column; gap: 8px; }
    .lpx-deliveries td:first-child { display: none; }
    .lpx-safety { flex-wrap: wrap; } .lpx-safety-cta { margin-left: 0; }
    .lpx-qa { grid-template-columns: repeat(2, 1fr); } .lpx-dl { grid-template-columns: 1fr; gap: 2px 0; } .lpx-dl dd { margin-bottom: 8px; }
}
