:root{--bg:#0b1524;--surface:#142338;--surface2:#1b2d45;--border:#2b3c54;--text:#eaf4f6;--muted:#91a7b6;--accent:#6de0b8;--red:#ff7b7b;--amber:#f2bd69;--blue:#86baf6;--shadow:0 12px 35px #0208173b;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:15px;-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit}button{cursor:pointer;border-radius:12px;border:1px solid var(--border);background:var(--surface2);color:var(--text);min-height:43px;padding:10px 13px}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#09291e;font-weight:750}button.secondary{background:transparent;border-color:#55728b}button.danger{border-color:#93545c;color:#ffc0c0;background:#48212a}button.ghost{border:0;background:transparent;color:var(--accent)}button.wide{width:100%}button.small{font-size:12px;min-height:34px;padding:7px 10px}.topbar{padding:calc(env(safe-area-inset-top,0px) + 13px) max(18px,env(safe-area-inset-right,18px)) 12px max(18px,env(safe-area-inset-left,18px));border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;background:#0d1a2b;position:sticky;top:0;z-index:600}.brand,.top-right{display:flex;align-items:center;gap:11px}.brand strong{font-size:19px;letter-spacing:1.4px}.brand small{display:block;font-size:10px;color:var(--muted);margin-top:1px}.brand-icon,.logo-large{display:grid;place-items:center;background:var(--accent);color:#0b3226;font-weight:900;border-radius:13px;width:39px;height:39px;font-size:25px}.demo-dot{font-size:9px;letter-spacing:1.1px;color:var(--amber);border:1px solid #8b6333;border-radius:6px;padding:5px}.iconbutton{border:0;background:transparent;font-size:22px;min-width:35px}main{padding:18px 16px calc(96px + env(safe-area-inset-bottom,0px));max-width:940px;margin:auto;min-height:70vh}.bottom-nav{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:7px 6px calc(5px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);background:#0d1b2df2;backdrop-filter:blur(20px);z-index:600}.bottom-nav button{background:transparent;border:0;border-radius:11px;min-height:56px;padding:6px 0;color:var(--muted);font-size:10px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px}.bottom-nav button span{font-size:24px;line-height:24px}.bottom-nav button.active{color:var(--accent);background:#21433473}.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;margin:0 0 14px}.section-head h1{font-size:25px;line-height:1.16;margin:0;font-weight:800}.section-head .subtitle{color:var(--muted);font-size:12px;margin-top:5px}.status-chip,.tag{padding:5px 8px;border-radius:7px;font-size:11px;font-weight:650;display:inline-flex;gap:4px;align-items:center}.status-chip{color:#b9cbd8;background:#22384e}.tag.success{color:#8ae9c8;background:#214938}.tag.warn{color:#ffd39a;background:#574127}.tag.error{color:#ff9a9a;background:#5b2831}.tag.info{color:#a9d1ff;background:#213f62}.tag.muted{color:#bbccd8;background:#263a4f}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:15px}.stat{background:var(--surface);border:1px solid var(--border);border-radius:15px;padding:14px 11px;min-width:0}.stat strong{font-size:24px;display:block;letter-spacing:-.7px;line-height:28px}.stat small{color:var(--muted);font-size:10px;display:block;margin-top:6px}.card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:16px;margin:0 0 13px;box-shadow:var(--shadow)}.card h2,.card h3{margin:0 0 10px;font-size:16px}.card p{margin:7px 0 10px;line-height:1.45}.muted{color:var(--muted)}.muted.small,.small-text{font-size:12px}.alert{border-radius:12px;padding:12px;margin:12px 0;background:#263d49;color:#c5e3e2;font-size:12px;border:1px solid #315e5e}.alert.warn{background:#4d3625;color:#ffe0b3;border-color:#805733}.alert.error{background:#3a2630;color:#ffc5c5;border-color:#71414c}.flex{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.actions>button{flex:1 1 120px}.object-row,.ticket-row,.route-row{border-top:1px solid var(--border);padding:12px 0;display:flex;justify-content:space-between;gap:10px;align-items:center}.object-row:first-of-type,.ticket-row:first-of-type,.route-row:first-of-type{border-top:0}.row-main{flex:1;min-width:0}.row-title{font-weight:700;line-height:1.4}.row-sub{color:var(--muted);font-size:12px;margin-top:4px;line-height:1.35}.progress{height:9px;border-radius:99px;background:#2a4154;overflow:hidden;margin:10px 0 5px}.progress>i{height:100%;background:var(--accent);display:block;transition:width .2s}input,textarea,select{width:100%;background:#0b1829;border:1px solid #38506c;color:var(--text);border-radius:12px;padding:12px;min-height:44px}textarea{resize:vertical;min-height:90px}label{font-size:12px;font-weight:650;display:block;margin:10px 0 6px;color:#c4d8e4}input:focus,textarea:focus,select:focus{outline:2px solid #5dbb9e}#mapFrame{height:48vh;min-height:330px;max-height:540px;border-radius:15px;overflow:hidden;background:#213044}.leaflet-container{color:#15253a;font-family:inherit}.filterbar{display:flex;gap:6px;overflow-x:auto;margin:12px 0;scrollbar-width:none}.filterbar button{white-space:nowrap;padding:8px 10px;min-height:35px;font-size:12px}.filterbar button.active{background:#255641;border-color:#65caab;color:#bff9e3}.object-list{max-height:50vh;overflow:auto}.map-dot{background:#284863;color:#fff;border:2px solid #fff;border-radius:100%;display:flex;justify-content:center;align-items:center;font-weight:800;width:30px;height:30px;box-shadow:0 2px 9px #091928aa}.map-dot.done{background:#178c66}.map-dot.pending{background:#d58f37}.map-dot.issue{background:#c4474e}.pin{border:0;background:none}.route-number{background:#1f4551;border:1px solid #3e8798;border-radius:10px;padding:5px 9px;min-width:32px;text-align:center;font-weight:700}.pill{display:inline-block;border:1px solid var(--border);border-radius:20px;padding:5px 9px;font-size:11px;color:var(--muted);margin:2px}.empty{text-align:center;color:var(--muted);padding:24px 10px}.modal{width:min(94vw,540px);max-height:85dvh;overflow:auto;border:1px solid #4e6d88;background:#112139;color:var(--text);border-radius:22px;padding:21px;box-shadow:0 20px 100px #000b}.modal::backdrop{background:#020a16bb;backdrop-filter:blur(3px)}.modal h2{font-size:20px;margin:0 0 10px}.modal .close{float:right;min-height:32px;font-size:20px;padding:2px 10px;border:none;background:transparent}.checkbox-line{display:flex;gap:10px;align-items:center;margin:10px 0}.checkbox-line input{width:18px;height:18px;min-height:18px;accent-color:var(--accent)}.checkbox-line label{font-size:14px;margin:0}.login{position:fixed;inset:0;z-index:900;background:#0b1524;display:grid;place-items:center;padding:20px}.login.hide{display:none}.login-card{width:min(100%,380px);background:var(--surface);border:1px solid var(--border);padding:27px;border-radius:20px}.login-card h1{font-size:23px}.logo-large{width:54px;height:54px;font-size:32px}.loading{padding:30px;color:var(--muted);text-align:center}#toast{position:fixed;bottom:calc(85px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);background:#245944;color:#e0fff3;border:1px solid #4eb690;padding:11px 14px;border-radius:12px;display:none;z-index:999;max-width:90vw;box-shadow:var(--shadow);text-align:center}.offline{border:1px solid #a67735;background:#624322;color:#ffe2b7;border-radius:9px;padding:9px;margin-bottom:13px;font-size:12px}@media(min-width:650px){.stats{gap:14px}.card{padding:20px}.bottom-nav{left:50%;max-width:650px;transform:translateX(-50%);border:1px solid var(--border);border-radius:17px 17px 0 0}.section-head h1{font-size:29px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Dynamic map clusters for grouped addresses and nearby objects */
.cluster-pin{border:0;background:none}
.map-cluster{height:100%;width:100%;display:flex;justify-content:center;align-items:center;border-radius:999px;background:#265d86;border:3px solid #b7dcff;color:#fff;font-size:15px;font-weight:850;box-shadow:0 0 0 5px #265d8660,0 4px 12px #08192790;cursor:pointer}
.map-cluster.pending{background:#b77723;border-color:#ffdea0;box-shadow:0 0 0 5px #b7772352,0 4px 12px #08192790}
.map-cluster.done{background:#158363;border-color:#a2f5ce;box-shadow:0 0 0 5px #15836352,0 4px 12px #08192790}
.map-cluster.issue{background:#bc404e;border-color:#ffb3b8;box-shadow:0 0 0 5px #bc404e52,0 4px 12px #08192790}
.cluster-pin:focus-visible .map-cluster{outline:3px solid white}

/* User-confirmed ticket proposals for existing daily route */
.route-suggestions{border-color:#507c78}.ticket-route-item{border-top:1px solid var(--border);padding:12px 0}.ticket-route-item .actions{margin-top:8px}.route-row .tag{margin-top:6px}

/* Dedicated route map: ordered stops, signed tickets, provisional geometry. */
#routeMap{height:43vh;min-height:330px;max-height:520px;border-radius:15px;overflow:hidden;background:#213044;position:relative;margin-top:10px}
.route-map-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:15px}
.route-number-wrapper,.route-cluster-pin{background:transparent;border:0}
.route-number-pin{width:34px;height:34px;border-radius:50% 50% 50% 5px;background:#c88632;border:2px solid #ffe2a3;box-shadow:0 3px 10px #0919289a;display:flex;align-items:center;justify-content:center;color:white;font-size:14px;font-weight:800}
.route-number-pin::first-letter{font-weight:900}
.route-number-pin.issue{background:#bb4355;border-color:#ffc2c9}
.route-number-pin.done{background:#198565;border-color:#c0ffe4}
.route-cluster{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#365d7e;border:3px solid #e4f3ff;color:white;font-weight:850;box-shadow:0 0 0 4px #4b8fa04a}
.route-empty-message{position:absolute;bottom:15px;left:16px;right:16px;background:#142338e8;border:1px solid #456079;color:#eaf4f6;padding:12px;border-radius:12px;text-align:center;font-size:12px;z-index:400;pointer-events:none}

/* Quick repairs accessible from object popup on route/map */
.object-tickets{margin:12px 0 0;padding:13px}.object-ticket{border-top:1px solid var(--border);padding:11px 0}.object-ticket:first-of-type{border-top:0}.object-ticket strong{font-size:13px;line-height:1.35;overflow-wrap:anywhere;flex:1}.object-ticket .actions{margin-top:9px}.object-ticket .actions button{flex:1 1 130px}.object-ticket .row-sub{margin:7px 0}
\n/* Valhalla side-by-side preview / Yandex navigation choices */\n.route-optimizer{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:14px 0}.route-optimizer label{font-size:12px;flex-basis:100%}.route-optimizer select{flex:1;min-width:120px}.route-optimizer button{flex:2;min-width:170px}.optimized-list{max-height:210px;overflow:auto;margin-bottom:12px;border-radius:10px;padding:8px;border:1px solid #405165}.optimized-list .row-sub{padding:5px 0;border-bottom:1px solid #405165}\n\n.route-optimizer{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}.optimized-list{max-height:250px;overflow:auto;border:1px solid #485d77;border-radius:9px;padding:9px;margin:8px 0}.optimized-list .row-sub{margin-bottom:6px}\n
/* Explicit car/walking comparison and route preview status */
.mode-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.mode-option{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:12px;min-height:95px;text-align:left;border:1px solid #5a7486;background:#22364a;border-radius:10px;color:#f5f7f8}
.mode-option.selected{border:2px solid #6bbde8;background:#29455b}
.mode-option span{font-size:16px;font-weight:750}
.mode-option small{font-size:11px;opacity:.85}
@media(max-width:370px){.mode-comparison{grid-template-columns:1fr}}

/* Daily totals and explicitly indicated start point */
.today-subtitle{font-size:12px;color:var(--muted);margin:-6px 0 16px;line-height:1.5}.route-start-info{border:1px solid var(--border);padding:12px;border-radius:12px;margin:10px 0;background:#1c3142;font-size:13px;overflow-wrap:anywhere}.route-start-info p{margin-bottom:0!important}.stats .stat small{line-height:1.4}

/* 3 VO + 9 PG manually selected hybrid sectors */
.hybrid-settings{display:grid;grid-template-columns:1fr 1fr;gap:8px}.hybrid-settings select{margin-top:6px}.hybrid-result{margin-top:18px}.hybrid-groups{max-height:300px;overflow:auto;margin-top:12px}.hybrid-group{border-top:1px solid var(--border);padding:12px 4px}.hybrid-group strong{font-size:13px;line-height:1.4}.hybrid-group .row-sub{padding-top:3px}.hybrid-result>.stats{margin-top:12px}

/* Interactive street-boundary sector polygons (VO x3 / PG x9) */
#sectorPickerMap{height:330px;min-height:300px;max-height:480px;width:100%;border-radius:15px;overflow:hidden;background:#1b3245;margin:12px 0 14px;isolation:isolate}.sector-bubble-pin{border:0;background:transparent;pointer-events:auto}.sector-bubble{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:38px;padding:4px 7px;white-space:nowrap;background:#132a39e8;color:#fff;border:2px solid #bad7eb;border-radius:12px;box-shadow:0 3px 9px #06152199;cursor:pointer;font-size:12px;line-height:1.15}.sector-bubble small{font-size:10px;color:#b8e1f3}.sector-bubble.chosen{border:3px solid #ffe78a;background:#405d70}
