/* Shared overview layout. Only the situation centre loads this stylesheet. */
:root { --space: clamp(12px,1.4vw,24px); --gap:12px; --muted:#4c6262; }
body { background:#f1f5f4; }
header { height:54px; padding:0 var(--space); gap:clamp(20px,3vw,56px); flex-wrap:nowrap; }
header .brand strong {font-size:21px}
header nav {gap:clamp(12px,1.6vw,30px);align-items:stretch}
header nav a {display:flex;align-items:center}
#roleSelect {display:none}
main {max-width:2000px;padding:14px var(--space) 12px}
.pagehead {margin:0 0 12px;min-height:42px}
h1 {font-size:clamp(24px,2.15vw,38px);letter-spacing:-.045em}
.timebox {gap:15px}
.timebox strong {font-size:19px}
.timebox small {font-size:12px}
#notice {position:fixed;bottom:14px;left:50%;transform:translateX(-50%);z-index:8;box-shadow:0 4px 20px #17383228;width:max-content;max-width:90vw;pointer-events:none}
#desk {display:flex;flex-direction:column;gap:var(--gap)}
.kpis,.engSummary {gap:0;margin:0;background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}
#desk>.kpis,#dircards {grid-template-columns:repeat(6,minmax(0,1fr))}
.kpi {min-height:0;padding:12px clamp(10px,1.05vw,20px);border:0;border-right:1px solid var(--line);border-radius:0;background:transparent}
.kpi:last-child {border:0}
.kpi span {font-size:14px;color:#405753;line-height:1.12}
.kpi strong {font-size:clamp(25px,2.1vw,40px);margin:6px 0 0}
.kpi small {font-size:12px;margin-top:4px}
#kpis .kpi:nth-child(2) strong,#kpis .kpi:nth-child(3) strong {color:#964116}
.overview {display:grid;grid-template-columns:minmax(0,1fr) minmax(316px,32%);gap:var(--gap);min-height:0;flex:1}
.overview>.card {margin:0;min-width:0}
.mapcard {display:flex;flex-direction:column}
.mapbar,.mapcontext,.briefHead,.sheetHead,.deskActions,.viewSwitch {display:flex;align-items:center;gap:10px}
.mapbar {padding:10px 14px;justify-content:space-between;flex-wrap:wrap}
.mapbar h2,.briefHead h2 {font-size:17px;line-height:1.17;margin:0}
.maptools {padding:0;gap:4px}
.maptools button {min-height:32px;padding:5px 9px;font-size:13px}
.mapwrap,.wallmode .mapwrap {flex:1;min-height:170px;height:auto}
.mapwrap #map {position:absolute;inset:0;width:100%;height:100%}
.mapcontext {order:4;justify-content:space-between;padding:7px 14px;background:#f7f9f8;color:var(--muted);font-size:12px;flex-wrap:wrap;gap:3px 9px}
#summaryLoad {margin:0;font-size:inherit}
.timeline {padding:6px 14px;gap:8px}
.timeline>div:first-child {display:flex;align-items:center;gap:8px}
.timeline strong {font-size:13px;margin:0}
.mapPeek {position:absolute;bottom:25px;left:10px;max-width:min(315px,85%);background:white;border:1px solid #a8c6bf;border-radius:9px;box-shadow:0 2px 12px #193f3d30;padding:10px 58px 9px 12px;display:grid;gap:3px}
.mapPeek strong {font-size:15px}.mapPeek span {font-size:13px}
.mapPeek button:not(.peekClose),.briefHead button,.stopName {color:#09675e;text-align:left;font-weight:650;text-underline-offset:3px}
.mapPeek button:not(.peekClose) {padding:4px 0;width:max-content}
.peekClose {position:absolute;right:2px;top:2px;width:32px;height:32px;font-size:20px}
.brief {display:flex;flex-direction:column;align-self:stretch;overflow:auto;scrollbar-width:thin}
.briefGroup {padding:clamp(10px,1.25vw,20px);border-bottom:1px solid var(--line)}
.briefGroup:last-child {border:0}
.briefHead {justify-content:space-between;align-items:baseline;gap:8px}
.briefHead button {flex:none;font-size:13px;padding:4px 0}
.priority {background:#eff8f4;border-left:4px solid #247967}
#firstStop {margin-top:8px}
#firstStop p {color:#3e5651;line-height:1.35;margin:4px 0 7px;font-size:14px}
#firstStop strong,.stopName {font-size:16px}
.stopName {padding:0;text-decoration:underline}
#firstStop .primary {padding:7px 13px;min-height:32px}
.briefAlert {display:flex;align-items:start;gap:8px;padding:7px 0;text-align:left;width:100%;border-bottom:1px solid #e7edeb}
.briefAlert:last-child {border:0;padding-bottom:0}
.briefAlert .dot {margin:5px 0 0;flex:none}
.briefAlert small,.briefAlert strong {display:block}
.briefAlert strong {font-size:14px;line-height:1.3;font-weight:600}
.briefAlert small {font-size:12px;margin-bottom:2px}
#firstRoutes {display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.routeChip {border:1px solid var(--line);border-radius:6px;display:flex;gap:7px;align-items:center;padding:6px 7px;background:#f7f9f8}
.routeChip span {color:#7d451c;font-variant-numeric:tabular-nums}
.deskActions,.viewSwitch {flex-wrap:wrap;gap:6px}
.deskActions button,.viewSwitch button,.sheetHead button,.menuGrid button,.menuGrid a {padding:7px 14px;min-height:35px;border:1px solid #cddbd7;border-radius:7px;background:white;color:#124d49;font-weight:600}
.deskActions button:hover,.briefAlert:hover,.searchItem:hover {background:#e6f2ee}
.viewSwitch [aria-pressed=true] {background:#1c534c;color:#fff}
#detailsDialog {padding:0;width:min(560px,94vw);max-width:none;max-height:85dvh;overflow:hidden}
#detailsDialog[open] {display:flex;flex-direction:column}
.sheetHead {padding:12px 16px;border-bottom:1px solid var(--line)}
.sheetHead h2 {flex:1}
.sheetBody {padding:15px 18px;overflow:auto;overscroll-behavior:contain;min-height:0}
.sheetPage>.card,.sheetPage .cardhead,.sheetPage .pad {border:0;margin:0;padding:0}
.sheetPage>.card>.cardhead {padding-bottom:10px}
.sheetPage>.card>.cardhead h2,.sheetPage #rankPanel h2 {display:none}
.sheetPage .manage label,.sheetPage #fleetQuery {font-size:15px}
.sheetPage #fleetQuery {width:100%;margin:5px 0 10px}
.searchItem {display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 4px;text-align:left;border-bottom:1px solid var(--line);gap:8px}
.searchItem small {text-align:right}
.menuGrid {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.menuGrid a {text-decoration:none;text-align:center}
#director,#engineer,#analytics {display:flex;flex-direction:column;gap:var(--gap)}
.engSummary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.engineGrid {min-height:0;display:grid;grid-template-columns:minmax(190px,28%) minmax(0,1fr);gap:var(--gap)}
.machineList,.diag,.reportBox {padding:16px;overflow:auto;scrollbar-width:thin}
.machineList .briefHead,.diag .briefHead {margin-bottom:10px}
#techdata .parts {margin:8px 0;grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}
#techdata .pair,#financial .pair,.reportBox .pair {font-size:14px}
.reportBox h2 {margin-bottom:8px}
.reportBox>.card {border:0;padding:0}
.reportBox>.card .row {margin:0}
#director .roletools label,.analyticshead label {display:flex;align-items:center;gap:8px}
#director .roletools,#director .kpis {margin:0}
#dirstatus {font-size:13px}
.daily {min-height:0;display:flex;flex-direction:column;gap:9px}
.daily .analyticshead,.daily .kpis {margin:0}
.daily .reportBox {min-height:0}
.daily .reportBox label {display:flex;align-items:center;gap:8px;margin-bottom:10px}
#analytics .reportBox section>.pad {padding:0}
#akpis .ico {display:none}
#akpis .kpi {border-radius:0}
@media (min-width:751px) and (min-height:560px) {
  body {display:flex;flex-direction:column;min-height:100dvh}
  header {flex:none}
  main,.wallmode main {flex:1;display:flex;flex-direction:column;width:100%}
  body:has(#desk:not([hidden])) main,body:has(#engineer:not([hidden])) main,body:has(#director:not([hidden])) main,body:has(#analytics:not([hidden])) main {height:calc(100dvh - 54px);flex:none}
  .pane:not([hidden]) {min-height:0}
  #desk,#engineer,#director,#analytics {flex:1}
  .deskActions,.kpis,.engSummary,.pagehead,.viewSwitch,.roletools {flex:none}
  #engineer .engineGrid,#director .reportBox,#analytics .reportBox {max-height:100%;min-height:0}
}
@media (min-width:751px) and (max-width:1100px) {header{gap:14px}header nav{gap:12px}header .access{gap:6px}#kpis .kpi small{display:none}.overview{grid-template-columns:minmax(0,1fr) minmax(306px,36%)}}
@media (max-width:850px) {header nav{display:none}#roleSelect{display:block;min-width:125px}.access{margin-left:auto}.card h2{font-size:16px}}
@media (max-width:750px) {
  :root {--gap:7px}
  header {min-height:44px;height:44px;padding:3px 10px;gap:9px}
  header .brand svg {width:24px;height:24px}header .brand strong{font-size:17px;letter-spacing:-.7px}
  #roleSelect {min-width:0;max-width:126px;min-height:30px;font-size:13px;padding:3px}
  header .access {gap:5px}header .online {font-size:11px}header .plain {padding:5px 7px;font-size:13px}
  main,.wallmode main {width:100%;padding:7px 9px}
  .pagehead {margin:0 0 7px;min-height:33px;gap:3px}
  h1 {font-size:clamp(19px,4.8vw,27px);letter-spacing:-.6px}
  .timebox {flex-direction:row;align-items:center;gap:6px}
  .timebox div {display:block}.timebox small {display:none}.timebox strong {font-size:13px}
  .timebox select {width:86px;min-height:27px;font-size:12px}
  #desk>.kpis,#dircards {grid-template-columns:repeat(3,minmax(0,1fr))}
  .kpi {padding:5px 8px;min-height:0;border-bottom:1px solid var(--line)}
  .kpi:nth-child(3n) {border-right:0}.kpi:nth-child(n+4){border-bottom:0}
  .kpi span {font-size:12px}.kpi strong {font-size:21px;letter-spacing:-.7px;margin:2px 0}.kpi small{display:none}
  .overview {display:flex;flex-direction:column;gap:var(--gap)}
  .mapbar,.timeline {padding:5px 8px;gap:4px}
  .mapbar h2 {font-size:15px}
  .maptools {gap:2px}.maptools button {font-size:12px;padding:3px 5px;min-height:27px}.maptools i{display:none}
  .mapwrap,.wallmode .mapwrap {height:clamp(145px,calc(100svh - 478px),410px);flex:none;min-height:0}
  .mapcontext {display:none}.timeline {min-height:31px}.timeline>div:first-child small{display:none}
  .speed {gap:2px}.speed button {min-height:25px;padding:3px 5px;font-size:12px}
  .brief {overflow:visible}.briefGroup{padding:6px 10px}.priority{border-left-width:3px}
  .briefHead h2 {font-size:15px}.briefHead button{padding:3px 0}
  #firstStop {margin-top:3px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:7px;align-items:center}
  #firstStop .primary,#firstStop>.signal{grid-column:2;grid-row:1/3}
  #firstStop>strong,#firstStop>.stopName{font-size:14px}
  #firstStop p{font-size:12px;margin:2px 0;grid-column:1}
  #firstAlarms .briefAlert:nth-child(n+2){display:none}
  .briefAlert {padding:2px 0}.briefAlert span{display:block}.briefAlert small{display:inline;margin:0 4px 0 0}.briefAlert strong {display:inline;font-size:13px}
  #rankBrief {display:flex;align-items:center;justify-content:space-between;gap:5px}
  #rankBrief h2{font-size:13px}#rankBrief .briefHead{gap:7px}#firstRoutes{margin:0;gap:3px}
  #firstRoutes .routeChip:not(:first-child){display:none}.routeChip {font-size:12px;padding:4px}
  .deskActions {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
  .deskActions button {min-height:34px;font-size:12px;padding:3px;border-radius:6px}
  #engineer .deskActions{display:flex}.engineGrid{display:block}.machineList{display:none}
  .machineList,.diag,.reportBox{padding:10px}
  #techdata .parts{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
  #techdata .parts>div{padding:5px 3px;font-size:12px}
  #techdata .parts .signal{font-size:11px;padding:3px 2px}
  #techdata .pair{padding:4px 0;font-size:13px}
  .viewSwitch {gap:4px}.viewSwitch button {min-height:32px;padding:4px 7px;font-size:13px}
  .engSummary .kpi strong {font-size:19px}
  #detailsDialog {width:100%;max-height:82dvh;margin:auto auto 0;border-radius:13px 13px 0 0}
  .sheetHead,.sheetBody {padding:10px 12px}
  .stoptrigger{gap:5px}
}
@media (max-width:365px) {header .brand strong{display:none}.timebox strong{display:none}.mapbar h2{font-size:14px}}
@media (max-height:620px) and (max-width:750px){.mapwrap{height:145px}}
@media (min-width:2000px){main{max-width:96vw}.briefGroup{padding:1.1rem}.kpi span,.briefAlert strong,.mapbar h2,.briefHead h2{font-size:1.12rem}}
.eventTarget {color:#155e56;text-decoration:underline;text-align:left;font-weight:650}
.fleetRow {display:grid;grid-template-columns:1fr 1fr auto;gap:4px;width:100%;text-align:left;padding:6px 0;border-bottom:1px solid var(--line);font-size:13px}
.fleetRow:hover {background:#edf6f1}.fleetRow:last-child{border:0}
@media(max-width:750px),(max-height:800px){.fleetBrief{display:none}}
@media(max-width:750px) {
  .mapwrap,.wallmode .mapwrap {height:clamp(112px,calc(100svh - 543px),395px)}
  #firstStop .primary {white-space:nowrap}
}
@media(max-width:750px) {
  #kpis .kpi span {display:block;line-height:15px}
  #kpis .kpi {padding:5px 6px}
  #desk {gap:6px}
  .mapbar {flex-wrap:nowrap}
  .mapbar .maptools {flex-wrap:nowrap}
  .briefAlert .dot {margin-top:3px}
}
@media(max-width:750px) and (min-height:620px) {
  body:has(#desk:not([hidden])) main {height:calc(100dvh - 44px);display:flex;flex-direction:column}
  #desk {min-height:0;flex:1}
  #desk>.kpis,#desk .deskActions,.brief,.pagehead {flex:none}
  #desk .mapcard {flex:1;min-height:155px}
  #desk .mapwrap {flex:1;height:auto;min-height:86px}
}
@media(max-width:400px) {.mapbar h2{font-size:14px}.mapbar .maptools button{padding-inline:5px}.mapbar{padding-inline:6px}}
@media(max-width:400px){.wideWord{display:none}}
#peekTrip:not(:empty){font-weight:650;color:#104d45}
.tripCard{background:#eef6f3;border:1px solid #c9ded5;border-radius:8px;padding:9px 12px;margin:8px 0}.tripCard>b{font-size:13px;color:#235a4b}
.tripPair{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:5px}.tripPair strong{display:block;font-size:24px}
#tripHistory{padding:8px 0}#tripRows table{border-collapse:collapse;width:100%;font-size:13px}#tripRows td,#tripRows th{padding:6px 4px;border-bottom:1px solid var(--line);text-align:right}#tripRows td:first-child,#tripRows th:first-child{text-align:left}

/* The search list and the map share the same route and selected object. */
.panelModes,.listKinds{display:flex;align-items:center;gap:4px}
.panelModes{padding:6px;border-bottom:1px solid var(--line);background:#f7faf8;flex:none}
.panelModes button,.listKinds button{background:transparent;color:#425e58;font-size:14px;font-weight:600;border:1px solid transparent;border-radius:6px;padding:6px 10px;min-height:32px}
.panelModes button[aria-pressed=true]{background:#1d544d;color:white}
.listKinds button[aria-pressed=true]{background:#d9efe8;border-color:#add1c5;color:#164c3f}
#fleetPane{min-height:0;display:flex;flex-direction:column;gap:7px;padding:12px 14px;flex:1;overflow:hidden}
#fleetPane label{font-size:14px}
#fleetPane input{width:100%;font-size:16px}
#fleetResults{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#fleetResults .searchItem{display:grid;gap:3px;line-height:1.25;justify-content:stretch;padding:8px}
#fleetResults .searchItem[aria-pressed=true]{background:#e4f4ed;box-shadow:inset 3px 0 #29785f}
#fleetResults small{text-align:left;font-size:13px}
#listScope{font-size:13px;color:#405650;display:flex;justify-content:space-between;gap:3px;align-items:center}
#clearRoute,.helpPage button{color:#09675e;text-decoration:underline}
.brief{overflow:hidden}
#summaryPane{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.listKinds{flex-wrap:wrap;gap:2px}
.listKinds button{font-size:13px;padding:4px 7px}
.helpEntry{display:flex;gap:5px;align-items:center;color:#18564c}
.helpEntry span{width:21px;height:21px;display:grid;place-content:center;border:1px solid #8ca9a1;border-radius:50%;font-weight:700}
.helpEntry b{font-size:14px}
.mapwrap .mapcredit{font-size:12px;min-height:22px;color:#214a42;background:#fffffff0;border:1px solid #c6d8d0;cursor:pointer}
.helpPage dl{margin:0}.helpPage h3{margin:0 0 12px}
.helpPage dt{font-size:16px;font-weight:700;margin:12px 0 3px}
.helpPage dd{font-size:15px;line-height:1.48;margin:0;color:#38534b}
.helpPage .signal{margin:3px 2px 2px 0}
.mapPeek{padding:10px 28px 10px 12px;max-width:min(370px,90%)}
.peekActions{display:flex;gap:5px;flex-wrap:wrap}
.mapPeek .peekActions button{font-size:13px;padding:5px 7px;border-radius:5px;border:1px solid #bdd3cc;background:#fff}
.mapPeek .peekActions [aria-pressed=true]{background:#1d544d;color:white}
@media(max-width:750px){
  #desk .deskActions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .helpEntry{padding:3px}.helpEntry b{display:none}
  .panelModes{padding:3px 6px;gap:3px}
  .panelModes button{font-size:13px;min-height:25px;padding:3px 9px}
  .brief[data-mode=list]{height:clamp(178px,35svh,315px);flex:none}
  .brief.hasObject #summaryPane,.brief.hasObject #fleetPane{display:none}
  .brief.hasObject{height:auto}
  #mobileObject .mapPeek{position:relative;width:100%;max-width:none;box-shadow:none;bottom:auto;left:auto;border:0;padding:7px 30px 7px 10px;gap:2px}
  #fleetPane{gap:3px;padding:6px 9px}
  #fleetPane label,#fleetResults small{font-size:12px}
  #fleetPane input{min-height:32px;padding-block:3px}
  .listKinds button{min-height:26px}
  .mapcredit{bottom:2px;left:2px}
  #rankBrief{padding-block:3px}
}
@media(max-width:440px){header .brand strong{display:none}}
@media (max-width:750px) and (max-height:700px) {
  #desk:has(.brief:not(.hasObject)[data-mode=summary]) .timeline>div:first-child{display:none}
  #desk .mapcard{min-height:129px}
  #desk .mapwrap{min-height:60px}
}
#kpis button.kpi{text-align:left;color:inherit;cursor:pointer}
#kpis button.kpi:hover,#kpis button.kpi:focus-visible{background:#eff7f3}
#kpis button.kpi:focus-visible{outline-offset:-3px}
#metricExplanation,#metricCurrent{font-size:16px;line-height:1.5}
#speedInDispatch .timeline{border:1px solid var(--line);border-radius:8px;margin-bottom:14px}
@media(max-width:750px){.timebox select{width:auto;max-width:116px}.mapcredit{font-size:11px}}
@media(max-width:750px) and (max-height:730px){
  #rankBrief{display:none}
  #kpis .kpi{padding-block:4px}
  #desk .mapwrap{min-height:110px}
  #firstStop p{margin:1px 0}
  .briefHead h2{font-size:14px}
}

#detailsDialog:has(#sheet-carrier:not([hidden])) {width:min(820px,96vw)}
.carrierTools {display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.carrierTools label {display:grid;gap:4px;min-width:0;font-weight:600}
.carrierTools select,.carrierTools input {max-width:100%;min-height:36px}
#routeOutput small {display:block;color:#495f61;line-height:1.45}
.reportStats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
.reportStats>div {padding:10px;background:#edf5f2;border-radius:6px}
.reportStats strong {display:block;margin-top:2px;font-size:1.35rem}
.routeFacts {padding-left:1.2rem;line-height:1.5}
.reportCoverage {border-left:3px solid #297b70;padding-left:9px;line-height:1.45}
#routeOutput h3,#routeOutput details {margin:15px 0 6px}
#routeOutput summary {cursor:pointer;font-weight:650}
.reportScroll {max-width:100%;overflow:auto;margin:8px 0}
.reportScroll table {width:100%;border-collapse:collapse}
.reportScroll th,.reportScroll td {padding:7px;text-align:right;border-bottom:1px solid #dce7e3}
.reportScroll th:first-child,.reportScroll td:first-child {text-align:left}
@media(max-width:750px){.carrierTools label:first-child{width:100%}.carrierTools{gap:6px}.reportStats>div{padding:7px}.reportScroll th,.reportScroll td{font-size:12px;padding:5px}.reportStats span{font-size:12px}}
#routeOutput details .carrierTools {margin:10px 0}
#routeOutput details input {width:8rem}

.scheduleBlock {border-block:1px solid #d2e0df;padding:8px 0 12px;margin:12px 0}
.scheduleBlock p {margin:8px 0}
.scheduleBlock button,.scheduleBlock label {margin:6px 8px 4px 0}
#routeOutput .scheduleBlock input[type=file] {width:100%;max-width:22rem;display:block}
.scheduleBlock select {max-width:100%}
