*{box-sizing:border-box}body{margin:0;background:#f2f5f8;color:#172d43;font:16px/1.5 "Inter","PingFang HK","Microsoft JhengHei",sans-serif}button,input,select,.account-button{font:inherit;color:inherit}button,a,summary{cursor:pointer}button,input,select,.account-button{border:1px solid #cbd6df;border-radius:9px;background:white;padding:.45rem .72rem}button:hover,a:hover{background:#edf6ff}button:disabled{cursor:default;opacity:.45}header{display:flex;align-items:center;gap:3vw;padding:12px 3%;background:white;border-bottom:1px solid #dce5eb}.brand{font-size:23px;color:#0068b4;letter-spacing:-1px;white-space:nowrap}.brand i{font-style:normal;color:#009363}.brand span{color:#118349}nav{display:flex;gap:5px}nav button{border:0;font-weight:600;background:none}nav .active,.primary{background:#0766a8;color:white}#sync{margin-left:auto;color:#24704e}main{max-width:1560px;margin:auto;padding:24px 3% 40px}.heading,.tools,.panehead,.filters,.legend,.slider{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.heading,.panehead{justify-content:space-between}.heading{margin-bottom:16px}.eyebrow{letter-spacing:.17em;color:#426d80;font-weight:700;font-size:12px}h1{font-size:clamp(24px,2.5vw,36px);margin:0 0 12px;letter-spacing:-.03em}.heading h1{margin:0}h2{font-size:18px;margin:0}.card{background:white;border:1px solid #dce5eb;border-radius:18px;box-shadow:0 3px 12px #19324b08;overflow:hidden}.workspace{display:grid;grid-template-columns:minmax(240px,26%) 1fr;gap:16px}.panehead{padding:14px 18px}.panehead small,.legend small,small{color:#546d7d}.panehead span{background:#e5f1f4;color:#207168;border-radius:16px;padding:1px 9px}aside{display:flex;flex-direction:column;height:432px}aside>input,aside>.filters{margin:0 14px 9px}.filters{flex-wrap:nowrap}.filters select{width:50%;font-size:14px}#roster,#lanes,#log{overflow:auto}#roster button{display:flex;width:100%;border:0;border-radius:0;border-top:1px solid #f0f3f5;align-items:center;gap:10px;text-align:left;padding:7px 15px}#roster button.selected{background:#e8f4fd}.avatar{background:#e4eef3;color:#326073;width:33px;height:33px;border-radius:11px;display:grid;place-items:center}.rosterinfo small{display:block;font-size:12px}.rosterinfo{flex:1}.mapcard{display:flex;flex-direction:column}#map{position:relative;isolation:isolate;flex:1;width:100%;min-height:295px;overflow:hidden}canvas,#pins{position:absolute;inset:0;width:100%;height:100%}.mapnote{position:absolute;bottom:4px;right:9px;font-size:12px;color:#385d66}.pin{position:absolute;border:0;background:transparent!important;padding:0;display:flex;align-items:flex-start;gap:4px;text-align:left;line-height:1.15;text-shadow:-1px -1px 2px white,1px 1px 2px white}.pin b,.pin small{display:block}.pin small{color:#243e50;font-size:12px}.pin i,.legend i,.dot{display:inline-block;width:11px;height:11px;border-radius:50%;border:1px solid #62738666;flex:none}.pin i{width:16px;height:16px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid white;box-shadow:0 1px 4px #647887}.future{background:#147be3}.active.dot,.active:not(button):not(nav){background:#25a564}.done{background:#ccd2d5}.late{background:#fff0cf;color:#854700;padding:1px 6px;border-radius:5px;font-size:13px}.legend{padding:10px 16px;font-size:13px;gap:15px}.legend i{margin-right:4px}.legend small{margin-left:auto}.timeline,.history,.form{margin-top:16px}.slider{padding:0 18px 12px;font-size:12px;color:#668}.slider input{flex:1;accent-color:#0874ac}.group{border-top:1px solid #dde9ed}.group summary{padding:6px 16px;background:#eef5f7;font-weight:700}.group summary small{float:right;font-weight:normal}.lane{display:grid;grid-template-columns:125px 1fr;align-items:center;padding:3px 16px;border-top:1px solid #eef2f4;font-size:14px}.track{height:24px;position:relative;background:repeating-linear-gradient(90deg,#d9e4e9 0 1px,transparent 1px 12.5%)}.bar{position:absolute;top:4px;height:16px;min-width:6px;padding:0;border:0;border-radius:5px}.cursor{position:absolute;height:100%;border-left:2px solid #0b436a;pointer-events:none}#lanes{max-height:330px}.settingsgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:15px}.form,.history{padding:20px}.form{max-width:620px}.form label,.form form label{display:grid;gap:4px;margin:12px 0}.form button{margin-top:8px}.form small{display:block}.check,.form label.check{display:flex;align-items:center;gap:6px}a{color:#0067aa}.history .tools{margin-bottom:12px}table{border-collapse:collapse;width:100%;white-space:nowrap;text-align:left;font-size:14px}th,td{border-bottom:1px solid #dce5eb;padding:9px}th{background:#f0f5f8}.state{font-size:13px}dialog{border:1px solid #bbcdd5;border-radius:18px;max-width:92vw}dialog button{float:right}#toast{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);background:#18364a;color:white;padding:10px 18px;border-radius:12px;z-index:10}.empty{padding:18px;color:#5c7180}[hidden]{display:none!important}@media(max-width:760px){header{flex-wrap:wrap;gap:4px;justify-content:space-between}nav{order:3;width:100%;justify-content:space-between}nav button{font-size:14px}main{padding:14px 10px}.heading{gap:8px}.tools{gap:5px}.workspace{grid-template-columns:1fr}.workspace aside{height:215px}.mapcard{min-height:385px}.lane{grid-template-columns:80px 1fr}.filters{margin-bottom:4px}.legend{gap:8px}}

.bar.active{background:#25a564}
.entry{max-width:490px;margin:6vh auto}.entry .form{padding:26px}.entry>a{display:inline-block;margin-top:14px}.entry .primary{width:100%;min-height:48px}.entry [role=status]:empty{display:none}.street-map.leaflet-container{z-index:0;background:#e2e9ef;--map-active:#147448}.leaflet-tooltip.gps-label{background:transparent;border:0;box-shadow:none;color:#162d42;text-shadow:0 0 3px white,0 0 4px white,1px 1px white;font:12px/1.22 sans-serif;padding:0}.gps-label b{font-size:15px}.leaflet-tooltip.gps-label:before{display:none}#mapstatus:not(:empty),#tileStatus:not(:empty){padding:4px 12px;background:#fff6dc}#map .leaflet-overlay-pane svg{position:absolute}#map .leaflet-control a{color:#166096}

.street-map .leaflet-tile-pane{filter:saturate(.32) contrast(.86) brightness(1.08)}
#map .gps-label{font-size:13px;font-weight:600;line-height:1.35}
.map-late{color:#815010;background:#fff1c9;border-radius:50%;padding:0 4px}
#map .leaflet-popup-content{line-height:1.55;margin:12px 18px}
#map .leaflet-popup-content button{margin-top:6px;font-size:13px}
.headcount-number{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;border:2px solid white;border-radius:50%;background:var(--map-active,#147448);color:white;font:700 15px/1 system-ui,sans-serif;font-variant-numeric:tabular-nums;box-shadow:0 1px 5px #123c3540}
.headcount-label{position:absolute;width:max-content;max-width:min(180px,35vw);overflow-wrap:anywhere;color:#173247;text-shadow:0 0 3px white,0 0 4px white,1px 1px white;font:600 13px/1.35 system-ui,sans-serif;pointer-events:none}
.headcount-project{bottom:calc(100% + 3px);left:50%;transform:translateX(-50%);text-align:center}
.headcount-people{left:calc(100% + 5px);top:50%;transform:translateY(-50%)}
.cluster-list{padding-left:0;list-style:none;max-height:190px;overflow:auto;margin:6px 0}
.cluster-list li+li{border-top:1px solid #e5ecea;margin-top:4px;padding-top:4px}
.project-icon{color:#294f77;text-align:center;text-shadow:0 0 3px white;font-size:18px}
#workPicker{position:relative;margin:14px 0}#workPicker label{margin:0 0 5px}.work-search{display:flex;align-items:stretch}.work-search input{width:100%;min-width:0;border-radius:9px 0 0 9px}.work-search button{margin:0;border-left:0;border-radius:0 9px 9px 0;padding-inline:14px}#workOptions{position:absolute;z-index:2;top:100%;width:100%;max-height:215px;overflow:auto;background:white;border:1px solid #bbcbd9;border-radius:10px;box-shadow:0 5px 16px #172d4324}#workOptions [role=option]{padding:9px 12px;cursor:pointer}#workOptions [role=option]:hover,#workOptions [aria-selected=true]{background:#e8f4fd}.entry .form:has(#workPicker){overflow:visible}
.staff-entry{width:min(100%,920px);max-width:920px}.staff-entry .card.form{max-width:none}.staff-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px;align-items:start}.location-panel{min-width:0;padding:14px;background:#f3f7f8;border-radius:12px}.location-panel h2{margin:0}.location-panel p{margin:8px 0;font-size:14px}.staff-entry select,.staff-entry input{min-width:0;max-width:100%}.staff-entry #action{margin-top:18px}.staff-entry #workOptions{z-index:5}#staffMap{height:240px;width:100%;border-radius:10px;isolation:isolate;z-index:0}.staff-entry #locate,.staff-entry #centerPick{min-height:44px}.staff-entry .leaflet-control a{padding:0}@media(max-width:680px){.staff-entry{margin:12px auto;padding:0 12px}.staff-entry .card.form{padding:16px}.staff-grid{grid-template-columns:minmax(0,1fr);gap:12px}.staff-entry input,.staff-entry select{min-height:44px;font-size:16px}#staffMap{height:clamp(180px,33dvh,280px)}}

.admin-list{margin:14px 0}.admin-list .table-wrap{overflow:auto;max-height:24rem}.admin-list th{position:sticky;top:0}.admin-list .form{margin:0;max-width:100%;padding:16px 20px;border:0;border-top:1px solid #dce5eb;border-radius:0;box-shadow:none}.admin-list .form label{max-width:32rem}.admin-list .form button+button{margin-left:8px}.setting-line{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 18px;border-top:1px solid #dce5eb}.setting-line button{margin-left:auto}
.list-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 18px 14px}.list-filters input{flex:1 1 210px;min-width:0}.list-filters small{margin-left:auto}.danger{color:#9c2929}#removeDialog{max-width:min(420px,94vw);padding:22px}#removeDialog label{display:grid;gap:5px}#removeDialog button{float:none}#removeError{color:#992e2e}

#projectMap{width:min(100%,56rem);aspect-ratio:1;border-radius:10px;isolation:isolate;cursor:crosshair}

.address-query{display:flex;align-items:stretch;gap:8px;max-width:36rem}.address-query input{min-width:0;flex:1}#project .address-query button{margin:0}#streetResults{max-height:12rem;overflow:auto}#project #streetResults button{display:block;margin:0;padding:8px 10px;width:100%;border:0;border-bottom:1px solid #dce5eb;border-radius:0;text-align:left}

.account-button{display:inline-flex;align-items:center;text-decoration:none;white-space:nowrap}

.headcount-icon{display:flex;align-items:center}
.headcount-number{position:static;width:23px;height:23px;flex:none;font-size:11px}
.status-future{background:#1671bb}.status-active{background:#147448}.status-done{background:#d4dadd;color:#344554}
.headcount-project,.headcount-people,.single-project,.single-person{paint-order:stroke fill;-webkit-text-stroke:3px #fff;text-shadow:0 0 2px white;font-weight:750}
.headcount-project,.single-project{color:#075eaa}.headcount-people,.single-person{color:#096239}
.single-project,.single-person{display:block}
.map-person{pointer-events:auto;border:0;background:none;padding:0;color:inherit;font:inherit;-webkit-text-stroke:inherit;paint-order:inherit}
#map .visit-popup{font-size:12px}.visit-popup strong{display:block;font-size:15px;color:#16364c}
.visit-popup dl{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin:5px 0}
.visit-popup dt,th,.group summary,#detail h3{font-weight:750}.visit-popup dt{color:#344f62}.visit-popup dd{margin:0;font-variant-numeric:tabular-nums}
#detail h3{border-top:1px solid #dbe4ea;padding-top:12px}#detail p{font-size:14px;line-height:1.6;margin:6px 0}
.record-actions button{margin:2px;font-size:13px}.record-actions{white-space:normal;min-width:148px}
#otherDialog{width:min(500px,94vw);max-height:90dvh;padding:20px}#otherDialog button{float:none}
#otherTarget{color:#435c6b;margin:6px 0 15px}#otherForm label{display:block;font-weight:700}
#otherMap{height:clamp(180px,35dvh,320px);margin:10px 0;border-radius:10px}
#otherResults{max-height:125px;overflow:auto}#otherResults button{display:block;width:100%;text-align:left;font-size:13px}
#otherPoint,#otherStatus{font-size:13px;color:#496171}.dialog-actions{display:flex;gap:8px;justify-content:flex-end}
#otherError{color:#9a3131}#copyStart{display:block}#recordType{margin-bottom:10px}
.lane-person{justify-self:start;padding:2px 0;background:transparent;border:0;color:#096239;font-weight:650}
#record{width:min(430px,94vw);color:#173247}
.detail-fields{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 16px;font-size:14px}
.detail-fields dt{font-weight:700}.detail-fields dd{margin:0;overflow-wrap:anywhere}
.event-list{list-style:none;padding:0;font-size:13px}.event-list li{display:flex;gap:12px;padding:4px 0;border-bottom:1px solid #e6edf1}
.event-list time{color:#496171;font-variant-numeric:tabular-nums}

#departureError{color:#983c24;font-weight:600}

.lane-schedule{display:block;font-size:12px;line-height:1.35;font-weight:500;color:#365e55;text-align:left}
.bar.scheduled{background:linear-gradient(to right,#25845e var(--elapsed),transparent var(--elapsed)),repeating-linear-gradient(135deg,#c1dfd1 0 3px,#eef6f1 3px 6px);border:1px solid #458769}
.lunch-band{position:absolute;inset-block:0;background:#eac45a44;pointer-events:none}
.now-line{position:absolute;inset-block:0;border-left:2px solid #be3c28;pointer-events:none;z-index:2}
.cursor{border-left:2px dashed #145482}
.time-ruler{font-size:12px;color:#963724}.time-ruler .track{height:14px}
.cluster-missing{position:absolute;left:-7px;top:-7px;background:#ffd46d;color:#553200;border:1px solid #916100;border-radius:50%;padding:0 4px;font:bold 11px/14px sans-serif}
#statusLegend{display:flex;flex-wrap:wrap;gap:5px}
#statusLegend button{background:white;border:1px solid #bfccd4;border-radius:8px;color:#193549;padding:5px 9px;font-weight:600;font-size:13px}
#statusLegend button[aria-pressed=true]{border-color:#165984;background:#e6f1f8;box-shadow:inset 0 0 0 1px #165984}
#statusLegend i{border-radius:50%;width:10px;height:10px;display:inline-block;margin-right:5px}
#statusLegend .missing{background:#ac6800}
#statusLegend .done,.bar.done,.headcount-number.status-done{background:#7047a1;color:#fff}
#map.retained .name-future{color:#095eae}#map.retained .name-active{color:#096239}
#map.retained .name-done{color:#653799}#map.retained .name-missing{color:#915100}

/* Keep the operations board in the viewport. Other admin pages scroll normally. */
body:has(#board:not([hidden])){height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr)}
main:has(#board:not([hidden])){width:100%;height:100%;margin:0;min-height:0;max-width:none;padding:10px clamp(10px,2vw,32px)}
#board{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) clamp(142px,22dvh,200px);gap:8px}
#board .heading{margin:0}
#board h1{font-size:clamp(19px,2vw,28px)}
#board .workspace{min-height:0;min-width:0;position:relative;grid-template-columns:minmax(0,1fr);gap:10px}
#board .workspace:has(aside:not([hidden])){grid-template-columns:clamp(210px,23vw,320px) minmax(0,1fr)}
#board .workspace aside,#board .mapcard{height:100%;min-height:0;min-width:0}
#board .mapcard .panehead{justify-content:flex-start;padding:6px 12px;gap:6px 12px}
#board .mapcard #mode{margin-left:auto}
#board #map{min-height:0}
#board .legend{padding:3px 12px}
#toggleDirectory[aria-expanded=true]{background:#e5f3f7;border-color:#629bb0}
#board .timeline{margin:0;min-height:0;display:flex;flex-direction:column}
.timeline .panehead{padding:3px 14px}
.timeline h2{font-size:16px}
.timeline .slider{padding:0 14px;flex-wrap:nowrap}
.timeline .slider input{margin:0;min-width:0}
.timeline .time-ruler{padding-block:0}
.timeline #lanes{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
.timeline .group summary{padding-block:2px}
.timeline .lane{padding-block:1px}
#board .project-building{display:grid;place-items:center;border-radius:7px;background:white;border:2px solid #326883;box-shadow:0 1px 4px #14364c55}
.project-building span{position:absolute;left:calc(100% + 3px);top:50%;transform:translateY(-50%);width:max-content;max-width:145px;font:700 12px/1.2 system-ui,sans-serif;color:#244d68;-webkit-text-stroke:3px white;paint-order:stroke fill}
@media(max-width:760px){
 #board{gap:5px;grid-template-rows:auto minmax(0,1fr) clamp(140px,22dvh,175px)}
 #board .workspace:has(aside:not([hidden])){grid-template-columns:minmax(0,1fr)}
 #board .workspace aside{position:absolute;inset:0 auto 0 0;width:min(300px,88%);z-index:3;box-shadow:4px 0 14px #18394d30}
 #board .workspace aside .panehead{padding:8px 12px}
 #board .mapcard .panehead{padding:4px 8px;gap:3px 8px;font-size:13px}
 #board .mapcard h2{display:none}
 #board .heading .tools{gap:4px}#board .tools input,#board .tools button{font-size:13px;padding:3px}
 #board .timeline .panehead{gap:1px 8px;font-size:12px;padding:2px 8px}
}

#board{grid-template-rows:auto minmax(0,1fr) clamp(128px,18dvh,162px)}
#board .timeline .panehead{justify-content:flex-start;gap:3px 10px}
.timeline .panehead h2{font-size:14px}
.timeline .panehead label,.timeline .panehead small,.timeline .panehead select,.timeline summary,.timeline .lane-person{font-size:11px}
.timeline .panehead select{padding:1px 4px}
.timeline .lane-person,.timeline .group summary{line-height:1.35}
.timeline .track{height:18px;overflow:hidden}
.timeline .bar{top:2px;height:14px;text-align:left;padding:0 3px;font:600 10px/12px system-ui,sans-serif;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:white}
.timeline .bar.active,.timeline .bar.scheduled{color:#103428}
#timeRuler{display:flex;justify-content:space-between;height:14px;font:10px/14px system-ui,sans-serif}
#timeRuler span{z-index:1}
#slotTip{position:fixed;z-index:1200;pointer-events:none;width:max-content;max-width:min(280px,90vw);border:1px solid #aec4cc;background:white;border-radius:8px;box-shadow:0 3px 12px #143e4733;padding:8px 12px;font-size:12px;overflow-wrap:anywhere}
