
    :root{
      --bg:#f5f7fb;--panel:#fff;--text:#182230;--muted:#667085;--border:#e4e7ec;
      --primary:#6941c6;--primary2:#53389e;--success:#067647;--successbg:#ecfdf3;
      --warn:#b54708;--warnbg:#fffaeb;--danger:#b42318;--dangerbg:#fef3f2;
      --dark:#101828;--shadow:0 8px 24px rgba(16,24,40,.08);--radius:14px;
    }
    *{box-sizing:border-box}
    body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:var(--bg)}
    button,input,select,textarea{font:inherit}
    button{cursor:pointer}
    .hidden{display:none!important}
    .topbar{position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid var(--border)}
    .topbar-inner{max-width:1550px;margin:auto;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}
    .brand h1{margin:0;font-size:20px}.brand div{font-size:12px;color:var(--muted);margin-top:3px}
    .actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
    .refresh-label{font-size:11px;color:var(--muted)}
    .container{max-width:1550px;margin:auto;padding:20px}
    .stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
    .stat,.panel,.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
    .stat{padding:17px}.stat-label{font-size:12px;color:var(--muted);margin-bottom:8px}.stat-value{font-size:30px;font-weight:700}
    .toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
    .tabs{display:flex;background:#e9eef7;border-radius:10px;padding:4px;gap:4px;flex-wrap:wrap}
    .tab{border:0;background:transparent;color:#344054;padding:9px 13px;border-radius:8px;font-weight:700}
    .tab.active{background:#fff;color:var(--primary);box-shadow:0 1px 3px rgba(16,24,40,.12)}
    .search{min-width:280px;flex:0 1 430px}
    input,select,textarea{width:100%;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:var(--text);outline:none}
    input,select{height:42px;padding:0 10px}textarea{padding:10px;min-height:85px;resize:vertical}
    input:focus,select:focus,textarea:focus{border-color:#b692f6;box-shadow:0 0 0 3px rgba(105,65,198,.12)}
    .panel{overflow:hidden}.table-wrap{overflow:auto}
    table{border-collapse:collapse;width:100%;min-width:1120px}
    th{background:#f9fafb;color:#475467;font-size:11px;text-align:left;padding:12px 13px;border-bottom:1px solid var(--border);white-space:nowrap}
    td{padding:12px 13px;border-bottom:1px solid #eef1f5;font-size:12px;vertical-align:middle}
    tbody tr:hover{background:#fbfcfe}.secondary{display:block;font-size:11px;color:var(--muted);margin-top:3px}
    .route{font-weight:700;white-space:nowrap}.status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
    .status.transit{background:#eff4ff;color:#1849a9}.status.await{background:var(--warnbg);color:var(--warn)}
    .status.done{background:var(--successbg);color:var(--success)}.status.deleted{background:var(--dangerbg);color:var(--danger)}
    .btn{border:0;border-radius:8px;padding:9px 13px;font-weight:700}.btn:disabled{opacity:.55;cursor:not-allowed}
    .btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary2)}
    .btn-secondary{background:#fff;color:var(--primary);border:1px solid #d6bbfb}.btn-secondary:hover{background:#f4f3ff;border-color:#b692f6;color:var(--primary2)}
    .btn-success{background:var(--primary);color:#fff}.btn-success:hover{background:var(--primary2)}.btn-danger{background:var(--danger);color:#fff}
    /* Excel keeps its familiar green identity, tuned to sit naturally beside the purple theme. */
    #histExportBtn{background:#19765a;color:#fff;border-color:#19765a;box-shadow:0 1px 2px rgba(16,24,40,.08)}
    #histExportBtn:hover{background:#145f49;border-color:#145f49}
    #histExportBtn:focus{box-shadow:0 0 0 3px rgba(105,65,198,.16)}
    .btn-warn{background:var(--warn);color:#fff}.btn-sm{padding:7px 10px;font-size:11px}
    .empty,.loading{padding:45px 20px;text-align:center;color:var(--muted)}
    .live-loading{display:inline-flex;align-items:center;justify-content:center;gap:12px;text-align:left;max-width:520px}
    .live-loading-spinner{width:22px;height:22px;flex:0 0 22px;border:3px solid #e4e7ec;border-top-color:var(--primary);border-radius:50%;animation:tripStatusSpin .8s linear infinite}
    .live-loading-title{font-size:13px;font-weight:800;color:#344054;line-height:1.35}
    .live-loading-sub{font-size:11px;color:var(--muted);line-height:1.45;margin-top:3px}
    .modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(16,24,40,.58);display:none;align-items:center;justify-content:center;padding:18px}
    .modal-backdrop.show{display:flex}.modal{width:min(820px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 24px 60px rgba(16,24,40,.25)}
    .modal.wide{width:min(1180px,100%)}.modal-header{padding:18px 20px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
    .modal-title{margin:0;font-size:19px}.modal-sub{font-size:11px;color:var(--muted);margin-top:4px}.close{width:36px;height:36px;border-radius:8px;border:1px solid var(--border);background:#fff;font-size:20px}
    .modal-body{padding:20px}.modal-footer{padding:15px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}
    .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}
    label{font-size:11px;font-weight:700;color:#344054}.notice{padding:11px 13px;border-radius:9px;font-size:12px;margin-bottom:12px}
    .notice.info{background:#eff4ff;color:#1849a9}.notice.success{background:var(--successbg);color:var(--success)}.notice.error{background:var(--dangerbg);color:var(--danger)}
    .notice.checking{background:#fff7e8;color:#7a2e0e;border:1px solid #fdb022;box-shadow:0 2px 8px rgba(181,71,8,.10);padding:14px 15px}
    .notice-checking-row{display:flex;align-items:center;gap:11px}
    .notice-checking-spinner{width:19px;height:19px;flex:0 0 19px;border:2px solid rgba(181,71,8,.22);border-top-color:#b54708;border-radius:50%;animation:tripStatusSpin .8s linear infinite}
    .notice-checking-title{font-size:13px;font-weight:800;line-height:1.35}
    .notice-checking-sub{font-size:11px;font-weight:600;line-height:1.4;margin-top:3px;color:#93370d}
    @keyframes tripStatusSpin{to{transform:rotate(360deg)}}
    .summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:16px}.summary-item{border:1px solid var(--border);border-radius:9px;padding:10px;background:#fcfcfd}
    .summary-label{font-size:10px;color:var(--muted)}.summary-value{font-size:12px;font-weight:700;margin-top:4px;word-break:break-word}
    .action-box{border:1px solid var(--border);border-radius:12px;padding:15px;margin-top:12px}.action-box h3{margin:0 0 12px;font-size:15px}
    .dispatch-details-panel{background:#f7f5ff;border:1px solid #d6bbfb;border-radius:12px;padding:15px;margin:-1px -1px 14px;box-shadow:0 1px 4px rgba(105,65,198,.06)}
    .dispatch-details-panel h3{margin:0 0 12px;font-size:15px;color:#42307d}
    .stage-bridge-card{border:1px solid #abefc6;border-radius:14px;padding:17px;margin-top:12px;background:#f6fef9;box-shadow:0 2px 10px rgba(6,118,71,.08)}
    .stage-bridge-status{display:flex;align-items:center;gap:9px;color:#067647;font-size:14px;font-weight:800;line-height:1.35}
    .stage-bridge-check{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;border-radius:50%;background:#dcfae6;color:#067647;font-size:15px;font-weight:900}
    .stage-bridge-question{margin-top:14px;font-size:17px;font-weight:800;color:#101828;line-height:1.35}
    .stage-bridge-sub{margin-top:5px;font-size:11px;color:var(--muted);line-height:1.45}
    .stage-bridge-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
    .stage-bridge-actions .btn{min-width:110px;min-height:44px}
    .checkbox{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:12px}.checkbox input{width:auto;height:auto}
    .manual-time-box{margin:10px 0;padding:11px;border:1px solid #d0d5dd;border-radius:10px;background:#fcfcfd}
    .manual-time-box .checkbox{margin:0}
    .manual-time-field{margin:10px 0 12px;padding:11px;border:1px solid #b2ddff;border-radius:10px;background:#f5fbff}
    .manual-time-hint{font-size:10px;color:var(--muted);margin-top:5px;line-height:1.4}
    .manual-action-row{display:flex;align-items:stretch;justify-content:flex-start;flex-wrap:wrap;gap:9px;margin-top:12px}
    .manual-action-row .btn{min-height:42px;white-space:nowrap;flex:0 0 auto}
    .manual-action-row .btn-main{min-width:168px;width:auto}
    .action-inline-notice{display:none;align-items:center;min-height:42px;max-width:430px;padding:9px 12px;border:1px solid #fda29b;border-radius:9px;background:var(--dangerbg);color:var(--danger);font-size:11px;font-weight:700;line-height:1.35}
    .action-inline-notice.show{display:flex}
    .btn-manual{background:#175cd3;color:#fff;border:1px solid #175cd3;min-width:190px;width:auto}
    .btn-manual:hover{background:#1849a9;border-color:#1849a9}
    .btn-manual.active{background:#0b4a6f;border-color:#0b4a6f;box-shadow:0 0 0 3px rgba(23,92,211,.14)}
    .history-controls{padding:14px;margin-bottom:14px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
    .filter-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr)) auto auto;gap:10px;align-items:end}
    .filter-input-wrap{position:relative;width:100%}
    .filter-input-wrap input{padding-right:38px}
    .filter-clear{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:26px;height:26px;padding:0;border:0;border-radius:50%;background:#f2f4f7;color:#667085;font-size:18px;font-weight:700;line-height:1;display:none;align-items:center;justify-content:center;z-index:2}
    .filter-clear:hover{background:#e4e7ec;color:#344054}
    .filter-clear:focus{outline:none;box-shadow:0 0 0 3px rgba(105,65,198,.12)}
    .filter-input-wrap input:not(:placeholder-shown)+.filter-clear{display:flex}
    .modal .filter-input-wrap input{padding-right:42px}
    .modal .filter-clear{width:28px;height:28px;right:7px;font-size:19px}
    .kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.kpi-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
    .kpi-label{font-size:11px;color:var(--muted);margin-bottom:8px}.kpi-value{font-size:25px;font-weight:700}.kpi-sub{font-size:10px;color:var(--muted);margin-top:6px}
    .kpi-breakdown{margin-top:12px;padding:16px}
    .kpi-breakdown-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
    .kpi-breakdown-title{font-size:14px;font-weight:800}
    .kpi-breakdown-note{font-size:10px;color:var(--muted);margin-top:4px}
    .kpi-breakdown-total{font-size:12px;font-weight:800;white-space:nowrap}
    .kpi-city-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}
    .kpi-city-row{border:1px solid var(--border);border-radius:10px;padding:10px 11px;background:#fcfcfd}
    .kpi-city-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
    .kpi-city-name{font-size:12px;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .kpi-city-count{font-size:16px;font-weight:800;color:var(--primary);white-space:nowrap}
    .kpi-city-track{height:6px;border-radius:999px;background:#eaecf0;margin-top:8px;overflow:hidden}
    .kpi-city-fill{height:100%;border-radius:999px;background:var(--primary);min-width:3px}
    .manager-shell{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px}.manager-menu{padding:12px;height:max-content}.manager-menu button{width:100%;text-align:left;margin-bottom:7px}
    .manager-login{max-width:440px;margin:35px auto;padding:22px}.manager-login h2{margin-top:0}
    .manager-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px;border-bottom:1px solid var(--border)}
    .manager-filter{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto auto;gap:9px;padding:14px;border-bottom:1px solid var(--border);align-items:center}
    .leg-card{border:1px solid var(--border);border-radius:12px;padding:14px;margin-bottom:12px;background:#fcfcfd}.leg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
    .audit{max-height:260px;overflow:auto;border:1px solid var(--border);border-radius:10px}.audit-row{padding:9px 11px;border-bottom:1px solid #eef1f5;font-size:11px}.audit-row:last-child{border-bottom:0}
    .master-editor{display:grid;grid-template-columns:160px minmax(170px,1fr) minmax(170px,1fr) 170px 90px 90px auto;gap:8px;padding:12px;border-bottom:1px solid var(--border);align-items:end}
    .toast{position:fixed;right:18px;bottom:18px;z-index:300;background:#101828;color:#fff;padding:12px 14px;border-radius:9px;box-shadow:var(--shadow);display:none;max-width:430px;font-size:12px}.toast.show{display:block}
    .toast.toast-success{background:#067647;color:#fff;border:1px solid #05603a;box-shadow:0 8px 24px rgba(6,118,71,.22)}
    .toast.toast-error{background:#b42318;color:#fff;border:1px solid #912018;box-shadow:0 8px 24px rgba(180,35,24,.22)}
    .overlay{position:fixed;inset:0;z-index:250;background:rgba(245,247,251,.84);backdrop-filter:blur(2px);display:none;align-items:center;justify-content:center}
    .overlay.show{display:flex}.loader{background:#fff;border:1px solid var(--border);border-radius:14px;padding:20px 28px;box-shadow:var(--shadow);font-weight:700}
    .app-footer{max-width:1550px;margin:0 auto;padding:4px 20px 22px;text-align:center;color:var(--muted);font-size:11px}
    .app-footer strong{color:#475467;font-weight:700}
    /* =======================================================
       MOBILE EXPERIENCE
       The desktop layout stays unchanged. On phones the tables
       become touch-friendly cards instead of desktop grids.
       ======================================================= */
    @media(max-width:900px){
      html,body{max-width:100%;overflow-x:hidden}
      body{
        padding-bottom:env(safe-area-inset-bottom);
        -webkit-text-size-adjust:100%;
      }

      .topbar{position:sticky;top:0}
      .topbar-inner{
        padding:11px 12px;
        padding-top:calc(11px + env(safe-area-inset-top));
        display:grid;
        grid-template-columns:1fr;
        gap:10px;
        align-items:stretch;
      }
      .brand h1{font-size:18px;line-height:1.15}
      .brand div{font-size:10px}
      .actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        width:100%;
      }
      .actions .btn{
        min-height:44px;
        width:100%;
      }
      .refresh-label{display:none}

      .container{padding:12px}
      .app-footer{padding:2px 12px calc(18px + env(safe-area-inset-bottom));font-size:10px}

      /* Compact KPI strip instead of three tall desktop cards. */
      .stats{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:8px;
        margin-bottom:12px;
      }
      .stat{
        min-width:0;
        padding:11px 8px;
        border-radius:11px;
        box-shadow:none;
      }
      .stat-label{
        font-size:9px;
        line-height:1.2;
        min-height:22px;
        margin-bottom:4px;
      }
      .stat-value{font-size:23px}

      .toolbar{
        display:block;
        margin-bottom:12px;
      }

      /* Swipeable navigation tabs. */
      .tabs{
        width:calc(100vw - 24px);
        max-width:100%;
        overflow-x:auto;
        overflow-y:hidden;
        flex-wrap:nowrap;
        white-space:nowrap;
        padding:4px;
        margin-bottom:10px;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
      }
      .tabs::-webkit-scrollbar{display:none}
      .tab{
        flex:0 0 auto;
        min-height:42px;
        padding:9px 12px;
        font-size:12px;
      }

      .search{
        width:100%;
        min-width:0;
        max-width:none;
      }

      input,select{
        min-height:46px;
        height:46px;
        font-size:16px; /* prevents iOS auto zoom */
      }
      textarea{font-size:16px}
      .btn{min-height:42px}
      .btn-sm{min-height:40px;font-size:12px}

      .form-grid,.summary-grid{grid-template-columns:1fr}
      .summary-grid{gap:7px}
      .summary-item{padding:9px 10px}

      /* Filters: two columns where useful, full-width search/actions. */
      .filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:9px;
      }
      .filter-grid .field:nth-child(5){grid-column:1/-1}
      .filter-grid > .btn{width:100%}

      .history-controls{
        padding:10px;
        margin-bottom:10px;
        border-radius:12px;
      }

      /* KPI dashboard uses two compact columns. */
      .kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:9px;
      }
      .kpi-card{
        padding:13px;
        border-radius:12px;
        box-shadow:none;
      }
      .kpi-card:nth-child(5){grid-column:1/-1}
      .kpi-value{font-size:22px}
      .kpi-city-list{grid-template-columns:1fr}
      .kpi-breakdown{padding:13px}

      /* Real mobile cards: no horizontal table scrolling. */
      .panel{overflow:visible;box-shadow:none}
      .table-wrap{overflow:visible}
      table{
        display:block;
        min-width:0!important;
        width:100%;
      }
      thead{display:none}
      tbody{
        display:block;
        width:100%;
      }
      tbody tr{
        display:block;
        width:100%;
        margin:0 0 10px;
        border:1px solid var(--border);
        border-radius:12px;
        background:#fff;
        overflow:hidden;
        box-shadow:0 3px 12px rgba(16,24,40,.05);
      }
      tbody tr:hover{background:#fff}
      tbody td{
        display:flex;
        width:100%;
        align-items:flex-start;
        justify-content:space-between;
        gap:14px;
        padding:9px 11px;
        border-bottom:1px solid #eef1f5;
        text-align:right;
        font-size:12px;
        word-break:break-word;
      }
      tbody td:last-child{border-bottom:0}
      tbody td::before{
        flex:0 0 38%;
        max-width:38%;
        text-align:left;
        color:var(--muted);
        font-size:9px;
        font-weight:800;
        letter-spacing:.02em;
        text-transform:uppercase;
        line-height:1.35;
      }
      tbody td > *{max-width:62%}
      tbody td .secondary{
        text-align:right;
        white-space:normal;
      }
      tbody td .route{
        white-space:normal;
        text-align:right;
      }
      tbody td .btn{
        max-width:none;
        width:100%;
      }
      tbody td:last-child::before{display:none}
      tbody td:last-child{padding:10px}

      /* Active trips labels */
      #activeRows td:nth-child(1)::before{content:"Fleet Ownership"}
      #activeRows td:nth-child(2)::before{content:"Trip Type"}
      #activeRows td:nth-child(3)::before{content:"Delivery Type"}
      #activeRows td:nth-child(4)::before{content:"Status"}
      #activeRows td:nth-child(5)::before{content:"Last Activity"}
      #activeRows td:nth-child(6)::before{content:"Route / Location"}
      #activeRows td:nth-child(7)::before{content:"Plate"}
      #activeRows td:nth-child(8)::before{content:"Truck"}
      #activeRows td:nth-child(9)::before{content:"Driver"}

      /* Completed trips labels */
      #completedRows td:nth-child(1)::before{content:"Fleet Ownership"}
      #completedRows td:nth-child(2)::before{content:"Initial Trip Type"}
      #completedRows td:nth-child(3)::before{content:"Trip Types"}
      #completedRows td:nth-child(4)::before{content:"Started"}
      #completedRows td:nth-child(5)::before{content:"Completed"}
      #completedRows td:nth-child(6)::before{content:"Route"}
      #completedRows td:nth-child(7)::before{content:"Plate"}
      #completedRows td:nth-child(8)::before{content:"Truck"}
      #completedRows td:nth-child(9)::before{content:"Driver"}
      #completedRows td:nth-child(10)::before{content:"Latest Delivery Type"}
      #completedRows td:nth-child(11)::before{content:"Legs"}
      #completedRows td:nth-child(12)::before{content:"Backload Count"}
      #completedRows td:nth-child(13)::before{content:"Free Trip Count"}
      #completedRows td:nth-child(14)::before{content:"Total Stopover (Hours)"}
      #completedRows td:nth-child(15)::before{content:"Trip Duration"}
      #completedRows td:nth-child(15){padding:9px 11px}
      #completedRows td:nth-child(15)::before{display:block}

      /* Activity Log labels */
      #activityRows td:nth-child(1)::before{content:"Date / Time"}
      #activityRows td:nth-child(2)::before{content:"User"}
      #activityRows td:nth-child(3)::before{content:"Action"}
      #activityRows td:nth-child(4)::before{content:"Trip"}
      #activityRows td:nth-child(5)::before{content:"Entity"}
      #activityRows td:nth-child(6)::before{content:"Field"}
      #activityRows td:nth-child(7)::before{content:"Old → New"}
      #activityRows td:nth-child(8)::before{content:"Details"}
      #activityRows td:nth-child(8){padding:9px 11px}
      #activityRows td:nth-child(8)::before{display:block}

      /* Manager trip database labels */
      #mgrTripRows td:nth-child(1)::before{content:"Trip"}
      #mgrTripRows td:nth-child(2)::before{content:"Status"}
      #mgrTripRows td:nth-child(3)::before{content:"Origin"}
      #mgrTripRows td:nth-child(4)::before{content:"Plate"}
      #mgrTripRows td:nth-child(5)::before{content:"Driver"}
      #mgrTripRows td:nth-child(6)::before{content:"Trip Type"}
      #mgrTripRows td:nth-child(7)::before{content:"Current Location"}
      #mgrTripRows td:nth-child(8)::before{content:"Updated"}

      /* Manager master data labels */
      #masterRows td:nth-child(1)::before{content:"Type"}
      #masterRows td:nth-child(2)::before{content:"Value"}
      #masterRows td:nth-child(3)::before{content:"Region"}
      #masterRows td:nth-child(4)::before{content:"Active"}
      #masterRows td:nth-child(5)::before{content:"Sort"}

      /* Manager vehicle labels */
      #vehicleRows td:nth-child(1)::before{content:"Plate Number"}
      #vehicleRows td:nth-child(2)::before{content:"Truck Type"}
      #vehicleRows td:nth-child(3)::before{content:"Fleet Ownership / Origin"}
      #vehicleRows td:nth-child(4)::before{content:"Driver Name"}
      #vehicleRows td:nth-child(5)::before{content:"Mobile Number"}
      #vehicleRows td:nth-child(6)::before{content:"Active"}
      #vehicleRows td:nth-child(7)::before{content:"Notes"}

      /* Manager routing labels */
      #routingRows td:nth-child(1)::before{content:"Destination"}
      #routingRows td:nth-child(2)::before{content:"Region"}
      #routingRows td:nth-child(3)::before{content:"To Email"}
      #routingRows td:nth-child(4)::before{content:"CC Email"}
      #routingRows td:nth-child(5)::before{content:"Destination WH CC"}
      #routingRows td:nth-child(6)::before{content:"Active"}

      /* Manager region mapping labels */
      #regionRows td:nth-child(1)::before{content:"Region"}
      #regionRows td:nth-child(2)::before{content:"Fleet Ownership"}
      #regionRows td:nth-child(3)::before{content:"Active"}
      #regionRows td:nth-child(4)::before{content:"Sort"}

      /* Empty/loading states should stay centered, not card label rows. */
      tbody td.empty,
      tbody td.loading{
        display:block;
        max-width:none;
        text-align:center;
        padding:28px 14px;
      }
      tbody td.empty::before,
      tbody td.loading::before{display:none}

      /* Full-screen mobile modals, native-app feel. */
      .modal-backdrop{
        padding:0;
        align-items:stretch;
        justify-content:stretch;
      }
      .modal,
      .modal.wide{
        width:100%;
        height:100dvh;
        max-height:100dvh;
        border-radius:0;
        box-shadow:none;
        display:flex;
        flex-direction:column;
      }
      .modal-header{
        position:sticky;
        top:0;
        z-index:3;
        background:#fff;
        padding:14px 13px;
        padding-top:calc(14px + env(safe-area-inset-top));
      }
      .modal-title{font-size:18px}
      .modal-body{
        flex:1 1 auto;
        overflow-y:auto;
        padding:13px;
        -webkit-overflow-scrolling:touch;
      }
      .modal-footer{
        position:sticky;
        bottom:0;
        z-index:3;
        background:#fff;
        padding:10px 12px;
        padding-bottom:calc(10px + env(safe-area-inset-bottom));
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
      }
      .modal-footer .btn{width:100%;min-height:46px}
      .close{min-width:40px;min-height:40px}

      .action-box{padding:13px}
      .action-box > .btn{width:100%;min-height:48px}

      /* Manager becomes a horizontal segmented menu. */
      .manager-shell{grid-template-columns:1fr;gap:10px}
      .manager-menu{
        display:flex;
        overflow-x:auto;
        gap:7px;
        padding:8px;
        position:sticky;
        top:0;
        z-index:5;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
      }
      .manager-menu::-webkit-scrollbar{display:none}
      .manager-menu button{
        flex:0 0 auto;
        width:auto;
        min-width:max-content;
        margin:0;
        text-align:center;
      }
      .manager-login{
        margin:16px auto;
        padding:18px;
        box-shadow:none;
      }
      .manager-head{
        padding:11px 12px;
        flex-wrap:wrap;
      }
      .manager-head input{
        max-width:none!important;
        flex:1 1 100%;
      }
      .manager-filter{
        grid-template-columns:1fr 1fr;
        gap:9px;
        padding:10px;
      }
      .manager-filter > input{grid-column:1/-1}
      .manager-filter > .btn{width:100%}

      .master-editor{
        grid-template-columns:1fr;
        padding:10px;
      }
      #routingEditor{
        grid-template-columns:1fr!important;
      }

      .leg-card{
        padding:11px;
        border-radius:11px;
      }
      .leg-card .btn{width:100%;min-height:44px}

      .audit{max-height:none}
      .audit-row{font-size:11px;line-height:1.45}

      .toast{
        left:12px;
        right:12px;
        bottom:calc(12px + env(safe-area-inset-bottom));
        max-width:none;
        text-align:center;
      }
      .loader{
        max-width:calc(100vw - 34px);
        text-align:center;
      }
    }

    @media(max-width:430px){
      .container{padding:10px}
      .topbar-inner{padding-left:10px;padding-right:10px}
      .brand h1{font-size:17px}
      .stats{gap:6px}
      .stat{padding:10px 6px}
      .stat-value{font-size:21px}
      .stat-label{font-size:8.5px}
      .tabs{width:calc(100vw - 20px)}
      .filter-grid{grid-template-columns:1fr}
      .filter-grid .field:nth-child(5){grid-column:auto}
      .kpi-grid{grid-template-columns:1fr 1fr}
      tbody td::before{flex-basis:40%;max-width:40%}
      tbody td > *{max-width:60%}
    }
  
    /* =======================================================
       FORCED MOBILE MODE
       Some mobile browsers/WebView containers report a desktop-
       like viewport (~980px). JS adds body.mobile-ui based on
       device/touch characteristics so the phone layout is not
       dependent on @media width alone.
       ======================================================= */
    body.mobile-ui{overflow-x:hidden;padding-bottom:env(safe-area-inset-bottom)}
    body.mobile-ui .topbar-inner{
      padding:10px 10px;
      padding-top:calc(10px + env(safe-area-inset-top));
      display:grid;grid-template-columns:1fr;gap:9px;align-items:stretch
    }
    body.mobile-ui .brand h1{font-size:17px;line-height:1.15}
    body.mobile-ui .brand div{font-size:10px}
    body.mobile-ui .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
    body.mobile-ui .actions .btn{width:100%;min-height:44px}
    body.mobile-ui .refresh-label{display:none}
    body.mobile-ui .container{padding:10px;max-width:none;width:100%}
    body.mobile-ui .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}
    body.mobile-ui .stat{padding:10px 6px;border-radius:11px;box-shadow:none;min-width:0}
    body.mobile-ui .stat-label{font-size:8.5px;line-height:1.2;min-height:21px;margin-bottom:3px}
    body.mobile-ui .stat-value{font-size:21px}
    body.mobile-ui .toolbar{display:block;margin-bottom:10px}
    body.mobile-ui .tabs{
      display:flex;flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;overflow-y:hidden;
      width:100%;max-width:100%;padding:4px;margin-bottom:9px;
      -webkit-overflow-scrolling:touch;scrollbar-width:none
    }
    body.mobile-ui .tabs::-webkit-scrollbar{display:none}
    body.mobile-ui .tab{flex:0 0 auto;min-height:42px;padding:9px 12px;font-size:12px}
    body.mobile-ui .search{width:100%;min-width:0;max-width:none}
    body.mobile-ui input,
    body.mobile-ui select{min-height:46px;height:46px;font-size:16px}
    body.mobile-ui textarea{font-size:16px}
    body.mobile-ui .btn{min-height:42px}
    body.mobile-ui .btn-sm{min-height:40px;font-size:12px}
    body.mobile-ui .form-grid,
    body.mobile-ui .summary-grid{grid-template-columns:1fr}
    body.mobile-ui .summary-grid{gap:7px}
    body.mobile-ui .filter-grid{grid-template-columns:1fr;gap:9px}
    body.mobile-ui .filter-grid .field:nth-child(5){grid-column:auto}
    body.mobile-ui .filter-grid > .btn{width:100%}
    body.mobile-ui .history-controls{padding:10px;margin-bottom:10px;border-radius:12px}
    body.mobile-ui .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    body.mobile-ui .kpi-card{padding:12px;border-radius:11px;box-shadow:none}
    body.mobile-ui .kpi-card:nth-child(5){grid-column:1/-1}
    body.mobile-ui .kpi-city-list{grid-template-columns:1fr}
    body.mobile-ui .kpi-breakdown{padding:12px}

    /* Convert every data table into vertical phone cards. */
    body.mobile-ui .panel{overflow:visible;box-shadow:none}
    body.mobile-ui .table-wrap{overflow:visible}
    body.mobile-ui table{display:block!important;min-width:0!important;width:100%!important}
    body.mobile-ui thead{display:none!important}
    body.mobile-ui tbody{display:block!important;width:100%!important}
    body.mobile-ui tbody tr{
      display:block!important;width:100%!important;margin:0 0 10px!important;
      border:1px solid var(--border)!important;border-radius:12px!important;
      background:#fff!important;overflow:hidden!important;
      box-shadow:0 3px 12px rgba(16,24,40,.05)!important
    }
    body.mobile-ui tbody td{
      display:flex!important;width:100%!important;max-width:none!important;
      align-items:flex-start!important;justify-content:space-between!important;
      gap:12px!important;padding:9px 11px!important;
      border-bottom:1px solid #eef1f5!important;text-align:right!important;
      font-size:12px!important;white-space:normal!important;word-break:break-word
    }
    body.mobile-ui tbody td:last-child{border-bottom:0!important}
    body.mobile-ui tbody td::before{
      flex:0 0 39%;max-width:39%;text-align:left;color:var(--muted);
      font-size:9px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;line-height:1.35
    }
    body.mobile-ui tbody td > *{max-width:61%}
    body.mobile-ui tbody td .route{white-space:normal!important;text-align:right}
    body.mobile-ui tbody td .secondary{white-space:normal!important;text-align:right}
    body.mobile-ui tbody td:last-child::before{display:none}
    body.mobile-ui tbody td:last-child .btn{width:100%;max-width:none}

    body.mobile-ui #activeRows td:nth-child(1)::before{content:"Fleet Ownership"}
    body.mobile-ui #activeRows td:nth-child(2)::before{content:"Trip Type"}
    body.mobile-ui #activeRows td:nth-child(3)::before{content:"Delivery Type"}
    body.mobile-ui #activeRows td:nth-child(4)::before{content:"Status"}
    body.mobile-ui #activeRows td:nth-child(5)::before{content:"Last Activity"}
    body.mobile-ui #activeRows td:nth-child(6)::before{content:"Route / Location"}
    body.mobile-ui #activeRows td:nth-child(7)::before{content:"Plate"}
    body.mobile-ui #activeRows td:nth-child(8)::before{content:"Truck"}
    body.mobile-ui #activeRows td:nth-child(9)::before{content:"Driver"}

    body.mobile-ui #completedRows td:nth-child(1)::before{content:"Fleet Ownership"}
    body.mobile-ui #completedRows td:nth-child(2)::before{content:"Initial Trip Type"}
    body.mobile-ui #completedRows td:nth-child(3)::before{content:"Trip Types"}
    body.mobile-ui #completedRows td:nth-child(4)::before{content:"Started"}
    body.mobile-ui #completedRows td:nth-child(5)::before{content:"Completed"}
    body.mobile-ui #completedRows td:nth-child(6)::before{content:"Route"}
    body.mobile-ui #completedRows td:nth-child(7)::before{content:"Plate"}
    body.mobile-ui #completedRows td:nth-child(8)::before{content:"Truck"}
    body.mobile-ui #completedRows td:nth-child(9)::before{content:"Driver"}
    body.mobile-ui #completedRows td:nth-child(10)::before{content:"Latest Delivery Type"}
    body.mobile-ui #completedRows td:nth-child(11)::before{content:"Legs"}
    body.mobile-ui #completedRows td:nth-child(12)::before{content:"Backload Count"}
    body.mobile-ui #completedRows td:nth-child(13)::before{content:"Free Trip Count"}
    body.mobile-ui #completedRows td:nth-child(14)::before{content:"Total Stopover (Hours)"}
    body.mobile-ui #completedRows td:nth-child(15)::before{content:"Trip Duration"}
    body.mobile-ui #completedRows td:nth-child(15)::before{display:block}

    body.mobile-ui #activityRows td:nth-child(1)::before{content:"Date / Time"}
    body.mobile-ui #activityRows td:nth-child(2)::before{content:"User"}
    body.mobile-ui #activityRows td:nth-child(3)::before{content:"Action"}
    body.mobile-ui #activityRows td:nth-child(4)::before{content:"Trip"}
    body.mobile-ui #activityRows td:nth-child(5)::before{content:"Entity"}
    body.mobile-ui #activityRows td:nth-child(6)::before{content:"Field"}
    body.mobile-ui #activityRows td:nth-child(7)::before{content:"Old → New"}
    body.mobile-ui #activityRows td:nth-child(8)::before{content:"Details"}
    body.mobile-ui #activityRows td:nth-child(8)::before{display:block}

    body.mobile-ui #mgrTripRows td:nth-child(1)::before{content:"Trip"}
    body.mobile-ui #mgrTripRows td:nth-child(2)::before{content:"Status"}
    body.mobile-ui #mgrTripRows td:nth-child(3)::before{content:"Origin"}
    body.mobile-ui #mgrTripRows td:nth-child(4)::before{content:"Plate"}
    body.mobile-ui #mgrTripRows td:nth-child(5)::before{content:"Driver"}
    body.mobile-ui #mgrTripRows td:nth-child(6)::before{content:"Trip Type"}
    body.mobile-ui #mgrTripRows td:nth-child(7)::before{content:"Current Location"}
    body.mobile-ui #mgrTripRows td:nth-child(8)::before{content:"Updated"}

    body.mobile-ui #masterRows td:nth-child(1)::before{content:"Type"}
    body.mobile-ui #masterRows td:nth-child(2)::before{content:"Value"}
    body.mobile-ui #masterRows td:nth-child(3)::before{content:"Region"}
    body.mobile-ui #masterRows td:nth-child(4)::before{content:"Active"}
    body.mobile-ui #masterRows td:nth-child(5)::before{content:"Sort"}

    body.mobile-ui #vehicleRows td:nth-child(1)::before{content:"Plate Number"}
    body.mobile-ui #vehicleRows td:nth-child(2)::before{content:"Truck Type"}
    body.mobile-ui #vehicleRows td:nth-child(3)::before{content:"Fleet Ownership / Origin"}
    body.mobile-ui #vehicleRows td:nth-child(4)::before{content:"Driver Name"}
    body.mobile-ui #vehicleRows td:nth-child(5)::before{content:"Mobile Number"}
    body.mobile-ui #vehicleRows td:nth-child(6)::before{content:"Active"}
    body.mobile-ui #vehicleRows td:nth-child(7)::before{content:"Notes"}

    body.mobile-ui #routingRows td:nth-child(1)::before{content:"Destination"}
    body.mobile-ui #routingRows td:nth-child(2)::before{content:"Region"}
    body.mobile-ui #routingRows td:nth-child(3)::before{content:"To Email"}
    body.mobile-ui #routingRows td:nth-child(4)::before{content:"CC Email"}
    body.mobile-ui #routingRows td:nth-child(5)::before{content:"Destination WH CC"}
    body.mobile-ui #routingRows td:nth-child(6)::before{content:"Active"}

    body.mobile-ui #regionRows td:nth-child(1)::before{content:"Region"}
    body.mobile-ui #regionRows td:nth-child(2)::before{content:"Fleet Ownership"}
    body.mobile-ui #regionRows td:nth-child(3)::before{content:"Active"}
    body.mobile-ui #regionRows td:nth-child(4)::before{content:"Sort"}

    body.mobile-ui tbody td.empty,
    body.mobile-ui tbody td.loading{display:block!important;text-align:center!important;padding:28px 14px!important}
    body.mobile-ui tbody td.empty::before,
    body.mobile-ui tbody td.loading::before{display:none!important}

    /* Phone modals fill the screen and keep actions reachable. */
    body.mobile-ui .modal-backdrop{padding:0;align-items:stretch;justify-content:stretch}
    body.mobile-ui .modal,
    body.mobile-ui .modal.wide{
      width:100%!important;height:100dvh!important;max-height:100dvh!important;
      border-radius:0!important;box-shadow:none!important;display:flex;flex-direction:column
    }
    body.mobile-ui .modal-header{
      position:sticky;top:0;z-index:3;background:#fff;padding:13px;
      padding-top:calc(13px + env(safe-area-inset-top))
    }
    body.mobile-ui .modal-body{
      flex:1 1 auto;overflow-y:auto;padding:12px;-webkit-overflow-scrolling:touch
    }
    body.mobile-ui .modal-footer{
      position:sticky;bottom:0;z-index:3;background:#fff;padding:9px 10px;
      padding-bottom:calc(9px + env(safe-area-inset-bottom));
      display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr))
    }
    body.mobile-ui .modal-footer .btn{width:100%;min-height:46px}
    body.mobile-ui .action-box{padding:12px}
    body.mobile-ui .action-box > .btn{width:100%;min-height:48px}
    body.mobile-ui .manual-action-row{display:flex;align-items:center;justify-content:flex-start;gap:8px}
    body.mobile-ui .manual-action-row .btn{width:auto;min-width:0;min-height:46px;padding:9px 14px;font-size:12px;white-space:nowrap}
    body.mobile-ui .manual-action-row .btn-main{min-width:150px}
    body.mobile-ui .manual-time-box{padding:11px;background:#f9fafb}

    /* Manager: turn desktop sidebar into swipeable segmented navigation. */
    body.mobile-ui .manager-shell{grid-template-columns:1fr;gap:10px}
    body.mobile-ui .manager-menu{
      display:flex;overflow-x:auto;gap:7px;padding:8px;position:sticky;top:0;z-index:5;
      -webkit-overflow-scrolling:touch;scrollbar-width:none
    }
    body.mobile-ui .manager-menu::-webkit-scrollbar{display:none}
    body.mobile-ui .manager-menu button{flex:0 0 auto;width:auto;min-width:max-content;margin:0;text-align:center}
    body.mobile-ui .manager-login{margin:14px auto;padding:17px;box-shadow:none}
    body.mobile-ui .manager-head{padding:10px 11px;flex-wrap:wrap}
    body.mobile-ui .manager-head input{max-width:none!important;flex:1 1 100%}
    body.mobile-ui .manager-filter{grid-template-columns:1fr;gap:9px;padding:10px}
    body.mobile-ui .manager-filter > input{grid-column:auto}
    body.mobile-ui .manager-filter > .btn{width:100%}
    body.mobile-ui .master-editor{grid-template-columns:1fr;padding:10px}
    body.mobile-ui #routingEditor{grid-template-columns:1fr!important}
    body.mobile-ui .leg-card{padding:11px}
    body.mobile-ui .leg-card .btn{width:100%;min-height:44px}
    body.mobile-ui .toast{
      left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));
      max-width:none;text-align:center
    }


    /* =======================================================
       v1.5.5 - ALIGNMENT + BALANCED READABILITY
       - Instructions always occupies the first action slot.
       - Update Trip always occupies the second action slot.
       - Button labels never wrap or become vertical.
       - Font sizes returned to a balanced desktop/mobile scale.
       ======================================================= */
    body{font-size:14px}
    .brand h1{font-size:20px}
    .brand div,.refresh-label{font-size:12px}
    .tab{font-size:13px}
    input,select,textarea{font-size:14px}
    th{font-size:12px;padding:12px 13px}
    td{font-size:13px;padding:12px 13px}
    .secondary{font-size:11.5px;line-height:1.35}
    .status{font-size:11px;padding:5px 9px}
    .btn{
      font-size:13px;
      white-space:nowrap;
      word-break:normal;
      overflow-wrap:normal;
      writing-mode:horizontal-tb;
    }
    .btn-sm{font-size:13px;padding:8px 11px}
    label{font-size:12px}
    .notice{font-size:13px;line-height:1.5}
    .modal-title{font-size:19px}
    .modal-sub{font-size:12px}
    .summary-label{font-size:11px}
    .summary-value{font-size:13px}
    .action-box h3{font-size:16px}
    .checkbox{font-size:13px}
    .manual-time-hint{font-size:11px}
    .kpi-label{font-size:12px}
    .kpi-sub{font-size:11px}
    .audit-row{font-size:12px}
    .toast{font-size:13px}

    .trip-row-actions{
      display:grid;
      grid-template-columns:164px 152px 116px;
      align-items:center;
      gap:9px;
      min-width:450px;
    }
    .trip-row-actions .instructions-btn,
    .trip-row-actions .driver-link-btn,
    .trip-row-actions .update-trip-btn,
    .trip-row-actions .instructions-slot-placeholder{
      width:100%;
      min-width:0;
      box-sizing:border-box;
    }
    .trip-row-actions .instructions-btn{grid-column:1}
    .trip-row-actions .instructions-slot-placeholder{
      grid-column:1;
      display:block;
      height:38px;
      visibility:hidden;
      pointer-events:none;
    }
    .trip-row-actions .driver-link-btn{grid-column:2;color:#175cd3;border-color:#b2ddff;background:#eff8ff}
    .trip-row-actions .driver-link-btn:hover{background:#dff1ff;border-color:#84caff;color:#1849a9}
    .trip-row-actions .update-trip-btn{grid-column:3}

    @media(max-width:900px){
      .brand h1{font-size:19px}
      .brand div{font-size:11px}
      .tab{font-size:13px}
      .stat-label{font-size:10px}
      .stat-value{font-size:23px}
      .btn{font-size:13px}
      .btn-sm{font-size:13px;min-height:42px}
      tbody td{font-size:13px;line-height:1.4;padding:10px 11px}
      tbody td::before{font-size:10px;line-height:1.35}
      tbody td .secondary{font-size:11.5px}
      .status{font-size:11px}
      .summary-label{font-size:11px}
      .summary-value{font-size:13px}
      label{font-size:12px}
      .modal-title{font-size:19px}
      .modal-sub{font-size:12px}
      .notice{font-size:13px}
      .trip-row-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
        width:100%;
        min-width:0;
        gap:8px;
      }
      .trip-row-actions .instructions-btn,
      .trip-row-actions .instructions-slot-placeholder{grid-column:1/-1}
      .trip-row-actions .driver-link-btn{grid-column:1}
      .trip-row-actions .update-trip-btn{grid-column:2}
      .trip-row-actions .btn{
        width:100%;
        max-width:none;
        padding-left:8px;
        padding-right:8px;
        font-size:clamp(11px,3.1vw,13px);
      }
      .trip-row-actions .instructions-slot-placeholder{height:0;display:none}
    }

    body.mobile-ui .brand h1{font-size:19px}
    body.mobile-ui .brand div{font-size:11px}
    body.mobile-ui .tab{font-size:13px}
    body.mobile-ui .stat-label{font-size:10px}
    body.mobile-ui .stat-value{font-size:23px}
    body.mobile-ui .btn{font-size:13px}
    body.mobile-ui .btn-sm{font-size:13px;min-height:42px}
    body.mobile-ui tbody td{font-size:13px!important;line-height:1.4;padding:10px 11px!important}
    body.mobile-ui tbody td::before{font-size:10px;line-height:1.35}
    body.mobile-ui tbody td .secondary{font-size:11.5px}
    body.mobile-ui .status{font-size:11px}
    body.mobile-ui .summary-label{font-size:11px}
    body.mobile-ui .summary-value{font-size:13px}
    body.mobile-ui label{font-size:12px}
    body.mobile-ui .modal-title{font-size:19px}
    body.mobile-ui .modal-sub{font-size:12px}
    body.mobile-ui .notice{font-size:13px}
    body.mobile-ui .trip-row-actions{
      display:grid;
      grid-template-columns:minmax(0,1fr) minmax(0,1fr);
      width:100%;
      max-width:none;
      min-width:0;
      gap:8px;
    }
    body.mobile-ui .trip-row-actions .instructions-btn,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{grid-column:1/-1}
    body.mobile-ui .trip-row-actions .driver-link-btn{grid-column:1}
    body.mobile-ui .trip-row-actions .update-trip-btn{grid-column:2}
    body.mobile-ui .trip-row-actions .btn{
      width:100%;
      max-width:none;
      padding-left:8px;
      padding-right:8px;
      font-size:clamp(11px,3.1vw,13px);
      white-space:nowrap!important;
      word-break:normal!important;
      overflow-wrap:normal!important;
      writing-mode:horizontal-tb!important;
    }
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{height:0;display:none}

    /* v1.5.6 - compact inline header icon */
    .brand{display:flex;align-items:center;gap:11px;min-width:0}
    .brand-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;color:var(--primary);margin:0}
    .brand-icon svg{display:block;width:42px;height:42px}
    .brand-copy{display:block;min-width:0}
    .brand-subtitle{display:block;font-size:12px;color:var(--muted);margin-top:3px;white-space:nowrap}
    @media(max-width:900px){
      .brand{gap:9px}
      .brand-icon{flex-basis:36px;width:36px;height:36px}
      .brand-icon svg{width:36px;height:36px}
      .brand-subtitle{font-size:10px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100vw - 74px)}
    }
    body.mobile-ui .brand{gap:9px}
    body.mobile-ui .brand-icon{flex-basis:36px;width:36px;height:36px}
    body.mobile-ui .brand-icon svg{width:36px;height:36px}
    body.mobile-ui .brand-subtitle{font-size:10px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100vw - 74px)}



    /* =======================================================
       v1.6.1 PREVIEW - ACTIVE TABLE LAYOUT
       Everything in this block is intentionally isolated so
       individual preview features can be removed later.
       ======================================================= */
    .refresh-meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;min-width:210px}
    .next-refresh{color:#6941c6;font-weight:700}
    .live-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
    .stat-filter{appearance:none;text-align:left;color:inherit;font-family:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
    .stat-filter:hover{border-color:#d6bbfb;transform:translateY(-1px)}
    .stat-filter.selected{border-color:#9e77ed;box-shadow:0 0 0 3px rgba(105,65,198,.10),var(--shadow)}
    .attention-stat .stat-value{color:#b54708}
    .attention-stat.selected{border-color:#f79009;box-shadow:0 0 0 3px rgba(247,144,9,.10),var(--shadow)}
    .stat-hint{font-size:10px;color:var(--muted);margin-top:5px;font-weight:400}
    .movement-line{font-weight:700;line-height:1.45;white-space:normal}
    .movement-key{font-size:10px;color:#6941c6;text-transform:uppercase;letter-spacing:.03em;font-weight:800}
    .movement-arrow{color:#9e77ed;padding:0 3px;font-weight:900}
    .next-pending{color:var(--muted);font-weight:600}
    .activity-title{display:block;line-height:1.35}
    .duration-pill{display:inline-flex;margin-top:6px;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
    .duration-pill.transit{background:#f4f3ff;color:#6941c6}
    .duration-pill.normal{background:#f2f4f7;color:#475467}
    .duration-pill.warn{background:#fffaeb;color:#b54708}
    .duration-pill.danger{background:#fef3f2;color:#b42318}
    .exception-list{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px;max-width:210px}
    .exception-badge{display:inline-flex;align-items:center;padding:3px 6px;border-radius:999px;font-size:9.5px;font-weight:800;line-height:1.25;white-space:nowrap}
    .exception-badge.danger{background:#fef3f2;color:#b42318}
    .exception-badge.info{background:#eff8ff;color:#175cd3}
    .exception-badge.purple{background:#f4f3ff;color:#6941c6}
    .exception-badge.green{background:#ecfdf3;color:#067647}
    .driver-arrival-alert{
      display:flex;flex-direction:column;gap:2px;margin-top:8px;padding:9px 11px;
      border:1.5px solid #84caff;border-radius:10px;background:#eff8ff;color:#175cd3;
      box-shadow:0 2px 8px rgba(23,92,211,.10);min-width:175px;max-width:230px
    }
    .driver-arrival-alert-title{font-size:11px;font-weight:900;line-height:1.25;letter-spacing:.01em}
    .driver-arrival-alert-time{font-size:10px;font-weight:700;color:#1849a9;line-height:1.3}
    .driver-arrival-row{background:linear-gradient(90deg,rgba(239,248,255,.95),rgba(255,255,255,0) 34%)}
    .driver-arrival-row td:first-child{box-shadow:inset 4px 0 0 #2e90fa}
    .attention-row{background:linear-gradient(90deg,rgba(255,250,235,.55),rgba(255,255,255,0) 28%)}
    .cell-stack{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0}
    .status-stack{gap:2px}
    .activity-stack{gap:1px}
    .instructions-btn{position:relative;overflow:visible}
    table{min-width:1230px}

    @media(max-width:900px){
      .actions .refresh-meta{grid-column:1/-1;display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:0;padding:0 2px}
      .refresh-label{display:inline!important;font-size:10px!important}
      .live-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
      .stat-hint{display:none}
      .movement-key{font-size:9px}
      tbody td .cell-stack{max-width:62%;align-items:flex-end;text-align:right}
      .exception-list{justify-content:flex-end;max-width:100%}
      .duration-pill{font-size:10px}
      table{min-width:0!important}
    }
    body.mobile-ui .actions .refresh-meta{grid-column:1/-1;display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:0;padding:0 2px}
    body.mobile-ui .refresh-label{display:inline!important;font-size:10px!important}
    body.mobile-ui .live-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
    body.mobile-ui .stat-hint{display:none}
    body.mobile-ui tbody td .cell-stack{max-width:61%;align-items:flex-end;text-align:right}
    body.mobile-ui .exception-list{justify-content:flex-end;max-width:100%}
    body.mobile-ui .movement-key{font-size:9px}


    /* =======================================================
       v1.6.20 ORIGIN NOTE LABEL
       Larger typography and touch targets, clearer mobile cards,
       easier forms, and pinch zoom support (viewport above).
       ======================================================= */
    body.mobile-ui{
      font-size:16px;
      line-height:1.45;
      -webkit-text-size-adjust:100%;
    }
    body.mobile-ui .topbar-inner{padding:12px 12px;padding-top:calc(12px + env(safe-area-inset-top));gap:11px}
    body.mobile-ui .brand{gap:10px}
    body.mobile-ui .brand h1{font-size:20px;line-height:1.2}
    body.mobile-ui .brand-subtitle,body.mobile-ui .brand div{font-size:11.5px;line-height:1.35}
    body.mobile-ui .brand-icon{flex-basis:40px;width:40px;height:40px}
    body.mobile-ui .brand-icon svg{width:40px;height:40px}
    body.mobile-ui .container{padding:12px}

    body.mobile-ui .actions{gap:9px}
    body.mobile-ui .actions .btn{min-height:48px;font-size:14px;padding:10px 12px}
    body.mobile-ui .refresh-label{font-size:11.5px!important}

    body.mobile-ui .tabs{gap:5px;padding:5px;margin-bottom:12px;scroll-snap-type:x proximity}
    body.mobile-ui .tab{
      min-height:48px;padding:11px 14px;font-size:14px;border-radius:9px;
      scroll-snap-align:start;touch-action:manipulation
    }

    body.mobile-ui .live-summary,
    body.mobile-ui .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px;margin-bottom:12px}
    body.mobile-ui .stat{padding:13px 11px;border-radius:13px}
    body.mobile-ui .stat-label{font-size:11.5px;line-height:1.3;min-height:0;margin-bottom:5px}
    body.mobile-ui .stat-value{font-size:27px;line-height:1.1}

    body.mobile-ui input,
    body.mobile-ui select{
      min-height:52px;height:52px;font-size:16px;padding:0 14px;border-radius:10px
    }
    body.mobile-ui textarea{
      min-height:112px;font-size:16px;line-height:1.5;padding:12px 14px;border-radius:10px
    }
    body.mobile-ui label{font-size:13.5px;line-height:1.3}
    body.mobile-ui .field{gap:7px}
    body.mobile-ui .filter-input-wrap input{padding-right:48px}
    body.mobile-ui .filter-clear{
      width:34px;height:34px;right:8px;font-size:21px;touch-action:manipulation
    }
    body.mobile-ui .search{font-size:16px}
    body.mobile-ui .history-controls{padding:12px;border-radius:14px;margin-bottom:12px}
    body.mobile-ui .filter-grid{gap:11px}

    body.mobile-ui .btn{min-height:48px;font-size:14.5px;padding:10px 14px;border-radius:10px;touch-action:manipulation}
    body.mobile-ui .btn-sm{min-height:46px;font-size:14px;padding:9px 12px}
    body.mobile-ui .close{width:44px;height:44px;min-width:44px;min-height:44px;font-size:24px;border-radius:10px}

    body.mobile-ui tbody tr{
      margin:0 0 12px!important;border-radius:14px!important;
      box-shadow:0 4px 14px rgba(16,24,40,.06)!important
    }
    body.mobile-ui tbody td{
      gap:14px!important;padding:12px 13px!important;font-size:14.5px!important;
      line-height:1.45!important;min-height:44px;align-items:center!important
    }
    body.mobile-ui tbody td::before{
      flex:0 0 36%;max-width:36%;font-size:11px;line-height:1.35;letter-spacing:.015em
    }
    body.mobile-ui tbody td > *{max-width:64%}
    body.mobile-ui tbody td .cell-stack{max-width:64%;gap:3px}
    body.mobile-ui tbody td .secondary{font-size:12.5px;line-height:1.4;margin-top:4px}
    body.mobile-ui .movement-line{font-size:14.5px;line-height:1.5}
    body.mobile-ui .movement-key{font-size:10.5px}
    body.mobile-ui .status{font-size:12px;padding:6px 10px}
    body.mobile-ui .duration-pill{font-size:11.5px;padding:5px 8px}
    body.mobile-ui .exception-badge{font-size:10.5px;padding:4px 7px}
    body.mobile-ui .driver-arrival-alert{
      width:100%;max-width:none;min-width:0;margin-top:8px;padding:10px 11px;
      border-width:2px;border-radius:11px;align-items:flex-end;text-align:right
    }
    body.mobile-ui .driver-arrival-alert-title{font-size:13px}
    body.mobile-ui .driver-arrival-alert-time{font-size:11.5px}
    body.mobile-ui .driver-arrival-row{
      background:#f5fbff!important;border-color:#84caff!important;
      box-shadow:0 4px 16px rgba(46,144,250,.12)!important
    }
    body.mobile-ui .driver-arrival-row td:first-child{box-shadow:inset 4px 0 0 #2e90fa}
    body.mobile-ui tbody td:last-child{padding:12px 13px!important}
    body.mobile-ui tbody td:last-child .btn{min-height:50px;font-size:14.5px}

    body.mobile-ui .trip-row-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
    body.mobile-ui .trip-row-actions .btn{
      min-height:50px;font-size:13.5px!important;padding:9px 8px!important
    }
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{height:50px}

    body.mobile-ui .modal-header{padding:15px 14px;padding-top:calc(15px + env(safe-area-inset-top))}
    body.mobile-ui .modal-title{font-size:21px;line-height:1.25}
    body.mobile-ui .modal-sub{font-size:13px;line-height:1.4}
    body.mobile-ui .modal-body{padding:14px}
    body.mobile-ui .modal-footer{padding:11px 12px;padding-bottom:calc(11px + env(safe-area-inset-bottom));gap:9px}
    body.mobile-ui .modal-footer .btn{min-height:52px;font-size:15px}
    body.mobile-ui .form-grid,body.mobile-ui .summary-grid{gap:10px}
    body.mobile-ui .summary-item{padding:12px;border-radius:11px}
    body.mobile-ui .summary-label{font-size:12.5px;line-height:1.35}
    body.mobile-ui .summary-value{font-size:14.5px;line-height:1.45;margin-top:5px}
    body.mobile-ui .notice{font-size:14px;line-height:1.5;padding:12px 13px}
    body.mobile-ui .notice.checking{padding:14px 15px}
    body.mobile-ui .notice-checking-title{font-size:15px}
    body.mobile-ui .notice-checking-sub{font-size:13px;margin-top:4px}
    body.mobile-ui .notice-checking-spinner{width:22px;height:22px;flex-basis:22px}
    body.mobile-ui .action-box{padding:14px;border-radius:13px;margin-top:14px}
    body.mobile-ui .dispatch-details-panel{padding:14px;border-radius:12px;margin:-1px -1px 14px}
    body.mobile-ui .action-box h3{font-size:17px;line-height:1.3}
    body.mobile-ui .stage-bridge-card{padding:16px;border-radius:13px;margin-top:14px}
    body.mobile-ui .stage-bridge-status{font-size:15px}
    body.mobile-ui .stage-bridge-question{font-size:19px;margin-top:15px}
    body.mobile-ui .stage-bridge-sub{font-size:12.5px}
    body.mobile-ui .stage-bridge-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:100%}
    body.mobile-ui .stage-bridge-actions .btn{width:100%;min-width:0;min-height:50px;font-size:14px}
    body.mobile-ui .action-box > .btn{min-height:52px;font-size:15px}
    body.mobile-ui .checkbox{font-size:14.5px;line-height:1.4;gap:10px}
    body.mobile-ui .checkbox input{width:20px;height:20px;min-height:20px;flex:0 0 20px}
    body.mobile-ui .manual-time-box,body.mobile-ui .manual-time-field{padding:13px;border-radius:11px}
    body.mobile-ui .manual-time-hint{font-size:12px;line-height:1.45}
    body.mobile-ui .manual-action-row{display:grid;grid-template-columns:1fr;gap:9px;width:100%}
    body.mobile-ui .manual-action-row .btn,
    body.mobile-ui .manual-action-row .btn-main{width:100%;min-width:0;min-height:50px;font-size:14px}
    body.mobile-ui .action-inline-notice{width:100%;max-width:none;min-height:auto;padding:10px 12px;font-size:12px}

    body.mobile-ui .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    body.mobile-ui .kpi-card{padding:14px;border-radius:13px}
    body.mobile-ui .kpi-label{font-size:12.5px;line-height:1.35}
    body.mobile-ui .kpi-value{font-size:25px}
    body.mobile-ui .kpi-sub{font-size:12px;line-height:1.4}
    body.mobile-ui .kpi-breakdown{padding:14px;border-radius:13px}
    body.mobile-ui .kpi-breakdown-title{font-size:16px}
    body.mobile-ui .kpi-breakdown-note{font-size:12px;line-height:1.4}
    body.mobile-ui .kpi-breakdown-total{font-size:13px}
    body.mobile-ui .kpi-city-row{padding:12px;border-radius:11px}
    body.mobile-ui .kpi-city-name{font-size:14px}
    body.mobile-ui .kpi-city-count{font-size:19px}

    body.mobile-ui .manager-menu{gap:8px;padding:9px}
    body.mobile-ui .manager-menu button{min-height:48px;font-size:14px;padding:10px 13px}
    body.mobile-ui .manager-head{padding:12px 13px;gap:10px}
    body.mobile-ui .manager-filter{gap:11px;padding:12px}
    body.mobile-ui .master-editor{gap:10px;padding:12px}
    body.mobile-ui .leg-card{padding:13px;border-radius:13px}
    body.mobile-ui .leg-card .btn{min-height:48px;font-size:14px}
    body.mobile-ui .audit-row{font-size:13.5px;line-height:1.5;padding:11px 12px}

    body.mobile-ui .toast{font-size:14px;line-height:1.45;padding:13px 14px;border-radius:11px}
    body.mobile-ui .loader{font-size:15px;line-height:1.45;padding:18px 20px}
    body.mobile-ui .app-footer{font-size:12px;line-height:1.4;padding-bottom:calc(20px + env(safe-area-inset-bottom))}

    @media(max-width:390px){
      body.mobile-ui .trip-row-actions{grid-template-columns:1fr}
      body.mobile-ui .trip-row-actions .instructions-slot-placeholder{display:none}
      body.mobile-ui .kpi-grid{grid-template-columns:1fr}
      body.mobile-ui .kpi-card:nth-child(5){grid-column:auto}
      body.mobile-ui tbody td::before{flex-basis:38%;max-width:38%}
      body.mobile-ui tbody td > *,body.mobile-ui tbody td .cell-stack{max-width:62%}
    }



    /* DUAL KPI TRUCK VISUALS - Trip level + Leg level */
    .kpi-truck-duo{
      display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
      margin-bottom:12px;
    }
    .kpi-truck-card{
      padding:16px 18px;overflow:hidden;position:relative;min-width:0;
      border-color:#ded3f6;background:linear-gradient(135deg,#fff 0%,#fbf9ff 58%,#f4efff 100%);
    }
    .kpi-truck-card.leg-level{
      border-color:#c9def8;background:linear-gradient(135deg,#fff 0%,#f8fbff 58%,#eef6ff 100%);
    }
    .kpi-truck-card::after{
      content:"";position:absolute;width:190px;height:190px;border-radius:50%;
      right:-78px;top:-112px;background:rgba(105,65,198,.055);pointer-events:none;
    }
    .kpi-truck-card.leg-level::after{background:rgba(46,144,250,.055)}
    .kpi-truck-copy{position:relative;z-index:1;min-width:0}
    .kpi-truck-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
    .kpi-truck-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:800;color:var(--primary);text-transform:uppercase;margin-bottom:5px}
    .leg-level .kpi-truck-eyebrow{color:#175cd3}
    .kpi-truck-title{font-size:17px;font-weight:800;line-height:1.2}
    .kpi-truck-note{font-size:10.5px;color:var(--muted);line-height:1.42;margin-top:4px;max-width:390px}
    .kpi-truck-rate-row{display:flex;align-items:flex-end;gap:7px;justify-self:end;white-space:nowrap}
    .kpi-truck-rate{font-size:38px;line-height:.95;font-weight:900;letter-spacing:-.04em;color:var(--primary)}
    .leg-level .kpi-truck-rate{color:#175cd3}
    .kpi-truck-rate-label{font-size:9.5px;font-weight:700;color:#667085;padding-bottom:4px}
    .kpi-truck-stats{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
    .kpi-truck-chip{display:inline-flex;align-items:center;gap:4px;border:1px solid #e4dcf6;background:#fff;padding:5px 7px;border-radius:999px;font-size:9.8px;color:#475467;white-space:nowrap}
    .leg-level .kpi-truck-chip{border-color:#d1e4fa}
    .kpi-truck-chip strong{font-size:11px;color:var(--text)}
    .kpi-truck-chip.positive strong{color:var(--success)}
    .kpi-truck-visual{position:relative;z-index:1;min-width:0;margin-top:6px}
    .kpi-truck-svg{display:block;width:100%;height:auto;max-height:190px;overflow:visible}
    .kpi-truck-fill{transform-box:fill-box;transform-origin:left center;transform:scaleX(0);transition:transform .72s cubic-bezier(.2,.8,.2,1)}
    .kpi-truck-wheel{transform-box:fill-box;transform-origin:center}
    .kpi-truck-card.kpi-truck-energized .kpi-truck-wheel{animation:kpiWheelNudge .72s ease-out}
    @keyframes kpiWheelNudge{0%{transform:rotate(0deg)}100%{transform:rotate(35deg)}}
    .kpi-truck-scope{margin-top:7px;font-size:9.5px;color:#7f56d9;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .leg-level .kpi-truck-scope{color:#175cd3}

    @media(max-width:980px){
      .kpi-truck-duo{grid-template-columns:1fr}
      .kpi-truck-svg{max-height:215px}
    }
    body.mobile-ui .kpi-truck-duo{gap:10px;margin-bottom:10px}
    body.mobile-ui .kpi-truck-card{padding:14px;border-radius:13px}
    body.mobile-ui .kpi-truck-title{font-size:16.5px}
    body.mobile-ui .kpi-truck-note{font-size:11px}
    body.mobile-ui .kpi-truck-rate{font-size:34px}
    body.mobile-ui .kpi-truck-chip{font-size:10px;padding:5px 7px}
    body.mobile-ui .kpi-truck-svg{max-height:205px}
    @media(max-width:560px){
      .kpi-truck-top{display:block}
      .kpi-truck-rate-row{justify-content:flex-start;margin-top:10px}
      .kpi-truck-scope{white-space:normal}
    }

    /* BACKLOAD PERFORMANCE BY REGION */
    .kpi-region-card{
      margin-bottom:12px;padding:18px 20px;border-color:#e4e7ec;
      background:linear-gradient(180deg,#fff 0%,#fcfcfd 100%);
    }
    .kpi-region-head{
      display:flex;align-items:flex-start;justify-content:space-between;
      gap:16px;margin-bottom:14px;
    }
    .kpi-region-title{font-size:17px;font-weight:800;line-height:1.2}
    .kpi-region-note{font-size:10.5px;color:var(--muted);line-height:1.45;margin-top:4px}
    .kpi-region-legend{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
    .kpi-region-legend-item{
      display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:700;
      color:#475467;white-space:nowrap;
    }
    .kpi-region-dot{width:9px;height:9px;border-radius:999px;display:inline-block}
    .kpi-region-dot.trip{background:#6941c6}
    .kpi-region-dot.leg{background:#2e90fa}
    .kpi-region-list{display:grid;gap:10px}
    .kpi-region-row{
      border:1px solid #eaecf0;border-radius:13px;padding:12px 13px;background:#fff;
      transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
    }
    .kpi-region-row:hover{transform:translateY(-1px);border-color:#d0d5dd;box-shadow:0 4px 14px rgba(16,24,40,.05)}
    .kpi-region-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
    .kpi-region-name{font-size:12px;font-weight:850;letter-spacing:.02em;color:#101828}
    .kpi-region-top{
      display:inline-flex;align-items:center;gap:4px;border:1px solid #e9d7fe;background:#f9f5ff;
      color:#6941c6;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap;
    }
    .kpi-region-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}
    .kpi-region-metric{min-width:0}
    .kpi-region-metric-head{
      display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:9px;align-items:center;
    }
    .kpi-region-metric-label{font-size:10px;font-weight:800;color:#475467}
    .kpi-region-track{height:10px;border-radius:999px;background:#f2f4f7;overflow:hidden}
    .kpi-region-fill{height:100%;width:0;border-radius:inherit;transition:width .72s cubic-bezier(.2,.8,.2,1)}
    .kpi-region-fill.trip{background:linear-gradient(90deg,#9e77ed,#6941c6)}
    .kpi-region-fill.leg{background:linear-gradient(90deg,#84caff,#2e90fa)}
    .kpi-region-rate{font-size:13px;font-weight:900;min-width:44px;text-align:right;color:#101828}
    .kpi-region-detail{font-size:9.5px;color:#667085;margin-top:4px;padding-left:79px}
    .kpi-region-empty{padding:22px 12px;text-align:center;color:#667085;font-size:11px}
    .kpi-region-scope{margin-top:11px;font-size:9.5px;color:#667085;font-weight:650}
    body.mobile-ui .kpi-region-card{padding:14px;border-radius:13px;margin-bottom:10px}
    body.mobile-ui .kpi-region-row{padding:11px 12px}
    body.mobile-ui .kpi-region-title{font-size:16.5px}
    body.mobile-ui .kpi-region-note{font-size:11px}
    @media(max-width:760px){
      .kpi-region-head{display:block}
      .kpi-region-legend{justify-content:flex-start;margin-top:9px}
      .kpi-region-metrics{grid-template-columns:1fr}
      .kpi-region-metric-head{grid-template-columns:68px minmax(0,1fr) auto}
      .kpi-region-detail{padding-left:77px}
    }
    @media(max-width:430px){
      .kpi-region-metric-head{grid-template-columns:62px minmax(0,1fr) auto;gap:7px}
      .kpi-region-detail{padding-left:69px}
      .kpi-region-rate{font-size:12px;min-width:40px}
    }

  

    /* v1.6.x - clearer mobile form fields */
    @media(max-width:900px){
      input:not([type="checkbox"]):not([type="radio"]),
      select,
      textarea{
        border:1.5px solid #9fb6c9;
        background:#f7fafc;
        box-shadow:0 0 0 1px rgba(159,182,201,.10);
      }
      input:not([type="checkbox"]):not([type="radio"]):focus,
      select:focus,
      textarea:focus{
        border-color:#7aa2c2;
        background:#ffffff;
        box-shadow:0 0 0 3px rgba(122,162,194,.16);
      }
    }

    body.mobile-ui input:not([type="checkbox"]):not([type="radio"]),
    body.mobile-ui select,
    body.mobile-ui textarea{
      border:1.5px solid #9fb6c9;
      background:#f7fafc;
      box-shadow:0 0 0 1px rgba(159,182,201,.10);
    }
    body.mobile-ui input:not([type="checkbox"]):not([type="radio"]):focus,
    body.mobile-ui select:focus,
    body.mobile-ui textarea:focus{
      border-color:#7aa2c2;
      background:#ffffff;
      box-shadow:0 0 0 3px rgba(122,162,194,.16);
    }


    /* v1.6.60 - driver arrival self-service controls */
    .driver-arrival-card{margin:12px 0 14px;padding:14px;border:1px solid #b2ddff;border-radius:12px;background:#f5fbff}
    .driver-arrival-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
    .driver-arrival-title{font-size:14px;font-weight:800;color:#1849a9;line-height:1.35}
    .driver-arrival-sub{font-size:11px;color:#475467;line-height:1.45;margin-top:4px}
    .driver-arrival-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
    .driver-arrival-result{margin-top:10px;font-size:11px;color:#344054;line-height:1.45}
    .driver-arrival-result .btn{margin-top:8px;margin-right:6px}
    @media(max-width:900px){
      .driver-arrival-card{padding:13px}
      .driver-arrival-head{display:block}
      .driver-arrival-actions{display:grid;grid-template-columns:1fr}
      .driver-arrival-actions .btn,.driver-arrival-result .btn{width:100%;margin-right:0}
    }
    body.mobile-ui .driver-arrival-card{padding:13px}
    body.mobile-ui .driver-arrival-head{display:block}
    body.mobile-ui .driver-arrival-actions{display:grid;grid-template-columns:1fr}
    body.mobile-ui .driver-arrival-actions .btn,
    body.mobile-ui .driver-arrival-result .btn{width:100%;margin-right:0}



    /* v3.7 - Driver Arrival Link: presentation-only safety patch.
       renderActiveTrips(), loadDashboard() and loadBootstrap() remain untouched. */
    /* Driver Arrival button - restored to the previous light outlined design. */
    .trip-row-actions .driver-link-btn{
      background:#fff!important;
      border:1px solid #b2ddff!important;
      color:#4f46c6!important;
      box-shadow:0 1px 2px rgba(16,24,40,.05);
      font-size:0!important;
      display:inline-flex!important;
      align-items:center!important;
      justify-content:center!important;
      gap:7px!important;
    }
    .trip-row-actions .driver-link-btn::before{
      content:"";
      display:inline-block;
      width:16px;
      height:16px;
      flex:0 0 16px;
      background-repeat:no-repeat;
      background-position:center;
      background-size:16px 16px;
      background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%2325D366'/%3E%3Cpath fill='white' d='M23.4 8.7A10.2 10.2 0 0 0 7.3 21l-1.4 5.1 5.2-1.4a10.2 10.2 0 0 0 12.3-16zm-7.2 15.2c-1.6 0-3.1-.4-4.4-1.2l-.3-.2-3.1.8.8-3-.2-.3a8 8 0 1 1 7.2 3.9zm4.4-6c-.2-.1-1.4-.7-1.6-.8-.2-.1-.4-.1-.6.1-.2.2-.6.8-.8 1-.1.2-.3.2-.5.1-1.3-.6-2.2-1.2-3.1-2.3-.2-.2 0-.4.1-.5l.4-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5-.1-.1-.6-1.5-.9-2-.2-.5-.5-.5-.6-.5h-.5c-.2 0-.5.1-.7.3-.2.2-1 1-1 2.4s1 2.8 1.2 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.6-.1 1.4-.6 1.6-1.1.2-.6.2-1 .1-1.1-.1-.1-.3-.2-.5-.3z'/%3E%3C/svg%3E");
    }
    .trip-row-actions .driver-link-btn::after{
      content:"Driver Arrival Link";
      font-size:13px;
      line-height:1.2;
      white-space:nowrap;
    }
    .trip-row-actions .driver-link-btn:hover{
      background:#f7f9ff!important;
      border-color:#84caff!important;
      color:#4338ca!important;
    }
    .trip-row-actions .driver-link-btn:focus{
      box-shadow:0 0 0 3px rgba(79,70,198,.12)!important;
    }
    .trip-row-actions .driver-link-btn:disabled::after{content:"Preparing..."}

    /* Once the driver has reported arrival, the row already has driver-arrival-row.
       Hide only the quick-link button; do not change trip rendering logic. */
    .driver-arrival-row .trip-row-actions{
      grid-template-columns:164px 116px;
      min-width:289px;
    }
    .driver-arrival-row .trip-row-actions .driver-link-btn{display:none!important}
    .driver-arrival-row .trip-row-actions .update-trip-btn{grid-column:2}

    /* v3.8 - dedicated Driver Arrival share modal */
    .driver-share-modal .driver-share-route{padding:12px 13px;border:1px solid #d6e4ef;border-radius:10px;background:#f7fafc;font-size:13px;font-weight:800}
    .driver-share-modal .driver-share-status{margin-top:12px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#fcfcfd;font-size:12px;line-height:1.45}
    .driver-share-modal .driver-share-status.preparing{position:relative;padding:14px 14px 14px 46px;border-color:#b2ddff;background:#eff8ff;color:#175cd3;font-size:13px;font-weight:800;min-height:48px;display:flex;align-items:center}
    .driver-share-modal .driver-share-status.preparing::before{content:"";position:absolute;left:15px;top:50%;width:19px;height:19px;margin-top:-10px;border:2.5px solid rgba(23,92,211,.20);border-top-color:#175cd3;border-radius:50%;animation:tripStatusSpin .8s linear infinite}
    .driver-share-modal .driver-share-status.ready{border-color:#abefc6;background:#f6fef9;color:#067647}
    .driver-share-modal .driver-share-status.error{border-color:#fda29b;background:#fef3f2;color:#b42318}
    .driver-share-modal .driver-share-message{margin-top:12px;padding:12px;border:1px solid #d0d5dd;border-radius:10px;background:#f8fafc;white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.55;color:#344054}
    .driver-share-modal .driver-share-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:14px}
    .driver-share-modal .driver-share-actions .btn{width:100%;min-height:44px}
    .driver-share-modal .driver-share-whatsapp{background:#20b96b!important;border:1px solid #159957!important;color:#fff!important;text-decoration:none;display:flex;align-items:center;justify-content:center;font-weight:800;border-radius:8px;padding:9px 13px}
    .driver-share-modal .driver-share-whatsapp:hover{background:#159957!important}
    .driver-share-modal .driver-share-whatsapp.disabled{opacity:.5;pointer-events:none}
    @media(max-width:700px){.driver-share-modal .driver-share-actions{grid-template-columns:1fr}}
    body.mobile-ui .driver-share-modal .driver-share-actions{grid-template-columns:1fr}

    @media(max-width:900px){
      .trip-row-actions .driver-link-btn::before{font-size:clamp(11px,3.1vw,13px)}
      .driver-arrival-row .trip-row-actions{grid-template-columns:1fr;min-width:0}
      .driver-arrival-row .trip-row-actions .update-trip-btn{grid-column:1}
    }
    body.mobile-ui .trip-row-actions .driver-link-btn::before{font-size:clamp(11px,3.1vw,13px)}
    body.mobile-ui .driver-arrival-row .trip-row-actions{grid-template-columns:1fr;min-width:0}
    body.mobile-ui .driver-arrival-row .trip-row-actions .update-trip-btn{grid-column:1}



    /* =======================================================
       v3.9.1 SAFE ACTION ALIGNMENT
       CSS ONLY — no trip loading/rendering JavaScript changed.
       ======================================================= */
    @media(min-width:901px){
      .trip-row-actions{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-start!important;
        flex-wrap:nowrap!important;
        gap:9px!important;
        min-width:0!important;
        width:max-content!important;
      }
      .trip-row-actions .instructions-slot-placeholder,
      .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]{
        display:none!important;
      }
      .trip-row-actions .instructions-btn{
        flex:0 0 164px!important;
        width:164px!important;
      }
      .trip-row-actions .driver-link-btn{
        flex:0 0 152px!important;
        width:152px!important;
      }
      .trip-row-actions .update-trip-btn{
        flex:0 0 116px!important;
        width:116px!important;
      }
      .driver-arrival-row .trip-row-actions{
        display:flex!important;
        min-width:0!important;
        width:max-content!important;
      }
      .driver-arrival-row .trip-row-actions .driver-link-btn{
        display:none!important;
      }
    }

    @media(max-width:900px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        display:grid!important;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
        align-items:stretch!important;
        gap:8px!important;
        width:100%!important;
        min-width:0!important;
      }
      .trip-row-actions .instructions-slot-placeholder,
      body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
        display:none!important;
      }
      .trip-row-actions .instructions-btn,
      body.mobile-ui .trip-row-actions .instructions-btn{
        grid-column:1/-1!important;
        width:100%!important;
      }
      .trip-row-actions .driver-link-btn,
      body.mobile-ui .trip-row-actions .driver-link-btn{
        grid-column:1!important;
        width:100%!important;
      }
      .trip-row-actions .update-trip-btn,
      body.mobile-ui .trip-row-actions .update-trip-btn{
        grid-column:2!important;
        width:100%!important;
      }
      .driver-arrival-row .trip-row-actions,
      body.mobile-ui .driver-arrival-row .trip-row-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
      }
      .driver-arrival-row .trip-row-actions .driver-link-btn,
      body.mobile-ui .driver-arrival-row .trip-row-actions .driver-link-btn{
        display:none!important;
      }
      .driver-arrival-row .trip-row-actions .instructions-btn,
      body.mobile-ui .driver-arrival-row .trip-row-actions .instructions-btn{
        grid-column:1!important;
      }
      .driver-arrival-row .trip-row-actions .update-trip-btn,
      body.mobile-ui .driver-arrival-row .trip-row-actions .update-trip-btn{
        grid-column:2!important;
      }
      .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]{
        display:none!important;
      }
      .trip-row-actions > .driver-link-btn[style*="visibility:hidden"] + .update-trip-btn{
        grid-column:1/-1!important;
      }
    }

    @media(max-width:390px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
      }
      .driver-arrival-row .trip-row-actions,
      body.mobile-ui .driver-arrival-row .trip-row-actions{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
      }
    }


    /* =======================================================
       v3.9.2 VERTICAL ACTION STACK — CSS ONLY
       Keeps all trip-loading/rendering JavaScript unchanged.
       Order: Update Trip > Driver Arrival Link > Origin Note.
       Missing/unavailable actions remain visible in muted gray.
       ======================================================= */
    .trip-row-actions,
    body.mobile-ui .trip-row-actions{
      display:flex!important;
      flex-direction:column!important;
      align-items:stretch!important;
      justify-content:flex-start!important;
      flex-wrap:nowrap!important;
      gap:8px!important;
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
    }

    .trip-row-actions .update-trip-btn,
    body.mobile-ui .trip-row-actions .update-trip-btn{
      order:1!important;
      width:100%!important;
      min-width:0!important;
      min-height:42px!important;
      grid-column:auto!important;
    }

    .trip-row-actions .driver-link-btn,
    body.mobile-ui .trip-row-actions .driver-link-btn{
      order:2!important;
      width:100%!important;
      min-width:0!important;
      min-height:42px!important;
      grid-column:auto!important;
      flex:0 0 auto!important;
    }

    .trip-row-actions .instructions-btn,
    body.mobile-ui .trip-row-actions .instructions-btn,
    .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
      order:3!important;
      width:100%!important;
      min-width:0!important;
      min-height:42px!important;
      grid-column:auto!important;
    }

    /* No origin note: keep a disabled-looking Origin Note button in place. */
    .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
      display:flex!important;
      visibility:visible!important;
      align-items:center!important;
      justify-content:center!important;
      height:42px!important;
      padding:8px 11px!important;
      border:1px solid #d0d5dd!important;
      border-radius:8px!important;
      background:#f2f4f7!important;
      color:#98a2b3!important;
      box-shadow:none!important;
      pointer-events:none!important;
      cursor:not-allowed!important;
      font-size:0!important;
      box-sizing:border-box!important;
    }
    .trip-row-actions .instructions-slot-placeholder::before,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder::before{
      content:"📌 Origin Note";
      font-size:13px;
      font-weight:700;
      line-height:1.2;
      white-space:nowrap;
      opacity:.72;
    }

    /* Driver link unavailable (not in transit): convert its placeholder into a muted button. */
    .trip-row-actions > .driver-link-btn[style*="visibility:hidden"],
    body.mobile-ui .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]{
      display:inline-flex!important;
      visibility:visible!important;
      align-items:center!important;
      justify-content:center!important;
      background:#f2f4f7!important;
      border-color:#d0d5dd!important;
      color:#98a2b3!important;
      box-shadow:none!important;
      pointer-events:none!important;
      cursor:not-allowed!important;
      opacity:1!important;
    }
    .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::before,
    body.mobile-ui .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::before{
      filter:grayscale(1)!important;
      opacity:.35!important;
    }
    .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::after,
    body.mobile-ui .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::after{
      color:#98a2b3!important;
      opacity:.78!important;
    }

    /* Driver has already reported arrival: keep the button visible but inactive-looking. */
    .driver-arrival-row .trip-row-actions .driver-link-btn,
    body.mobile-ui .driver-arrival-row .trip-row-actions .driver-link-btn{
      display:inline-flex!important;
      visibility:visible!important;
      background:#f2f4f7!important;
      border-color:#d0d5dd!important;
      color:#98a2b3!important;
      box-shadow:none!important;
      pointer-events:none!important;
      cursor:not-allowed!important;
      opacity:1!important;
    }
    .driver-arrival-row .trip-row-actions .driver-link-btn::before,
    body.mobile-ui .driver-arrival-row .trip-row-actions .driver-link-btn::before{
      filter:grayscale(1)!important;
      opacity:.35!important;
    }
    .driver-arrival-row .trip-row-actions .driver-link-btn::after,
    body.mobile-ui .driver-arrival-row .trip-row-actions .driver-link-btn::after{
      color:#98a2b3!important;
      opacity:.78!important;
    }

    @media(max-width:900px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        width:100%!important;
        min-width:0!important;
        max-width:none!important;
        gap:9px!important;
      }
      .trip-row-actions .update-trip-btn,
      .trip-row-actions .driver-link-btn,
      .trip-row-actions .instructions-btn,
      .trip-row-actions .instructions-slot-placeholder,
      body.mobile-ui .trip-row-actions .update-trip-btn,
      body.mobile-ui .trip-row-actions .driver-link-btn,
      body.mobile-ui .trip-row-actions .instructions-btn,
      body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
        min-height:48px!important;
      }
    }



    /* =======================================================
       v3.9.3 UNIFORM ACTION BUTTON DIMENSIONS — CSS ONLY
       Final override: equal width + equal fixed height for the
       three vertical trip actions on desktop and mobile.
       ======================================================= */
    .trip-row-actions,
    body.mobile-ui .trip-row-actions{
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
      align-items:stretch!important;
      box-sizing:border-box!important;
    }

    .trip-row-actions .update-trip-btn,
    .trip-row-actions .driver-link-btn,
    .trip-row-actions .instructions-btn,
    .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui .trip-row-actions .update-trip-btn,
    body.mobile-ui .trip-row-actions .driver-link-btn,
    body.mobile-ui .trip-row-actions .instructions-btn,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
      width:100%!important;
      min-width:100%!important;
      max-width:100%!important;
      height:48px!important;
      min-height:48px!important;
      max-height:48px!important;
      flex:0 0 48px!important;
      margin:0!important;
      padding:0 12px!important;
      box-sizing:border-box!important;
      align-items:center!important;
      justify-content:center!important;
      line-height:1.2!important;
      white-space:nowrap!important;
      overflow:hidden!important;
      text-overflow:ellipsis!important;
      vertical-align:middle!important;
    }

    .trip-row-actions .update-trip-btn,
    .trip-row-actions .driver-link-btn,
    .trip-row-actions .instructions-btn,
    body.mobile-ui .trip-row-actions .update-trip-btn,
    body.mobile-ui .trip-row-actions .driver-link-btn,
    body.mobile-ui .trip-row-actions .instructions-btn{
      display:flex!important;
    }

    .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
      display:flex!important;
    }

    @media(max-width:900px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        width:100%!important;
        min-width:0!important;
        max-width:none!important;
      }
      .trip-row-actions .update-trip-btn,
      .trip-row-actions .driver-link-btn,
      .trip-row-actions .instructions-btn,
      .trip-row-actions .instructions-slot-placeholder,
      body.mobile-ui .trip-row-actions .update-trip-btn,
      body.mobile-ui .trip-row-actions .driver-link-btn,
      body.mobile-ui .trip-row-actions .instructions-btn,
      body.mobile-ui .trip-row-actions .instructions-slot-placeholder{
        width:100%!important;
        min-width:100%!important;
        max-width:100%!important;
        height:50px!important;
        min-height:50px!important;
        max-height:50px!important;
        flex-basis:50px!important;
      }
    }


    /* =======================================================
       v3.9.4 UNIFORM ACTION STACK WIDTH — CSS ONLY
       Fixed visual width across all mobile trip cards.
       ======================================================= */
    @media(max-width:900px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        width:230px!important;
        min-width:230px!important;
        max-width:230px!important;
        margin-left:auto!important;
        margin-right:0!important;
        align-self:flex-end!important;
      }
    }

    @media(max-width:390px){
      .trip-row-actions,
      body.mobile-ui .trip-row-actions{
        width:220px!important;
        min-width:220px!important;
        max-width:220px!important;
      }
    }


    /* =======================================================
       v3.9.5 FIXED ACTION COLUMN WIDTH + COMPACT HEIGHT — CSS ONLY
       Fixes the action-stack container itself so every trip uses
       exactly the same visual width, including forced mobile-ui.
       ======================================================= */
    body.mobile-ui #activeRows td:last-child{
      display:flex!important;
      justify-content:flex-end!important;
      align-items:flex-start!important;
    }
    body.mobile-ui #activeRows td:last-child > .trip-row-actions{
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
      flex:0 0 200px!important;
      align-self:auto!important;
      margin-left:auto!important;
      margin-right:0!important;
      box-sizing:border-box!important;
    }
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
      width:100%!important;
      min-width:100%!important;
      max-width:100%!important;
      height:42px!important;
      min-height:42px!important;
      max-height:42px!important;
      flex:0 0 42px!important;
      padding:0 9px!important;
      margin:0!important;
      box-sizing:border-box!important;
    }

    @media(max-width:900px){
      #activeRows td:last-child{
        display:flex!important;
        justify-content:flex-end!important;
        align-items:flex-start!important;
      }
      #activeRows td:last-child > .trip-row-actions{
        width:200px!important;
        min-width:200px!important;
        max-width:200px!important;
        flex:0 0 200px!important;
        margin-left:auto!important;
        margin-right:0!important;
        box-sizing:border-box!important;
      }
      #activeRows td:last-child > .trip-row-actions .update-trip-btn,
      #activeRows td:last-child > .trip-row-actions .driver-link-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
        width:100%!important;
        min-width:100%!important;
        max-width:100%!important;
        height:42px!important;
        min-height:42px!important;
        max-height:42px!important;
        flex:0 0 42px!important;
        padding:0 9px!important;
        margin:0!important;
        box-sizing:border-box!important;
      }
    }


    /* =======================================================
       v3.9.6 DRIVER LINK + FINAL ACTION WIDTH FIX — CSS ONLY
       except the visible quick-action label is now "Driver Link".
       ======================================================= */
    /* Use the real button text; do not generate a second label. */
    .trip-row-actions .driver-link-btn::after,
    body.mobile-ui .trip-row-actions .driver-link-btn::after{
      content:none!important;
      display:none!important;
    }
    .trip-row-actions .driver-link-btn,
    body.mobile-ui .trip-row-actions .driver-link-btn{
      font-size:13px!important;
      line-height:1.1!important;
    }

    /* Placeholder has no inner text, so give only the placeholder a label. */
    .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::after,
    body.mobile-ui .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::after{
      content:"Driver Link"!important;
      display:inline!important;
      font-size:13px!important;
      line-height:1.1!important;
      white-space:nowrap!important;
      color:#98a2b3!important;
    }

    /* Fix the actions TABLE CELL and the stack itself to one shared width. */
    #activeRows td:last-child{
      width:224px!important;
      min-width:224px!important;
      max-width:224px!important;
      box-sizing:border-box!important;
    }
    #activeRows td:last-child > .trip-row-actions,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions{
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
      flex:0 0 200px!important;
      box-sizing:border-box!important;
      margin-left:auto!important;
      margin-right:auto!important;
      gap:7px!important;
    }

    #activeRows td:last-child > .trip-row-actions .update-trip-btn,
    #activeRows td:last-child > .trip-row-actions .driver-link-btn,
    #activeRows td:last-child > .trip-row-actions .instructions-btn,
    #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
      height:40px!important;
      min-height:40px!important;
      max-height:40px!important;
      flex:0 0 40px!important;
      padding:0 8px!important;
      margin:0!important;
      box-sizing:border-box!important;
      align-items:center!important;
      justify-content:center!important;
    }

    @media(max-width:900px){
      #activeRows td:last-child,
      body.mobile-ui #activeRows td:last-child{
        width:100%!important;
        min-width:100%!important;
        max-width:100%!important;
        display:flex!important;
        justify-content:flex-end!important;
        align-items:flex-start!important;
        box-sizing:border-box!important;
      }
      #activeRows td:last-child > .trip-row-actions,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions{
        width:220px!important;
        min-width:220px!important;
        max-width:220px!important;
        flex:0 0 220px!important;
        margin-left:auto!important;
        margin-right:0!important;
      }
      #activeRows td:last-child > .trip-row-actions .update-trip-btn,
      #activeRows td:last-child > .trip-row-actions .driver-link-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .update-trip-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .driver-link-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
        width:220px!important;
        min-width:220px!important;
        max-width:220px!important;
        height:40px!important;
        min-height:40px!important;
        max-height:40px!important;
        flex:0 0 40px!important;
      }
    }



    /* =======================================================
       v3.9.7 CONSISTENT ACTION CORNERS + MOBILE FULL WIDTH
       CSS ONLY — v3.9.6 remains the stable functional base.
       ======================================================= */
    /* Keep the three action controls visually identical in shape. */
    #activeRows .trip-row-actions .update-trip-btn,
    #activeRows .trip-row-actions .driver-link-btn,
    #activeRows .trip-row-actions .instructions-btn,
    #activeRows .trip-row-actions .instructions-slot-placeholder,
    body.mobile-ui #activeRows .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows .trip-row-actions .instructions-slot-placeholder{
      border-radius:10px!important;
      overflow:hidden!important;
    }

    /* On phones, let the action stack fill the card width instead of hugging the right edge. */
    @media(max-width:900px){
      #activeRows td:last-child,
      body.mobile-ui #activeRows td:last-child{
        width:100%!important;
        min-width:100%!important;
        max-width:100%!important;
        display:block!important;
        padding:10px 12px!important;
        box-sizing:border-box!important;
      }
      #activeRows td:last-child > .trip-row-actions,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        flex:0 0 auto!important;
        margin:0!important;
        align-self:stretch!important;
        box-sizing:border-box!important;
      }
      #activeRows td:last-child > .trip-row-actions .update-trip-btn,
      #activeRows td:last-child > .trip-row-actions .driver-link-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-btn,
      #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .update-trip-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .driver-link-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-btn,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        border-radius:10px!important;
      }
    }

    /* Forced mobile mode can apply even when viewport width is desktop-like. */
    body.mobile-ui #activeRows td:last-child{
      width:100%!important;
      min-width:100%!important;
      max-width:100%!important;
      display:block!important;
      padding:10px 12px!important;
      box-sizing:border-box!important;
    }
    body.mobile-ui #activeRows td:last-child > .trip-row-actions{
      width:100%!important;
      min-width:0!important;
      max-width:100%!important;
      flex:0 0 auto!important;
      margin:0!important;
      align-self:stretch!important;
      box-sizing:border-box!important;
    }
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows td:last-child > .trip-row-actions .instructions-slot-placeholder{
      width:100%!important;
      min-width:0!important;
      max-width:100%!important;
      border-radius:10px!important;
    }


    /* =======================================================
       v3.9.9 ACTION ICON POLISH — CSS ONLY
       - Disabled Origin Note pin becomes grayscale.
       - Update Trip gets a white outline pencil SVG icon.
       Functional v3.9.7 base remains unchanged.
       ======================================================= */
    #activeRows .trip-row-actions .instructions-slot-placeholder::before,
    body.mobile-ui #activeRows .trip-row-actions .instructions-slot-placeholder::before{
      filter:grayscale(1)!important;
      opacity:.62!important;
    }

    #activeRows .trip-row-actions .update-trip-btn::before,
    body.mobile-ui #activeRows .trip-row-actions .update-trip-btn::before{
      content:"";
      display:inline-block;
      width:15px;
      height:15px;
      flex:0 0 15px;
      margin-right:7px;
      background:currentColor;
      vertical-align:-2px;
      -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
      mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
    }


    /* v5.1 - Trip Type sequence readability in Completed Trips */
    .trip-type-stack{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:130px;line-height:1.3}
    .trip-type-stack-item{font-weight:700;color:#344054;white-space:normal}
    .trip-type-stack-arrow{font-size:13px;font-weight:900;color:#9e77ed;line-height:1;text-align:center;padding-left:12px}
    body.mobile-ui .trip-type-stack{align-items:flex-end;text-align:right;min-width:0;max-width:100%}
    body.mobile-ui .trip-type-stack-arrow{padding-left:0;padding-right:12px}

    /* v5.2 - clearer Free Trip KPI summary */
    .free-trip-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:2px 0 16px}
    .free-trip-metric{border:1px solid var(--border);border-radius:12px;background:#fcfcfd;padding:13px 14px;min-width:0}
    .free-trip-metric.primary{border-color:#abefc6;background:#f6fef9}
    .free-trip-metric-label{font-size:11px;font-weight:800;color:#475467;line-height:1.3}
    .free-trip-metric-value{font-size:26px;font-weight:800;color:#101828;margin-top:7px;line-height:1.05}
    .free-trip-metric.primary .free-trip-metric-value{color:#067647}
    .free-trip-metric-sub{font-size:10.5px;color:var(--muted);line-height:1.4;margin-top:6px}
    .free-trip-origin-title{margin-bottom:10px;font-weight:700;color:#475467}
    @media(max-width:900px){
      .free-trip-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
      .free-trip-metric{padding:12px}
      .free-trip-metric-value{font-size:23px}
      .free-trip-metric-sub{font-size:10px}
    }
    body.mobile-ui .free-trip-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    body.mobile-ui .free-trip-metric{padding:12px}
    body.mobile-ui .free-trip-metric-label{font-size:11.5px}
    body.mobile-ui .free-trip-metric-value{font-size:24px}
    body.mobile-ui .free-trip-metric-sub{font-size:10.5px}
    @media(max-width:430px){
      .free-trip-metric-grid{grid-template-columns:1fr}
    }


    /* =======================================================
       v5.5.3 TRIP NOTES + DRIVER ALERT STATUS-ONLY UI
       - Trip Notes remains a dedicated operational card.
       - Update Trip contains no note controls/content.
       - Driver Alert button is restored for IN_TRANSIT trips.
       - Driver Alert is status-only: no send/share/copy controls.
       ======================================================= */
    #activeRows .trip-row-actions,
    body.mobile-ui #activeRows .trip-row-actions{
      display:flex!important;
      flex-direction:column!important;
      align-items:stretch!important;
      justify-content:flex-start!important;
      gap:8px!important;
      width:200px!important;
      min-width:200px!important;
      max-width:200px!important;
    }
    #activeRows .trip-row-actions .update-trip-btn,
    #activeRows .trip-row-actions .driver-link-btn,
    #activeRows .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows .trip-row-actions .instructions-btn{
      width:100%!important;
      min-width:0!important;
      max-width:100%!important;
      height:42px!important;
      min-height:42px!important;
      max-height:42px!important;
      flex:0 0 42px!important;
      border-radius:10px!important;
      display:flex!important;
      align-items:center!important;
      justify-content:center!important;
      padding:0 12px!important;
      box-sizing:border-box!important;
      grid-column:auto!important;
      white-space:nowrap!important;
    }
    #activeRows .trip-row-actions .update-trip-btn,
    body.mobile-ui #activeRows .trip-row-actions .update-trip-btn{order:1!important}
    #activeRows .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows .trip-row-actions .driver-link-btn{
      order:2!important;
      background:#eff8ff!important;
      border:1px solid #b2ddff!important;
      color:#175cd3!important;
      box-shadow:none!important;
    }
    #activeRows .trip-row-actions .driver-link-btn:hover{
      background:#dff1ff!important;
      border-color:#84caff!important;
      color:#1849a9!important;
    }
    #activeRows .trip-row-actions .instructions-btn,
    body.mobile-ui #activeRows .trip-row-actions .instructions-btn{
      order:3!important;
      background:#f4f3ff!important;
      border:1px solid #d6bbfb!important;
      color:#6941c6!important;
      box-shadow:none!important;
    }
    #activeRows .trip-row-actions .instructions-btn:hover{
      background:#ebe9fe!important;
      border-color:#b692f6!important;
      color:#53389e!important;
    }
    @media(max-width:900px){
      #activeRows td:last-child > .trip-row-actions,
      body.mobile-ui #activeRows td:last-child > .trip-row-actions{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
      }
      #activeRows .trip-row-actions .update-trip-btn,
      #activeRows .trip-row-actions .driver-link-btn,
      #activeRows .trip-row-actions .instructions-btn,
      body.mobile-ui #activeRows .trip-row-actions .update-trip-btn,
      body.mobile-ui #activeRows .trip-row-actions .driver-link-btn,
      body.mobile-ui #activeRows .trip-row-actions .instructions-btn{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        height:48px!important;
        min-height:48px!important;
        max-height:48px!important;
        flex-basis:48px!important;
      }
    }

    .trip-notes-modal{width:min(760px,100%)}
    .trip-notes-trip-info{
      display:grid;
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:9px;
      margin-bottom:16px;
    }
    .trip-notes-info-item{
      min-width:0;
      padding:11px 12px;
      border:1px solid var(--border);
      border-radius:10px;
      background:#fcfcfd;
    }
    .trip-notes-info-item span{
      display:block;
      font-size:10px;
      font-weight:800;
      color:var(--muted);
      text-transform:uppercase;
      letter-spacing:.02em;
    }
    .trip-notes-info-item strong{
      display:block;
      margin-top:5px;
      font-size:12.5px;
      line-height:1.4;
      color:#344054;
      word-break:break-word;
    }
    .trip-note-log-section{
      padding:14px;
      border:1px solid #e4e7ec;
      border-radius:13px;
      background:#fff;
    }
    .trip-note-section-head{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:12px;
      margin-bottom:11px;
    }
    .trip-note-section-title{font-size:15px;font-weight:800;color:#101828}
    .trip-note-section-sub{font-size:11px;color:var(--muted);line-height:1.4;margin-top:3px}
    .trip-note-count{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-width:30px;
      height:30px;
      padding:0 9px;
      border-radius:999px;
      background:#f4f3ff;
      color:#6941c6;
      font-size:12px;
      font-weight:900;
    }
    .trip-note-log{display:flex;flex-direction:column;gap:9px}
    .trip-note-entry{
      padding:12px 13px;
      border:1px solid #e4e7ec;
      border-radius:11px;
      background:#f9fafb;
    }
    .trip-note-entry.origin{
      border-color:#d6bbfb;
      background:#f7f5ff;
    }
    .trip-note-entry-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
    .trip-note-entry-label{font-size:11.5px;font-weight:900;color:#344054}
    .trip-note-entry.origin .trip-note-entry-label{color:#6941c6}
    .trip-note-entry-no{font-size:10px;font-weight:800;color:#98a2b3}
    .trip-note-entry-meta{margin-top:5px;font-size:10.5px;font-weight:700;color:#667085}
    .trip-note-entry-text{
      margin-top:8px;
      font-size:13px;
      line-height:1.6;
      color:#182230;
      white-space:pre-wrap;
      word-break:break-word;
    }
    .trip-note-empty{
      padding:20px 14px;
      border:1px dashed #d0d5dd;
      border-radius:10px;
      background:#fcfcfd;
      text-align:center;
      color:#667085;
      font-size:12px;
    }
    .trip-note-add-card{
      margin-top:14px;
      padding:14px;
      border:1px solid #d6bbfb;
      border-radius:13px;
      background:#f7f5ff;
      box-shadow:0 2px 8px rgba(105,65,198,.06);
    }
    .trip-note-add-title{font-size:15px;font-weight:800;color:#42307d}
    .trip-note-add-sub{margin-top:3px;font-size:11px;color:#6941c6;line-height:1.4}
    .trip-note-add-card textarea{
      margin-top:11px;
      min-height:92px;
      border-color:#c3b5fd;
      background:#fff;
    }
    .trip-note-add-footer{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin-top:10px;
    }
    .trip-note-add-notice{
      min-height:18px;
      flex:1 1 auto;
      font-size:11px;
      font-weight:700;
      color:#6941c6;
      line-height:1.35;
    }
    .trip-note-add-card .btn{min-width:120px}
    .driver-arrival-notification-only{margin-bottom:12px}

    @media(max-width:700px){
      .trip-notes-trip-info{grid-template-columns:1fr 1fr}
      .trip-note-add-footer{align-items:stretch;flex-direction:column}
      .trip-note-add-card .btn{width:100%}
    }
    @media(max-width:430px){
      .trip-notes-trip-info{grid-template-columns:1fr}
    }
    body.mobile-ui .trip-notes-trip-info{grid-template-columns:1fr 1fr}
    body.mobile-ui .trip-note-add-footer{align-items:stretch;flex-direction:column}
    body.mobile-ui .trip-note-add-card .btn{width:100%;min-height:48px}



    /* =======================================================
       v5.5.5 ACTIVE TRIP READABILITY
       - Delivery Type follows Trip Type in the main table.
       - Current navigation tab is unmistakably highlighted.
       - Empty Trip Notes and unavailable Driver Link are muted gray.
       ======================================================= */
    .tabs .tab.active{
      background:var(--primary)!important;
      color:#fff!important;
      box-shadow:0 3px 9px rgba(105,65,198,.24)!important;
      border:1px solid var(--primary)!important;
    }
    .tabs .tab.active:hover{
      background:var(--primary2)!important;
      color:#fff!important;
    }

    #activeRows .trip-row-actions .instructions-btn.note-empty,
    body.mobile-ui #activeRows .trip-row-actions .instructions-btn.note-empty{
      background:#f2f4f7!important;
      border-color:#d0d5dd!important;
      color:#667085!important;
      box-shadow:none!important;
    }
    #activeRows .trip-row-actions .instructions-btn.note-empty:hover,
    body.mobile-ui #activeRows .trip-row-actions .instructions-btn.note-empty:hover{
      background:#eaecf0!important;
      border-color:#b9c0cc!important;
      color:#475467!important;
    }

    #activeRows .trip-row-actions > .driver-link-btn[style*="visibility:hidden"],
    body.mobile-ui #activeRows .trip-row-actions > .driver-link-btn[style*="visibility:hidden"],
    #activeRows .driver-arrival-row .trip-row-actions .driver-link-btn,
    body.mobile-ui #activeRows .driver-arrival-row .trip-row-actions .driver-link-btn{
      display:flex!important;
      visibility:visible!important;
      background:#f2f4f7!important;
      border-color:#d0d5dd!important;
      color:#98a2b3!important;
      box-shadow:none!important;
      pointer-events:none!important;
      cursor:not-allowed!important;
      opacity:1!important;
    }
    #activeRows .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::before,
    body.mobile-ui #activeRows .trip-row-actions > .driver-link-btn[style*="visibility:hidden"]::before,
    #activeRows .driver-arrival-row .trip-row-actions .driver-link-btn::before,
    body.mobile-ui #activeRows .driver-arrival-row .trip-row-actions .driver-link-btn::before{
      filter:grayscale(1)!important;
      opacity:.38!important;
    }


    /* =======================================================
       v5.5.7 MANAGER BULK SELECTION
       - Select All applies to currently displayed, non-deleted trips.
       - Bulk delete remains recoverable soft delete.
       ======================================================= */
    .manager-bulk-actions{
      display:flex;
      align-items:center;
      gap:10px;
      padding:10px 14px;
      border-bottom:1px solid var(--border);
      background:#fcfcfd;
      flex-wrap:wrap;
    }
    .manager-select-all{
      display:inline-flex;
      align-items:center;
      gap:7px;
      font-size:12px;
      font-weight:800;
      color:#344054;
      cursor:pointer;
      white-space:nowrap;
    }
    .manager-select-all input,
    .manager-trip-select-cell input{
      width:17px;
      height:17px;
      min-height:0;
      flex:0 0 17px;
      accent-color:var(--primary);
      cursor:pointer;
    }
    .manager-select-all input:disabled,
    .manager-trip-select-cell input:disabled{cursor:not-allowed}
    .manager-selected-count{
      min-width:76px;
      font-size:11px;
      font-weight:700;
      color:var(--muted);
    }
    #mgrDeleteSelectedBtn{margin-left:auto}
    .manager-trip-select-cell{
      display:flex;
      align-items:center;
      gap:8px;
      min-width:max-content;
    }

    @media(max-width:900px){
      .manager-bulk-actions{padding:10px;gap:8px}
      #mgrDeleteSelectedBtn{margin-left:0;width:100%}
    }
    body.mobile-ui .manager-bulk-actions{padding:10px;gap:8px}
    body.mobile-ui #mgrDeleteSelectedBtn{margin-left:0;width:100%}



    /* =======================================================
       v5.5.8 MANAGER DATE FILTER + SERVER PAGINATION
       - Trip Start period is filtered on the server.
       - Only one result page is sent to the browser.
       - Select Page remains intentionally page-scoped for safe bulk delete.
       ======================================================= */
    .manager-trip-filter{
      grid-template-columns:minmax(250px,1.6fr) 150px 150px 170px 110px auto auto;
      gap:9px;
      align-items:end;
    }
    .manager-trip-filter .field{min-width:0}
    .manager-deleted-filter{
      margin:0!important;
      min-height:42px;
      align-items:center;
      padding:0 4px;
      white-space:nowrap;
    }
    .manager-apply-btn{min-height:42px;white-space:nowrap}
    .manager-bulk-note{
      font-size:10px;
      color:var(--muted);
      line-height:1.35;
    }
    .manager-pagination{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      padding:9px 14px;
      border-bottom:1px solid var(--border);
      background:#fff;
      flex-wrap:wrap;
    }
    .manager-pagination-bottom{
      border-top:1px solid var(--border);
      border-bottom:0;
    }
    .manager-page-summary{
      font-size:11px;
      font-weight:800;
      color:#344054;
      white-space:nowrap;
    }
    .manager-page-summary span{color:var(--muted);font-weight:700}
    .manager-page-buttons{
      display:flex;
      align-items:center;
      gap:5px;
      flex-wrap:wrap;
    }
    .manager-page-btn{
      min-width:34px;
      height:34px;
      padding:0 9px;
      border:1px solid #d0d5dd;
      border-radius:7px;
      background:#fff;
      color:#344054;
      font-size:11px;
      font-weight:800;
      cursor:pointer;
    }
    .manager-page-btn:hover:not(:disabled){border-color:#b692f6;background:#f4f3ff;color:var(--primary2)}
    .manager-page-btn.active{
      background:var(--primary);
      border-color:var(--primary);
      color:#fff;
      cursor:default;
    }
    .manager-page-btn.nav{min-width:auto;padding:0 10px}
    .manager-page-btn:disabled{opacity:.38;cursor:not-allowed}
    .manager-page-gap{padding:0 2px;color:var(--muted);font-weight:800}

    /* Manager table: new Started column before Updated. */
    #mgrTripRows td:nth-child(8)::before{content:"Started"}
    #mgrTripRows td:nth-child(9)::before{content:"Updated"}
    body.mobile-ui #mgrTripRows td:nth-child(8)::before{content:"Started"}
    body.mobile-ui #mgrTripRows td:nth-child(9)::before{content:"Updated"}

    @media(max-width:1100px){
      .manager-trip-filter{
        grid-template-columns:repeat(3,minmax(0,1fr));
      }
      .manager-search-field{grid-column:1/-1}
      .manager-deleted-filter{align-self:end}
    }
    @media(max-width:900px){
      .manager-trip-filter{grid-template-columns:1fr 1fr!important}
      .manager-trip-filter .manager-search-field{grid-column:1/-1}
      .manager-trip-filter .manager-apply-btn{width:100%}
      .manager-pagination{padding:9px 10px;align-items:flex-start}
      .manager-page-buttons{width:100%}
      .manager-page-btn{min-height:38px;height:38px}
      .manager-bulk-note{width:100%}
    }
    body.mobile-ui .manager-trip-filter{grid-template-columns:1fr!important}
    body.mobile-ui .manager-trip-filter .manager-search-field{grid-column:auto}
    body.mobile-ui .manager-trip-filter .manager-apply-btn{width:100%}
    body.mobile-ui .manager-deleted-filter{min-height:42px}
    body.mobile-ui .manager-pagination{padding:9px 10px;align-items:flex-start}
    body.mobile-ui .manager-page-buttons{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
    body.mobile-ui .manager-page-btn{flex:0 0 auto;min-height:40px;height:40px}
    body.mobile-ui .manager-bulk-note{width:100%}




/* v0.3.0 Reference Data split: Locations (green) vs Operational Options (blue) */
.reference-block{margin:14px;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff}
.reference-block+.reference-block{margin-top:18px}
.reference-locations{border-color:#b7dfc8;background:#fbfffc}
.reference-locations>.manager-head{background:#eaf7ef;border-bottom-color:#cde8d8}
.reference-locations>.manager-head strong{color:#166534}
.reference-locations thead{background:#f1faf4}
.reference-options{border-color:#c7dcf1;background:#fbfdff}
.reference-options>.manager-head{background:#eaf3fb;border-bottom-color:#d2e4f4}
.reference-options>.manager-head strong{color:#1d4f7a}
.reference-options thead{background:#f1f7fd}
.notice.success-lite{background:#ecfdf3;border:1px solid #abefc6;color:#067647}
.location-editor{grid-template-columns:minmax(170px,1fr) minmax(170px,1fr) 160px 120px 100px 145px 120px 90px auto}
.option-editor{grid-template-columns:170px minmax(180px,1fr) minmax(180px,1fr) 90px 90px auto}
@media (max-width:1180px){.location-editor,.option-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.location-editor .btn,.option-editor .btn{width:100%}}
@media (max-width:700px){.reference-block{margin:10px}.location-editor,.option-editor{grid-template-columns:1fr}}
