@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f6f7f3;--paper:#fff;--ink:#23372d;--muted:#778079;--line:#e4e8df;--forest:#263e31;--lime:#d4ec7f;--amber:#ac701e;--red:#a7413e;--radius:16px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'DM Sans',system-ui,sans-serif}h1,h2,h3,.brand{font-family:Manrope,system-ui,sans-serif}h1{font-size:34px;letter-spacing:-1.3px;line-height:1.2;margin:10px 0}h2{font-size:20px;letter-spacing:-.6px;margin:0 0 8px}h3{font-size:15px;margin:0 0 6px}p{line-height:1.6;color:var(--muted);margin:8px 0 16px}a{color:var(--forest);text-decoration:none}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--forest);color:#fff;padding:12px 18px;border:1px solid var(--forest);border-radius:9px;font:600 13px 'DM Sans',sans-serif;cursor:pointer;white-space:nowrap;text-decoration:none;min-height:44px}button:hover,.button:hover{filter:brightness(1.1)}button:disabled{opacity:.45;cursor:not-allowed}.secondary{background:var(--paper);border:1px solid var(--line);color:var(--ink)}input,select,textarea{font:inherit;padding:11px 12px;border:1px solid #dce2d8;border-radius:8px;background:white;color:var(--ink);max-width:100%;min-height:44px}input:focus,select:focus,textarea:focus{outline:2px solid #bdd46d;outline-offset:2px}button:focus-visible,a:focus-visible{outline:3px solid #a5bd50;outline-offset:3px}label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;margin:12px 0}small{font-size:11px}.muted{color:var(--muted)}.amber{color:var(--amber)}.error{color:var(--red)}.app-shell{display:flex;min-height:100vh}.sidebar{width:230px;background:var(--forest);color:#a8b5aa;position:fixed;inset:0 auto 0 0;padding:30px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:9px;font-size:22px;font-weight:800;color:var(--lime);letter-spacing:-.8px}.sidebar .brand{color:white;margin:0 6px 56px}.sidebar-caption{font-size:9px;letter-spacing:1.8px;margin:0 12px 14px;color:#97a899}.sidebar nav{display:grid;gap:7px}.sidebar nav a{color:#bac7be;display:flex;gap:12px;align-items:center;padding:14px;border-radius:9px;font-size:15px}.sidebar nav a.active{background:var(--lime);color:var(--forest);font-weight:700}.sidebar-bottom{margin-top:auto;font-size:11px;line-height:1.7;padding:0 8px}.sidebar-bottom a{display:block;color:#d7e2d9;margin-top:20px}.status-dot{display:inline-block;width:7px;height:7px;background:#93b960;border-radius:50%;margin-right:7px}.workspace{margin-left:230px;width:calc(100% - 230px)}.topbar{height:72px;background:#ffffffa8;border-bottom:1px solid var(--line);padding:0 38px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.account-pill{color:var(--ink);border:1px solid var(--line);padding:8px 12px;background:#fff;border-radius:20px;font-size:11px}.page-content{max-width:1530px;padding:36px 38px 60px;margin:auto}.heading{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:24px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.6px;color:#7d8775}.heading p{font-size:13px;margin-bottom:0}.toolbar{display:flex;align-items:center;gap:18px;margin:22px 0}.toolbar label{flex-direction:row;align-items:center;margin:0;gap:10px}.toolbar>button:last-child{margin-left:auto}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:26px 0 34px}.metrics>div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px}.metrics span{display:block;font-size:12px;color:var(--muted)}.metrics strong{font-family:Manrope;font-size:32px;display:block;margin:9px 0;letter-spacing:-1px}.metrics strong em{font:400 15px 'DM Sans';color:#a0a69c}.metrics small{color:var(--muted)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:30px 0 18px}.section-heading p{margin:0;font-size:12px}.actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}.section-heading .actions{margin:0}.panel{padding:25px;border:1px solid var(--line);background:var(--paper);border-radius:var(--radius);margin-bottom:20px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.step-label{display:block;font-size:10px;color:#879078;letter-spacing:1.5px;font-weight:700;margin-bottom:18px}.upload-area{border:1px dashed #bdc7b4;border-radius:12px;background:#f8faf3;padding:35px 20px;display:flex;flex-direction:column;gap:20px;align-items:center;margin:25px 0}.upload-area>span{font-size:30px;color:#6b8054}.upload-area input{border:0;font-size:12px;background:transparent;max-width:100%}.route-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:18px}.route-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px}.route-header{display:flex;align-items:center;gap:10px;margin-bottom:18px}.route-header h3{margin:0}.route-header div>span{font-size:11px;color:var(--muted)}.avatar{width:36px;height:36px;background:#edf1e7;color:#5c7450;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700}.icon-button{margin-left:auto;padding:7px 11px;background:#f3f5ec;border-color:#e6eadc;color:var(--forest)}.route-start{font-size:10px;color:#87917f;border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:7px}.stop-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #f0f2eb}.stop-number{font-size:10px;background:#f1f4e9;border:1px solid #e0e6d4;border-radius:50%;min-width:23px;height:23px;display:grid;place-items:center;color:#687758}.stop-row>div{flex:1;min-width:0}.stop-row strong{display:block;font-size:11px}.stop-row div>span{display:block;font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}.eta{font-size:11px;text-align:right;font-weight:600}.eta small{display:block;font-size:9px;margin-top:4px}.route-empty{padding:18px 0;font-size:12px;min-height:80px}.route-footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:14px;margin-top:15px;font-size:9px;color:var(--muted)}.empty-state{border:1px dashed #cdd7c2;border-radius:16px;background:#edf2e2;padding:42px;text-align:center}.empty-state h2{font-size:22px}.empty-symbol{font-size:30px;color:#718859;margin-bottom:12px}.empty-inline{border:1px solid var(--line);background:#fff;border-radius:12px;padding:30px}.empty-inline p{font-size:12px}.empty-inline a{font-weight:600;font-size:12px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#85907e;background:#fafbf7;padding:16px;white-space:nowrap}td{padding:16px;border-top:1px solid var(--line);vertical-align:top}td strong{display:block}td small{display:block;margin-top:5px;color:var(--muted)}td select{font-size:11px;max-width:160px}td details{margin-top:8px;font-size:10px}summary{cursor:pointer;color:#6b7c5e}.badge{font-size:10px;border-radius:20px;padding:5px 9px;background:#f1f3eb;color:#7a826d;display:inline-block;white-space:nowrap}.badge.green{background:#e8f2e4;color:#4f7644}.badge.red{background:#faeae6;color:#aa5950}.notice{padding:18px 22px;border-radius:12px;background:#eaf1dd;border:1px solid #d3dfbe;margin:16px 0}.notice.error{background:#faece8;border-color:#ecd1ca}.notice p{color:inherit;font-size:12px}.job-status{display:flex;align-items:center;gap:12px;padding:16px 20px;background:#eef2e6;border:1px solid #dce5d1;border-radius:10px;margin-bottom:18px;font-size:12px;flex-wrap:wrap}.search{min-width:230px}.candidate{display:block;white-space:normal;text-align:left;margin:8px 0;width:100%}.address-panel{display:grid;grid-template-columns:1fr 1fr;gap:25px}.checkbox-label{flex-direction:row;align-items:center}.checkbox-label input{min-height:0;width:18px;height:18px}.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 20% 0,#e0e9c9,transparent 55%),var(--bg)}.login-card{width:420px;max-width:calc(100% - 32px);background:#fff;border:1px solid var(--line);border-radius:20px;padding:40px;box-shadow:0 20px 70px #23372d0a}.login-card .brand{color:var(--forest);margin-bottom:30px}.login-card h1{font-size:27px}.login-card button{width:100%;margin-top:15px}#blazor-error-ui{display:none;position:fixed;bottom:0;left:0;right:0;padding:16px;background:#fff4d4;z-index:1000}.valid.modified:not([type=checkbox]){outline:1px solid #76915c}.validation-message{color:var(--red)}
.driver-page{max-width:580px;margin:auto;padding:20px 18px 60px}.driver-header{display:flex;align-items:center;justify-content:space-between;margin:8px 0 28px}.driver-header .brand{font-size:19px;color:var(--forest)}.driver-day{display:flex;align-items:center;gap:10px;justify-content:space-between}.driver-page h1{font-size:28px}.driver-summary{background:var(--forest);color:white;border-radius:16px;padding:22px;margin:20px 0}.driver-summary p{color:#b9c9bd}.driver-summary strong{font-size:28px;font-family:Manrope}.driver-stop{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;margin:15px 0}.driver-stop.next{border:2px solid #b1c77d}.driver-stop.done{opacity:.75}.driver-stop h2{font-size:20px;margin-top:12px}.driver-stop .address{color:var(--ink);font-size:16px;line-height:1.5}.driver-stop .actions>*{flex:1}.driver-stop .delivered-button{background:#e5efd5;color:#3d5d31;border-color:#cbdcaa}.driver-stop textarea{width:100%;min-height:75px}.driver-stop details{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}.navigation-choice{width:100%;margin:10px 0}.driver-stop .eta-info{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:12px 0}.offline-banner{background:#ffedcc;color:#865e22;padding:12px;border-radius:10px;margin:12px 0}.notes{white-space:pre-wrap}.driver-page .logout{font-size:11px}.driver-page progress{width:100%;height:5px;accent-color:var(--lime)}
@media(min-width:1500px){.route-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,1fr)}.page-content{padding:28px}.section-heading{align-items:flex-start;flex-direction:column}.heading{align-items:flex-start}h1{font-size:29px}.toolbar{flex-wrap:wrap}.two-columns{grid-template-columns:1fr}}@media(max-width:760px){.sidebar{position:static;width:100%;padding:18px;gap:15px}.sidebar .brand{margin:0;font-size:20px}.sidebar-caption,.sidebar-bottom{display:none}.sidebar nav{display:flex;flex-wrap:wrap;gap:5px}.sidebar nav a{padding:9px;font-size:12px}.app-shell{display:block}.workspace{margin:0;width:100%}.topbar{height:48px;padding:0 20px}.page-content{padding:24px 18px}.heading{flex-direction:column;gap:16px}.metrics{gap:10px}.metrics>div{padding:16px}.metrics strong{font-size:26px}.toolbar .muted{display:none}.toolbar label{flex-direction:column;align-items:flex-start}.route-grid{grid-template-columns:1fr}.address-panel{grid-template-columns:1fr}.empty-state{padding:30px 20px}.search{width:100%;min-width:0}.panel{padding:20px}.actions button,.actions .button{white-space:normal}.section-heading .actions{width:100%}}

.driver-route-overview{margin:20px 0}.driver-route-overview summary{cursor:pointer;font-weight:600}#driver-route-map{height:420px;max-height:65vh;border-radius:12px;margin-top:12px;z-index:0}.route-marker{display:flex;align-items:center;justify-content:center;border:2px solid white;border-radius:50%;background:#345d91;color:white;font-weight:700;box-shadow:0 2px 5px #0004}.route-marker.route-delivered{background:#238449}.route-marker.route-failed{background:#c34242}.route-marker.route-start{background:#293e32}.route-legend{font-size:13px;color:#345d91}.route-legend .route-delivered{color:#238449}.route-legend .route-failed{color:#c34242}

.route-next{outline:3px solid #e9aa35;outline-offset:2px}.route-last{outline:2px solid #238449;outline-offset:2px}.route-position{display:flex;align-items:center;justify-content:center;color:#176fed;background:white;border:3px solid #176fed;border-radius:50%;box-shadow:0 0 0 5px #176fed30}

/* Compound selectors preserve centering when Leaflet's stylesheet loads later. */
.leaflet-marker-icon.route-marker{display:grid;place-items:center;box-sizing:border-box;padding:0;font-family:Manrope,Arial,sans-serif;font-size:13px;line-height:1;font-weight:800;border:2px solid #fff;box-shadow:0 2px 8px #0f172a40}
.route-marker-number{display:block;line-height:1;font-variant-numeric:tabular-nums}
.leaflet-marker-icon.route-last{border-radius:9px;background:#238449;outline:2px solid #238449;outline-offset:2px;box-shadow:0 0 0 6px #23844925,0 3px 9px #0f172a35}
.route-last::after{content:'✓';position:absolute;top:-6px;right:-6px;width:15px;height:15px;display:grid;place-items:center;box-sizing:border-box;border:1px solid #238449;border-radius:50%;background:#fff;color:#166534;font-size:11px;font-weight:800;line-height:1}
.leaflet-marker-icon.route-position{display:grid;place-items:center;box-sizing:border-box;padding:0;line-height:1}
.route-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;line-height:1.5;color:#334155}
.route-legend-item{display:inline-flex;align-items:center;gap:6px}
.route-legend-symbol{display:inline-block;width:11px;height:11px;flex:none;border-radius:50%;background:#345d91}
.route-legend-symbol.delivered{background:#238449}.route-legend-symbol.failed{background:#c34242}
.route-legend-symbol.last{border-radius:3px;background:#238449;color:#fff;font-size:9px;text-align:center;line-height:11px}
.route-legend-symbol.next{outline:2px solid #e9aa35;outline-offset:2px}

.route-map-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.route-map-actions button{flex:1;min-width:140px;font-size:12px;white-space:normal}.driver-finished{margin:20px 0;padding:24px;border:2px solid #238449;border-radius:18px;background:#eaf7ee;color:#166534;text-align:center}.driver-finished>span{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 12px;border-radius:50%;background:#238449;color:white;font-size:28px}.driver-finished h2{font-size:24px;margin:0 0 10px}.driver-finished p{margin:0 0 12px}

button.table-sort{background:transparent;border:0;border-radius:0;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:left;padding:3px 0;min-height:30px;white-space:nowrap;width:100%}button.table-sort:focus-visible{outline:2px solid #345d91;outline-offset:3px}.table-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:12px 0 18px}.table-filters label{min-width:140px;flex:1}.table-filters input,.table-filters select{width:100%}.table-filters>span{color:#526256;font-size:13px;padding:8px 0}@media(max-width:760px){.table-filters label{min-width:calc(50% - 12px)}.table-filters>span{width:100%}}

.planning-steps{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.planning-steps .current{box-shadow:0 0 0 3px #bae6fd}.wizard-status{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0}.preview-stop span{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:2px solid white;border-radius:50%;background:#0284c7;color:white;font-weight:700;box-sizing:border-box;box-shadow:0 2px 6px #0003}.leaflet-div-icon.preview-stop{background:transparent;border:0}
