/* FleetLume UI v4 — responsive fleet operations design system */
:root{
  --ui-bg:#f5f7fb;
  --ui-bg-strong:#edf2f9;
  --ui-surface:#ffffff;
  --ui-surface-soft:#f8faff;
  --ui-ink:#0b1739;
  --ui-text:#243454;
  --ui-muted:#71809d;
  --ui-line:#e3e9f3;
  --ui-line-strong:#d6dfec;
  --ui-primary:#1768f2;
  --ui-primary-dark:#0d4fd4;
  --ui-primary-soft:#eaf2ff;
  --ui-indigo:#6947e8;
  --ui-cyan:#0aa8cf;
  --ui-green:#159c57;
  --ui-orange:#ed7a16;
  --ui-red:#dc3c4d;
  --ui-navy:#071a3f;
  --ui-navy-2:#0b2e68;
  --ui-sidebar:244px;
  --ui-radius-sm:12px;
  --ui-radius:18px;
  --ui-radius-lg:24px;
  --ui-shadow-xs:0 1px 2px rgba(13,32,67,.04);
  --ui-shadow:0 8px 28px rgba(20,43,84,.07),0 1px 2px rgba(20,43,84,.04);
  --ui-shadow-lg:0 24px 70px rgba(7,26,63,.18);
}

[hidden]{display:none!important}
html{font-size:16px;scroll-behavior:smooth}
body.ui-v4{margin:0;background:var(--ui-bg);color:var(--ui-ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.45;overflow-x:hidden;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body.ui-v4 *,body.ui-v4 *::before,body.ui-v4 *::after{box-sizing:border-box}
body.ui-v4 a{color:inherit;text-decoration:none}
body.ui-v4 button,body.ui-v4 input,body.ui-v4 select,body.ui-v4 textarea{font:inherit}
body.ui-v4 :focus-visible{outline:3px solid rgba(23,104,242,.22);outline-offset:2px}
body.ui-v4 svg{display:block}

/* Application frame */
body.ui-v4 .app-shell{display:grid;grid-template-columns:var(--ui-sidebar) minmax(0,1fr);min-height:100dvh;transition:grid-template-columns .22s ease}
body.ui-v4.sidebar-collapsed .app-shell{grid-template-columns:76px minmax(0,1fr)}
body.ui-v4 .main-content{min-width:0;background:radial-gradient(circle at 90% 0,rgba(39,114,242,.075),transparent 26%),linear-gradient(180deg,#f8faff 0,var(--ui-bg) 220px)}
body.ui-v4 .page-content{width:min(100%,1600px);margin:0 auto;padding:22px 28px 42px}
body.ui-v4 .alert{width:min(calc(100% - 56px),1544px);margin:16px auto 0;border-radius:14px;box-shadow:var(--ui-shadow-xs)}

/* Sidebar */
body.ui-v4 .sidebar-v4,
body.ui-v4 .sidebar-v3{position:sticky;top:0;z-index:70;display:flex;flex-direction:column;height:100dvh;min-width:0;padding:14px 12px;background:linear-gradient(180deg,#061630 0%,#082654 56%,#0a3374 100%);color:#fff;border-right:1px solid rgba(255,255,255,.08);overflow:hidden}
body.ui-v4 .sidebar-v4::before,
body.ui-v4 .sidebar-v3::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 25% 0,rgba(60,144,255,.22),transparent 27%),radial-gradient(circle at 85% 80%,rgba(17,188,214,.12),transparent 28%);pointer-events:none}
body.ui-v4 .sidebar-v4>*,body.ui-v4 .sidebar-v3>*{position:relative;z-index:1}
body.ui-v4 .sidebar-brand-row{min-height:60px;display:flex;align-items:center;gap:8px;padding:0 3px 13px;border-bottom:1px solid rgba(255,255,255,.09)}
body.ui-v4 .sidebar .brand{min-width:0;flex:1;display:flex;align-items:center;gap:10px;padding:0 3px;color:#fff}
body.ui-v4 .brand-mark-image{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border:2px solid rgba(255,255,255,.9);border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.22)}
body.ui-v4 .brand-mark-image img{width:100%;height:100%;object-fit:cover;transform:scale(1.12)}
body.ui-v4 .brand-copy{min-width:0;line-height:1.05}
body.ui-v4 .brand-copy strong{display:block;font-size:17px;font-weight:760;letter-spacing:-.025em}
body.ui-v4 .brand-copy small{display:block;margin-top:5px;color:#a7bada;font-size:9px;font-weight:700;letter-spacing:.13em;text-transform:uppercase}
body.ui-v4 .icon-button{width:40px;height:40px;display:inline-grid;place-items:center;flex:0 0 40px;padding:0;border:1px solid var(--ui-line);border-radius:12px;background:#fff;color:var(--ui-text);cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
body.ui-v4 .icon-button:hover{transform:translateY(-1px);border-color:#c8d5e7;box-shadow:0 8px 20px rgba(20,43,84,.1)}
body.ui-v4 .icon-button svg{width:19px;height:19px}
body.ui-v4 .sidebar .icon-button{width:36px;height:36px;flex-basis:36px;border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.07);color:#b8c8df;box-shadow:none}
body.ui-v4 .sidebar .icon-button:hover{background:rgba(255,255,255,.13);color:#fff;transform:none}
body.ui-v4 .sidebar-close{display:none!important;font-size:22px}
body.ui-v4 .nav-search{height:42px;display:flex;align-items:center;gap:9px;margin:13px 2px 8px;padding:0 10px;border:1px solid rgba(255,255,255,.095);border-radius:12px;background:rgba(255,255,255,.055);color:#91a8ca;transition:.18s}
body.ui-v4 .nav-search:focus-within{border-color:rgba(99,162,255,.55);background:rgba(255,255,255,.09)}
body.ui-v4 .nav-search svg{width:16px;height:16px;flex:0 0 16px}
body.ui-v4 .nav-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#fff;font-size:12px}
body.ui-v4 .nav-search input::placeholder{color:#8ba0bf}
body.ui-v4 .nav-search kbd{padding:2px 5px;border:1px solid rgba(255,255,255,.1);border-radius:5px;background:rgba(255,255,255,.04);color:#8fa4c3;font-size:8px}
body.ui-v4 .sidebar-nav{flex:1;min-height:0;margin:3px -2px 8px;padding:0 3px 14px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#466185 transparent}
body.ui-v4 .sidebar-nav::-webkit-scrollbar{width:4px}
body.ui-v4 .sidebar-nav::-webkit-scrollbar-thumb{border-radius:10px;background:#466185}
body.ui-v4 .nav-item,body.ui-v4 .nav-section>summary{min-height:42px;display:flex;align-items:center;gap:11px;margin:3px 0;padding:9px 10px;border-radius:11px;color:#bdcbe0;font-size:12px;font-weight:650;list-style:none;cursor:pointer;transition:background .15s ease,color .15s ease,transform .15s ease}
body.ui-v4 .nav-section>summary::-webkit-details-marker{display:none}
body.ui-v4 .nav-item:hover,body.ui-v4 .nav-section>summary:hover{background:rgba(255,255,255,.075);color:#fff}
body.ui-v4 .nav-item.active{background:linear-gradient(90deg,rgba(23,104,242,.9),rgba(39,135,255,.67));color:#fff;box-shadow:0 8px 22px rgba(0,54,155,.28),inset 0 1px rgba(255,255,255,.16)}
body.ui-v4 .nav-item svg,body.ui-v4 .nav-section>summary svg{width:18px;height:18px;flex:0 0 18px}
body.ui-v4 .nav-item>span,body.ui-v4 .nav-section>summary>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .nav-section{margin:9px 0 4px}
body.ui-v4 .nav-section>summary{min-height:32px;margin:0;padding:6px 9px;color:#8299ba;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
body.ui-v4 .nav-section>summary:hover{background:transparent;color:#a9bdd8}
body.ui-v4 .nav-section>summary svg{width:14px;height:14px}
body.ui-v4 .nav-section>summary i{margin-left:auto;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:.16s}
body.ui-v4 .nav-section[open]>summary i{transform:rotate(225deg) translate(-1px,-1px)}
body.ui-v4 .nav-section>div{margin:2px 0 5px;padding:0}
body.ui-v4 .nav-section>div .nav-item{padding-left:12px}
body.ui-v4 .nav-count{margin-left:auto;min-width:20px;height:20px;display:grid;place-items:center;padding:0 5px;border-radius:999px;background:#ef4658;color:#fff;font-size:9px;line-height:1;box-shadow:0 4px 10px rgba(239,70,88,.28)}
body.ui-v4 .sidebar-footer{display:flex;align-items:center;gap:9px;margin-top:auto;padding:10px 6px 1px;border-top:1px solid rgba(255,255,255,.09)}
body.ui-v4 .sidebar-user-avatar{width:37px;height:37px;flex:0 0 37px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#2d72ee,#17b3d0);color:#fff;font-size:12px;font-weight:800;box-shadow:0 8px 18px rgba(0,0,0,.16)}
body.ui-v4 .sidebar-user-copy{min-width:0;flex:1}
body.ui-v4 .sidebar-user-copy strong,body.ui-v4 .sidebar-user-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .sidebar-user-copy strong{font-size:12px;color:#fff}
body.ui-v4 .sidebar-user-copy small{margin-top:2px;color:#91a7c5;font-size:10px}
body.ui-v4.sidebar-collapsed .brand-copy,body.ui-v4.sidebar-collapsed .nav-search input,body.ui-v4.sidebar-collapsed .nav-search kbd,body.ui-v4.sidebar-collapsed .nav-item>span,body.ui-v4.sidebar-collapsed .nav-section>summary>span,body.ui-v4.sidebar-collapsed .nav-section>summary i,body.ui-v4.sidebar-collapsed .sidebar-user-copy,body.ui-v4.sidebar-collapsed .sidebar-footer>a{display:none}
body.ui-v4.sidebar-collapsed .sidebar-v4,body.ui-v4.sidebar-collapsed .sidebar-v3{padding-inline:9px}
body.ui-v4.sidebar-collapsed .sidebar-brand-row{justify-content:center}
body.ui-v4.sidebar-collapsed .sidebar .brand{flex:0 0 42px}
body.ui-v4.sidebar-collapsed .sidebar-collapse{position:absolute;top:21px;right:-3px;width:23px;height:23px;opacity:0}
body.ui-v4.sidebar-collapsed .sidebar:hover .sidebar-collapse{opacity:1}
body.ui-v4.sidebar-collapsed .nav-search{justify-content:center;padding:0}
body.ui-v4.sidebar-collapsed .nav-item,body.ui-v4.sidebar-collapsed .nav-section>summary{justify-content:center;padding-inline:0}
body.ui-v4.sidebar-collapsed .nav-section>div{display:none}
body.ui-v4.sidebar-collapsed .sidebar-footer{justify-content:center;padding-inline:0}

/* Topbar */
body.ui-v4 .topbar-v4,
body.ui-v4 .topbar-v3{position:sticky;top:0;z-index:55;min-height:72px;display:grid;grid-template-columns:minmax(190px,1fr) minmax(280px,500px) auto;align-items:center;gap:18px;padding:11px 28px;border-bottom:1px solid rgba(221,229,241,.82);background:rgba(250,252,255,.88);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
body.ui-v4 .topbar-leading{min-width:0;display:flex;align-items:center;gap:11px}
body.ui-v4 .topbar-leading .mobile-menu{display:none}
body.ui-v4 .topbar-title{min-width:0}
body.ui-v4 .topbar-title .eyebrow{margin:0 0 1px;color:var(--ui-primary);font-size:8px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
body.ui-v4 .topbar-title h1{margin:0;color:var(--ui-ink);font-size:19px;font-weight:760;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .command-trigger{height:42px;width:100%;display:flex;align-items:center;gap:10px;padding:0 12px;border:1px solid var(--ui-line);border-radius:12px;background:rgba(255,255,255,.94);color:#8b98ae;cursor:pointer;box-shadow:var(--ui-shadow-xs);transition:.16s}
body.ui-v4 .command-trigger:hover{border-color:#cbd7e8;background:#fff;box-shadow:0 7px 20px rgba(20,43,84,.07)}
body.ui-v4 .command-trigger svg{width:17px;height:17px}
body.ui-v4 .command-trigger span{flex:1;text-align:left;font-size:12px}
body.ui-v4 .command-trigger kbd{padding:3px 6px;border:1px solid #e0e6ef;border-radius:6px;background:#f7f9fc;color:#8491a5;font-size:9px}
body.ui-v4 .topbar-actions{display:flex;align-items:center;gap:8px}
body.ui-v4 .autopilot-pill{height:44px;display:flex;align-items:center;gap:8px;padding:5px 10px 5px 6px;border:1px solid #dbe5f4;border-radius:13px;background:#fff;box-shadow:var(--ui-shadow-xs);transition:.16s}
body.ui-v4 .autopilot-pill:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(20,43,84,.09)}
body.ui-v4 .autopilot-pill.is-active{border-color:#bcd2ff;background:#f5f8ff}
body.ui-v4 .autopilot-spark{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#256cf0,#7749e9);color:#fff;font-size:15px;box-shadow:0 7px 15px rgba(80,84,226,.25)}
body.ui-v4 .autopilot-pill strong,body.ui-v4 .autopilot-pill small{display:block}
body.ui-v4 .autopilot-pill strong{font-size:11px}
body.ui-v4 .autopilot-pill small{margin-top:1px;color:var(--ui-muted);font-size:9px}
body.ui-v4 .autopilot-pill b{min-width:18px;height:18px;display:grid;place-items:center;border-radius:99px;background:var(--ui-red);color:#fff;font-size:8px}
body.ui-v4 .notification-button{position:relative}
body.ui-v4 .notification-button>span{position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 4px;border:2px solid #fff;border-radius:999px;background:#ef334c;color:#fff;font-size:8px;font-weight:800}
body.ui-v4 .profile-menu{position:relative}
body.ui-v4 .profile-menu>summary{height:46px;display:flex;align-items:center;gap:8px;padding:4px 9px 4px 5px;border:1px solid var(--ui-line);border-radius:14px;background:#fff;list-style:none;cursor:pointer;box-shadow:var(--ui-shadow-xs)}
body.ui-v4 .profile-menu>summary::-webkit-details-marker{display:none}
body.ui-v4 .profile-menu .avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(135deg,#e9efff,#dce8ff);color:#2862d3;font-size:11px;font-weight:850}
body.ui-v4 .profile-copy{min-width:92px}
body.ui-v4 .profile-copy strong,body.ui-v4 .profile-copy small{display:block;white-space:nowrap}
body.ui-v4 .profile-copy strong{font-size:11px}
body.ui-v4 .profile-copy small{margin-top:1px;color:var(--ui-muted);font-size:9px}
body.ui-v4 .profile-menu>summary i{width:7px;height:7px;border-right:1.5px solid #8090a8;border-bottom:1.5px solid #8090a8;transform:rotate(45deg) translateY(-2px)}
body.ui-v4 .profile-popover{position:absolute;right:0;top:54px;z-index:90;width:230px;padding:8px;border:1px solid var(--ui-line);border-radius:15px;background:#fff;box-shadow:var(--ui-shadow-lg)}
body.ui-v4 .profile-popover>div{padding:9px 10px 11px;border-bottom:1px solid var(--ui-line)}
body.ui-v4 .profile-popover strong,body.ui-v4 .profile-popover span{display:block}
body.ui-v4 .profile-popover strong{font-size:12px}
body.ui-v4 .profile-popover span{margin-top:3px;color:var(--ui-muted);font-size:10px;overflow-wrap:anywhere}
body.ui-v4 .profile-popover a,body.ui-v4 .profile-popover button{width:100%;display:block;padding:9px 10px;border:0;border-radius:9px;background:transparent;color:var(--ui-text);text-align:left;font-size:11px;cursor:pointer}
body.ui-v4 .profile-popover a:hover,body.ui-v4 .profile-popover button:hover{background:#f3f6fb;color:var(--ui-primary)}

/* Shared surfaces */
body.ui-v4 .panel,body.ui-v4 .card,body.ui-v4 .stat-card,body.ui-v4 .form-section{min-width:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:var(--ui-surface);box-shadow:var(--ui-shadow)}
body.ui-v4 .panel{padding:20px}
body.ui-v4 .panel-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}
body.ui-v4 .panel-header h2,body.ui-v4 .panel h2{margin:0;color:var(--ui-ink);font-size:17px;font-weight:760;letter-spacing:-.02em}
body.ui-v4 .panel-header p{margin:4px 0 0;color:var(--ui-muted);font-size:11px}
body.ui-v4 .page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 18px;padding:2px 1px}
body.ui-v4 .page-heading h1{margin:0 0 5px;color:var(--ui-ink);font-size:27px;font-weight:780;letter-spacing:-.035em}
body.ui-v4 .page-heading p{max-width:760px;margin:0;color:var(--ui-muted);font-size:13px;line-height:1.55}
body.ui-v4 .page-actions,body.ui-v4 .action-row,body.ui-v4 .button-row,body.ui-v4 .form-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
body.ui-v4 .eyebrow{margin:0 0 4px;color:var(--ui-primary);font-size:9px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
body.ui-v4 .btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 14px;border:1px solid transparent;border-radius:11px;font-size:11px;font-weight:750;line-height:1;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease}
body.ui-v4 .btn:hover{transform:translateY(-1px)}
body.ui-v4 .btn svg{width:16px;height:16px}
body.ui-v4 .btn-primary{border-color:var(--ui-primary);background:linear-gradient(135deg,#1768f2,#0b59df);color:#fff;box-shadow:0 8px 18px rgba(23,104,242,.24)}
body.ui-v4 .btn-primary:hover{background:linear-gradient(135deg,#0f5fe8,#084dcc);box-shadow:0 10px 24px rgba(23,104,242,.3)}
body.ui-v4 .btn-light,body.ui-v4 .btn-white{border-color:var(--ui-line);background:#fff;color:var(--ui-text);box-shadow:var(--ui-shadow-xs)}
body.ui-v4 .btn-light:hover,body.ui-v4 .btn-white:hover{border-color:#c9d5e6;background:#f9fbff}
body.ui-v4 .btn-danger{background:#e54858;color:#fff;border-color:#e54858}
body.ui-v4 .btn-sm{min-height:34px;padding:7px 10px;border-radius:9px;font-size:10px}
body.ui-v4 .btn-block{width:100%}
body.ui-v4 input,body.ui-v4 select,body.ui-v4 textarea{width:100%;min-height:42px;padding:9px 11px;border:1px solid var(--ui-line-strong);border-radius:11px;background:#fff;color:var(--ui-text);font-size:12px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
body.ui-v4 textarea{min-height:110px;resize:vertical;line-height:1.5}
body.ui-v4 input:focus,body.ui-v4 select:focus,body.ui-v4 textarea:focus{border-color:#79a8fa;box-shadow:0 0 0 4px rgba(23,104,242,.1);background:#fff}
body.ui-v4 label{color:var(--ui-text);font-size:11px;font-weight:700}
body.ui-v4 label>span,body.ui-v4 .field-help{color:var(--ui-muted);font-size:10px;font-weight:500}
body.ui-v4 .form-grid{display:grid;gap:14px}
body.ui-v4 .form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
body.ui-v4 .form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
body.ui-v4 .form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
body.ui-v4 .form-section{padding:18px;margin-bottom:16px}
body.ui-v4 .form-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
body.ui-v4 .form-section-head h2,body.ui-v4 .form-section-head h3{margin:0;color:var(--ui-ink);font-size:16px}
body.ui-v4 .table-wrap{width:100%;overflow:auto;border:1px solid var(--ui-line);border-radius:14px;background:#fff;scrollbar-width:thin}
body.ui-v4 table{width:100%;border-collapse:separate;border-spacing:0;color:var(--ui-text);font-size:11px}
body.ui-v4 th{padding:11px 13px;border-bottom:1px solid var(--ui-line);background:#f7f9fc;color:#74829a;font-size:9px;font-weight:800;letter-spacing:.06em;text-align:left;text-transform:uppercase;white-space:nowrap}
body.ui-v4 td{padding:12px 13px;border-bottom:1px solid #edf1f6;vertical-align:middle}
body.ui-v4 tbody tr:last-child td{border-bottom:0}
body.ui-v4 tbody tr{transition:background .14s ease}
body.ui-v4 tbody tr:hover{background:#fbfcff}
body.ui-v4 .badge{display:inline-flex;align-items:center;justify-content:center;min-height:23px;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:800;line-height:1;white-space:nowrap}
body.ui-v4 .badge-success{background:#e7f8ef;color:#087a42}
body.ui-v4 .badge-warning{background:#fff2df;color:#be5d07}
body.ui-v4 .badge-danger{background:#ffeaed;color:#c3273b}
body.ui-v4 .badge-info,body.ui-v4 .badge-primary{background:#eaf2ff;color:#175dcc}
body.ui-v4 .badge-neutral{background:#eef2f7;color:#5d6b82}
body.ui-v4 .empty{padding:28px!important;color:var(--ui-muted)!important;text-align:center!important}
body.ui-v4 .content-grid{display:grid;gap:18px}
body.ui-v4 .two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
body.ui-v4 .three-col{grid-template-columns:repeat(3,minmax(0,1fr))}
body.ui-v4 .mini-card{border-color:var(--ui-line);border-radius:13px;background:#fff;box-shadow:var(--ui-shadow-xs)}
body.ui-v4 .segmented-nav{display:flex;gap:4px;padding:4px;border:1px solid var(--ui-line);border-radius:12px;background:#eef3f9;overflow:auto}
body.ui-v4 .segmented-nav a{flex:0 0 auto;padding:8px 11px;border-radius:9px;color:var(--ui-muted);font-size:10px;font-weight:750;white-space:nowrap}
body.ui-v4 .segmented-nav a.active{background:#fff;color:var(--ui-primary);box-shadow:0 2px 8px rgba(20,43,84,.08)}

/* Dashboard */
body.ui-v4 .dashboard-welcome{position:relative;min-height:180px;display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px;padding:24px 26px;border:1px solid #d8e4f6;border-radius:22px;background:linear-gradient(116deg,#fff 0%,#fbfdff 48%,#eaf2ff 100%);box-shadow:var(--ui-shadow);overflow:hidden}
body.ui-v4 .dashboard-welcome-copy{position:relative;z-index:2;min-width:0;max-width:870px}
body.ui-v4 .dashboard-kicker{margin:0 0 7px;color:var(--ui-primary);font-size:9px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}
body.ui-v4 .dashboard-welcome h1{margin:0;color:var(--ui-ink);font-size:29px;font-weight:790;letter-spacing:-.045em}
body.ui-v4 .dashboard-welcome h1 span{color:var(--ui-primary)}
body.ui-v4 .dashboard-welcome-copy>p:not(.dashboard-kicker){max-width:680px;margin:6px 0 0;color:var(--ui-muted);font-size:12px}
body.ui-v4 .dashboard-welcome-actions{position:relative;z-index:3;display:flex;gap:9px;flex:0 0 auto;margin-top:27px}
body.ui-v4 .dashboard-welcome-actions .btn{min-height:42px;padding-inline:16px}
body.ui-v4 .dashboard-health-row{display:flex;align-items:stretch;gap:0;margin-top:23px}
body.ui-v4 .health-chip{min-width:150px;display:flex;align-items:center;gap:9px;padding:0 18px;border-right:1px solid #dfe7f1}
body.ui-v4 .health-chip:first-child{padding-left:0}
body.ui-v4 .health-chip:last-child{border-right:0}
body.ui-v4 .health-icon{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:10px}
body.ui-v4 .health-icon svg{width:17px;height:17px}
body.ui-v4 .health-icon.blue{background:#e8f1ff;color:#1768f2}
body.ui-v4 .health-icon.cyan{background:#e7f9fc;color:#0799bd}
body.ui-v4 .health-icon.green{background:#e9f8ef;color:#159c57}
body.ui-v4 .health-icon.purple{background:#f0ebff;color:#7047dd}
body.ui-v4 .health-chip strong,body.ui-v4 .health-chip small{display:block}
body.ui-v4 .health-chip strong{color:var(--ui-text);font-size:10px}
body.ui-v4 .health-chip small{margin-top:2px;color:var(--ui-muted);font-size:8px;white-space:nowrap}
body.ui-v4 .dashboard-route-art{position:absolute;right:0;bottom:0;width:260px;height:125px;opacity:.9;pointer-events:none}
body.ui-v4 .route-line{position:absolute;right:-15px;width:260px;height:110px;border:3px solid rgba(60,126,237,.22);border-left:0;border-bottom:0;border-radius:70% 0 0 0;transform:rotate(-14deg)}
body.ui-v4 .route-line-one{bottom:-35px}
body.ui-v4 .route-line-two{right:-40px;bottom:-58px;border-color:rgba(33,112,244,.11)}
body.ui-v4 .route-pin{position:absolute;right:37px;top:8px;color:#2c73ee;font-size:26px;text-shadow:0 5px 12px rgba(39,111,237,.22)}
body.ui-v4 .route-truck{position:absolute;right:36px;bottom:18px;width:62px;height:43px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#1a72f4,#0e4fc7);color:#fff;box-shadow:0 12px 25px rgba(23,104,242,.25)}
body.ui-v4 .route-truck svg{width:34px;height:34px}

body.ui-v4 .dashboard-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
body.ui-v4 .metric-card{min-width:0;min-height:103px;display:flex;align-items:center;gap:13px;padding:15px;border:1px solid var(--ui-line);border-radius:17px;background:#fff;box-shadow:var(--ui-shadow-xs);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
body.ui-v4 .metric-card:hover{transform:translateY(-2px);border-color:#cad8ec;box-shadow:0 13px 30px rgba(20,43,84,.09)}
body.ui-v4 .metric-icon{width:46px;height:46px;display:grid;place-items:center;flex:0 0 46px;border-radius:14px}
body.ui-v4 .metric-icon svg{width:23px;height:23px}
body.ui-v4 .metric-content{min-width:0;display:block}
body.ui-v4 .metric-content small,body.ui-v4 .metric-content strong,body.ui-v4 .metric-content em{display:block}
body.ui-v4 .metric-content small{color:#53617a;font-size:10px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .metric-content strong{margin:2px 0;color:var(--ui-ink);font-size:24px;font-weight:790;letter-spacing:-.035em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .metric-content em{color:var(--ui-muted);font-size:8.5px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .metric-blue .metric-icon{background:#e9f2ff;color:#1768f2}
body.ui-v4 .metric-purple .metric-icon{background:#f0ebff;color:#7548e5}
body.ui-v4 .metric-green .metric-icon{background:#e9f8ee;color:#159c57}
body.ui-v4 .metric-indigo .metric-icon{background:#eaf0ff;color:#345ee8}
body.ui-v4 .metric-orange .metric-icon{background:#fff1e4;color:#e46f10}
body.ui-v4 .metric-emerald .metric-icon{background:#e7f8ef;color:#0e9a55}
body.ui-v4 .metric-rose .metric-icon{background:#ffeaee;color:#dd3f55}
body.ui-v4 .metric-violet .metric-icon{background:#f1ecff;color:#7048dc}

body.ui-v4 .dashboard-primary-grid{display:grid;grid-template-columns:minmax(0,2.15fr) minmax(290px,.85fr);gap:14px;margin-bottom:14px}
body.ui-v4 .dashboard-secondary-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:14px}
body.ui-v4 .dashboard-card{padding:0;overflow:hidden}
body.ui-v4 .dashboard-card-header{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid #edf1f6}
body.ui-v4 .dashboard-card-header>div{min-width:0;display:flex;align-items:center;gap:10px}
body.ui-v4 .dashboard-card-header h2{margin:0;color:var(--ui-ink);font-size:14px;font-weight:770;letter-spacing:-.02em}
body.ui-v4 .dashboard-card-header p{margin:2px 0 0;color:var(--ui-muted);font-size:9px}
body.ui-v4 .section-icon{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:10px}
body.ui-v4 .section-icon svg{width:17px;height:17px}
body.ui-v4 .section-icon.blue{background:#eaf2ff;color:#1768f2}
body.ui-v4 .section-icon.indigo{background:#eeebff;color:#6543db}
body.ui-v4 .section-icon.orange{background:#fff0e2;color:#e36d0f}
body.ui-v4 .section-icon.cyan{background:#e6f8fb;color:#0495b8}
body.ui-v4 .text-link{display:inline-flex;align-items:center;gap:5px;color:var(--ui-primary);font-size:9px;font-weight:750;white-space:nowrap}
body.ui-v4 .text-link svg{width:13px;height:13px}
body.ui-v4 .dashboard-table-wrap{border:0;border-radius:0}
body.ui-v4 .dashboard-load-table th{padding:9px 13px;background:#f8faff}
body.ui-v4 .dashboard-load-table td{height:65px;padding:10px 13px}
body.ui-v4 .load-id{display:inline-block;color:var(--ui-primary);font-size:11px;font-weight:800}
body.ui-v4 .route-copy{display:block;margin-top:3px;color:var(--ui-muted);font-size:8.5px;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .route-copy b{color:#8a98ad;font-weight:500}
body.ui-v4 .cell-primary{display:block;color:var(--ui-text);font-size:10px;font-weight:700}
body.ui-v4 td small{display:block;margin-top:2px;color:var(--ui-muted);font-size:8px}
body.ui-v4 .inline-meta{display:inline-flex;align-items:center;gap:3px;margin-top:4px;padding:2px 6px;border-radius:999px;font-size:7px;font-weight:700}
body.ui-v4 .inline-meta svg{width:10px;height:10px}
body.ui-v4 .reefer-meta{background:#e8f8fc;color:#048dab}
body.ui-v4 .row-action{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--ui-line);border-radius:9px;color:#7c8aa0;font-size:19px;line-height:1}
body.ui-v4 .row-action:hover{border-color:#b9cbe2;color:var(--ui-primary);background:#f5f8ff}
body.ui-v4 .workflow-card{position:relative;min-height:100%}
body.ui-v4 .workflow-list{position:relative;z-index:2;display:grid;gap:0;margin:0;padding:9px 17px 16px;list-style:none}
body.ui-v4 .workflow-list li{position:relative;display:grid;grid-template-columns:25px minmax(0,1fr);gap:10px;padding:10px 0}
body.ui-v4 .workflow-list li:not(:last-child)::after{content:"";position:absolute;left:12px;top:34px;bottom:-4px;border-left:1px dashed #b9cff4}
body.ui-v4 .workflow-list li>span{width:25px;height:25px;display:grid;place-items:center;border-radius:999px;background:linear-gradient(135deg,#2874f4,#0e57dc);color:#fff;font-size:9px;font-weight:800;box-shadow:0 5px 12px rgba(23,104,242,.2)}
body.ui-v4 .workflow-list strong{display:block;color:var(--ui-text);font-size:10px}
body.ui-v4 .workflow-list p{margin:3px 0 0;color:var(--ui-muted);font-size:8.5px;line-height:1.5}
body.ui-v4 .workflow-route{position:absolute;right:-14px;bottom:-10px;width:150px;height:115px;opacity:.45}
body.ui-v4 .workflow-route span{position:absolute;inset:15px -30px -30px 10px;border:5px solid #c5d7f7;border-left:0;border-bottom:0;border-radius:70% 0 0 0;transform:rotate(-18deg)}
body.ui-v4 .workflow-route i{position:absolute;right:23px;bottom:16px;width:13px;height:13px;border:4px solid #2472ef;border-radius:50%;box-shadow:0 0 0 7px rgba(36,114,239,.12)}

body.ui-v4 .dashboard-list{padding:9px 12px 13px}
body.ui-v4 .dashboard-list-item{min-height:54px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 10px;border-bottom:1px solid #edf1f6;border-radius:10px;transition:background .14s ease}
body.ui-v4 .dashboard-list-item:last-child{border-bottom:0}
body.ui-v4 .dashboard-list-item:hover{background:#f8faff}
body.ui-v4 .dashboard-list-item>span:nth-child(2){min-width:0}
body.ui-v4 .dashboard-list-item strong,body.ui-v4 .dashboard-list-item small{display:block}
body.ui-v4 .dashboard-list-item strong{color:var(--ui-text);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .dashboard-list-item small{margin-top:2px;color:var(--ui-muted);font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .dashboard-list-item>b{color:#8da0ba;font-size:18px;font-weight:500}
body.ui-v4 .dashboard-list-item time{padding:4px 7px;border-radius:7px;background:#f2f5f9;color:#65738a;font-size:7.5px;white-space:nowrap}
body.ui-v4 .list-dot{width:8px;height:8px;border-radius:50%}
body.ui-v4 .list-dot.blue{background:#2c76f0;box-shadow:0 0 0 5px rgba(44,118,240,.09)}
body.ui-v4 .alert-symbol{width:35px;height:35px;display:grid;place-items:center;border-radius:10px;background:#fff0e3;color:#e66d09}
body.ui-v4 .alert-symbol svg{width:17px;height:17px}
body.ui-v4 .alert-danger .alert-symbol{background:#ffebee;color:#d9384d}
body.ui-v4 .activity-list{padding:8px 12px 13px}
body.ui-v4 .activity-item{display:grid;grid-template-columns:32px minmax(0,1fr) 6px;align-items:center;gap:9px;min-height:52px;padding:8px;border-bottom:1px solid #edf1f6}
body.ui-v4 .activity-item:last-child{border-bottom:0}
body.ui-v4 .activity-marker{width:32px;height:32px;display:grid;place-items:center;border-radius:10px}
body.ui-v4 .activity-marker svg{width:15px;height:15px}
body.ui-v4 .activity-marker.blue{background:#eaf2ff;color:#1768f2}
body.ui-v4 .activity-marker.green{background:#e8f8ef;color:#129653}
body.ui-v4 .activity-marker.orange{background:#fff0e2;color:#e36d0f}
body.ui-v4 .activity-item strong,body.ui-v4 .activity-item small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-v4 .activity-item strong{color:var(--ui-text);font-size:9.5px}
body.ui-v4 .activity-item small{margin-top:2px;color:var(--ui-muted);font-size:7.5px}
body.ui-v4 .activity-item i{width:5px;height:5px;border-radius:50%;background:#2c74ef}
body.ui-v4 .empty-state{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;text-align:center}
body.ui-v4 .empty-state.compact{min-height:145px}
body.ui-v4 .empty-state-icon{width:54px;height:54px;display:grid;place-items:center;margin-bottom:10px;border-radius:17px;background:#eaf2ff;color:#1768f2}
body.ui-v4 .empty-state-icon.success{background:#e8f8ef;color:#129653}
body.ui-v4 .empty-state-icon svg{width:25px;height:25px}
body.ui-v4 .empty-state strong{color:var(--ui-text);font-size:11px}
body.ui-v4 .empty-state p{max-width:250px;margin:4px 0 0;color:var(--ui-muted);font-size:8.5px;line-height:1.45}
body.ui-v4 .mobile-quick-actions{display:none}
body.ui-v4 .quick-action-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
body.ui-v4 .quick-action-grid a{display:flex;flex-direction:column;align-items:center;gap:8px;padding:13px 8px;border:1px solid var(--ui-line);border-radius:14px;background:#fff;text-align:center}
body.ui-v4 .quick-action-grid span{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;color:#fff}
body.ui-v4 .quick-action-grid span svg{width:19px;height:19px}
body.ui-v4 .quick-action-grid .blue{background:#2568ed}
body.ui-v4 .quick-action-grid .purple{background:#7444df}
body.ui-v4 .quick-action-grid .green{background:#199b54}
body.ui-v4 .quick-action-grid .orange{background:#ee7410}
body.ui-v4 .quick-action-grid strong{font-size:9px}

/* Command palette */
body.ui-v4 .command-palette{position:fixed;inset:0;z-index:120;display:grid;place-items:start center;padding:8vh 18px 18px}
body.ui-v4 .command-palette[hidden]{display:none!important}
body.ui-v4 .command-backdrop{position:absolute;inset:0;border:0;background:rgba(5,16,39,.58);backdrop-filter:blur(8px);cursor:default}
body.ui-v4 .command-palette>section{position:relative;z-index:1;width:min(700px,100%);overflow:hidden;border:1px solid rgba(255,255,255,.8);border-radius:21px;background:#fff;box-shadow:0 35px 100px rgba(4,19,50,.32)}
body.ui-v4 .command-close{position:absolute;right:12px;top:12px;z-index:2;width:36px;height:36px;border:0;border-radius:10px;background:#f2f5f9;color:#66758b;font-size:22px;cursor:pointer}
body.ui-v4 .command-input{height:66px;display:flex;align-items:center;gap:11px;padding:0 58px 0 17px;border-bottom:1px solid var(--ui-line)}
body.ui-v4 .command-input svg{width:21px;height:21px;color:#586a83}
body.ui-v4 .command-input form{flex:1}
body.ui-v4 .command-input input{min-height:42px;padding:0;border:0;border-radius:0;box-shadow:none!important;font-size:16px}
body.ui-v4 .command-input kbd{padding:4px 7px;border:1px solid var(--ui-line);border-radius:7px;background:#f6f8fb;color:#7a879c;font-size:9px}
body.ui-v4 .command-shortcuts{display:grid;gap:3px;padding:10px}
body.ui-v4 .command-shortcuts>span{padding:7px 9px;color:#99a5b8;font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
body.ui-v4 .command-shortcuts a{display:flex;justify-content:space-between;padding:11px;border-radius:10px;font-size:12px}
body.ui-v4 .command-shortcuts a:hover{background:#f2f6fb;color:var(--ui-primary)}
body.ui-v4 .command-shortcuts kbd{color:#98a5b8}

/* Mobile dock */
body.ui-v4 .mobile-dock{display:none}
body.ui-v4 .sidebar-backdrop{display:none}

/* Specialized responsive helpers */
body.ui-v4 .dispatch-board{gap:12px}
body.ui-v4 .dispatch-column{border-color:var(--ui-line);border-radius:16px;background:#f8faff}
body.ui-v4 .load-card{border-color:var(--ui-line);border-radius:14px;box-shadow:var(--ui-shadow-xs)}
body.ui-v4 .calendar-card{border:1px solid var(--ui-line);border-radius:16px;background:#fff;overflow:auto}
body.ui-v4 .calendar-day{background:#fff}
body.ui-v4 .calendar-day.is-today{background:#edf4ff}
body.ui-v4 .notification-item{border-color:var(--ui-line)}
body.ui-v4 .hos-graph-wrap,body.ui-v4 #tracking-map{border-radius:15px;overflow:hidden}
body.ui-v4 .automation-hero{border-radius:22px}
body.ui-v4 .automation-rule-card,body.ui-v4 .automation-action-main{border-color:var(--ui-line);border-radius:15px;box-shadow:var(--ui-shadow-xs)}

/* Tablet */
@media(max-width:1280px){
  body.ui-v4 .topbar-v4,body.ui-v4 .topbar-v3{grid-template-columns:minmax(170px,1fr) minmax(230px,410px) auto;padding-inline:21px}
  body.ui-v4 .profile-copy{display:none}
  body.ui-v4 .dashboard-health-row{gap:0}
  body.ui-v4 .health-chip{min-width:135px;padding-inline:13px}
  body.ui-v4 .dashboard-secondary-grid{grid-template-columns:1fr 1fr}
  body.ui-v4 .activity-card{grid-column:1/-1}
  body.ui-v4 .activity-list{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
}
@media(max-width:1100px){
  body.ui-v4 .app-shell,body.ui-v4.sidebar-collapsed .app-shell{display:block}
  body.ui-v4 .sidebar-v4,body.ui-v4 .sidebar-v3{position:fixed;left:0;top:0;width:min(310px,88vw);transform:translateX(-103%);box-shadow:var(--ui-shadow-lg);transition:transform .22s ease}
  body.ui-v4.sidebar-open .sidebar-v4,body.ui-v4.sidebar-open .sidebar-v3{transform:translateX(0)}
  body.ui-v4 .sidebar-backdrop{position:fixed;inset:0;z-index:65;border:0;background:rgba(4,15,36,.55);backdrop-filter:blur(2px)}
  body.ui-v4.sidebar-open .sidebar-backdrop{display:block}
  body.ui-v4 .sidebar-collapse{display:none!important}
  body.ui-v4 .sidebar-close{display:grid!important}
  body.ui-v4 .topbar-leading .mobile-menu{display:flex;width:39px;height:39px;flex-direction:column;justify-content:center;gap:4px}
  body.ui-v4 .mobile-menu span{display:block;width:17px;height:1.5px;border-radius:9px;background:currentColor}
  body.ui-v4 .topbar-v4,body.ui-v4 .topbar-v3{grid-template-columns:minmax(0,1fr) minmax(210px,340px) auto}
  body.ui-v4 .dashboard-welcome{padding-right:22px}
  body.ui-v4 .dashboard-route-art{opacity:.45}
  body.ui-v4 .dashboard-health-row{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-right:260px}
  body.ui-v4 .health-chip{min-width:0;padding:0;border:0}
  body.ui-v4 .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ui-v4 .dashboard-primary-grid{grid-template-columns:1fr}
  body.ui-v4 .workflow-list{grid-template-columns:1fr 1fr;gap:0 20px}
  body.ui-v4 .workflow-list li:not(:last-child)::after{display:none}
  body.ui-v4 .form-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ui-v4.sidebar-collapsed .brand-copy,body.ui-v4.sidebar-collapsed .nav-search input,body.ui-v4.sidebar-collapsed .nav-search kbd,body.ui-v4.sidebar-collapsed .nav-item>span,body.ui-v4.sidebar-collapsed .nav-section>summary>span,body.ui-v4.sidebar-collapsed .nav-section>summary i,body.ui-v4.sidebar-collapsed .sidebar-user-copy,body.ui-v4.sidebar-collapsed .sidebar-footer>a{display:block}
  body.ui-v4.sidebar-collapsed .nav-search{justify-content:flex-start;padding:0 10px}
  body.ui-v4.sidebar-collapsed .nav-item,body.ui-v4.sidebar-collapsed .nav-section>summary{justify-content:flex-start;padding-inline:10px}
  body.ui-v4.sidebar-collapsed .nav-section>div{display:block}
  body.ui-v4.sidebar-collapsed .sidebar-footer{justify-content:flex-start;padding-inline:6px}
}

/* Mobile */
@media(max-width:800px){
  body.ui-v4{font-size:13px;background:#f4f7fb}
  body.ui-v4 .topbar-v4,body.ui-v4 .topbar-v3{min-height:64px;grid-template-columns:minmax(0,1fr) auto;padding:8px 14px;background:rgba(247,250,255,.94)}
  body.ui-v4 .topbar-v4 .command-trigger,body.ui-v4 .topbar-v3 .command-trigger{display:none}
  body.ui-v4 .topbar-title .eyebrow{display:none}
  body.ui-v4 .topbar-title h1{font-size:17px}
  body.ui-v4 .autopilot-pill{width:39px;height:39px;padding:3px;border:0;background:transparent;box-shadow:none}
  body.ui-v4 .autopilot-spark{width:36px;height:36px}
  body.ui-v4 .autopilot-pill>span:nth-child(2),body.ui-v4 .autopilot-pill>b{display:none}
  body.ui-v4 .profile-menu{display:none}
  body.ui-v4 .topbar-actions{gap:5px}
  body.ui-v4 .icon-button{width:39px;height:39px;flex-basis:39px}
  body.ui-v4 .page-content{padding:14px 13px 96px}
  body.ui-v4 .alert{width:calc(100% - 26px);margin-top:10px}
  body.ui-v4 .page-heading{display:block;margin-bottom:14px}
  body.ui-v4 .page-heading h1{font-size:23px}
  body.ui-v4 .page-heading .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
  body.ui-v4 .page-heading .page-actions>*{width:100%}
  body.ui-v4 .panel{padding:15px;border-radius:16px}
  body.ui-v4 .panel-header{align-items:stretch;flex-direction:column}
  body.ui-v4 .form-grid.two,body.ui-v4 .form-grid.three,body.ui-v4 .form-grid.four{grid-template-columns:1fr}
  body.ui-v4 .two-col,body.ui-v4 .three-col{grid-template-columns:1fr}
  body.ui-v4 .form-section{padding:15px;border-radius:16px}
  body.ui-v4 .action-row,body.ui-v4 .form-actions{width:100%}
  body.ui-v4 .form-actions .btn{flex:1}

  body.ui-v4 .dashboard-welcome{min-height:auto;display:block;margin:-14px -13px 13px;padding:24px 18px 22px;border:0;border-radius:0 0 28px 28px;background:linear-gradient(145deg,#0b2c72 0%,#0a49bb 58%,#1768f2 100%);box-shadow:0 18px 42px rgba(10,56,137,.2);color:#fff}
  body.ui-v4 .dashboard-welcome-copy{max-width:none}
  body.ui-v4 .dashboard-kicker{color:#9ec7ff}
  body.ui-v4 .dashboard-welcome h1{color:#fff;font-size:25px}
  body.ui-v4 .dashboard-welcome h1 span{color:#89c7ff}
  body.ui-v4 .dashboard-welcome-copy>p:not(.dashboard-kicker){color:#dce9ff;font-size:11px}
  body.ui-v4 .dashboard-welcome-actions{position:absolute;right:17px;top:20px;margin:0}
  body.ui-v4 .dashboard-welcome-actions .btn-primary{width:40px;min-width:40px;height:40px;padding:0;border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.13);box-shadow:none}
  body.ui-v4 .dashboard-welcome-actions .btn-primary span{display:none}
  body.ui-v4 .dashboard-welcome-actions .btn-primary svg{width:19px;height:19px}
  body.ui-v4 .dashboard-welcome-actions .btn-white{display:none}
  body.ui-v4 .dashboard-health-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:20px 0 0}
  body.ui-v4 .health-chip{padding:9px;border:1px solid rgba(255,255,255,.13);border-radius:13px;background:rgba(255,255,255,.08)}
  body.ui-v4 .health-chip strong{color:#fff;font-size:9px}
  body.ui-v4 .health-chip small{color:#cbdcff;font-size:7.5px}
  body.ui-v4 .health-icon{width:30px;height:30px;flex-basis:30px;background:rgba(255,255,255,.14)!important;color:#fff!important}
  body.ui-v4 .dashboard-route-art{display:none}
  body.ui-v4 .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:13px}
  body.ui-v4 .metric-card{min-height:104px;display:block;padding:13px;border-radius:16px}
  body.ui-v4 .metric-icon{width:38px;height:38px;margin-bottom:7px;border-radius:12px}
  body.ui-v4 .metric-icon svg{width:19px;height:19px}
  body.ui-v4 .metric-content strong{font-size:22px}
  body.ui-v4 .metric-content small{font-size:9px}
  body.ui-v4 .metric-content em{font-size:7.5px;white-space:normal;line-height:1.35}
  body.ui-v4 .dashboard-primary-grid,body.ui-v4 .dashboard-secondary-grid{display:block;margin:0}
  body.ui-v4 .dashboard-card{margin-bottom:13px;border-radius:17px}
  body.ui-v4 .dashboard-card-header{min-height:62px;padding:12px 13px}
  body.ui-v4 .dashboard-card-header h2{font-size:13px}
  body.ui-v4 .dashboard-card-header p{font-size:8px}
  body.ui-v4 .section-icon{width:31px;height:31px;flex-basis:31px}
  body.ui-v4 .text-link{font-size:8px}
  body.ui-v4 .workflow-card{display:none}
  body.ui-v4 .dashboard-load-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  body.ui-v4 .dashboard-load-table,body.ui-v4 .dashboard-load-table tbody,body.ui-v4 .dashboard-load-table tr,body.ui-v4 .dashboard-load-table td{display:block;width:100%}
  body.ui-v4 .dashboard-load-table tbody{padding:5px 12px 12px}
  body.ui-v4 .dashboard-load-table tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px 42px 12px 10px;border-bottom:1px solid #e8edf4}
  body.ui-v4 .dashboard-load-table tr:last-child{border-bottom:0}
  body.ui-v4 .dashboard-load-table td{height:auto;padding:0;border:0!important;text-align:left!important}
  body.ui-v4 .dashboard-load-table td::before{display:none!important}
  body.ui-v4 .dashboard-load-table td:nth-child(1){grid-column:1;grid-row:1/3}
  body.ui-v4 .dashboard-load-table td:nth-child(2){display:none}
  body.ui-v4 .dashboard-load-table td:nth-child(3){grid-column:1;grid-row:3}
  body.ui-v4 .dashboard-load-table td:nth-child(4){grid-column:2;grid-row:1;text-align:right!important}
  body.ui-v4 .dashboard-load-table td:nth-child(5){grid-column:2;grid-row:2;text-align:right!important}
  body.ui-v4 .dashboard-load-table td:nth-child(6){position:absolute;right:8px;top:50%;transform:translateY(-50%)}
  body.ui-v4 .route-copy{white-space:normal;line-height:1.4}
  body.ui-v4 .cell-primary{font-size:9px}
  body.ui-v4 .schedule-card{display:none}
  body.ui-v4 .activity-list{display:block}
  body.ui-v4 .alerts-card .dashboard-list{padding-top:4px}
  body.ui-v4 .dashboard-list-item{min-height:58px;padding-inline:6px}
  body.ui-v4 .dashboard-list-item strong{font-size:9.5px}
  body.ui-v4 .dashboard-list-item small{font-size:7.5px}
  body.ui-v4 .activity-item strong{font-size:9px}
  body.ui-v4 .activity-item small{font-size:7px}
  body.ui-v4 .mobile-quick-actions{display:block;margin-bottom:0}
  body.ui-v4 .quick-action-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  body.ui-v4 .quick-action-grid a{padding:10px 4px;border-radius:13px}
  body.ui-v4 .quick-action-grid strong{font-size:7.5px;line-height:1.25}

  body.ui-v4 .mobile-dock{position:fixed;left:0;right:0;bottom:0;z-index:60;height:72px;display:grid!important;grid-template-columns:repeat(5,1fr);align-items:center;padding:5px 10px max(5px,env(safe-area-inset-bottom));border-top:1px solid rgba(220,228,240,.9);background:rgba(255,255,255,.95);box-shadow:0 -10px 30px rgba(20,43,84,.09);backdrop-filter:blur(17px)}
  body.ui-v4 .mobile-dock a,body.ui-v4 .mobile-dock button{position:relative;height:57px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:11px;background:transparent;color:#8492aa;font-size:8px;font-weight:650}
  body.ui-v4 .mobile-dock svg{width:20px;height:20px}
  body.ui-v4 .mobile-dock a.is-active,body.ui-v4 .mobile-dock a:hover,body.ui-v4 .mobile-dock button:hover{color:var(--ui-primary)}
  body.ui-v4 .mobile-dock a.is-active::before{content:"";position:absolute;top:0;width:25px;height:3px;border-radius:999px;background:var(--ui-primary)}
  body.ui-v4 .mobile-dock .dock-ai{width:auto;height:57px;margin:0;border:0;border-radius:11px;background:transparent;color:#7148df;box-shadow:none}
  body.ui-v4 .mobile-dock .dock-ai>span{font-size:18px}
  body.ui-v4 .mobile-dock .dock-ai small{font-size:8px}

  body.ui-v4 .table-wrap:not(.dashboard-table-wrap){border:0;overflow:visible;background:transparent}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table){min-width:0;display:block}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) tbody{display:grid;gap:10px}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) tr{display:block;width:100%;padding:10px 12px;border:1px solid var(--ui-line);border-radius:14px;background:#fff;box-shadow:var(--ui-shadow-xs)}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) td{display:grid;width:100%;grid-template-columns:minmax(92px,35%) minmax(0,1fr);gap:10px;align-items:start;padding:7px 0!important;border:0!important;text-align:right!important}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) td::before{content:attr(data-label);color:#77859a;font-size:8px;font-weight:800;letter-spacing:.05em;text-align:left;text-transform:uppercase}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) td:empty{display:none}
  body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) td .action-row,body.ui-v4 .table-wrap table[data-responsive-ready]:not(.invoice-table):not(.dashboard-load-table) td .table-actions{justify-content:flex-end}
  body.ui-v4 .dispatch-board{margin-inline:-13px;padding-inline:13px;overflow:auto;scroll-snap-type:x proximity}
  body.ui-v4 .dispatch-column{min-width:84vw;scroll-snap-align:start}
  body.ui-v4 .calendar-card,body.ui-v4 .hos-graph-wrap{margin-inline:-15px;border-radius:0}
  body.ui-v4 .command-palette{padding-top:4vh}
  body.ui-v4 .command-palette>section{border-radius:18px}
}

@media(max-width:480px){
  body.ui-v4 .dashboard-welcome h1{padding-right:46px;font-size:23px}
  body.ui-v4 .dashboard-health-row{grid-template-columns:1fr}
  body.ui-v4 .health-chip:nth-child(n+3){display:none}
  body.ui-v4 .dashboard-metrics{grid-template-columns:1fr 1fr}
  body.ui-v4 .metric-card{min-height:110px}
  body.ui-v4 .metric-content strong{font-size:21px}
  body.ui-v4 .page-heading .page-actions{grid-template-columns:1fr}
  body.ui-v4 .quick-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ui-v4 .quick-action-grid a{flex-direction:row;justify-content:flex-start;padding:10px}
  body.ui-v4 .profile-popover{right:-8px}
  body.ui-v4 .command-input kbd{display:none}
}

@media print{
  body.ui-v4 .sidebar,body.ui-v4 .topbar-v4,body.ui-v4 .topbar-v3,body.ui-v4 .mobile-dock,body.ui-v4 .page-actions,body.ui-v4 .sidebar-backdrop{display:none!important}
  body.ui-v4 .app-shell{display:block!important}
  body.ui-v4 .page-content{width:100%!important;max-width:none!important;padding:0!important}
  body.ui-v4 .panel{box-shadow:none!important}
}
@media(max-width:800px){
 body.ui-v4 .mobile-dock .dock-alert-link b{position:absolute;top:5px;left:50%;margin-left:5px;min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px;border:2px solid #fff;border-radius:999px;background:#ef334c;color:#fff;font-size:7px;line-height:1}
}
body.ui-v4 .topbar-v4.is-scrolled{box-shadow:0 8px 24px rgba(20,43,84,.06)}
body.ui-v4 .has-horizontal-overflow{max-width:100%}
body.ui-v4 .dashboard-welcome-side{position:relative;z-index:3;display:flex;flex-direction:column;align-items:flex-end;gap:11px;flex:0 0 auto;margin-top:27px}
body.ui-v4 .dashboard-welcome-side .dashboard-welcome-actions{margin-top:0}
body.ui-v4 .dashboard-revenue-pill{min-width:200px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 11px;border:1px solid #d8e4f5;border-radius:12px;background:rgba(255,255,255,.78);box-shadow:0 6px 18px rgba(31,76,145,.06)}
body.ui-v4 .dashboard-revenue-pill span{color:var(--ui-muted);font-size:8px;font-weight:650}
body.ui-v4 .dashboard-revenue-pill strong{color:var(--ui-ink);font-size:12px}
@media(max-width:800px){
 body.ui-v4 .dashboard-welcome-side{position:absolute;right:17px;top:20px;margin:0}
 body.ui-v4 .dashboard-welcome-side .dashboard-welcome-actions{position:static}
 body.ui-v4 .dashboard-revenue-pill{display:none}
}
/* Login refresh */
body.auth-body.ui-v4{min-height:100dvh;padding:24px;background:radial-gradient(circle at 12% 15%,rgba(31,112,242,.3),transparent 30%),radial-gradient(circle at 90% 80%,rgba(10,168,207,.22),transparent 30%),linear-gradient(145deg,#05142f,#0a2d6c 62%,#0a4d91)}
body.auth-body.ui-v4 .auth-wrapper{width:min(1080px,100%);min-height:min(720px,calc(100dvh - 48px));display:grid;grid-template-columns:minmax(410px,1fr) minmax(420px,1.05fr);overflow:hidden;border:1px solid rgba(255,255,255,.14);border-radius:28px;background:#fff;box-shadow:0 42px 120px rgba(2,13,35,.4)}
body.auth-body.ui-v4 .auth-card{display:flex;flex-direction:column;justify-content:center;padding:56px;border:0;border-radius:0;background:#fff;box-shadow:none}
body.auth-body.ui-v4 .auth-logo{display:inline-flex;width:max-content;margin-bottom:30px}
body.auth-body.ui-v4 .auth-logo img{width:auto;max-width:225px;height:auto}
body.auth-body.ui-v4 .auth-card h1{margin:2px 0 8px;color:var(--ui-ink);font-size:35px;font-weight:790;letter-spacing:-.05em}
body.auth-body.ui-v4 .auth-card .muted{max-width:520px;color:var(--ui-muted);font-size:12px;line-height:1.65}
body.auth-body.ui-v4 .form-stack{display:grid;gap:15px;margin-top:25px}
body.auth-body.ui-v4 .form-stack label{display:grid;gap:7px}
body.auth-body.ui-v4 .form-stack input{min-height:48px;padding-inline:14px;border-radius:13px;font-size:13px}
body.auth-body.ui-v4 .form-stack .btn{min-height:48px;margin-top:3px;border-radius:13px;font-size:12px}
body.auth-body.ui-v4 .auth-help{display:flex;justify-content:space-between;gap:18px;margin-top:20px;color:var(--ui-muted);font-size:10px}
body.auth-body.ui-v4 .auth-help a{color:var(--ui-primary);font-weight:750}
body.auth-body.ui-v4 .auth-hero{position:relative;display:flex;align-items:flex-end;padding:50px;border:0;border-radius:0;background:linear-gradient(145deg,#071b45,#0e4eb3 66%,#0e79a5);overflow:hidden}
body.auth-body.ui-v4 .auth-hero::before{content:"";position:absolute;width:520px;height:520px;right:-220px;top:-220px;border:1px solid rgba(255,255,255,.16);border-radius:50%;box-shadow:0 0 0 70px rgba(255,255,255,.035),0 0 0 140px rgba(255,255,255,.022)}
body.auth-body.ui-v4 .auth-hero::after{content:"";position:absolute;left:40px;right:40px;bottom:55px;height:170px;border:4px solid rgba(126,194,255,.18);border-left:0;border-bottom:0;border-radius:70% 0 0 0;transform:rotate(-12deg)}
body.auth-body.ui-v4 .hero-panel{position:relative;z-index:2;width:100%;padding:28px;border:1px solid rgba(255,255,255,.13);border-radius:22px;background:rgba(5,24,63,.36);backdrop-filter:blur(12px);color:#fff}
body.auth-body.ui-v4 .hero-panel .eyebrow{color:#a8d7ff}
body.auth-body.ui-v4 .hero-panel h2{max-width:480px;margin:7px 0 24px;color:#fff;font-size:30px;line-height:1.12;letter-spacing:-.045em}
body.auth-body.ui-v4 .hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body.auth-body.ui-v4 .hero-grid>div{padding:13px;border:1px solid rgba(255,255,255,.11);border-radius:13px;background:rgba(255,255,255,.06)}
body.auth-body.ui-v4 .hero-grid strong,body.auth-body.ui-v4 .hero-grid span{display:block}
body.auth-body.ui-v4 .hero-grid strong{font-size:11px}
body.auth-body.ui-v4 .hero-grid span{margin-top:3px;color:#c7d9f4;font-size:9px}
@media(max-width:840px){
 body.auth-body.ui-v4{padding:10px}
 body.auth-body.ui-v4 .auth-wrapper{display:block;min-height:calc(100dvh - 20px);border-radius:22px}
 body.auth-body.ui-v4 .auth-card{min-height:calc(100dvh - 20px);padding:34px 24px}
 body.auth-body.ui-v4 .auth-hero{display:none}
 body.auth-body.ui-v4 .auth-card h1{font-size:30px}
 body.auth-body.ui-v4 .auth-help{flex-direction:column;gap:7px}
}
/* Broader module refresh */
body.ui-v4 .stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
body.ui-v4 .compact-stats{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
body.ui-v4 .stat-card{position:relative;overflow:hidden;padding:17px;border-radius:17px;background:linear-gradient(180deg,#fff,#fbfcff);box-shadow:var(--ui-shadow-xs);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
body.ui-v4 .stat-card:hover{transform:translateY(-2px);border-color:#cbd8ea;box-shadow:0 12px 28px rgba(20,43,84,.08)}
body.ui-v4 .stat-card::after{content:"";position:absolute;right:-28px;top:-28px;width:78px;height:78px;border-radius:50%;background:rgba(23,104,242,.045)}
body.ui-v4 .stat-card span{display:block;color:#58667e;font-size:10px;font-weight:700}
body.ui-v4 .stat-card strong{display:block;margin:5px 0 2px;color:var(--ui-ink);font-size:27px;font-weight:790;letter-spacing:-.04em}
body.ui-v4 .stat-card small{display:block;color:var(--ui-muted);font-size:8.5px;line-height:1.4}
body.ui-v4 .stat-card.highlight{border:0;background:linear-gradient(135deg,#175fe0,#0b8fb5);color:#fff;box-shadow:0 13px 30px rgba(20,91,205,.22)}
body.ui-v4 .stat-card.highlight span,body.ui-v4 .stat-card.highlight strong,body.ui-v4 .stat-card.highlight small{color:#fff}
body.ui-v4 .stat-card.highlight small{opacity:.78}
body.ui-v4 .dark-panel{border:1px solid rgba(255,255,255,.06);background:linear-gradient(145deg,#081a3b,#0b3270);color:#fff;box-shadow:0 16px 36px rgba(7,26,63,.16)}
body.ui-v4 .dark-panel h2,body.ui-v4 .dark-panel strong{color:#fff}
body.ui-v4 .dark-panel p,body.ui-v4 .dark-panel small{color:#b8c9e3}
body.ui-v4 .mini-list{display:grid;gap:9px}
body.ui-v4 .mini-card{display:block;padding:12px 13px;border:1px solid var(--ui-line);border-radius:13px;background:#fff;transition:.15s}
body.ui-v4 a.mini-card:hover{transform:translateY(-1px);border-color:#c7d5e8;box-shadow:0 8px 20px rgba(20,43,84,.07)}
body.ui-v4 .mini-card strong,body.ui-v4 .mini-card span{display:block}
body.ui-v4 .mini-card strong{color:var(--ui-text);font-size:10px}
body.ui-v4 .mini-card span{margin-top:3px;color:var(--ui-muted);font-size:8.5px;line-height:1.45}
body.ui-v4 .warning-left{border-left:3px solid var(--ui-orange)}
body.ui-v4 .danger-left{border-left:3px solid var(--ui-red)}
body.ui-v4 .info-list{display:grid;gap:9px}
body.ui-v4 .info-list>div{padding:11px 12px;border:1px solid var(--ui-line);border-radius:12px;background:#fbfcff}
body.ui-v4 .filter-bar,body.ui-v4 .toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding:12px;border:1px solid var(--ui-line);border-radius:14px;background:#fff;box-shadow:var(--ui-shadow-xs)}
body.ui-v4 .filter-bar input,body.ui-v4 .filter-bar select,body.ui-v4 .toolbar input,body.ui-v4 .toolbar select{width:auto;min-width:150px;flex:1}
body.ui-v4 .load-card,body.ui-v4 .mobile-record-card{border:1px solid var(--ui-line);border-radius:15px;background:#fff;box-shadow:var(--ui-shadow-xs);transition:.15s}
body.ui-v4 .load-card:hover,body.ui-v4 .mobile-record-card:hover{border-color:#cbd8e8;box-shadow:0 10px 24px rgba(20,43,84,.08)}
body.ui-v4 .notification-item{border-bottom:1px solid var(--ui-line);background:#fff}
body.ui-v4 .notification-item.is-unread{background:#f3f7ff}
body.ui-v4 .notification-level{border-radius:999px}
body.ui-v4 .permission-grid,body.ui-v4 .choice-grid{gap:10px}
body.ui-v4 .choice-card,body.ui-v4 .permission-card{border:1px solid var(--ui-line);border-radius:13px;background:#fff}
body.ui-v4 .journal-line,body.ui-v4 .line-item-row,body.ui-v4 .stop-row{gap:10px}
body.ui-v4 .stop-row,body.ui-v4 .line-item-row{padding:12px;border:1px solid var(--ui-line);border-radius:13px;background:#f9fbfe}
@media(max-width:1050px){body.ui-v4 .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){
 body.ui-v4 .stats-grid,body.ui-v4 .compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ui-v4 .stat-card{padding:14px}
 body.ui-v4 .stat-card strong{font-size:23px}
 body.ui-v4 .filter-bar,body.ui-v4 .toolbar{align-items:stretch;flex-direction:column}
 body.ui-v4 .filter-bar input,body.ui-v4 .filter-bar select,body.ui-v4 .toolbar input,body.ui-v4 .toolbar select,body.ui-v4 .filter-bar .btn,body.ui-v4 .toolbar .btn{width:100%;min-width:0}
 body.ui-v4 .journal-line,body.ui-v4 .line-item-row,body.ui-v4 .stop-row{grid-template-columns:1fr!important}
}
