:root{--ink:#24382e;--muted:#78847b;--bg:#f4f6f2;--line:#e2e7df;--green:#94c11f;--dark:#172d24;--soft:#eef4df;--danger:#b85043;--shadow:0 12px 40px #142d1814;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--ink);border-radius:8px;padding:10px 14px;font-weight:550;display:inline-flex;gap:8px;align-items:center;justify-content:center;transition:background .15s}button:hover{background:#f0f4e9;border-color:#c3d3ad}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--green);border-color:var(--green);color:#20310b}button.dark{background:var(--dark);color:#fff;border-color:var(--dark)}button.ghost{background:transparent;border-color:transparent}button.danger{color:var(--danger)}button.small{padding:6px 9px;font-size:12px}button.icon{padding:8px;min-width:34px}input,select,textarea{padding:10px 12px;border:1px solid #dce3d7;border-radius:7px;background:#fff;color:var(--ink);min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid #94c11f77;outline-offset:1px}input[type=checkbox]{accent-color:#7ca51b;width:16px;height:16px;cursor:pointer}textarea{width:100%;resize:vertical;min-height:90px}a{color:#4d751b}h1,h2,h3,h4,p{margin-top:0}h1{font-size:25px;letter-spacing:-.8px;margin-bottom:5px}h2{font-size:20px;letter-spacing:-.4px}h3{font-size:16px;margin-bottom:8px}p{line-height:1.6}.muted{color:var(--muted)}.mono{font-variant-numeric:tabular-nums}.flex{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:grid;gap:14px}.label{font-size:10px;letter-spacing:1.8px;text-transform:uppercase;color:var(--muted);font-weight:700}.logo-mark{background:var(--green);color:#213615;display:inline-grid;place-items:center;font-weight:950;font-style:italic;font-size:26px;width:42px;height:42px;border-radius:11px;flex:none}.shell{display:grid;grid-template-columns:218px 1fr;min-height:100vh}.sidebar{background:var(--dark);color:#dce4de;padding:28px 17px 18px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:218px;z-index:500}.brand{display:flex;gap:10px;align-items:center;padding:0 10px 34px}.brand strong{color:white;font-size:22px;letter-spacing:1px;line-height:1}.brand small{display:block;font-size:9px;letter-spacing:1.5px;color:#a9b9ab;margin-top:6px}.nav-label{font-size:9px;color:#90a397;letter-spacing:1.7px;padding:0 13px;margin:18px 0 12px}.nav{display:grid;gap:6px}.nav button{justify-content:flex-start;color:#bacabe;background:transparent;border:none;padding:13px 14px;font-size:13px;position:relative}.nav button:hover{background:#ffffff0a}.nav button.active{background:#32472b;color:#c5eb78}.nav svg{width:19px;height:19px;opacity:.9}.badge{display:inline-flex;align-items:center;border-radius:5px;padding:4px 7px;font-size:10px;font-weight:650;white-space:nowrap;background:#edf1e7;color:#657651;letter-spacing:.1px}.badge.orange{background:#fff2df;color:#a7742d}.badge.red{background:#fbece7;color:#ae594c}.badge.green{background:#edf6de;color:#64811a}.badge.blue{background:#eaf0fc;color:#4f72b5}.nav .badge{margin-left:auto;background:#ffffff16;color:#d2ddca}.sidebar-bottom{margin-top:auto}.depot-card{padding:16px 12px;border-top:1px solid #ffffff12;font-size:12px;line-height:1.8;color:#9fb0a3}.depot-card strong{color:#d6e0d5;display:block;font-size:12px}.account{padding:14px 8px 0;border-top:1px solid #ffffff12;display:flex;gap:10px;align-items:center}.avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#e8eedf;color:#44563b;font-size:11px;font-weight:700}.account small{display:block;color:#9bac9e;font-size:10px;margin-top:3px}.account .logout{margin-left:auto;color:#b6c3b9}.main{grid-column:2;min-width:0}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid var(--line);background:#fff;font-size:11px;color:#768277}.topbar .crumb{display:flex;gap:10px;align-items:center}.online-dot{width:6px;height:6px;border-radius:50%;background:#92b73d;display:inline-block;margin-right:6px}.page-head{display:flex;align-items:center;justify-content:space-between;padding:25px 30px 20px;gap:14px}.page-head p{font-size:12px;color:var(--muted);margin:0}.date-control{display:flex;gap:3px;align-items:center;background:white;border:1px solid var(--line);border-radius:8px;padding:4px}.date-control input{border:0;width:142px;padding:4px}.date-control button{border:0;padding:5px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:0 30px 21px}.stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px 20px;position:relative}.stat-value{font-size:28px;letter-spacing:-1px;font-weight:650;margin:6px 0 4px}.stat small{font-size:11px;color:var(--muted)}.stat .stat-icon{position:absolute;right:16px;top:18px;color:#829572;background:#f3f6ed;border-radius:8px;padding:8px}.stat-icon svg{width:17px;height:17px}.toolbar{padding:0 30px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px}.search{position:relative;flex:1;max-width:310px}.search input{width:100%;padding-left:36px;font-size:12px}.search svg{position:absolute;left:12px;top:12px;width:15px;height:15px;color:#8b9586}.segments{display:inline-flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:8px;background:#eaf0e5}.segments button{padding:7px 12px;border:0;background:transparent;font-size:11px;color:#75836d}.segments button.active{background:white;box-shadow:0 1px 4px #172d2414;color:#38502b}.workspace{display:grid;grid-template-columns:minmax(300px,1fr) 360px;margin:0 30px 24px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:white;min-height:530px;height:calc(100vh - 343px)}.map-wrap{position:relative;min-width:0;background:#e8eedf}.map{height:100%;width:100%;z-index:1}.map-toolbar{position:absolute;top:16px;left:16px;z-index:410;background:white;padding:5px;border-radius:9px;box-shadow:0 3px 12px #23392626;display:flex;gap:3px}.map-toolbar button{padding:8px 10px;border:0;font-size:11px}.map-toolbar button.active{background:var(--soft);color:#648319}.map-note{position:absolute;bottom:26px;left:15px;z-index:410;background:#ffffffee;padding:8px 11px;border-radius:7px;box-shadow:0 3px 10px #0001;font-size:10px;max-width:85%;pointer-events:none}.map-key{position:absolute;left:15px;bottom:70px;z-index:410;display:flex;gap:12px;background:#fffffff0;border-radius:7px;padding:8px 11px;font-size:10px}.dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:#9ca596;margin-right:5px}.route-panel{border-left:1px solid var(--line);display:flex;flex-direction:column;overflow:hidden;background:#fff}.panel-head{padding:20px 19px 14px;border-bottom:1px solid var(--line)}.panel-head h3{margin:0;font-size:14px}.panel-head small{font-size:11px;color:var(--muted)}.routes-scroll{overflow-y:auto;flex:1;padding:12px}.route-card{border:1px solid var(--line);border-radius:9px;margin-bottom:10px;overflow:hidden;background:#fff}.route-card.focus{border-color:#a6bb83;box-shadow:0 0 0 1px #b6ca9444}.route-head{padding:13px;display:flex;gap:10px;align-items:flex-start;cursor:pointer}.route-swatch{width:4px;border-radius:5px;min-height:42px;flex:none}.route-info{flex:1;min-width:0}.route-info strong{font-size:12px}.route-info p{font-size:10px;color:#819078;margin:5px 0 0;display:flex;align-items:center;gap:7px}.route-info .metrics{font-size:10px;color:#899383;display:flex;gap:13px;margin-top:7px}.route-head .badge{font-size:9px;padding:3px 5px}.route-controls{padding:0 12px 10px;display:flex;gap:5px;justify-content:space-between}.route-controls button{font-size:10px;padding:5px 7px}.route-stops{border-top:1px solid var(--line);background:#fafbf7;max-height:320px;overflow:auto}.stop-row{padding:12px 10px;display:flex;gap:8px;align-items:flex-start;border-bottom:1px solid #edf0e8;font-size:11px}.stop-row.selected{background:#eff6dc}.stop-row .place{flex:1;min-width:0;cursor:pointer}.stop-row strong{font-size:11px;display:block}.stop-row small{display:block;font-size:10px;color:#87917f;margin-top:4px;line-height:1.5}.stop-row .time{font-size:10px;color:#64813a;white-space:nowrap}.stop-row .arrows{display:flex;flex-direction:column;gap:2px}.arrows button{padding:0 4px;height:16px;font-size:10px;line-height:1}.panel-footer{padding:12px 18px;border-top:1px solid var(--line);background:#fafcf7;font-size:10px;color:#899480;display:flex;justify-content:space-between}.selection-bar{position:absolute;bottom:104px;left:50%;transform:translateX(-50%);z-index:420;background:var(--dark);color:white;border-radius:10px;box-shadow:var(--shadow);padding:12px 14px;display:flex;align-items:center;gap:10px;max-width:94%;flex-wrap:wrap;font-size:12px;min-width:300px}.selection-bar select{font-size:11px;max-width:170px;padding:8px}.selection-bar button{font-size:11px;padding:8px 10px}.selection-bar .ghost{color:white}.pin{width:29px;height:29px;border-radius:50% 50% 50% 4px;transform:rotate(-45deg);border:2px solid white;box-shadow:0 2px 5px #28392a55;display:grid;place-items:center;background:var(--pin)}.pin span{transform:rotate(45deg);font-size:10px;font-weight:800;color:white}.pin.selected{border:3px solid #1d3825;outline:3px solid #b4d75d;background:#98c237!important;z-index:4}.pin.depot{border-radius:8px;background:#263f2b;width:35px;height:35px}.pin.dim{opacity:.25}.leaflet-control-attribution{font-size:9px!important}.leaflet-popup-content{font-size:12px;font-family:inherit}.leaflet-container{font-family:inherit!important}.map-warning{position:absolute;top:70px;left:15px;right:15px;z-index:410;padding:9px 12px;background:#fff2dc;border-radius:8px;font-size:11px}.content{padding:0 30px 30px}.card{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;box-shadow:0 1px 2px #00000003}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.card-grid .card h3{font-size:15px}.vehicle-icon{width:48px;height:48px;display:grid;place-items:center;background:#f0f5e4;border-radius:12px;margin-bottom:17px;color:#6d8b36}.vehicle-icon svg{width:25px;height:25px}.plate{font-size:11px;border:1px solid #e2cc75;background:#fff4c5;color:#65591f;border-radius:4px;padding:4px 7px;font-weight:700}.chips{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}.table-card{overflow:auto;background:white;border:1px solid var(--line);border-radius:10px}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;font-weight:600;color:#7c8874;background:#f9fbf5;padding:14px 16px;font-size:10px;text-transform:uppercase;letter-spacing:.7px;white-space:nowrap}td{padding:14px 16px;border-top:1px solid var(--line);vertical-align:middle}td small{display:block;color:var(--muted);font-size:10px;margin-top:4px}tbody tr:hover{background:#fbfcf8}.empty{text-align:center;padding:45px 20px;color:var(--muted);line-height:1.7}.empty svg{width:35px;height:35px;display:block;margin:0 auto 16px;color:#9eaf89}.review-card{border-left:4px solid #d4a35d;margin-bottom:15px}.review-card .dates{display:flex;gap:30px;font-size:12px;margin:16px 0}.review-card .dates small{display:block;margin-bottom:4px;color:var(--muted)}.notice{padding:12px 16px;border-radius:8px;background:#f4f7ec;color:#6a7b51;font-size:12px;line-height:1.6}.notice.warning{background:#fff2de;color:#997039}.notice.error{background:#fcebe5;color:#a34d3d}.notice p:last-child{margin-bottom:0}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-art{background:var(--dark);padding:60px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;color:white}.login-art h1{font-size:48px;line-height:1.15;max-width:460px;margin:80px 0 20px}.login-art p{color:#9fb09e;max-width:370px}.login-art .brand{padding:0}.login-art:after{content:'';position:absolute;width:520px;height:520px;border:1px solid #94c11f22;border-radius:50%;right:-200px;bottom:-180px;box-shadow:0 0 0 65px #94c11f08,0 0 0 130px #94c11f06}.login-form{display:grid;place-content:center;padding:40px}.login-form form{width:350px;max-width:85vw}.login-form h2{font-size:28px}.field{display:grid;gap:7px;font-size:12px}.field>span{font-weight:600}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid .full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}dialog{border:1px solid var(--line);border-radius:14px;box-shadow:0 25px 90px #0b261e44;padding:26px;width:600px;max-width:94vw;max-height:90vh;color:var(--ink)}dialog.wide{width:800px}dialog::backdrop{background:#14271e66;backdrop-filter:blur(2px)}dialog .dialog-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}dialog .dialog-head h2{margin-bottom:5px}dialog .dialog-head p{font-size:12px;color:var(--muted);margin-bottom:0}.drawer{position:fixed;right:0;top:0;bottom:0;width:460px;max-width:100vw;z-index:1000;background:white;box-shadow:-10px 0 70px #10291633;overflow:auto;padding:25px}.drawer h2{margin-bottom:6px}.order-card{padding:15px;border:1px solid var(--line);border-radius:9px;margin:12px 0}.order-card p{font-size:12px;margin:8px 0}.package{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;padding:8px 0;border-bottom:1px solid #edf0e8}.package code{font-size:11px}.photos{display:flex;gap:10px;flex-wrap:wrap}.photos img{width:90px;height:70px;object-fit:cover;border-radius:6px}.timeline{display:grid;gap:10px}.driver{max-width:800px;margin:auto;padding:20px}.driver-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.driver .card{margin-bottom:15px}.driver .scan{position:sticky;top:0;z-index:500;background:var(--bg);padding:8px 0 14px}.driver .scan form{display:flex;gap:7px}.driver .scan input{flex:1;min-width:0}.driver-stop{display:flex;gap:12px}.step-number{width:30px;height:30px;border-radius:50%;background:#f0f5e6;display:grid;place-items:center;font-weight:700;flex:none}.driver .status-banner{font-size:11px;padding:10px 12px;background:#eaf3dd;border-radius:7px;margin-bottom:16px}.track{max-width:650px;margin:40px auto;padding:0 20px}.track .brand{color:var(--ink);padding:0 0 25px}.track .brand strong{color:var(--ink)}.track .card{margin-bottom:18px}.track .status{display:flex;gap:10px;margin:20px 0}.track .status>div{flex:1;border-top:3px solid #e1e8d8;padding-top:10px;font-size:11px}.track .status>div.done{border-color:#94c11f;color:#698e21}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%) translateY(100px);background:var(--dark);color:white;padding:14px 22px;border-radius:10px;box-shadow:var(--shadow);z-index:2500;max-width:90vw;transition:transform .2s;font-size:13px}#toast.show{transform:translateX(-50%) translateY(0)}#toast.error{background:#954c3a}.boot{display:grid;place-content:center;min-height:100vh;text-align:center;justify-items:center;gap:16px}.boot p{color:var(--muted)}.loading{opacity:.65;pointer-events:none}.count-circle{background:#f0f4e9;border-radius:50%;width:23px;height:23px;display:inline-grid;place-items:center;font-size:10px}.error-text{font-size:12px;color:#a24634;margin-top:12px;line-height:1.6}.dragging{opacity:.4}.section-title{display:flex;align-items:center;justify-content:space-between;margin:25px 0 15px}.checkbox-label{display:flex;align-items:center;gap:8px;font-size:12px}.compact{font-size:11px}.map-fallback{padding:55px;line-height:1.8}.photo-upload{display:block;margin-top:12px}.connection{font-size:11px}.connect-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.message-preview{white-space:pre-wrap;line-height:1.7;background:#f6f8f1;padding:18px;border-radius:10px;font-size:13px;margin:15px 0}.recipient-list{max-height:180px;overflow:auto;font-size:12px;line-height:1.9}.mobile-brand{display:none}svg:not(.leaflet-zoom-animated){width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}
@media(min-width:1650px){.workspace{grid-template-columns:1fr 400px}.sidebar{width:235px}.shell{grid-template-columns:235px 1fr}.page-head,.toolbar,.content{padding-left:38px;padding-right:38px}.stats,.workspace{margin-left:38px;margin-right:38px}}
@media(max-width:1180px){.sidebar{width:180px;padding:22px 10px}.shell{grid-template-columns:180px 1fr}.brand{padding-left:4px}.brand strong{font-size:18px}.page-head,.content,.toolbar{padding-left:18px;padding-right:18px}.stats,.workspace{margin-left:18px;margin-right:18px}.workspace{grid-template-columns:1fr 310px}.stat{padding:13px}.stat-icon{display:none}.toolbar .search{max-width:230px}.card-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.sidebar{width:68px;padding:20px 8px}.shell{grid-template-columns:68px 1fr}.sidebar .brand{padding:0 5px 25px}.brand .wordmark,.nav-label,.nav button span,.nav .badge,.depot-card,.account>div,.account .logout{display:none}.nav button{justify-content:center;padding:14px}.account{justify-content:center;padding:15px 0}.workspace{grid-template-columns:1fr 280px}.page-head{flex-wrap:wrap}.stats{gap:8px}.stat-value{font-size:24px}.stat small{font-size:9px}.toolbar{flex-wrap:wrap}.topbar{padding:0 18px}.selection-bar{left:10px;transform:none;min-width:0;max-width:calc(100% - 20px)}.login-art{padding:30px}.login-art h1{font-size:36px}}
@media(max-width:650px){.sidebar{display:none}.shell{display:block}.main{width:100%}.topbar{height:45px}.topbar .crumb{font-size:10px}.topbar .connection{font-size:9px}.page-head{padding:20px 15px 15px}h1{font-size:24px}.stats{grid-template-columns:1fr 1fr;margin:0 15px 18px}.stat{padding:12px 15px}.stat-value{margin:4px 0;font-size:25px}.toolbar{padding:0 15px 12px}.toolbar .search{max-width:none;width:100%}.workspace{display:flex;flex-direction:column;height:auto;margin:0 15px 20px;min-height:0}.map-wrap{height:410px}.route-panel{border-left:0;max-height:600px}.map-toolbar button{font-size:10px;padding:7px}.content{padding:0 15px 20px}.card-grid,.connect-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.login{grid-template-columns:1fr}.login-art{display:none}.login-form{min-height:100vh}.mobile-brand{display:flex}.page-head .flex{flex-wrap:wrap}.toolbar .segments button{padding:6px 10px}.driver{padding:15px}.drawer{width:100%}.review-card .dates{gap:15px;flex-wrap:wrap}.mobile-nav{display:flex;overflow:auto;gap:5px;padding:10px 15px;background:white;border-bottom:1px solid var(--line)}.mobile-nav button{font-size:11px;white-space:nowrap}.mobile-nav .active{background:var(--soft)}}
@media(min-width:651px){.mobile-nav{display:none}}

/* Planning 0.2: quieter map, a single visible route, explicit selection and full addresses. */
.quiet-map .leaflet-tile-pane{filter:saturate(.35) contrast(.86) brightness(1.055)}
.map-display{position:absolute;top:16px;right:16px;display:flex;gap:6px;z-index:410}
.map-display button{background:#fffffff5;box-shadow:0 2px 10px #1736251a;font-size:11px}
.map-focus{position:absolute;top:69px;left:16px;z-index:410;background:#fffffff5;border:1px solid #dce5d4;border-radius:8px;padding:9px 12px;display:flex;align-items:center;gap:9px;box-shadow:0 2px 10px #17362510;max-width:calc(100% - 32px);font-size:11px;flex-wrap:wrap}
.map-focus strong{font-size:12px}.map-focus>span:not(.dot){color:#6f7c68}.map-focus .dot{margin:0;width:10px;height:10px}
.route-visibility{padding:9px 13px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:9px;background:#fafcf6;font-size:10px;color:#7c8971}
.route-head{align-items:center}.route-choice{width:16px;height:16px;border:1.5px solid #bcc8b4;border-radius:50%;display:inline-grid;place-items:center;flex:none}
.route-choice.chosen{border-color:#729b2c}.route-choice.chosen:after{content:'';width:8px;height:8px;background:#729b2c;border-radius:50%}
.route-head:focus-visible{outline:2px solid #729b2c;outline-offset:-3px}.route-card.focus{border-color:#789b44;background:#fbfdf6}
.pin{width:26px;height:26px;border-radius:50%;transform:none;background:white;border:2px solid var(--pin);box-shadow:0 1px 5px #12271040;color:var(--pin)}
.pin span{transform:none;font-size:10px;color:var(--pin);font-weight:800}.pin.selected{background:#e7f3bd!important;border-color:#587d1e;outline:3px solid #aacb62aa}
.pin.depot{width:32px;height:32px;border-radius:8px;background:#263f2b;border:2px solid white}.pin.depot span{color:white;font-size:13px}
.map-key{bottom:61px;box-shadow:0 2px 8px #0001}.map-note{bottom:23px;max-width:calc(100% - 110px);font-size:10px}
.shipment-facts{display:grid;gap:12px;margin:14px 0;padding:13px;background:#f7f9f3;border:1px solid #e6ebde;border-radius:8px;font-size:12px}
.shipment-facts dt{font-size:10px;letter-spacing:.35px;color:#7a886e;margin-bottom:5px}.shipment-facts dd{margin:0;line-height:1.6;overflow-wrap:anywhere}.shipment-facts dd>span,.shipment-facts dd>strong{display:block}.shipment-facts .client-fact dd{font-weight:700;color:#344f22}
.address-block{display:grid;gap:4px;line-height:1.45;min-width:135px;max-width:240px;overflow-wrap:anywhere}.address-block strong{font-size:11px}.address-block span{font-size:11px}.orders-table td{vertical-align:top}
.shell.map-expanded{display:block}.shell.map-expanded .sidebar,.shell.map-expanded .topbar,.shell.map-expanded .mobile-nav,.shell.map-expanded #page>.page-head,.shell.map-expanded #page>.stats,.shell.map-expanded #page>.toolbar{display:none}
.shell.map-expanded .workspace{position:fixed;inset:0;margin:0;height:100dvh;min-height:0;border:0;border-radius:0;z-index:700;grid-template-columns:minmax(0,1fr) 340px}
.shell.map-expanded .map-wrap{height:100%}.shell.map-expanded .route-panel{max-height:100dvh}.shell.map-expanded .map{height:100%}
@media(min-width:1100px){.workspace{min-height:560px;height:calc(100dvh - 325px)}.page-head{padding-top:20px;padding-bottom:16px}.stats{margin-bottom:15px}.stat{padding-top:12px;padding-bottom:12px}.stat-value{font-size:25px}}
@media(max-width:1100px){.map-display{top:63px}.map-focus{top:105px}.map-toolbar{max-width:calc(100% - 32px);flex-wrap:wrap}.map-toolbar button{padding:7px}}
@media(max-width:650px){.map-wrap{height:510px}.map-toolbar{left:10px;top:10px;gap:1px}.map-toolbar button{font-size:10px;padding:6px}.map-display{top:58px;right:10px}.map-focus{top:98px;left:10px;max-width:calc(100% - 20px)}.map-focus>span:not(.dot){display:none}.map-key{font-size:9px;gap:6px;left:10px}.map-note{left:10px;max-width:calc(100% - 65px)}.shell.map-expanded .workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(270px,1fr) 240px}.shell.map-expanded .route-panel{max-height:240px}.shell.map-expanded .map-wrap{height:100%}.route-visibility{flex-wrap:wrap}}

/* Planning 0.3: compact route list, multiple route checkboxes and planned end times. */
.quiet-map .leaflet-tile-pane{filter:saturate(.67) contrast(.87) brightness(1.065)}
.route-panel>.panel-head{background:#142f43;color:white;padding:14px 15px}.route-panel>.panel-head h3{color:white}.route-panel>.panel-head small{color:#bdcbd5}.route-panel>.panel-head button{color:white}.route-panel>.panel-head .count-circle{background:#ffffff20;color:white}
.routes-scroll{padding:0}.route-card{border:0;border-bottom:1px solid #e2e6e9;border-radius:0;margin:0}.route-card.focus{box-shadow:none;background:#f5f8ef;border-left:3px solid #94c11f}.route-card:not(.visible-route){opacity:.64}.route-card:not(.visible-route):hover{opacity:1}.route-card.empty-route{background:#faf8f1}.route-card.empty-route .route-swatch{background:#cbbd9a!important}
.route-head{padding:12px 10px 8px;gap:7px;align-items:center;cursor:default}.route-swatch{min-height:36px;width:3px}.route-checkbox{width:15px;height:15px;flex:none;margin:0 3px 0 0}.route-name-button{padding:0;display:block;flex:1;min-width:0;border:0;background:transparent;text-align:left;box-shadow:none}.route-name-button:hover{background:transparent}.route-info{display:block}.route-info strong{font-size:12px;color:#223344}.route-driver{display:block;color:#72808b;font-size:10px;margin:4px 0;line-height:1.4}.route-info .metrics{font-size:10px;gap:8px;flex-wrap:wrap}.route-end{text-align:right;white-space:nowrap;min-width:70px}.route-end small{font-size:7px;letter-spacing:.7px;color:#78878c;display:block;margin-bottom:3px}.route-end strong{font-size:15px;color:#2d4e38;display:block;font-variant-numeric:tabular-nums}.route-end span{font-size:9px;color:#7a868c;display:block;margin-top:4px}.route-end.late strong{color:#b1663f}.empty-route .route-end strong{color:#b19f7a}.empty-label{color:#aa8245;font-weight:650}.route-expand{padding:2px!important;min-width:19px!important}.route-expand svg{width:13px;height:13px}
.route-controls{padding:0 10px 10px 34px;gap:4px;justify-content:flex-start;flex-wrap:wrap}.route-controls button{padding:4px 6px;font-size:9px}.route-controls button svg{width:12px;height:12px}.route-controls .badge{font-size:8px;padding:3px 5px;margin-right:auto}.route-visibility{justify-content:space-between;background:white;padding:9px 12px}.route-visibility .checkbox-label{font-size:10px}.unplanned-route{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid #e2e6e9;background:#f6f7f3}.unplanned-route button{display:block;text-align:left;padding:0;border:0}.unplanned-route strong{font-size:11px}.unplanned-route small{display:block;font-size:10px;color:#7d8778;margin-top:4px}
.pin{width:25px;height:25px;border-width:1.7px}.pin span{font-size:9px}.map-focus{font-size:10px;padding:7px 10px;gap:8px}.map-focus strong{font-size:11px}.map-note{background:#fffffff2}
@media(min-width:1100px){.workspace{grid-template-columns:minmax(300px,1fr) 345px}.shell.map-expanded .workspace{grid-template-columns:minmax(0,1fr) 345px}.route-card .route-stops{max-height:280px}}
@media(max-width:1100px){.route-head{gap:4px;padding-left:8px;padding-right:6px}.route-end{min-width:57px}.route-end strong{font-size:13px}.route-end small{font-size:6px}.route-info .metrics{gap:5px}.route-driver{font-size:9px}.route-controls{padding-left:25px}}

 .visit-hover{font:12px/1.35 Arial,sans-serif;color:#123047;max-height:min(300px,var(--hover-max-height,50vh));overflow:auto}.visit-hover dl{display:grid;grid-template-columns:88px minmax(0,1fr);gap:4px 10px;margin:2px 0 9px}.visit-hover dt{font-weight:700;text-align:right}.visit-hover dd{margin:0;overflow-wrap:anywhere}.visit-hover small{font-size:10px;color:#66756d}.hover-instructions{max-height:54px;overflow:auto}.hover-refs{max-height:32px;overflow:auto}.hover-attention{color:#ce2b26}.visit-hover .button,.visit-hover button.small{font-size:11px;padding:5px 8px;border-radius:4px}.visit-hover .button{text-decoration:none;background:#268be8;color:white}.visit-hover-popup .leaflet-popup-content{margin:14px 14px 10px}.visit-hover-popup .leaflet-popup-content-wrapper{border-radius:7px}.visit-hover-popup.hover-shifted .leaflet-popup-tip-container{display:none}@media(max-width:480px){.visit-hover dl{grid-template-columns:76px minmax(0,1fr);gap:4px 7px}.visit-hover-popup .leaflet-popup-content{margin:14px 10px 9px}}

/* Keep every legend item above the note, including narrow and expanded maps. */
.map-footer{position:absolute;left:12px;right:65px;bottom:24px;z-index:410;display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-height:38%;overflow:auto}.map-footer .map-key,.map-footer .map-note{position:static;max-width:100%;margin:0;flex:none}.map-footer .map-key{display:flex;flex-wrap:wrap;gap:5px 12px;padding:7px 10px}.map-footer .map-key>span{display:inline-flex;align-items:center;gap:5px;white-space:normal}.map-footer .map-key .dot{flex:none}.map-footer .map-note{font-size:10px;line-height:1.35;padding:6px 10px}.quiet-map .leaflet-tile-pane{filter:saturate(.35) contrast(.82) brightness(1.09)}.quiet-map .vector-basemap .leaflet-tile-pane{filter:none}.basemap-warning{position:absolute;left:12px;top:145px;z-index:410;max-width:calc(100% - 24px);font-size:10px;background:#fff8e8;padding:5px 8px;border-radius:5px}.leaflet-maplibre-gl{pointer-events:none}@media(max-width:650px){.map-footer{left:10px;right:56px;bottom:22px;gap:4px}.map-footer .map-key{font-size:10px;gap:5px 9px}}

.basemap-notice{position:absolute;left:12px;top:145px;z-index:420;max-width:min(520px,calc(100% - 24px));display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:9px 11px;background:#fff5dc;color:#72521d;border:1px solid #ddbe79;border-radius:6px;font-size:12px;box-shadow:0 2px 10px #0002}.basemap-notice button{flex:none}.leaflet-gl-layer{pointer-events:none}.order-card>.flex.between{gap:8px;flex-wrap:wrap}.order-card>.flex.between>.badge{font-size:11px;white-space:normal;line-height:1.4}
