/* REMO Corporate Light */
:root {
 color-scheme: light;
 --navy: #0d2848;
 --ink: #122747;
 --muted: #4e6782;
 --accent: #106cae;
 --line: #d5e2ef;
 --paper: #fff;
 --shadow: 0 2px 6px #153d6520;
}
body { background: #eef4fb; color: var(--ink); }
[data-status="normal"], .operating { --status: #08744a; --tint: #e7f7ee; --strong-tint: #c7ecd9; }
[data-status="attention"] { --status: #936000; --tint: #fff7e5; --strong-tint: #ffeac1; }
[data-status="fault"], .fault { --status: #b42238; --tint: #fdf0f2; --strong-tint: #f7d6dd; }
[data-status="critical"], .alarm { --status: #a9500c; --tint: #fff2e9; --strong-tint: #ffdfc5; }
[data-status="offline"], .offline { --status: #5d3aa5; --tint: #f3eefc; --strong-tint: #e6d9f8; }
[data-status="unknown"], .unknown { --status: #526b85; --tint: #edf2f8; --strong-tint: #dfe8f3; }
[data-status="cluster"], .total { --status: #125d9e; --tint: #e6f2ff; --strong-tint: #d3e7fb; }
.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 144px minmax(0, 1fr); }
.side-nav {
 background: linear-gradient(172deg,#0c2748 65%,#143d66);
 color: #f3f8ff;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 20px;
 padding: 14px 10px;
}
.brand-icon { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-weight: 780; line-height: 1.08; }
.brand-icon img { width: 36px; height: 36px; object-fit: contain; }
.rail-links { display: grid; align-content: start; gap: 5px; }
.rail-button {
 display: flex; align-items: center; gap: 10px; min-height: 39px;
 border: 0; border-radius: 8px; padding: 7px 9px; background: transparent; color: inherit; text-align: left; font-weight: 650;
}
.rail-button svg { width: 18px; height: 18px; }
.rail-button[aria-current] { background: #197cc0; color: #fff; }
.rail-button:hover:not(:disabled):not([aria-current]) { background: #214567; }
.rail-button:disabled { opacity: .5; }
.side-nav :focus-visible { outline-color: #8fcfff; }
.mobile-menu { display: none; }
.workspace { min-width: 0; padding: 11px 13px 5px; display: flex; flex-direction: column; gap: 10px; }
.topbar { min-height: 51px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-inline: 7px; }
.top-heading { min-width: 0; }
.eyebrow { color: #254f79; font-size: .68rem; font-weight: 800; letter-spacing: .07em; }
.eyebrow span { margin-inline: 3px; }
h1 { margin: 0; font-size: clamp(23px, 2.1vw, 34px); line-height: 1.14; letter-spacing: -.045em; }
.top-right, .connection { display: flex; align-items: center; gap: 9px; }
.top-right { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.environment {
 border: 1px solid #b6cbdc; border-radius: 999px; padding: 4px 9px; color: #3d5872;
 background: #f7fbff; font-size: .71rem; font-weight: 750; white-space: nowrap;
}
.environment[data-health="verified"] { color: #08633e; border-color: #9cd6b8; background: #e5f8ed; }
.environment[data-health="simulation"] { color: #805319; border-color: #e7c898; background: #fff4df; }
.feed-status { font-size: .75rem; font-weight: 650; }
.feed-status small, .time-box small { display: block; font-size: .69rem; color: var(--muted); font-weight: 500; }
.connection { gap: 5px; }
.connection-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #758da5; }
.connection-dot.connected { background: #0b8e55; }
.time-box { border-left: 1px solid #b9cce0; padding-left: 10px; text-align: right; }
.time-box > span { display: block; font-size: 1.15rem; line-height: 1.1; font-variant-numeric: tabular-nums; font-weight: 800; }
.icon-button, .text-button, .toolbar select, .search-wrap {
 min-height: 34px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px;
}
.icon-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.icon-button { width: 34px; padding: 0; }
.icon-button:hover, .text-button:hover { background: #e7f3ff; }
.summary-row { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.summary-tile {
 min-width: 0; min-height: 78px; display: flex; align-items: flex-start; gap: 8px; padding: 10px 9px;
 background: linear-gradient(#fff,#f8fbff); border: 1px solid var(--line); border-bottom: 3px solid var(--status);
 border-radius: 11px; box-shadow: var(--shadow);
}
.summary-tile > div { min-width: 0; }
.tile-icon { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--status); }
.tile-icon svg { width: 22px; height: 22px; }
.summary-label { display: block; font-size: .69rem; font-weight: 800; line-height: 1.14; text-transform: uppercase; color: #274f78; }
.summary-tile strong { display: block; font-size: 1.72rem; line-height: 1.12; color: var(--status); font-variant-numeric: tabular-nums; }
.summary-tile small { display: block; color: #395875; font-size: .68rem; line-height: 1.2; }
.notice { padding: 7px 10px; border: 1px solid #e4c59e; border-radius: 8px; color: #79501f; background: #fff5e9; font-size: .78rem; }
.content-area { flex: 1; min-height: 0; min-width: 0; display: grid; }
.map-view, .fleet-view { display: none; min-width: 0; min-height: 0; }
.map-view.is-visible { display: grid; grid-template-columns: minmax(0,3fr) minmax(245px,1fr); gap: 10px; }
body[data-view="map"] .map-view { grid-template-columns: minmax(0,1fr); }
body[data-view="map"] .map-sidebar { display: none; }
.map-area { position: relative; overflow: hidden; isolation: isolate; min-width: 0; min-height: 280px; background: #a9d9ee; border: 1px solid #98c8dd; border-radius: 12px; }
#mapCanvas { position: absolute; inset: 0; }
.offline-map { position: absolute; inset: 0; overflow: hidden; background: #96cfe7; }
.offline-map > img { position: absolute; display: block; max-width: none; pointer-events: none; }
.offline-map.can-pan { cursor: grab; touch-action: none; }
.offline-map.can-pan:active { cursor: grabbing; }
.offline-pin-layer { position: absolute; inset: 0; pointer-events: none; }
.offline-pin { position: absolute; display: flex; align-items: center; gap: 2px; transform: translate(-17px,-17px); padding: 0; border: 0; background: transparent; color: var(--ink); pointer-events: auto; z-index: 2; }
.offline-pin.pin-left { transform: translate(calc(-100% + 17px),-17px); flex-direction: row-reverse; }
.pin-count { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 2px solid white; background: var(--status); color: white; box-shadow: 0 2px 9px #12365356; font-weight: 800; }
.pin-label { display: grid; text-align: left; background: #ffffffef; border-radius: 7px; padding: 4px 8px; box-shadow: var(--shadow); max-width: 170px; }
.pin-label strong { font-size: .78rem; line-height: 1.18; }
.pin-label small { font-size: .69rem; color: var(--muted); }
.offline-pin:hover, .offline-pin:focus-visible { z-index: 3; }
.map-style-switch, .map-controls {
 position: absolute; z-index: 900; display: flex; border: 1px solid var(--line); border-radius: 9px; background: #fff;
 box-shadow: var(--shadow); padding: 3px;
}
.map-style-switch { top: 10px; left: 10px; }
.map-style-switch button, .map-controls button {
 display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--ink);
 border: 0; border-radius: 6px; background: transparent; min-height: 30px; font-size: .75rem; padding: 4px 8px; font-weight: 750;
}
.map-style-switch .is-active { color: #fff; background: #114f84; }
.map-controls { right: 10px; top: 10px; flex-direction: column; }
.map-controls button { font-size: 1rem; width: 30px; padding: 0; }
.map-controls button:hover, .map-style-switch button:not(.is-active):hover { background: #e3effb; }
.map-area .leaflet-top.leaflet-left { top: 55px; }
.map-notice { position: absolute; z-index: 900; bottom: 9px; left: 10px; max-width: 90%; padding: 4px 7px; border-radius: 5px; background: #fff; font-size: .69rem; color: #365878; }
.map-notice:empty { display: none; }
.cluster-menu {
 position: absolute; z-index: 1000; top: 57px; left: 10px; max-height: calc(100% - 70px); max-width: calc(100% - 65px);
 overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: var(--shadow);
}
.cluster-menu strong { padding-right: 26px; }
.cluster-close { position: absolute; right: 5px; top: 4px; border: 0; background: #fff; font-size: 1rem; }
.cluster-site { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: white; color: var(--ink); padding: 7px 3px; text-align: left; }
.cluster-site small { color: var(--muted); }
.map-sidebar { display: grid; grid-template-rows: minmax(150px,auto) auto; gap: 9px; align-content: start; min-height: 0; }
.directory-panel, .legend-panel, .jobsites-view, .list-panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.directory-panel { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.map-side-title { padding: 9px 11px; border-bottom: 1px solid #e4edf6; display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.map-side-title h2 { font-size: .96rem; margin: 0; }
.map-side-title span { font-size: .72rem; color: var(--muted); font-weight: 650; }
.site-directory { padding: 5px 8px; overflow: auto; min-height: 0; scrollbar-width: thin; }
.site-entry {
 width: 100%; display: grid; grid-template-columns: 31px minmax(0,1fr) auto 14px; gap: 6px; align-items: center;
 text-align: left; color: var(--ink); padding: 7px 3px; border: 0; border-bottom: 1px solid #e6edf5; background: white;
}
.site-entry:last-child { border-bottom: 0; }
.site-entry:hover { background: #edf6ff; }
.site-icon { background: #edf5fc; color: #2d669b; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; }
.site-name { display: block; font-size: .77rem; line-height: 1.18; overflow-wrap: anywhere; }
.site-count { font-size: .73rem; font-weight: 700; white-space: nowrap; }
.site-meta, .site-state { display: inline-flex; align-items: center; gap: 4px; }
.site-meta { flex-wrap: wrap; gap: 2px 5px; margin-top: 3px; }
.site-state, .unmapped { font-size: .65rem; color: var(--muted); }
.site-state .lane-dot { width: 6px; height: 6px; }
.site-arrow { color: #285780; }
.legend { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px 4px; padding: 9px; }
.legend-item { display: flex; align-items: center; gap: 4px; color: #3c5671; font-size: .67rem; }
.jobsites-view { align-self: start; }
.jobsites-view .site-directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr)); column-gap: 14px; }
.fleet-view.is-visible { display: flex; flex-direction: column; gap: 8px; }
.content-bar, .content-heading, .toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.content-bar { justify-content: space-between; }
.content-heading h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.025em; }
.content-caption { font-size: .75rem; color: var(--muted); }
.toolbar select { max-width: 180px; font-size: .75rem; padding: 0 8px; }
.search-wrap { display: flex; align-items: center; gap: 6px; padding: 0 7px; color: var(--muted); }
.search-wrap input { background: transparent; color: var(--ink); border: 0; min-width: 0; width: 155px; font-size: .77rem; }
.search-wrap kbd { font-size: .7rem; color: var(--muted); }
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: white; }
.view-switch .text-button { border: 0; min-height: 28px; }
.text-button[aria-pressed="true"] { background: #104f87; color: white; }
.board-grid { flex: 1; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; min-height: 230px; }
.lane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--tint); border: 1px solid var(--strong-tint); border-radius: 10px; overflow: hidden; }
.lane-head { display: flex; min-height: 41px; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 6px; background: var(--strong-tint); }
.lane-head h3 { display: flex; align-items: center; gap: 5px; margin: 0; font-size: clamp(.66rem,.95vw,.83rem); line-height: 1.2; }
.lane-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--status); flex: none; }
.lane-count { background: white; color: var(--status); border: 1px solid var(--strong-tint); border-radius: 999px; padding: 1px 6px; min-width: 23px; text-align: center; font-size: .76rem; font-weight: 800; }
.lane-content { flex: 1; min-height: 0; padding: 5px; overflow: auto; scrollbar-width: thin; }
.lane-empty { display: grid; justify-items: center; gap: 5px; padding: 16px 4px; color: var(--status); font-size: .72rem; text-align: center; }
.lane-empty svg { width: 21px; height: 21px; }
.lift-card {
 display: grid; gap: 3px; width: 100%; min-width: 0; min-height: 93px; text-align: left; margin-bottom: 5px; padding: 6px;
 border: 1px solid var(--line); border-left: 3px solid var(--status); border-radius: 8px; background: #fff; color: var(--ink);
 box-shadow: 0 2px 3px #183d6510;
}
.lift-card:hover { background: #f5faff; }
.card-top, .card-updated { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.card-id, .card-site, .card-updated { font-size: .68rem; color: #405d78; }
.card-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name { font-size: .8rem; line-height: 1.15; overflow-wrap: anywhere; }
.card-site { overflow-wrap: anywhere; }
.status-mini { display: inline-block; border-radius: 999px; padding: 1px 5px; font-size: .64rem; font-weight: 800; color: var(--status); background: var(--tint); white-space: nowrap; }
.card-updated { padding-top: 4px; border-top: 1px solid #e3ebf3; font-weight: 600; }
.card-alert { color: var(--status); font-size: .7rem; }
.compact .lift-card { min-height: 70px; padding-block: 4px; }
.compact .card-site { display: none; }
.list-panel { overflow: auto; }
.list-panel table { width: 100%; border-collapse: collapse; text-align: left; }
.list-panel th, .list-panel td { border-bottom: 1px solid #e4edf6; padding: 8px; font-size: .79rem; overflow-wrap: anywhere; }
.list-panel th { background: #edf4fb; }
.lift-link { border: 0; padding: 0; text-align: left; color: #145d9b; background: none; font-weight: 750; }
.lift-link small { display: block; color: var(--muted); font-weight: 500; }
.empty-results { color: var(--muted); padding: 9px; margin: 0; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; color: var(--muted); font-size: .69rem; }
.details-modal { width: min(92vw,560px); max-height: 85dvh; padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: 0 18px 70px #0d284866; }
.details-modal::backdrop { background: #0d2848a8; }
.modal-close { position: absolute; top: 9px; right: 9px; border: 1px solid var(--line); background: white; border-radius: 7px; font-size: 1.18rem; }
.modal-heading { padding-right: 22px; margin: 0 0 4px; }
.modal-status { color: var(--muted); font-weight: 700; }
.modal-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.modal-item { min-width: 0; border-bottom: 1px solid var(--line); padding: 0 3px 5px; }
.modal-item dt { color: var(--muted); font-size: .73rem; }
.modal-item dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.modal-alert { background: #fff1ed; color: #883221; padding: 6px 8px; border-radius: 5px; }
body[data-view="split"] .content-area { grid-template-rows: minmax(235px, 1fr) minmax(245px,1fr); gap: 10px; }
@media (min-width: 1120px) and (min-height: 650px) and (orientation: landscape) {
 .app-shell { height: 100dvh; }
 .map-sidebar { grid-template-rows: minmax(0,max-content) auto; max-height: 100%; }
 .directory-panel { max-height: 60dvh; }
}
@media (max-width: 1119px), (max-height: 649px), (orientation: portrait) {
 .map-area { min-height: clamp(300px,53vh,620px); }
 .board-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .lane-content { max-height: 215px; }
 .lane[data-empty] { min-height: 76px; }
 .lane-empty { padding: 6px 3px; }
 body[data-view="split"] .content-area { grid-template-rows: auto auto; }
}
@media (max-width: 1050px) {
 .topbar { align-items: flex-start; flex-direction: column; }
 .top-right { justify-content: flex-start; }
 .summary-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px), (orientation: portrait) {
 .map-view.is-visible { grid-template-columns: minmax(0,1fr); }
 .map-sidebar { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); grid-template-rows: auto; }
}
@media (max-width: 670px) {
 .app-shell { display: block; }
 .side-nav { gap: 8px; min-height: 49px; padding: 5px 9px; display: flex; flex-flow: row wrap; align-items: center; justify-content: space-between; }
 .brand-icon { padding: 0 3px; font-size: .78rem; }
 .brand-icon img { height: 32px; width: 32px; }
 .mobile-menu { display: inline-flex; gap: 5px; align-items: center; padding: 7px 8px; border: 1px solid #53799b; background: #153e64; border-radius: 7px; color: white; }
 .rail-links { display: none; flex: 1 0 100%; grid-template-columns: 1fr 1fr; gap: 2px; }
 .mobile-menu[aria-expanded="true"] + .rail-links { display: grid; }
 .workspace { padding-inline: 8px; }
 .topbar { padding: 0; }
 .top-right { gap: 6px; }
 .time-box { padding-left: 5px; }
 .summary-tile { gap: 5px; padding: 6px 5px; }
 .tile-icon { flex-basis: 23px; height: 23px; }
 .tile-icon svg { width: 15px; height: 15px; }
 .summary-label { font-size: .62rem; }
 .summary-tile small { font-size: .61rem; }
 .summary-tile strong { font-size: 1.35rem; }
 .map-sidebar { grid-template-columns: minmax(0,1fr); }
 .pin-label { display: none; }
 .board-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .list-panel table { min-width: 460px; }
}
.pin-breakdown { margin-top: 2px; }
@media (min-width: 1120px) and (min-height: 650px) and (orientation: landscape) {
 .workspace { min-height: 0; }
}
@media (max-width: 540px) {
 .list-panel table, .list-panel tbody { display: block; width: 100%; min-width: 0; }
 .list-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .list-panel tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 5px; border-bottom: 1px solid var(--line); }
 .list-panel td { border: 0; padding: 5px; }
 .list-panel td:first-child { grid-column: 1/-1; }
 .list-panel td:not(:first-child)::before { display: block; content: attr(data-label); color: var(--muted); font-size: .69rem; }
}

.preview-banner{background:#fff2c6;color:#403309;padding:7px 14px;border-bottom:1px solid #ead08a;font:600 13px/1.4 system-ui}.preview-banner a{text-decoration:underline}.preview-disabled{opacity:.64}
