:root{--navy:#101d30;--navy2:#1b2d46;--ink:#1b2b41;--muted:#74839a;--line:#e4e9ef;--bg:#f5f7fa;--white:#fff;--blue:#245be9;--blue-hover:#1f4bcc;--aqua:#13b8ad;--red:#cf3d4c;--amber:#e3a03c;--radius:13px;--shadow:0 2px 12px rgba(24,44,69,.035)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font:14px/1.52 Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--blue)}h1,h2,h3,p{margin-top:0}h1{font-size:31px;letter-spacing:-.95px;margin-bottom:7px;font-weight:760}h2{font-size:19px;letter-spacing:-.35px;margin:0}h3{font-size:15px;letter-spacing:-.15px;margin:0}p{color:var(--muted);margin-bottom:0}small{font-size:12px}.muted,.soft-hint{color:var(--muted)}.soft-hint{font-size:12px}.eyebrow{text-transform:uppercase;letter-spacing:1.7px;font-size:10px;font-weight:800;color:#6591c2;margin-bottom:6px}
.layout{display:flex;min-height:100vh}.sidebar{width:248px;min-width:248px;background:var(--navy);color:#f8fcff;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh;overflow:auto;z-index:15}.brand{display:flex;gap:11px;align-items:center;padding:30px 23px 34px}.brand-logo{width:39px;height:39px;border-radius:11px;background:#d9f5ee;color:#126e67;font-weight:900;font-size:17px;display:grid;place-items:center;letter-spacing:-1px}.brand strong{display:block;font-size:16px;letter-spacing:-.2px}.brand span{display:block;color:#8193ad;font-size:10px;margin-top:3px}.side-caption{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#627591;margin:0 25px 13px}.nav{padding:0 11px}.nav-item{display:flex;align-items:center;gap:13px;color:#b9c8d9;width:100%;padding:12px 14px;border:0;text-align:left;background:transparent;font-weight:560;border-radius:9px;margin:4px 0}.nav-item:hover{background:#1f324c;color:white}.nav-item.active{background:#263c56;color:#fff;box-shadow:inset 3px 0 0 #42dbc3}.nav-icon{font-size:20px;opacity:.93;width:19px;text-align:center;line-height:1}.side-bottom{margin-top:auto;padding:18px}.side-tip{background:#1a2c44;border:1px solid #2c4059;padding:15px;border-radius:12px}.side-tip strong{font-size:12px}.side-tip p{color:#849bb7;font-size:11px;line-height:1.5;margin-top:5px}.sidebar-version{text-align:center;color:#647891;font-size:10px;margin-top:14px}
.app-shell{flex:1;min-width:0}.topbar{height:69px;border-bottom:1px solid var(--line);background:white;display:flex;justify-content:space-between;align-items:center;padding:0 35px;gap:12px}.breadcrumbs{color:#7d8da2}.breadcrumbs span{color:#c1cbd5;margin:0 11px}.breadcrumbs b{color:var(--ink);font-weight:650}.topbar-right,.topbar-leading{display:flex;align-items:center;gap:23px}.sync-dot{display:flex;align-items:center;gap:8px;font-size:12px;color:#477b69}.sync-dot>span:first-child{width:7px;height:7px;background:#26b589;border-radius:50%;box-shadow:0 0 0 4px #e4f8ef}.topbar-clock{color:var(--muted);font-size:12px}.top-logout{color:#71819b;border:0;background:none;font-weight:600;font-size:12px}.hamburger{display:none;background:none;border:0;font-size:23px}.main{padding:36px;max-width:1650px;margin:auto}.view{display:none}.view.visible{display:block}.page-intro{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:28px}.page-intro p{font-size:13px}.page-intro.compact{margin-bottom:26px}.spark{color:#32bba5;font-size:20px;vertical-align:4px}.intro-actions{display:flex;gap:9px;align-items:center}.btn{border:1px solid #dbe3ed;border-radius:9px;color:#374a63;background:white;padding:9px 14px;font-size:12px;font-weight:730;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:37px}.btn:hover{background:#f3f6fa}.btn.primary{color:white;border-color:var(--blue);background:var(--blue)}.btn.primary:hover{background:var(--blue-hover)}.btn.ghost{background:#fff}.btn.tiny{padding:6px 9px;min-height:30px;font-size:11px}.btn.block{width:100%;justify-content:space-between}.btn.danger-ghost{background:#fff;color:#b82936;border:1px solid #f2d6da}.link-button{border:0;background:none;padding:0;color:var(--blue);font-size:12px;font-weight:750}.link-button:hover{text-decoration:underline}.banner{border-radius:10px;padding:12px 16px;margin-bottom:18px;font-size:12px;line-height:1.5}.banner strong{color:inherit}.banner.amber{background:#fff7e5;border:1px solid #ffdf98;color:#74501d}.banner.red{background:#fff1f1;border:1px solid #f4c9cc;color:#992f3e}.banner.neutral{background:#edf4fc;border:1px solid #ccdcf0;color:#476482}.banner.small{margin:4px 0 0;padding:10px 12px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:33px}.stat-card{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:var(--radius);padding:21px 22px;display:flex;align-items:flex-start;justify-content:space-between;min-height:123px}.stat-card .stat-label{color:#73829a;font-size:12px;font-weight:550;margin-bottom:7px}.stat-card .stat-value{font-size:32px;letter-spacing:-1px;font-weight:780;line-height:1.2}.stat-card .stat-sub{color:#95a1b1;font-size:11px;margin-top:6px}.stat-icon{width:41px;height:41px;border-radius:12px;display:grid;place-items:center;font-size:20px}.stat-icon.blue{background:#e9efff;color:#3868ef}.stat-icon.orange{background:#fff1da;color:#d98c23}.stat-icon.red{background:#fff0f0;color:#da5860}.stat-icon.mint{background:#e5f8f3;color:#169d84}.section-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:14px}.section-row h2{margin-bottom:3px}.section-row p{font-size:12px}.horizon-controls{background:#e8edf3;border-radius:9px;display:flex;padding:4px;gap:3px}.chip{border:0;background:transparent;color:#697b94;padding:6px 11px;border-radius:7px;font-size:11px;font-weight:750;white-space:nowrap}.chip.active{background:white;box-shadow:0 1px 4px #1c2c4030;color:#223751}.filter-row{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-bottom:20px}.filter-row>label{font-size:11px;color:#708098;font-weight:640;display:grid;gap:5px}.filter-row input,.filter-row select{min-width:134px;padding:8px 10px;height:37px;border:1px solid #dbe3eb;background:#fff;border-radius:8px;color:#31455f;font-weight:500}.filter-row input[type=search]{min-width:250px}.filter-row input:focus,.filter-row select:focus,input:focus,textarea:focus,select:focus{outline:2px solid #bfd0ff;outline-offset:1px}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0;overflow:hidden}.panel-head{padding:18px 20px 15px;display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-head h3{font-weight:730}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:18px;margin-bottom:18px}.map-inline-note{background:#f7f9fc;color:#73869c;padding:7px 18px;font-size:10px;border-block:1px solid #f0f2f6}.map-host{overflow:hidden;position:relative;background:#e3eaf0}.dashboard-map{height:340px}.big-map{height:min(68vh,720px);min-height:510px}.map-root{width:100%;height:100%;position:relative;overflow:hidden;touch-action:none;user-select:none}.map-tiles,.map-overlay{position:absolute;inset:0}.map-tiles{pointer-events:none}.map-tiles img{position:absolute;width:256px;height:256px;pointer-events:none;max-width:none}.map-overlay{pointer-events:none;width:100%;height:100%;overflow:visible}.map-marker{cursor:pointer;pointer-events:auto}.map-buttons{position:absolute;top:13px;right:13px;display:flex;flex-direction:column;gap:5px}.map-buttons button{width:30px;height:30px;border:1px solid #d0d9e3;background:white;font-size:21px;line-height:1;border-radius:7px;box-shadow:0 2px 6px #1529431a}.map-attribution{background:#ffffffdf;position:absolute;right:3px;bottom:3px;padding:2px 6px;font-size:9px;color:#425875}.map-empty{position:absolute;left:10px;top:10px;background:#ffffffed;border:1px solid #ccd5e0;padding:7px 10px;border-radius:7px;color:#536982;font-size:11px}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:17px;padding:10px 18px;font-size:10px;color:#6f8198;border-top:1px solid var(--line)}.legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}.legend-dot.red{background:#d9585f}.legend-dot.amber{background:#e9ad4b}.legend-dot.slate{background:#64758e}.alert-panel .panel-head{border-bottom:1px solid var(--line)}.count-pill{background:#edf2f8;color:#586f86;border-radius:20px;padding:3px 9px;font-size:11px;font-weight:750}.attention-list{max-height:430px;overflow-y:auto}.attention-item{padding:13px 19px;border-bottom:1px solid #eff1f5;display:flex;gap:12px;align-items:flex-start}.attention-item:last-child{border:0}.attention-dot{width:29px;height:29px;flex:0 0 29px;border-radius:9px;display:grid;place-items:center;font-size:14px;background:#fff3eb;color:#bf773e;margin-top:2px}.attention-item strong{display:block;font-size:12px}.attention-item small{display:block;color:#8290a2;margin-top:3px}.attention-item button{font-size:11px;margin-top:4px}.attention-empty,.empty-cell,.empty-card{text-align:center;color:#96a4b5;padding:42px 20px;font-size:12px}.attention-empty b{display:block;color:#586e85;margin-bottom:4px}.two-col{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:18px}.table-wrap{overflow:auto;max-width:100%}table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;min-width:600px}th{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:#8493a8;font-weight:760;border-bottom:1px solid #e8edf2;padding:10px 17px;background:#fafbfd;white-space:nowrap}td{border-bottom:1px solid #edf1f5;padding:13px 17px;vertical-align:middle;color:#4a5d74}tr:last-child td{border-bottom:0}td strong{display:block;color:#243850;font-weight:730}.text-sub{font-size:10px;color:#90a0b2;margin-top:3px}.status-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:18px;font-size:10px;font-weight:800;white-space:nowrap}.status-pill.open{color:#b85b2f;background:#fff1e7}.status-pill.assigned,.status-pill.planned{color:#416ac7;background:#ecf1ff}.status-pill.completed,.status-pill.no_action{color:#168366;background:#e4f6ee}.status-pill.cancelled{color:#74849b;background:#edf1f5}.status-pill.unverified{color:#9d531c;background:#fff3e5}.plain-action{border:0;background:none;padding:5px;color:#245be9;font-size:11px;font-weight:800;white-space:nowrap}.plain-action:hover{text-decoration:underline}.task-mini{padding:11px 19px;border-bottom:1px solid #edf1f5;display:flex;align-items:flex-start;justify-content:space-between;gap:9px}.task-mini:last-child{border:0}.task-mini strong{display:block;font-size:12px}.task-mini small{display:block;color:#94a1af;font-size:10px;margin-top:2px}
.map-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(295px, .75fr);gap:16px}.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;font-size:12px}.map-actions{display:flex;gap:6px;align-items:center}.map-actions select{border:1px solid #dbe3ed;border-radius:7px;background:white;padding:7px 8px;font-size:11px}.map-drawing-hint{position:absolute;top:12px;left:50%;transform:translateX(-50%);max-width:90%;padding:11px 15px;border-radius:9px;background:#163c60ed;color:white;text-align:center;pointer-events:none;font-size:12px;font-weight:700;z-index:3}.map-search{padding:0 17px 13px}.map-search input{width:100%;border:1px solid #dae4ec;border-radius:8px;height:37px;padding:8px 11px;font-size:12px}.closure-list{overflow:auto;max-height:min(70vh,780px)}.closure-card{width:100%;display:block;text-align:left;background:white;border:0;border-top:1px solid #e8edf3;padding:15px 18px}.closure-card:hover{background:#f8fafc}.closure-card strong{display:block;font-size:13px;color:#26394e}.closure-card small{display:block;color:#8b9bad;margin-top:5px}.closure-card .closure-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.closure-card .closure-reason{color:#8294a8;font-size:11px;margin-top:4px}.section-panel{padding:10px 0}.section-panel .filter-row{padding:12px 17px 16px;margin:0}.route-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:15px}.route-card{border-radius:var(--radius);padding:18px 20px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}.route-card .card-top{display:flex;justify-content:space-between;align-items:center}.route-card .route-name{font-size:19px;font-weight:810;letter-spacing:-.5px}.route-card .car-icon{background:#e9f0f9;color:#527397;padding:5px 9px;border-radius:8px;font-size:11px;font-weight:750}.route-card .route-frac{margin:15px 0 18px;color:#62758d;font-size:12px;min-height:34px}.route-card .card-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #edf1f4;padding-top:12px}.route-card .verified-mark{font-size:11px;color:#2f9875}
.editor-dialog{border:0;padding:0;width:min(620px,96vw);max-height:91vh;border-radius:15px;box-shadow:0 16px 75px #12263d58;color:var(--ink);overflow:hidden}.editor-dialog::backdrop{background:#111d30a8;backdrop-filter:blur(2px)}.editor-dialog.narrow-dialog{width:min(500px,95vw)}.dialog-head{padding:22px 25px 17px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--line)}.dialog-head h2{font-size:22px;margin:2px 0 0}.icon-button{border:0;background:#f1f4f8;color:#65758c;font-size:22px;border-radius:8px;width:33px;height:33px;line-height:1}.dialog-content{max-height:calc(91vh - 180px);overflow-y:auto;padding:20px 25px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.dialog-content>label,.dialog-content>.field-block{display:flex;flex-direction:column;font-size:12px;color:#43556c;font-weight:710;gap:6px;min-width:0}.dialog-content label.full,.dialog-content>.full,.dialog-content>.dialog-description,.dialog-content>.banner,.dialog-content>.import-result{grid-column:1/-1}.dialog-content label.check-label{display:flex;flex-direction:row;align-items:center;gap:9px}.dialog-content input:not([type=checkbox]):not([type=file]),.dialog-content select,.dialog-content textarea,.dialog-content input[type=file]{width:100%;min-height:38px;padding:9px 10px;border:1px solid #d9e2eb;border-radius:8px;font-weight:450;color:#233851;background:#fff}.dialog-content textarea{min-height:75px;resize:vertical}.dialog-content .hint{font-size:10px;color:#8493a6;font-weight:470}.dialog-content fieldset{grid-column:1/-1;border:1px solid var(--line);border-radius:9px;padding:11px 13px}.dialog-content fieldset legend{font-size:12px;color:#5a718b;font-weight:750}.fracs-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.fracs-grid label{font-weight:500;font-size:12px;color:#5a6f83}.dialog-foot{border-top:1px solid var(--line);padding:15px 25px;display:flex;align-items:center;justify-content:flex-end;gap:9px;background:#fafbfd}.dialog-spacer{flex:1}.dialog-description{font-size:12px;color:#6b7e94}.dialog-content .import-result{font-size:12px;color:#45617c}.editor-dialog .banner{margin:0}.editor-dialog form{margin:0}.error-message{color:#c54352;min-height:18px;font-size:12px}.drawing-note{color:#637d99;font-size:12px;grid-column:1/-1}
#toast{position:fixed;bottom:24px;right:24px;z-index:200;background:#203952;color:#fff;max-width:min(420px,90vw);padding:12px 18px;border-radius:10px;box-shadow:0 10px 35px #24334334;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}.login-body{display:grid;place-items:center;min-height:100vh;background:radial-gradient(ellipse at 20% 10%,#dbeff4,transparent 38%),radial-gradient(ellipse at 82% 80%,#e7eeff,transparent 43%),#f6f8fb}.login-card{width:min(430px,94vw);background:#fff;border:1px solid #e4eaf2;border-radius:16px;padding:42px;box-shadow:0 10px 55px #1a3d6120}.login-icon{background:#122c42;color:#d8f8e9;border-radius:12px;width:48px;height:48px;display:grid;place-items:center;font-size:18px;font-weight:900;letter-spacing:-1px;margin-bottom:25px}.login-card h1{font-size:29px;margin-bottom:8px}.login-card p{font-size:13px}.login-card form{margin-top:25px;display:flex;flex-direction:column;gap:12px}.login-card label{font-weight:700;font-size:12px}.login-card input{border:1px solid #dae2ec;border-radius:9px;padding:12px}.login-foot{margin-top:22px;border-top:1px solid #edf1f5;padding-top:17px;font-size:10px;color:#9aaaBC}
@media(max-width:1270px){.sidebar{width:220px;min-width:220px}.main{padding:28px}.topbar{padding:0 28px}.stats-grid{gap:11px}.stat-card{padding:18px}.dashboard-grid,.two-col{grid-template-columns:minmax(0,1.45fr) minmax(270px,1fr)}}
@media(max-width:1040px){.sidebar{position:fixed;transform:translateX(-100%);transition:transform .23s;height:100vh}.sidebar.open{transform:translateX(0)}.hamburger{display:block}.dashboard-grid,.two-col,.map-layout{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-map{height:370px}.map-side .closure-list{max-height:340px}.topbar{height:61px}}
@media(max-width:650px){.main{padding:18px 12px}.topbar{padding:0 13px}.breadcrumbs{font-size:12px}.topbar-clock{display:none}.topbar-right{gap:12px}.page-intro{align-items:flex-start;flex-direction:column}.page-intro h1{font-size:26px}.stats-grid{gap:9px}.stat-card{padding:13px 14px;min-height:107px}.stat-card .stat-value{font-size:27px}.stat-icon{width:33px;height:33px;font-size:17px}.section-row{flex-direction:column;align-items:flex-start}.horizon-controls{width:100%;overflow:auto}.chip{flex:1}.filter-row{gap:8px}.filter-row>label{flex:1;min-width:42%}.filter-row input,.filter-row select,.filter-row input[type=search]{width:100%;min-width:0}.dashboard-map{height:330px}.big-map{height:50vh;min-height:420px}.dialog-content{padding:16px;gap:11px}.dialog-head,.dialog-foot{padding:16px}.map-toolbar{flex-wrap:wrap}.map-actions{flex-wrap:wrap}.route-cards{grid-template-columns:1fr}.login-card{padding:28px}.sync-dot #syncLabel{max-width:95px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* RI v1.3 individual login management */
.user-create-form{padding:18px;display:grid;gap:14px;max-width:440px}
.user-create-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700}
.user-create-form input,.user-create-form select{padding:10px;border:1px solid #dae2ec;border-radius:8px;background:#fff}
.user-create-form p{font-size:12px}
.temporary-password-box{background:#f0f5fa;border-radius:8px;padding:13px;display:grid;gap:9px;overflow-wrap:anywhere}
.temporary-password-box code{font-size:14px;font-weight:800;word-break:break-all}

/* RI v1.1 roles, notes and fleet panels */
[hidden]{display:none!important}
.user-role{font-size:11px;font-weight:700;color:#36566b;border:1px solid #e1ebef;padding:6px 8px;border-radius:6px;white-space:nowrap;background:#f3f9fa}
.period-arrow{padding:3px 10px;background:#e9eff4;border:0;border-radius:8px;cursor:pointer;font-size:19px;color:#294757}
.period-label{font-size:11px;font-weight:700;color:#526a7c;white-space:nowrap}
.fleet-summary{padding:12px 16px;margin:0 0 18px;background:#eef5f6;border:1px solid #cfdee5;border-radius:9px;font-size:13px;font-weight:700;color:#274c5b}
.route-meta{font-size:12px;color:#516576;line-height:1.6;display:grid;gap:3px;margin-top:10px}.route-meta strong{color:#264d61}.route-details{margin-top:9px;font-size:11px;line-height:1.5;color:#607386;white-space:pre-wrap;overflow-wrap:anywhere}
.daily-notes{display:grid;gap:7px;margin:0 0 17px}.note-banner{background:#eef7fa;border:1px solid #c9e2ea;color:#29485d;border-radius:9px;padding:12px 16px;font-size:12px;line-height:1.55}.note-banner.high{border-color:#f2b8a3;background:#fff1ea}.note-banner strong{display:block;font-weight:800}.note-banner small{display:block;color:#637485;margin-top:5px}.notes-list{display:grid;gap:13px;padding:18px}.note-card{padding:16px;border:1px solid #e1eaf0;border-radius:10px;background:#fff}.note-card.high{border-left:4px solid #d66e48}.note-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.note-head small{display:block;color:#677e8f;margin-top:4px}.note-card p{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.detail-row{border-bottom:1px solid #e5edf0;padding:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}.detail-row strong{display:block;font-size:11px;color:#678095;margin-bottom:5px}.detail-row span{font-size:13px;color:#243a4a}.role-readonly{font-size:12px;color:#36596a;padding:9px;background:#e9f3f6;border-radius:7px}
@media(max-width:650px){.user-role{max-width:88px;overflow:hidden;text-overflow:ellipsis}.period-label{max-width:95px;overflow:hidden;text-overflow:ellipsis}.period-arrow{padding:2px 7px}.topbar-right{gap:6px}}

/* Driver mode: all operations remain read-only on the API as well. */
body.readonly-mode [data-new],body.readonly-mode #importBtn,body.readonly-mode #exportBtn,body.readonly-mode [data-complete]{display:none!important}
