*{box-sizing:border-box} :root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#182d35;background:#f3f6f7;font-synthesis:none}body{margin:0}button,input,select{font:inherit}button,a{touch-action:manipulation}button{min-height:46px;border:1px solid #cedade;background:white;border-radius:10px;padding:10px 16px;font-weight:650;color:#18343d;cursor:pointer}button:hover{background:#eaf2f2}button.primary{background:#126b69;border-color:#126b69;color:#fff}button.primary:hover{background:#0b5755}button.danger{color:#ab2934}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #43b8c0;outline-offset:2px}input,select{width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid #9fb6c0;border-radius:9px;color:#182d35;background:white}input[type=date],input[type=time]{appearance:none;min-height:48px}label{display:grid;gap:7px;font-size:13px;font-weight:650}h1,h2,h3,p{margin:0}h1{font-size:30px;letter-spacing:-1px;line-height:1.15}h2{font-size:22px;letter-spacing:-.5px}h3{font-size:19px}p{line-height:1.6}small,.muted{color:#5a7079;font-size:13px;line-height:1.5}a{color:#126b69;overflow-wrap:anywhere}header{background:#122f39;color:white;padding:26px 24px}header .brand{font-size:11px;font-weight:750;letter-spacing:2px;color:#9bced0;margin-bottom:9px}header .top{max-width:1120px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:20px}header p{color:#bcd0d5;margin-top:8px}header button{background:#23444f;color:white;border-color:#50717c}.wrap{max-width:1168px;padding:26px 24px 50px;margin:auto}.toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:20px;flex-wrap:wrap}.toolbar label{min-width:170px}.actions{display:flex;gap:9px;flex-wrap:wrap}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:26px}.stat{background:white;border:1px solid #dfe8eb;border-radius:12px;padding:16px}.stat strong{font-size:28px;display:block;line-height:1.2}.stat span{font-size:12px;color:#526d76}.section-head{display:flex;justify-content:space-between;align-items:center;margin:22px 0 14px}.live{font-size:12px;font-weight:600;color:#126b69}.live:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#2d9b7a;margin-right:6px}.date-group{grid-column:1/-1;margin:6px 0 0;color:#5a7079;font-size:15px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}.trip{background:#fff;border:1px solid #d9e4e8;border-radius:15px;overflow:hidden}.trip-body{padding:20px}.trip-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.time{font-size:24px;letter-spacing:-.5px;font-weight:750}.badge{font-size:11px;line-height:1.3;text-transform:uppercase;letter-spacing:.7px;padding:7px 9px;border-radius:6px;background:#eaf0f3;color:#42616f;font-weight:750}.badge.done{color:#146c4c;background:#e1f3e9}.badge.cancelled{color:#8d4650;background:#f7e9eb}.driver-name{margin-top:5px;margin-bottom:20px}.route{padding-left:17px;border-left:2px solid #c5d8dc;margin:17px 0}.route div+div{margin-top:17px}.route small{display:block;font-size:10px;letter-spacing:1px;font-weight:700;margin-bottom:3px}.route p{font-size:14px;overflow-wrap:anywhere}.trip-footer{padding:13px 20px;border-top:1px solid #e4ecef;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.signature-saved{color:#146c4c;font-size:12px;font-weight:650}.empty{padding:45px 24px;text-align:center;background:white;border:1px dashed #bfd1d8;border-radius:14px}.empty h3{margin-bottom:8px}.empty p{color:#5a7079}.backdrop{position:fixed;inset:0;background:#0b222e99;z-index:10;display:flex;align-items:center;justify-content:center;padding:20px}.modal{max-width:580px;width:100%;max-height:calc(100dvh - 40px);overflow-y:auto;background:#fff;border-radius:17px;padding:24px}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.modal-head button{min-width:44px;padding:8px}.form{display:grid;gap:17px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.hint{background:#f0f6f6;border-radius:9px;padding:12px;font-size:13px;color:#46636c;line-height:1.5}.error{color:#b32738;font-size:14px;line-height:1.5}.form-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.signature-pad{display:block;width:100%;height:185px;border:2px dashed #a4bec5;border-radius:10px;background:#fff;touch-action:none;cursor:crosshair}.sign-label{font-size:12px;text-align:center;color:#667e87;padding:8px}.sig-image{width:100%;height:135px;object-fit:contain;background:white;border:1px solid #dfE8eb;border-radius:9px}.sig-actions{display:flex;gap:9px;justify-content:space-between;margin:12px 0}.stack{display:grid;gap:15px}.driver-row{border:1px solid #dce5e8;padding:14px;border-radius:10px;display:grid;gap:12px}.link-box{padding:12px;border:1px solid #a6c7c7;border-radius:10px;background:#f1f8f7;overflow-wrap:anywhere;font-size:13px}.link-box input{font-size:12px}#notice:not(:empty){position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);background:#163d47;color:white;z-index:50;padding:13px 20px;border-radius:12px;box-shadow:0 6px 30px #102b3926;font-size:14px}.login{max-width:500px;margin:12vh auto;padding:24px}.login h1{margin-bottom:15px}.login p{margin-bottom:18px}.fineprint{font-size:12px;color:#65808a;line-height:1.6;margin-top:25px}.sign-summary{padding:12px 0;border-bottom:1px solid #e4ecef;margin-bottom:14px}.sign-summary p{font-size:14px}.confirm-box{background:#fff2f0;border-radius:9px;padding:13px}.checkbox{display:flex;align-items:flex-start;gap:10px;font-weight:400;font-size:13px;line-height:1.5}.checkbox input{width:20px;min-height:20px;flex-shrink:0;margin-top:1px}.owner-links{display:none}@media(max-width:600px){header{padding:25px 20px}header .top{align-items:flex-start}header button{padding:9px 11px;font-size:12px}h1{font-size:26px}.wrap{padding:20px 16px 40px}.stats{gap:8px}.stat{padding:14px 11px}.stat strong{font-size:25px}.stat span{font-size:11px}.cards{grid-template-columns:1fr}.toolbar{align-items:center}.toolbar label{flex:1}.toolbar .actions{width:100%}.toolbar .actions button{flex:1}.backdrop{padding:10px;align-items:center}.modal{padding:20px;max-height:calc(100dvh - 20px);border-radius:13px}.two{grid-template-columns:1fr 1fr;gap:10px}.form-footer button{flex:1}.trip-body{padding:18px}.trip-footer{padding:12px 18px}.live{font-size:11px}.signature-pad{height:180px}}

.import-preview{display:grid;gap:12px;max-height:45dvh;overflow-y:auto}.import-preview p{font-size:13px;overflow-wrap:anywhere}

.map-address{display:inline-block;min-height:44px;padding:8px 0;text-underline-offset:4px}.badge.no_show{background:#fff1d8;color:#80581d}

.payroll-trip{padding:12px 0;border-bottom:1px solid #dce5e8}.payroll-trip p{font-size:13px}

.brand-logo{display:block;width:210px;max-width:100%;height:auto;margin:0 0 18px}header .brand-logo{width:170px;margin:0 0 12px}header .top>div{min-width:0}.login .brand-logo{width:250px;margin-bottom:22px}

.transport-badge{display:inline-block;background:#e7f2f1;color:#125654;font-size:13px;font-weight:750;border:1px solid #c9e0dd;border-radius:6px;padding:4px 9px;margin:0 0 10px}

textarea{font:inherit;width:100%;padding:11px 12px;border:1px solid #9fb6c0;border-radius:9px;color:#182d35;background:white;resize:vertical}.trip-notes{margin:12px 0;padding:12px;background:#fff8e7;border:1px solid #e5d8b2;border-radius:9px;overflow-wrap:anywhere}.trip-notes strong{font-size:13px}.trip-notes p{white-space:pre-wrap;font-size:14px}

.time-label{display:block;font-size:10px;letter-spacing:1px;color:#526d76;margin-bottom:3px}.appointment-time{font-size:14px;font-weight:650;margin:5px 0;color:#18343d}

.trip-timeline{padding:16px;border:1px solid #d3e0e3;border-radius:12px;background:#f5f9fa}.trip-timeline p{margin:8px 0;font-size:14px}

.install-strip{padding:16px 24px 32px;text-align:center}.install-strip p{margin-top:8px}@media(display-mode:standalone){.install-strip{display:none}}
.search-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}
.head-side{display:flex;align-items:center;gap:12px}
button.mini{min-height:34px;padding:5px 12px;font-size:12px}
.payroll-table-wrap{overflow-x:auto}
.payroll-table{width:100%;border-collapse:collapse;font-size:13px}
.payroll-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#5a7079;padding:8px 10px;border-bottom:2px solid #dce5e8}
.payroll-table td{padding:9px 10px;border-bottom:1px solid #e4ecef;vertical-align:top;line-height:1.45}
.payroll-table .cancelled-row{background:#fdf3f4}
.cell-cancelled{color:#b32738;font-weight:700}
@media(max-width:600px){.search-row{grid-template-columns:1fr}}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.pay-head{font-weight:700;font-size:13px;margin-top:4px}
@media(max-width:600px){.three{grid-template-columns:1fr}}

.modal-wide{max-width:960px}
.live-map{height:60vh;min-height:320px;border-radius:12px;border:1px solid #d4dde1}
.leaflet-container{font:inherit}

.trip-check{width:22px;height:22px;margin:0 0 8px}
.bulk-bar{position:sticky;bottom:0;display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#122f39;color:#fff;padding:12px 16px;border-radius:12px;margin-top:12px}
.bulk-bar select{min-width:160px}
.view-actions{display:flex;gap:6px;align-items:flex-end}

.badge.delayed{background:#fff3cd;color:#8a6d00;border:1px solid #e5cf7d}
.badge.willcall{background:#e3f2fd;color:#0d47a1;border:1px solid #90caf9}
.comments{margin-top:12px;border-top:1px solid #ddd;padding-top:8px}
.comment-list{max-height:200px;overflow:auto;margin-bottom:8px}
.comment{border-bottom:1px solid #eee;padding:6px 0}
.comment-meta{font-size:12px;color:#666}
.comment p{margin:2px 0}
.comment-form{display:flex;gap:8px}
.comment-form input{flex:1}
.route-wrap{display:flex;gap:12px}
.route-wrap .live-map{flex:1;min-height:420px}
.route-side{width:300px;max-height:420px;overflow:auto}
.route-stops{margin:4px 0 12px 0;padding-left:4px;font-size:13px}
.route-stops li{margin:2px 0}
@media(max-width:900px){.route-wrap{flex-direction:column}.route-side{width:100%}}
.gps-on{align-self:center;white-space:nowrap}
.import-flag{color:#ab2934}
.badge.market-badge{background:#efe6fb;color:#5b2d8e;border:1px solid #d3bcf0}
.market-trip{padding:16px}
.market-trip .trip-top{margin-bottom:10px}
.market-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.market-controls label{flex:1;min-width:150px}
.market-controls button{flex-shrink:0}
.market-taken{border:1px solid #dce5e8;border-radius:10px;padding:12px 14px}
.market-taken p{font-size:14px}
.return-leg{border-top:1px dashed #c5d8dc;margin-top:12px;padding-top:10px}
.return-head{font-size:13px;color:#5a7079}
.rt-leg{border-top:1px dashed #c5d8dc;margin-top:12px;padding-top:10px}
.rt-leg:first-child{border-top:none;margin-top:0;padding-top:0}
.cards .badge.willcall{white-space:nowrap}
.toolbar button.alert,button.alert{background:#b42318;color:#fff;border-color:#b42318;font-weight:700}

/* Workspace shell: sidebar (desktop) + bottom tabs (phone) */
#nav{background:#122f39;color:#cfe0e4;padding:16px 12px;display:flex;flex-direction:column;gap:16px}
#nav[hidden]{display:none}
#nav .brand-logo{height:32px;width:auto;margin:4px 6px 2px;align-self:flex-start}
.nav-group p{margin:0 6px 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#7fa3ad;font-weight:700}
.nav-item{display:block;width:100%;text-align:left;background:none;border:0;color:#cfe0e4;padding:9px 10px;border-radius:9px;font-weight:600;cursor:pointer;font-size:14px;min-height:38px}
.nav-item:hover{background:#1b4553}
.nav-item.on{background:#136d6b;color:#fff}
.nav-item.nav-danger{color:#f3b5a8;border-top:1px solid #1b4553;border-radius:0;margin-top:8px}
#tabbar{position:fixed;bottom:0;left:0;right:0;display:flex;background:#122f39;z-index:40;padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -2px 12px rgba(0,0,0,.18)}
#tabbar[hidden]{display:none}
#tabbar button{flex:1;background:none;border:0;color:#cfe0e4;font-weight:600;padding:10px 4px;border-radius:8px;font-size:12px;min-height:44px}
#tabbar button.on{background:#136d6b;color:#fff}
@media(min-width:861px){
 body.shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:100vh}
 body.shell #nav{position:sticky;top:0;height:100vh;overflow-y:auto}
 body.shell #tabbar{display:none}
 body.shell #app{min-width:0}
}
@media(max-width:860px){
 body.shell #nav{display:none}
 body.shell #app{padding-bottom:84px}
}
.page-head{padding:22px 22px 6px}
.page-head h1{margin:0;font-size:26px}
.page-head p{margin:4px 0 0;color:#4a6570}
.menu-g{margin:10px 2px 4px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#7fa3ad;font-weight:700}
.menu-row{display:flex;justify-content:space-between;align-items:center;width:100%;background:#fff;border:1px solid #dbe5e8;border-radius:10px;padding:13px 14px;font-weight:600;font-size:15px;cursor:pointer;color:#122f39;text-align:left}
.menu-row.danger{color:#a33}
.doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.doc-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #e4ecef}
.doc-row:last-child{border-bottom:0}
.doc-row .actions{flex-shrink:0}
.doc-add{border-top:1px dashed #c8d6da;margin-top:10px;padding-top:10px;display:flex;flex-direction:column;gap:10px}
.docs{margin-top:6px}
.docs summary{cursor:pointer;font-weight:600;min-height:36px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;background:#e7f0f1;border-radius:999px;padding:6px 8px 6px 12px;font-weight:600;font-size:13px}
.chip button{background:none;border:0;font-size:16px;cursor:pointer;color:#4a6570;padding:0 4px;min-height:24px}
.badge-exp,.badge-soon,.badge-watch,.badge-ok{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.badge-exp{background:#fbe4e0;color:#a33}
.badge-soon{background:#fdf0d8;color:#8a5a00}
.badge-watch{background:#e4eefb;color:#1d4f91}
.badge-ok{background:#e2f3e6;color:#20693a}

.nav-spacer{flex:1}

/* Stage 2: calendar + recurring */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:#e8eef0;border-radius:10px;overflow:hidden}
.cal-day{background:#fff;border:0;padding:10px;min-height:150px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:4px;font:inherit;color:inherit}
.cal-day:hover{background:#f2f7f8}
.cal-day.today{outline:2px solid #136d6b;outline-offset:-2px}
.cal-chip{background:#136d6b;color:#fff;border-radius:6px;padding:3px 6px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dow{display:flex;flex-wrap:wrap;gap:12px;border:1px solid #dbe5e8;border-radius:10px;padding:12px;margin:0}
.dow legend{font-weight:600;padding:0 6px}
@media(max-width:860px){.cal-grid{grid-template-columns:1fr}.cal-day{min-height:0}}
.driver-filter-wrap{position:relative;display:block}
.driver-filter-wrap input,.driver-filter-wrap select{width:100%;padding-right:34px}
#driver-filter-clear,#status-filter-clear{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:transparent;font-size:15px;color:#5a6b72;cursor:pointer;padding:4px 8px;min-height:32px;line-height:1}
#driver-filter-clear:hover,#status-filter-clear:hover{color:#122f39}

.modal-head{position:sticky;top:-24px;margin:-24px -24px 16px;padding:24px 24px 12px;background:#fff;z-index:3;border-bottom:1px solid #eef3f4}
.modal .form-footer{position:sticky;bottom:-24px;margin:18px -24px -24px;padding:12px 24px 20px;background:#fff;border-top:1px solid #e3eaed;z-index:3}
.addr-wrap{position:relative}
.addr-list{position:absolute;top:100%;left:0;right:0;margin-top:2px;background:#fff;border:1px solid #9fb6c0;border-radius:9px;box-shadow:0 8px 24px #102b3922;z-index:6;overflow:hidden}
.addr-list button{display:block;width:100%;text-align:left;border:0;border-radius:0;min-height:0;padding:10px 12px;font-weight:500;font-size:14px}
.addr-list button:hover{background:#eaf2f2}
@media(max-width:600px){.modal-head{margin:-20px -20px 14px;padding:20px 20px 10px;top:-20px}.modal .form-footer{bottom:-20px;margin:16px -20px -20px;padding:10px 20px 16px}}
.nav-dup{display:none!important}
