
:root{
  --bg:#06121b;--bg2:#081823;--panel:#0a1b27;--panel2:#0d2230;--line:#193240;
  --text:#eef5f8;--muted:#9fb0ba;--orange:#ff6500;--green:#71c92d;--blue:#1d92ff;
  --purple:#8e4de7;--amber:#ffb118;--teal:#16bdc5;--water:#2a8eea;--violet:#7848c7;--red:#ff3333;
}
*{box-sizing:border-box} body{margin:0;background:linear-gradient(135deg,#06111a,#061923);color:var(--text);font-family:Segoe UI,Arial,sans-serif;font-size:13px}
button{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:205px;background:linear-gradient(180deg,#07131c,#05111a);border-right:1px solid #172b36;padding:10px 8px;position:fixed;top:0;bottom:0;overflow:auto}
.brand{padding:3px 6px 18px}.brand img{width:180px;max-width:100%}.nav-section{font-size:10px;color:#94a4ae;padding:12px 10px 5px}.nav-item,.subnav-item{width:100%;background:transparent;color:#edf4f6;border:0;text-align:left;padding:8px 10px;border-radius:5px;cursor:pointer;display:flex;align-items:center;gap:9px}
.nav-item span:first-child{width:17px;text-align:center;color:var(--orange)}.nav-item:hover,.subnav-item:hover{background:#0d202c}.nav-item.active{border:1px solid var(--orange);background:#16242b;color:#fff}.nav-item.active span:first-child{color:var(--orange)}.badge{margin-left:auto;background:#e72828;padding:2px 7px;border-radius:10px;font-size:10px}.chev{margin-left:auto}.subnav{padding-left:29px;display:none}.subnav.open{display:block}.subnav-item{font-size:11px;color:#afbdc5;padding:7px}.collapse{position:sticky;bottom:0;margin-top:15px;padding:12px;background:#07131c;color:#d7e1e6}
.main{margin-left:205px;width:calc(100% - 205px);min-width:1000px}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #172c37;background:rgba(4,15,23,.9);position:sticky;top:0;z-index:10}
h1{font-size:20px;margin:0 0 4px}.subtitle{color:#b9c3c9}.top-controls{display:flex;gap:10px;align-items:center}.selectish,.icon-btn{background:#071520;color:#eef4f7;border:1px solid #1b3440;border-radius:6px;padding:10px 14px}.selectish span{color:#8da0aa;margin-left:13px}.icon-btn{position:relative;padding:10px 12px}.notif{position:absolute;right:-3px;top:-6px;background:var(--orange);border-radius:10px;padding:1px 5px;font-size:9px}.profile{display:flex;align-items:center;gap:9px;padding:3px 6px}.profile small{display:block;color:#a8b5bc;font-size:10px}.avatar{width:38px;height:38px;border-radius:50%;background:#172934;display:flex;align-items:center;justify-content:center;font-size:16px}
.view{display:none;padding:12px}.active-view{display:block}.kpi-row{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:9px}.kpi{background:linear-gradient(145deg,#0b1c27,#0a1822);border:1px solid #17303b;border-radius:7px;padding:11px;display:flex;gap:10px;min-height:90px}.kpi-icon{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;flex:0 0 auto}.green{background:#4b9417}.blue{background:#075fb5}.orange{background:#e85c00}.purple{background:#6632aa}.amber{background:#cb8200}.teal{background:#087e86}.water{background:#0b5ea8}.grey{background:#26333c}.kpi small{color:#cdd6da}.kpi-num{font-size:24px;margin:4px 0}.kpi-num em{font-size:12px;font-style:normal;color:#8ed62f}.kpi span{font-size:10px;color:#a9b5bc}
.module-tabs{display:flex;border:1px solid #18313c;border-radius:7px;background:#071722;margin:10px 0;overflow:hidden}.module-tab{border:0;background:transparent;color:#e4ecef;padding:11px 18px;cursor:pointer}.module-tab.active{color:var(--orange);border-bottom:2px solid var(--orange);background:#10202a}.module-tab:hover{background:#10202a}
.overview-grid{display:grid;grid-template-columns:1.15fr 1fr .72fr;grid-template-rows:auto auto;gap:10px}.panel{background:linear-gradient(145deg,#0a1b27,#071722);border:1px solid #19343f;border-radius:7px;padding:12px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.01)}.panel-title{font-size:15px;font-weight:600;margin-bottom:10px}.flex{display:flex;justify-content:space-between;align-items:center}.flex a{color:#28a8ff;font-size:11px;font-weight:400}.map-panel{grid-column:1;grid-row:1}.recent{grid-column:2;grid-row:1}.summary{grid-column:3;grid-row:1}.traffic{grid-column:1;grid-row:2}.top-assets{grid-column:2;grid-row:2}.alerts-panel{grid-column:3;grid-row:2}
.event,.alert-item{display:grid;grid-template-columns:36px 1fr auto;gap:8px;align-items:center;border-bottom:1px solid #17303a;padding:8px 0}.event:last-child,.alert-item:last-child{border-bottom:0}.event-icon,.alert-icon{width:30px;height:30px;border-radius:6px;display:flex;align-items:center;justify-content:center;border:1px solid currentColor}.event small,.alert-item small{display:block;color:#a7b5bc;margin-top:2px}.time{color:#9eacb4;font-size:11px;text-align:right}
table{width:100%;border-collapse:collapse}th{color:#aebbc2;text-align:left;font-size:10px;font-weight:500;padding:7px 5px;border-bottom:1px solid #203a45}td{padding:8px 5px;border-bottom:1px solid #17303a}th:last-child,td:last-child{text-align:right}.summary .total{font-weight:700;background:#07131c}.summary .total td:last-child{color:#8ddb2d}.c-green{color:#8dd12d}.c-purple{color:#a765e6}.c-amber{color:#ffad19}.c-teal{color:#16bfca}.c-blue{color:#2698f2}.c-violet{color:#9a58e8}.legend-inline{font-size:10px;margin:-4px 0 3px 26px}.legend-inline span{margin-right:18px}.green-line{color:#78c82e}.blue-line{color:#2699ff}
.chart{width:100%;height:160px}.grid-lines line{stroke:#17323e;stroke-width:1}.line{fill:none;stroke-width:2}.entries{stroke:#71c92d}.exits{stroke:#238ff3}.axis-labels text{fill:#8e9ea6;font-size:10px}
.page-grid{display:grid;grid-template-columns:2fr 1fr;gap:12px}.wide{min-height:500px}.mini-kpis{display:grid;grid-template-columns:1fr 1.4fr;gap:15px;padding:10px}.mini-kpis b{font-size:30px;color:var(--orange)}.mini-kpis span{align-self:center;color:#b7c3c8}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:10px 8px}.status-pill{padding:3px 8px;border-radius:12px;font-size:10px}.ok{background:#133d24;color:#7ae38e}.warn{background:#49340c;color:#ffc759}.bad{background:#48151a;color:#ff6d78}.info{background:#123347;color:#6fc6ff}.small-action{background:var(--orange);color:#fff;border:0;border-radius:5px;padding:7px 10px}.muted{color:#a8b6bd;line-height:1.6}.status-ok{color:#6edb7a;padding:15px 0}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-grid label{color:#aebcc3}.settings-grid input{display:block;width:100%;margin-top:6px;padding:10px;background:#06151f;border:1px solid #1a3642;color:white;border-radius:5px}.report-cards,.analytics-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.report-card{border:1px solid #1c3945;background:#091923;border-radius:7px;padding:20px;min-height:125px}.report-card strong{display:block;font-size:16px;margin-bottom:7px}.report-card small{color:#9eacb4}.report-card button{margin-top:15px;border:1px solid #31505d;background:#0e2430;color:white;padding:6px 10px;border-radius:4px}
footer{display:flex;justify-content:space-between;padding:15px 12px;color:#8f9da4;font-size:10px}
@media(max-width:1400px){.kpi-row{grid-template-columns:repeat(4,1fr)}.overview-grid{grid-template-columns:1fr 1fr}.summary,.alerts-panel{grid-column:auto}.map-panel{grid-column:1/-1}.map-wrap img{height:420px}}

/* Interactive map restored for v0.4 */
.map-wrap{display:block}.interactive-map{position:relative;width:100%;background:#06141d;border-radius:5px;overflow:hidden}.interactive-map img{display:block;width:100%;height:385px;object-fit:contain;background:#06141d;border-radius:5px}.map-hotspot{position:absolute;border:1px solid transparent;background:rgba(0,0,0,0);border-radius:10px;cursor:pointer}.map-hotspot span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:0;white-space:nowrap;padding:6px 9px;border-radius:6px;background:#06131c;color:#fff;border:1px solid #39505c;font-size:11px}.map-hotspot:hover{background:rgba(255,101,0,.15);border-color:#ff6500}.map-hotspot:hover span{opacity:1}.map-hotspot.ldv{left:46%;top:0%;width:11%;height:15%}.map-hotspot.engen{left:6%;top:12%;width:18%;height:23%}.map-hotspot.front-parking{left:27%;top:12%;width:48%;height:17%}.map-hotspot.wash-left{left:6%;top:34%;width:16%;height:22%}.map-hotspot.wash-right{left:27%;top:32%;width:12%;height:22%}.map-hotspot.workshop-zone{left:38%;top:30%;width:34%;height:26%}.map-hotspot.tyre-zone{left:73%;top:30%;width:13%;height:26%}.map-hotspot.shell{left:39%;top:54%;width:28%;height:13%}.map-hotspot.back-parking{left:27%;top:66%;width:43%;height:30%}.map-hotspot.safripol{left:72%;top:64%;width:23%;height:32%}.map-hotspot.truck{left:62%;top:88%;width:14%;height:12%}.map-help{margin-top:7px;color:#7f929c;font-size:10px;text-align:right}

/* Gate Ops v0.4 */
.gate-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:10px}.gk{background:#0a1b27;border:1px solid #19343f;border-radius:7px;padding:12px}.gk b{font-size:27px;display:block}.gk span{display:block;color:#fff;margin:3px 0}.gk small{color:#a8b5bb}.gate-tabs{display:flex;border-bottom:1px solid #1a3440;margin-bottom:10px}.gate-tabs button{background:none;border:0;color:#ddd;padding:12px 28px}.gate-tabs .active{color:#ff6500;border-bottom:2px solid #ff6500}.gate-grid{display:grid;grid-template-columns:.8fr 1.55fr 1.15fr;grid-template-areas:'live process summary' 'live process company' 'processed processed status1' 'processed processed status2' 'processed processed exc';gap:10px}.gate-live{grid-area:live}.gate-process{grid-area:process}.gate-summary{grid-area:summary}.gate-company{grid-area:company}.gate-processed{grid-area:processed}.gate-status1{grid-area:status1}.gate-status2{grid-area:status2}.gate-exc{grid-area:exc}.live-dot{color:#6fd12f;font-size:10px}.gle-hint{color:#66808a;font-size:9.5px;text-align:center;padding-top:8px}.gle{display:grid;grid-template-columns:34px 1fr auto;gap:8px;padding:9px 0 9px 8px;border-bottom:1px solid #17313d;position:relative;cursor:pointer;transition:background .15s}.gle:hover{background:#0e202b}.gle.active{background:#0f2733}.gle.active::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#ff6500}.gle small{display:block;color:#aab7bd}.pill{font-size:9px;padding:2px 6px;border-radius:4px;margin-left:7px}.en{background:#173f1c;color:#82dc66}.ex{background:#4b270c;color:#ffac55}.os{background:#0d4650;color:#55dae5}.linkbtn{background:none;border:0;color:#26a8ff;padding:10px 0}.readerrow{display:grid;grid-template-columns:16px 1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid #17313d}.readerrow:last-child{border-bottom:0}.readerrow i{width:10px;height:10px;border-radius:50%;background:#4ec429;margin-top:4px}.readerrow small{display:block;color:#a8b5bb}.readerrow strong{color:#75d631}.readerrow.offline i{background:#e2493a}.readerrow.offline strong{color:#ff8a7a}.journey-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 0;border-top:1px solid #17313d}.journey-head{display:flex;flex-direction:column;gap:2px;min-width:100px;white-space:nowrap}.journey-head b{font-size:12px}.journey-head .jh-reg{font-size:9px;color:#61747c}.journey-entry{text-align:center;min-width:52px;margin-right:6px}.journey-entry span{display:block;font-size:9px;color:#8fa0a9;margin-bottom:2px}.journey-entry b{font-size:12px;color:#fff}.journey-track{display:flex;align-items:center;flex-wrap:wrap;gap:6px;flex:1}.gap-pill{display:flex;align-items:center;justify-content:center;min-width:38px;padding:3px 7px;border-radius:5px;text-align:center;font-size:9.5px;font-weight:600;color:#eef2f4;background-color:#132029;background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.24) 0,rgba(255,255,255,.24) 2px,transparent 2px,transparent 8px);border:1px solid #223640}.journey-tail{display:flex;gap:16px;margin-left:auto;padding-left:10px}.journey-tail div{text-align:center;min-width:52px}.journey-tail span{display:block;font-size:9px;color:#8fa0a9;margin-bottom:2px}.journey-tail b{font-size:12px;color:#fff}.journey-tail b.total{color:#ffc46b}
.dept-cell{border-radius:5px;padding:3px 6px;text-align:center;min-width:50px}
.dept-cell .dc-time{display:flex;justify-content:space-between;gap:5px;font-size:7px;color:rgba(255,255,255,.7);line-height:1;margin-bottom:1px}
.dept-cell .dc-dur{font-size:10px;font-weight:600;color:#fff;display:flex;align-items:center;justify-content:center;gap:3px}
.dept-cell.w{background:#174799}.dept-cell.t{background:#9f5c00}.dept-cell.f{background:#2c6d1e}.dept-cell.wa{background:#256e72}.dept-cell.pa{background:#5a2b8a}
.dlogo{display:inline-flex;align-items:center;justify-content:center;width:12px;height:12px;border-radius:50%;font-size:7px;vertical-align:middle}
.dlogo.w{background:#174799}.dlogo.t{background:#9f5c00}.dlogo.f{background:#2c6d1e}.dlogo.wa{background:#256e72}.dlogo.pa{background:#5a2b8a}
.procrow-legend{display:flex;flex-wrap:wrap;gap:16px;padding-bottom:10px;margin-bottom:2px;border-bottom:1px solid #17313d;font-size:10px;color:#a9b6bc}
.procrow-legend span{display:flex;align-items:center;gap:5px}
.gate-alert{display:grid;grid-template-columns:28px 1fr auto;gap:8px;padding:8px 0;border-bottom:1px solid #17313d}.gate-alert small{display:block;color:#a8b5bb}@media(max-width:1500px){.gate-kpis{grid-template-columns:repeat(3,1fr)}.gate-grid{grid-template-columns:1fr 1.4fr;grid-template-areas:'live process' 'summary company' 'processed processed' 'status1 status2' 'exc exc'}}

.auto-badge{font-size:10px;color:#78d632;background:#12351a;border:1px solid #286728;border-radius:14px;padding:5px 9px}
.auto-processing-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:12px}
.movement-bundle,.auto-details{background:#071722;border:1px solid #1a3541;border-radius:7px;padding:10px}
.bundle-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.bundle-head small{color:#82949d}.bundle-head h2{font-size:15px;margin:2px 0}
.direction-chip{font-weight:800;font-size:11px;padding:6px 12px;border-radius:4px}.direction-chip.entry{background:#16441d;color:#85e36b}.direction-chip.exit{background:#51300c;color:#ffb35b}.direction-chip.onsite{background:#0d4650;color:#55dae5}
.bundle-item{display:grid;grid-template-columns:38px 1fr 25px;gap:9px;align-items:center;border:1px solid #1a3541;border-radius:6px;padding:9px;margin:6px 0;background:#0a1b27}.bundle-item.recognised{border-left:3px solid #53c735}.bundle-item.missing{border-left:3px solid #ffad19;background:#2a210e}.bundle-item.empty{border-left:3px solid #35474f;opacity:.75}.bundle-item.flagged{border-left:3px solid #ff3333;background:#2a1013}
.bundle-icon{width:34px;height:34px;border-radius:5px;background:#102c3a;display:flex;align-items:center;justify-content:center;font-size:18px}.bundle-item small{display:block;color:#8fa2ab;font-size:9px}.bundle-item strong{display:block;font-size:13px;margin:2px 0}.bundle-item em{display:block;font-style:normal;color:#aebbc1;font-size:10px}.bundle-item>b{color:#66d44b;font-size:18px}.bundle-item.missing>b{color:#ffb21b}.bundle-item.empty>b{color:#5c6d76}.bundle-item.empty em{color:#75868f}.bundle-item.flagged>b{color:#ff5b5b;font-size:15px}.bundle-item.flagged em{color:#e5a3a6}
.auto-status{display:flex;gap:9px;align-items:center;border-radius:5px;padding:9px;margin-bottom:8px}.auto-status.success{background:#123a18;color:#9be78b}.auto-status.warning{background:#4a3510;color:#ffd36e}.auto-status.info{background:#0d3742;color:#7fd8e6}.auto-status.danger{background:#3c1112;color:#ff9296}.auto-status>span{font-size:21px}.auto-status small{display:block;color:inherit;opacity:.8;margin-top:2px}
.notify-sent{display:flex;align-items:center;gap:6px;margin-top:7px;padding-top:7px;border-top:1px solid rgba(255,255,255,.18);font-size:10.5px;font-weight:600;color:#ffb3b6}.notify-sent span{font-weight:400;opacity:.85;color:inherit}
.flagged-alert{position:relative;padding-left:10px!important;background:#210b0d;border-radius:4px}.flagged-alert::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#ff3333;border-radius:2px 0 0 2px}
tr.row-flagged{background:#210b0d}tr.row-flagged td:first-child{position:relative}tr.row-flagged td:first-child::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#ff3333}
.auto-field{display:flex;justify-content:space-between;gap:10px;padding:7px 2px;border-bottom:1px solid #17313d;font-size:10px}.auto-field span{color:#92a5ae}.auto-field b{text-align:right;font-size:11px}
.automatic-result{margin-top:10px;background:#133a19;border:1px solid #2f702c;border-radius:6px;padding:10px}.automatic-result.warning{background:#3c2c0d;border-color:#7d5c16}.automatic-result small{display:block;color:#9bb9a0;font-size:9px}.automatic-result strong{display:block;color:#a1ef8c;font-size:16px;margin:2px 0}.automatic-result.warning strong{color:#ffd36e}.automatic-result span{color:#b8c8bd;font-size:10px}
@media(max-width:1500px){.auto-processing-grid{grid-template-columns:1fr}}

/* Master v1.1 — preserves v0.5 visual design */
.gate-tab{cursor:pointer}
.gate-entryexit-panel{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px;padding-top:0;align-items:stretch;max-height:min(430px,calc(100vh - 300px))}
.gate-entryexit-panel .eep-panel{grid-column:2}
.gate-entryexit-panel .panel{min-height:0;min-width:0}
.gate-entryexit-panel .gate-processed{display:flex;flex-direction:column;overflow:hidden}
.gate-entryexit-panel .gate-processed #eeMovedRows{flex:1;min-height:0;overflow-y:auto}
.gate-entryexit-panel .eep-panel{overflow-y:auto}
@media(max-width:1500px){.gate-entryexit-panel{grid-template-columns:1fr;align-items:start;max-height:none}.gate-entryexit-panel .eep-panel{grid-column:1}.gate-entryexit-panel .gate-processed{display:block}.gate-entryexit-panel .gate-processed #eeMovedRows{flex:none;max-height:200px}}
.eep-panel .panel-title.flex{align-items:center}
.eep-toggle{display:flex;gap:8px}
.eep-toggle button{background:transparent;border:1px solid #31505d;color:#cfd9de;padding:7px 14px;border-radius:5px;font-size:11px;font-weight:700;cursor:pointer}
.eep-toggle button.active{background:rgba(255,101,0,.12);border-color:var(--orange);color:var(--orange)}
.eep-body{display:grid;grid-template-columns:150px 1fr;gap:12px;margin-top:4px}
.eep-card{background:transparent;border:0;border-radius:0;padding:0;text-align:center}
.eep-photo{width:100%;height:100px;border-radius:6px;overflow:hidden;margin-bottom:6px;background:#071722}
.eep-photo img{width:100%;height:100%;object-fit:cover;display:block}
.eep-banner{border-radius:5px;padding:4px 7px;font-size:9.5px;font-weight:700;margin:5px 0 2px}
.eep-banner.ok{background:#123a18;color:#9be78b}
.eep-name{display:block;font-size:13px;margin-top:1px}
.eep-sub{display:block;color:#8fa2ab;font-size:10px;margin-bottom:1px}
.eep-form{display:grid;grid-template-columns:1fr 1fr;gap:2px 14px;align-content:start}
.eep-field{background:transparent;border:0;border-bottom:1px solid #152c37;border-radius:0;padding:3px 2px}
.eep-field label{display:block;font-size:9px;color:#8fa0a9;margin-bottom:1px}
.eep-field .eep-value{font-size:12px;color:#eef5f8;font-weight:600;line-height:1.3}
.eep-field-full{grid-column:1/-1}
@media(max-width:1400px){.eep-body{grid-template-columns:1fr}.eep-card{display:flex;align-items:center;gap:12px;text-align:left}.eep-photo{width:100px;height:75px;flex:0 0 auto;margin-bottom:0}}
#eeMovedRows .journey-row{cursor:pointer;position:relative;padding-left:10px;border-radius:4px;transition:background .15s}
#eeMovedRows .journey-row:hover{background:#0e202b}
#eeMovedRows .journey-row.active{background:#0f2733}
#eeMovedRows .journey-row.active::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#ff6500;border-radius:2px 0 0 2px}
#processedRows{max-height:200px}
#processedRows,#eeMovedRows{overflow-y:auto;padding-right:6px}
#processedRows::-webkit-scrollbar,#eeMovedRows::-webkit-scrollbar{width:8px}
#processedRows::-webkit-scrollbar-track,#eeMovedRows::-webkit-scrollbar-track{background:transparent}
#processedRows::-webkit-scrollbar-thumb,#eeMovedRows::-webkit-scrollbar-thumb{background:#1c3945;border-radius:5px}
#processedRows::-webkit-scrollbar-thumb:hover,#eeMovedRows::-webkit-scrollbar-thumb:hover{background:#2a4c59}
.gate-temp-panel{padding-top:0}
.gate-temp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:4px 0 12px}
.gate-temp-head h2{margin:0 0 4px;font-size:18px}
.gate-temp-head p{margin:0;color:#8da7b4;font-size:11px}
.gate-temp-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:10px}
.gate-temp-grid{display:grid;grid-template-columns:3fr 1fr;gap:10px}
.temp-table-wrap{overflow:auto}
.temp-table th,.temp-table td{white-space:nowrap}
.temp-status{display:inline-block;padding:4px 8px;border-radius:12px;font-size:9px;font-weight:700}
.temp-status.active{background:#153d18;color:#80e86a}
.temp-status.expiring{background:#4b320b;color:#ffc95c}
.temp-status.pending{background:#27334a;color:#9fc3ff}
.temp-rules .auto-field{padding:10px 0}
@media(max-width:1350px){
 .gate-temp-kpis{grid-template-columns:repeat(2,1fr)}
 .gate-temp-grid{grid-template-columns:1fr}
}

/* v1.2 — processed-movements header + demo controls */

/* v1.2 — bay occupancy boards, trend charts, report modal, analytics charts (carried from v0.4) */
.kpi-icon.red{background:#8a2530}.kpi-icon.violet{background:#4a2b7a}
.bay-kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:12px}
.bay-kpi-row .kpi{min-height:78px}
.bay-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:12px;margin-bottom:12px;align-items:stretch}
.bay-board-panel,.bay-trend-panel{display:flex;flex-direction:column}
.dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin:0 4px 0 14px;vertical-align:middle}
.dot:first-child{margin-left:0}
.dot.ok{background:var(--green)}.dot.warn{background:var(--amber)}.dot.bad{background:var(--red)}.dot.free{background:#33505c}
.bay-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;flex:1}
.bay-slot{border-radius:6px;padding:9px;border:1px solid #1c3945;background:#0a1b26;min-height:78px;display:flex;flex-direction:column;justify-content:space-between;transition:box-shadow .15s ease}
.bay-slot .slot-id{font-size:10px;color:#8ea0a9;display:flex;align-items:center;gap:5px}
.bay-slot .slot-asset{font-weight:600;font-size:12.5px;margin:3px 0}
.bay-slot .slot-meta{font-size:10px;color:#aebcc3}
.bay-slot.free{border-style:dashed;color:#7f929c;background:#081620}
.bay-slot.free .slot-asset{color:#5d6f78;font-weight:400}
.bay-slot.slot-ok{border-color:#2c6b3d;box-shadow:inset 0 0 0 1px rgba(113,201,45,.14)}
.bay-slot.slot-warn{border-color:#8a6a1c;box-shadow:inset 0 0 0 1px rgba(255,177,24,.16)}
.bay-slot.slot-bad{border-color:#8a2a30;box-shadow:inset 0 0 0 1px rgba(255,51,51,.18)}
.zone-board{display:flex;flex-direction:column;gap:16px;justify-content:center;flex:1}
.zone-row .zone-head{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}
.zone-row .zone-head b{font-weight:600}
.zone-row .zone-head span{color:#9eacb4;font-size:11px}
.meter-track{height:11px;border-radius:6px;background:#0a1b26;border:1px solid #1c3945;overflow:hidden}
.meter-fill{height:100%;border-radius:6px 0 0 6px;transition:width .2s ease}
.zone-foot{display:flex;justify-content:space-between;margin-top:5px;font-size:10px;color:#8698a1}
.muted-note{font-size:10px;color:#7f929c;font-weight:400}
.trend-chart{width:100%;height:160px}
.trend-chart .tgrid line{stroke:#17323e;stroke-width:1}
.trend-chart .tline{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.trend-chart .tarea{opacity:.12}
.trend-chart .tpoint{fill:#06121b;stroke-width:2;cursor:pointer}
.trend-chart .taxis text{fill:#8e9ea6;font-size:9.5px}
.trend-caption{font-size:10px;color:#8698a1;margin-top:6px;text-align:center}

.modal-overlay{position:fixed;inset:0;background:rgba(2,8,12,.68);display:none;align-items:center;justify-content:center;z-index:60;padding:20px}
.modal-overlay.open{display:flex}
.modal-box{width:660px;max-width:100%;max-height:88vh;overflow:auto;background:linear-gradient(150deg,#0b1d29,#081722);border:1px solid #23414d;border-radius:10px;padding:22px}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px;gap:12px}
.modal-head h3{margin:0;font-size:17px}
.modal-head p{margin:4px 0 0;color:#9eacb4;font-size:11.5px}
.modal-close{background:transparent;border:1px solid #1f3945;color:#cfd9de;font-size:14px;cursor:pointer;border-radius:6px;width:28px;height:28px;flex:0 0 auto}
.modal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}
.modal-stat{background:#091923;border:1px solid #1c3945;border-radius:7px;padding:10px}
.modal-stat b{display:block;font-size:20px;color:var(--orange)}
.modal-stat span{font-size:10px;color:#9eacb4}
.modal-foot{margin-top:16px;text-align:right;display:flex;justify-content:flex-end;gap:8px}
.ghost-btn{background:transparent;border:1px solid #31505d;color:#dbe6ea;padding:8px 12px;border-radius:5px;cursor:pointer}

.analytics-charts{display:grid;grid-template-columns:1.3fr 1fr;gap:12px;margin-top:12px}
.analytics-charts .panel{min-height:230px}
.bar-chart{width:100%;height:190px}
.bar-chart .bgrid line{stroke:#17323e;stroke-width:1}
.bar-chart .bval{fill:#eef5f8;font-size:11px;font-weight:600}
.bar-chart .blabel{fill:#9eacb4;font-size:10px}
.donut-wrap{display:flex;align-items:center;gap:18px}
.donut-legend{flex:1;font-size:11px}
.donut-legend div{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px solid #142834}
.donut-legend div:last-child{border-bottom:0}
.donut-legend b{font-weight:600}
.donut-center-num{font-size:22px;font-weight:700;fill:#eef5f8}
.donut-center-lbl{font-size:9px;fill:#9eacb4}

.toast{position:fixed;bottom:22px;right:22px;background:#0d2230;border:1px solid #2a4c59;color:#eef5f8;padding:12px 16px;border-radius:8px;font-size:12px;max-width:320px;box-shadow:0 8px 24px rgba(0,0,0,.4);opacity:0;transform:translateY(8px);transition:opacity .25s ease,transform .25s ease;z-index:80}
.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1400px){.bay-grid{grid-template-columns:1fr}.analytics-charts{grid-template-columns:1fr}}
