:root{color-scheme:dark;--ink:#07101b;--map:#0b1725;--panel:rgba(8,18,31,.86);--panel-soft:rgba(9,21,35,.78);--line:rgba(139,180,202,.16);--line-soft:rgba(255,255,255,.075);--text:#f3f7fa;--body:#c9d4dc;--muted:#8194a3;--dim:#5e7180;--aqua:#4cc9d8;--green:#31c48d;--amber:#e5a93d;--red:#e85d68;--blue:#599adf;--radius:7px;--side:304px;font-family:"PingFang SC","Microsoft YaHei UI",Inter,sans-serif}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:var(--ink);color:var(--text)}body{line-height:1.5}.app-shell{height:100%;min-width:1280px}.topbar{height:52px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;background:#050c15;border-bottom:1px solid var(--line-soft);position:relative;z-index:30}.brand{display:flex;align-items:center;gap:11px}.brand-symbol{width:29px;height:29px;position:relative;border:1px solid rgba(76,201,216,.45);border-radius:6px;transform:rotate(45deg)}.brand-symbol i{position:absolute;background:var(--aqua);border-radius:1px}.brand-symbol i:first-child{width:14px;height:4px;left:6px;top:6px}.brand-symbol i:last-child{width:4px;height:14px;right:6px;bottom:6px}.brand strong,.brand span{display:block}.brand strong{font-size:17px;line-height:1.15;letter-spacing:.02em}.brand span{margin-top:2px;color:#53697a;font:8px/1.1 "Arial Narrow",sans-serif;letter-spacing:.17em}.global-status{display:flex;align-items:center;gap:16px;color:#aebbc5;font-size:12px}.global-status>span{display:flex;align-items:center;gap:7px}.global-status button{padding:6px 0;border:0;background:none;color:#bcc8d0}.global-status .operator{padding-left:16px;border-left:1px solid var(--line-soft)}.demo-chip{padding:3px 8px!important;border:1px solid rgba(89,154,223,.22);border-radius:3px;color:#8bb9e7;background:rgba(89,154,223,.07)}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex:0 0 auto}.dot.green{background:var(--green)}.dot.amber{background:var(--amber)}.dot.red{background:var(--red)}
.workspace{position:relative;height:calc(100% - 52px);overflow:hidden;background:var(--map)}.map-canvas{position:absolute;inset:0;overflow:hidden;background:radial-gradient(circle at 53% 36%,rgba(31,79,111,.21),transparent 34%),linear-gradient(145deg,#0e1d2d,#091523 62%,#08121e)}.map-grid{position:absolute;inset:0;opacity:.3;background-image:linear-gradient(rgba(109,159,188,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(109,159,188,.055) 1px,transparent 1px);background-size:58px 58px}.contour{position:absolute;border-radius:50%;background:repeating-radial-gradient(ellipse,transparent 0 14px,rgba(122,169,194,.08) 15px 16px,transparent 17px 24px)}.contour-one{width:48%;height:60%;left:26%;top:-12%;transform:rotate(-12deg)}.contour-two{width:40%;height:50%;left:40%;bottom:-16%;transform:rotate(9deg)}.lake{position:absolute;border:1px solid rgba(76,201,216,.16);background:rgba(20,117,142,.105);border-radius:50%}.lake-one{width:45%;height:27%;left:29%;top:38%;transform:rotate(-7deg)}.lake-two{width:26%;height:52%;left:51%;top:23%;transform:rotate(27deg)}.road{position:absolute;height:2px;background:rgba(121,170,203,.48);box-shadow:0 0 8px rgba(89,154,223,.14);transform-origin:left center}.road-one{width:67%;left:17%;top:34%;transform:rotate(12deg)}.road-two{width:57%;left:32%;top:73%;transform:rotate(-19deg)}.road-three{width:46%;left:41%;top:26%;transform:rotate(58deg);opacity:.6}.map-name{position:absolute;color:rgba(129,148,163,.54);font-size:12px}.name-one{left:46%;top:37%}.name-two{left:58%;top:54%}.name-three{left:63%;top:69%}.map-search{position:absolute;left:calc(var(--side) + 34px);top:16px;width:308px;height:38px;display:flex;align-items:center;border:1px solid var(--line);border-radius:5px;background:rgba(8,18,31,.82);backdrop-filter:blur(9px);color:var(--muted);font-size:13px}.map-search>span{margin:0 10px 0 12px;font-size:20px}.map-search p{flex:1}.map-search button{height:100%;padding:0 14px;border:0;border-left:1px solid var(--line-soft);background:none;color:#a9b8c2;font-size:12px}.map-summary{position:absolute;left:calc(var(--side) + 34px);top:64px;display:flex;gap:7px}.map-summary>span{display:flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid var(--line-soft);border-radius:4px;background:rgba(8,18,31,.73);color:#aebbc5;font-size:11px}.map-actions{position:absolute;right:calc(var(--side) + 34px);top:42%;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:5px;overflow:hidden;background:rgba(8,18,31,.82)}.map-actions button{width:36px;height:36px;border:0;border-bottom:1px solid var(--line-soft);background:none;color:#c8d4dc;font-size:17px}.map-actions button:last-child{border:0}.geo-marker{position:absolute;display:grid;grid-template-columns:17px auto;column-gap:8px;z-index:2}.geo-marker>i{grid-row:1/3;width:13px;height:13px;margin-top:5px;border:3px solid #dff7f7;border-radius:50%;background:var(--aqua);outline:2px solid rgba(76,201,216,.35)}.geo-marker strong,.geo-marker span{display:block}.geo-marker strong{font-size:12px}.geo-marker span{color:#728797;font-size:11px}.station-marker{left:48%;top:25%}.camera-marker{left:57%;top:43%}.camera-marker>i{background:var(--green);outline-color:rgba(49,196,141,.35)}.drone-marker{left:42%;top:53%}.drone-marker>i{background:var(--amber);outline-color:rgba(229,169,61,.35)}.warning-marker{left:63%;top:32%}.warning-marker>i{background:var(--red);outline-color:rgba(232,93,104,.35)}.warning-marker>div{padding:6px 9px;border:1px solid rgba(232,93,104,.28);border-radius:4px;background:rgba(28,14,23,.88)}.event-path{position:absolute;left:49%;top:30%;width:17%;height:15%;border-right:1px dashed rgba(232,93,104,.45);border-bottom:1px dashed rgba(232,93,104,.45);transform:skewX(-23deg)}.map-footer{position:absolute;left:50%;bottom:11px;display:flex;align-items:center;gap:8px;transform:translateX(-50%);color:#6d8090;font-size:10px}.map-footer b{width:52px;border-top:2px solid #8194a3}
.side-column{position:absolute;z-index:12;top:16px;bottom:16px;width:var(--side);display:grid;gap:14px}.left-column{left:16px;grid-template-rows:46% 1fr}.right-column{right:16px;grid-template-rows:29% 40% 1fr}.panel{min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);backdrop-filter:blur(10px);box-shadow:0 14px 32px rgba(0,0,0,.2)}.panel-header{height:62px;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line-soft)}.panel-header span,.panel-header h2{display:block}.panel-header span{color:#728797;font-size:11px}.panel-header h2{margin:2px 0 0;font-size:16px;line-height:1.3;letter-spacing:.01em}.panel-header em{font-style:normal;font-size:11px}.panel-header button{border:0;background:none;color:#9eafbb;font-size:12px}.good{color:#65d6aa}.risk{padding:3px 7px;border-radius:3px;color:#f3bd5f;background:rgba(229,169,61,.08)}.standby{color:#f0bd66}.station-card{height:68px;padding:11px 14px;display:grid;grid-template-columns:43px 1fr auto;align-items:center;gap:10px;border-bottom:1px solid var(--line-soft)}.station-id{width:42px;height:42px;display:grid;place-items:center;border:1px solid rgba(76,201,216,.24);border-radius:5px;background:rgba(76,201,216,.055);color:#82dce5;font:600 14px "Consolas",monospace}.station-card strong,.station-card small{display:block}.station-card strong{font-size:14px}.station-card small{margin-top:3px;color:var(--muted);font-size:11px}.station-card>b{color:#65d6aa;font-size:12px}.device-list{padding:4px 14px}.device-list>div{height:46px;display:grid;grid-template-columns:15px 1fr auto;align-items:center;border-bottom:1px solid var(--line-soft)}.device-list span b,.device-list span small{display:block}.device-list span b{color:#d7e0e6;font-size:13px;font-weight:550}.device-list span small{margin-top:1px;color:#708594;font-size:11px}.device-list em{color:#adbbc4;font-size:11px;font-style:normal}.sensor-grid{display:grid;grid-template-columns:repeat(2,1fr);border-bottom:1px solid var(--line-soft)}.sensor-grid>div{height:67px;padding:9px 13px;border-right:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}.sensor-grid>div:nth-child(even){border-right:0}.sensor-grid span{display:block;color:#90a2af;font-size:12px}.sensor-grid strong{display:inline-block;margin-top:3px;color:#edf3f6;font:650 21px "Consolas","Roboto Mono",monospace}.sensor-grid small{margin-left:3px;color:#6d8190;font-size:10px}.sensor-grid .attention strong{color:#f0ba58}.trend-title{display:flex;justify-content:space-between;padding:10px 13px 0;color:#a8b6c0;font-size:11px}.trend-title b{color:#718594;font-weight:400}.trend-title b i,.trend-title b em{display:inline-block;width:9px;margin:0 4px 3px 7px;border-top:2px solid var(--aqua)}.trend-title b em{border-color:var(--amber)}.trend-chart{display:block;width:calc(100% - 26px);height:78px;margin:2px 13px 0}.trend-chart line{stroke:rgba(255,255,255,.06)}.trend-area{fill:url(#waterFill)}.trend-line{fill:none;stroke:var(--aqua);stroke-width:1.6}.threshold{fill:none;stroke:var(--amber);stroke-width:1;stroke-dasharray:5 5}.chart-time{display:flex;justify-content:space-between;margin:-3px 13px 0;color:#5f7382;font:9px Consolas,monospace}
.alert-tabs{height:40px;padding:0 11px;display:flex;align-items:end;gap:4px;border-bottom:1px solid var(--line-soft)}.alert-tabs button{height:34px;padding:0 9px;border:0;border-bottom:2px solid transparent;background:none;color:#768a99;font-size:12px}.alert-tabs button.active{border-color:var(--aqua);color:#dce5ea}.alert-items{padding:8px 11px}.alert-row{width:100%;height:50px;margin-bottom:7px;padding:7px 9px;display:grid;grid-template-columns:14px 1fr auto;align-items:center;text-align:left;border:1px solid var(--line-soft);border-radius:5px;background:rgba(0,0,0,.1);color:#fff}.alert-row.active{border-color:rgba(232,93,104,.28);background:rgba(87,23,33,.1)}.alert-row span b,.alert-row span small{display:block}.alert-row span b{font-size:12px}.alert-row span small{margin-top:2px;color:#748897;font-size:10px}.alert-row em{color:#f3949b;font-size:10px;font-style:normal}.alert-row:not(.active) em{color:#edbc61}.event-time{font:12px Consolas,monospace!important}.incident-location{height:59px;margin:9px 12px 0;padding:8px 9px;display:grid;grid-template-columns:20px 1fr auto;align-items:center;border:1px solid var(--line-soft);border-radius:5px;background:rgba(255,255,255,.018)}.incident-location>i{width:11px;height:11px;border:3px solid #ffe4e6;border-radius:50%;background:var(--red)}.incident-location strong,.incident-location span{display:block}.incident-location strong{font-size:13px}.incident-location span{margin-top:2px;color:#728797;font-size:10px}.incident-location button{padding:6px 8px;border:1px solid var(--line);border-radius:3px;background:none;color:#aebcc5;font-size:10px}.incident-stats{display:grid;grid-template-columns:1fr 1fr;margin:8px 12px 0;border-top:1px solid var(--line-soft);border-left:1px solid var(--line-soft)}.incident-stats>div{padding:7px 9px;border-right:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}.incident-stats span,.incident-stats strong{display:block}.incident-stats span{color:#8093a1;font-size:10px}.incident-stats strong{margin-top:2px;font:600 13px Consolas,monospace}.evidence{margin:8px 12px 0}.evidence>span{color:#8da0ad;font-size:11px}.evidence>div{height:25px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line-soft)}.evidence b{font-size:10px;font-weight:500}.evidence em{color:#69cba5;font-size:10px;font-style:normal}.incident-actions{height:34px;margin:8px 12px;display:grid;grid-template-columns:1fr 1fr;gap:7px}.incident-actions button{border:1px solid var(--line);border-radius:4px;background:rgba(255,255,255,.02);color:#aebbc5;font-size:11px}.incident-actions .confirm{border-color:rgba(76,201,216,.28);background:rgba(76,201,216,.08);color:#9de4eb}.drone-health{height:57px;margin:9px 12px 0;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:8px}.drone-glyph{width:38px;height:38px;display:grid;place-items:center;border:1px solid rgba(76,201,216,.23);border-radius:5px;color:var(--aqua);font-size:20px}.drone-health strong,.drone-health span{display:block}.drone-health strong{font-size:13px}.drone-health span{margin-top:2px;color:#738796;font-size:10px}.drone-health>b{color:#8de0b9;font:600 16px Consolas,monospace}.mission-data{display:grid;grid-template-columns:repeat(3,1fr);margin:2px 12px 8px;border-top:1px solid var(--line-soft);border-left:1px solid var(--line-soft)}.mission-data>div{padding:6px;border-right:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}.mission-data span,.mission-data b{display:block;text-align:center}.mission-data span{color:#7e919f;font-size:9px}.mission-data b{margin-top:2px;font:600 12px Consolas,monospace}.dispatch-button{width:calc(100% - 24px);height:33px;margin:0 12px;border:1px solid rgba(232,93,104,.28);border-radius:4px;background:rgba(232,93,104,.08);color:#efa1a7;font-size:11px}.response-panel p{margin:5px 0 0;text-align:center;color:#607482;font-size:9px}
.video-console{position:absolute;z-index:8;left:calc(var(--side) + 30px);right:calc(var(--side) + 30px);bottom:28px;height:276px;border:1px solid rgba(139,180,202,.2);border-radius:var(--radius);background:rgba(5,13,23,.88);backdrop-filter:blur(11px);box-shadow:0 16px 36px rgba(0,0,0,.26);overflow:hidden}.console-head{height:48px;padding:0 13px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line-soft)}.console-head h2,.console-head span{display:inline}.console-head h2{margin:0;font-size:15px}.console-head>div:first-child span{margin-left:9px;color:#718493;font-size:11px}.console-status{display:flex;align-items:center;gap:7px;color:#a9b7c0;font-size:11px}.console-status button{margin-left:7px;padding:5px 9px;border:1px solid var(--line-soft);border-radius:3px;background:rgba(255,255,255,.02);color:#adbac3;font-size:10px}.video-pair{height:calc(100% - 48px);padding:9px;display:grid;grid-template-columns:1fr 1fr;gap:9px}.feed{position:relative;min-width:0;overflow:hidden;border:1px solid rgba(139,180,202,.14);border-radius:4px;background:#02070d}.feed.selected{border-color:rgba(76,201,216,.28)}.feed img{width:100%;height:100%;object-fit:cover}.feed-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,10,17,.42),transparent 33%,rgba(4,10,17,.5))}.feed-top,.feed-bottom{position:absolute;left:9px;right:9px;display:flex;align-items:center;justify-content:space-between;color:#e3ebef;font-size:10px}.feed-top{top:8px}.feed-top span{padding:3px 6px;border-radius:3px;background:rgba(3,8,14,.68)}.feed-top .dot{margin-right:5px}.feed-top b{font-size:10px}.feed-bottom{bottom:7px;color:#c4d0d7}.detection-zone{position:absolute;left:55%;top:49%;width:31%;height:29%;border:1px solid rgba(229,169,61,.82)}.detection-zone span{position:absolute;left:-1px;top:-18px;padding:2px 5px;background:var(--amber);color:#101722;font-size:8px}.flight-reticle{position:absolute;left:50%;top:51%;width:38px;height:38px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.48);border-radius:50%}.flight-reticle:before,.flight-reticle:after{content:"";position:absolute;background:rgba(255,255,255,.48)}.flight-reticle:before{width:54px;height:1px;left:-9px;top:18px}.flight-reticle:after{width:1px;height:54px;left:18px;top:-9px}.flight-reticle i{position:absolute;width:5px;height:5px;left:16px;top:16px;border-radius:50%;background:rgba(255,255,255,.7)}
button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid var(--aqua);outline-offset:2px}@media(max-width:1500px){:root{--side:280px}.map-search,.map-summary{left:310px}.map-actions{right:310px}.video-console{left:306px;right:306px}.sensor-grid>div{height:62px}.sensor-grid strong{font-size:19px}}@media(max-height:820px){.side-column{top:12px;bottom:12px;gap:10px}.panel-header{height:54px;padding:8px 12px}.station-card{height:57px;padding:7px 12px}.device-list{padding:2px 12px}.device-list>div{height:39px}.sensor-grid>div{height:54px;padding:6px 11px}.sensor-grid strong{font-size:18px}.trend-chart{height:58px}.alert-tabs{height:34px}.alert-tabs button{height:30px}.alert-items{padding:6px 9px}.alert-row{height:43px;margin-bottom:5px;padding:5px 7px}.incident-location{height:49px;margin-top:6px}.incident-stats{margin-top:6px}.incident-stats>div{padding:5px 8px}.evidence{margin-top:5px}.evidence>div{height:21px}.incident-actions{height:28px;margin-top:5px}.drone-health{height:46px;margin-top:5px}.mission-data{margin-bottom:5px}.dispatch-button{height:27px}.response-panel p{display:none}.video-console{height:226px;bottom:20px}.console-head{height:41px}.video-pair{height:calc(100% - 41px);padding:7px}.global-status>span:nth-child(3){display:none}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Real GIS canvas: the map is the visual anchor; every control stays quiet above it. */
.gis-map{position:absolute;inset:0;z-index:0;background:#0a1723}
.gis-map .leaflet-tile-pane{filter:brightness(.90) saturate(1.02) contrast(1.01)}
.gis-map:after{content:"";position:absolute;inset:0;z-index:450;pointer-events:none;background:linear-gradient(90deg,rgba(5,13,23,.42),transparent 26%,transparent 74%,rgba(5,13,23,.42)),linear-gradient(180deg,rgba(5,13,23,.2),transparent 30%)}
.leaflet-container{font-family:"PingFang SC","Microsoft YaHei UI",sans-serif}
.leaflet-control-attribution{margin:0 322px 4px 0!important;padding:2px 6px!important;border-radius:3px;background:rgba(4,10,17,.72)!important;color:#718493!important;font-size:9px!important}
.leaflet-control-attribution a{color:#86a7b8!important}
.leaflet-marker-pane,.leaflet-overlay-pane{z-index:460}
.map-search,.map-summary,.map-actions,.map-footer{z-index:9}
.map-offline{position:absolute;z-index:5;left:50%;top:32%;transform:translate(-50%,-50%);width:260px;padding:18px;text-align:center;border:1px solid var(--line);border-radius:6px;background:rgba(7,16,27,.88);color:#d9e4e9}
.map-offline[hidden]{display:none}
.map-offline strong,.map-offline span{display:block}
.map-offline strong{font-size:14px}.map-offline span{margin-top:4px;color:var(--muted);font-size:11px}
.map-device-icon{background:none!important;border:0!important}
.device-pin{position:absolute;left:1px;top:5px;width:21px;height:21px;border:1px solid rgba(223,247,247,.72);border-radius:50%;background:rgba(5,13,23,.85);box-shadow:0 3px 10px rgba(0,0,0,.35)}
.device-pin i{position:absolute;inset:5px;border-radius:50%;background:var(--aqua)}
.device-pin.camera i{background:var(--green)}.device-pin.drone i{background:var(--amber)}.device-pin.alert i{background:var(--red)}
.device-label{position:absolute;left:28px;top:0;min-width:116px;padding:4px 7px;border:1px solid rgba(139,180,202,.15);border-radius:4px;background:rgba(5,13,23,.84);box-shadow:0 5px 14px rgba(0,0,0,.25);white-space:nowrap}
.device-label strong,.device-label small{display:block;text-shadow:0 1px 2px #000}
.device-label strong{color:#edf4f7;font-size:11px;line-height:15px}.device-label small{color:#83a0af;font-size:9px;line-height:13px}
.map-device-icon:has(.device-pin.alert) .device-label{border-color:rgba(232,93,104,.36);background:rgba(32,12,20,.9)}
@media(max-width:1500px){.leaflet-control-attribution{margin-right:296px!important}}

/* Alignment pass: shared baseline, calmer panels, no map-provider badge. */
:root{--panel:rgba(8,18,31,.94);--panel-soft:rgba(9,21,35,.90)}
.side-column{isolation:isolate}
.side-column>.panel{background:var(--panel)}
.right-column{grid-template-rows:26% 43% 1fr}
.video-console{bottom:16px;background:rgba(5,13,23,.82)}
.leaflet-control-attribution{display:none!important}
@media(max-height:820px){.right-column{grid-template-rows:26% 43% 1fr}.video-console{bottom:12px}}
@media(max-height:820px){.incident-panel .panel-header{height:48px}.incident-panel .incident-location{height:43px;margin-top:4px}.incident-panel .incident-stats{margin-top:4px}.incident-panel .incident-stats>div{padding:3px 8px}.incident-panel .incident-actions{display:none}.incident-panel .evidence{margin-top:2px;margin-bottom:8px}.incident-panel .evidence>div{height:17px}.response-panel .panel-header{height:48px}.response-panel .drone-health{height:44px;margin-top:2px}.response-panel .mission-data{margin-top:0;margin-bottom:5px}.response-panel .mission-data>div{padding:4px}.response-panel .dispatch-button{height:26px;margin-bottom:7px}.response-panel p{display:none}}

/* Compact right workflow at control-screen heights. Heights follow content instead of percentages. */
@media(max-height:820px){
  .right-column{grid-template-rows:181px 276px minmax(0,1fr);gap:10px}
  .alert-panel .panel-header{height:48px;padding:7px 12px}
  .alert-panel .alert-tabs{height:34px}
  .alert-panel .alert-tabs button{height:30px}
  .alert-panel .alert-items{padding:6px 9px}
  .alert-panel .alert-row{height:38px;margin-bottom:3px;padding:3px 7px}
  .incident-panel .panel-header{height:46px;padding:6px 12px}
  .incident-panel .incident-location{height:39px;margin:4px 10px 0;padding:4px 7px}
  .incident-panel .incident-stats{margin:4px 10px 0}
  .incident-panel .incident-stats>div{height:37px;padding:3px 7px}
  .incident-panel .evidence{margin:4px 10px 0}
  .incident-panel .evidence>span{display:block;height:17px}
  .incident-panel .evidence>div{height:17px}
  .incident-panel .incident-actions{display:grid;height:23px;margin:3px 10px 6px}
  .response-panel .panel-header{height:42px;padding:4px 12px}
  .response-panel .drone-health{height:38px;margin:0 10px}
  .response-panel .mission-data{margin:0 10px 4px}
  .response-panel .mission-data>div{height:33px;padding:2px}
  .response-panel .dispatch-button{width:calc(100% - 20px);height:24px;margin:0 10px 6px}
}

/* Keep the incident action bar fully visible under browser/font scaling. */
.incident-panel{position:relative}
@media(max-height:820px){
  .incident-panel{padding-bottom:35px}
  .incident-panel .incident-actions{position:absolute;left:10px;right:10px;bottom:8px;width:auto;height:25px;margin:0;z-index:2;background:rgba(8,18,31,.96)}
}

/* 1080p displays commonly fall below 960 CSS pixels after browser scaling. */
@media(max-height:960px){
  .side-column{gap:10px}
  .right-column{grid-template-rows:181px 320px minmax(166px,1fr);gap:10px}
  .alert-panel .panel-header{height:48px;padding:7px 12px}
  .alert-panel .alert-tabs{height:34px}
  .alert-panel .alert-tabs button{height:30px}
  .alert-panel .alert-items{padding:6px 9px}
  .alert-panel .alert-row{height:38px;margin-bottom:3px;padding:3px 7px}
  .incident-panel{padding-bottom:0}
  .incident-panel .panel-header{height:46px;padding:6px 12px}
  .incident-panel .incident-location{height:42px;margin:5px 10px 0;padding:4px 7px}
  .incident-panel .incident-stats{margin:5px 10px 0}
  .incident-panel .incident-stats>div{height:38px;padding:4px 7px}
  .incident-panel .evidence{margin:5px 10px 0}
  .incident-panel .evidence>span{display:block;height:18px}
  .incident-panel .evidence>div{height:19px}
  .incident-panel .incident-actions{position:static;width:auto;height:32px;margin:6px 10px 9px;background:transparent}
  .response-panel .panel-header{height:42px;padding:4px 12px}
  .response-panel .drone-health{height:38px;margin:0 10px}
  .response-panel .mission-data{margin:0 10px 4px}
  .response-panel .mission-data>div{height:33px;padding:2px}
  .response-panel .dispatch-button{width:calc(100% - 20px);height:24px;margin:0 10px 6px}
  .response-panel p{display:none}
}
@media(max-height:820px){
  .right-column{grid-template-rows:181px 280px minmax(162px,1fr)}
  .incident-panel .incident-location{height:39px;margin-top:4px}
  .incident-panel .incident-stats{margin-top:4px}
  .incident-panel .incident-stats>div{height:36px;padding:3px 7px}
  .incident-panel .evidence{margin-top:3px}
  .incident-panel .evidence>span{height:16px}
  .incident-panel .evidence>div{height:17px}
  .incident-panel .incident-actions{height:30px;margin:4px 10px 8px}
}

/* Tall control screens: use the available height instead of leaving a dead zone. */
@media(min-height:961px){
  .right-column{grid-template-rows:24% 42% 1fr;gap:12px}
  .alert-panel{display:grid;grid-template-rows:62px 40px 1fr}
  .alert-panel .alert-items{min-height:0;padding:12px;display:grid;grid-template-rows:1fr 1fr;gap:10px}
  .alert-panel .alert-row{height:auto;min-height:56px;margin:0;padding:10px 12px}
  .incident-panel{display:grid;grid-template-rows:62px 70px 112px minmax(104px,1fr) 48px}
  .incident-panel .incident-location{height:auto;margin:10px 14px 0;padding:10px 12px}
  .incident-panel .incident-stats{margin:10px 14px 0}
  .incident-panel .incident-stats>div{display:flex;flex-direction:column;justify-content:center;padding:8px 11px}
  .incident-panel .evidence{margin:10px 14px 0;display:grid;grid-template-rows:22px repeat(3,1fr)}
  .incident-panel .evidence>div{height:auto;min-height:25px}
  .incident-panel .incident-actions{height:auto;margin:8px 14px 12px}
  .response-panel{display:grid;grid-template-rows:62px minmax(86px,1fr) 72px 44px 26px}
  .response-panel .drone-health{width:auto;height:auto;margin:0 16px;grid-template-columns:48px 1fr auto;gap:12px;align-self:stretch}
  .response-panel .drone-glyph{width:46px;height:46px}
  .response-panel .drone-health strong{font-size:15px}
  .response-panel .drone-health span{font-size:11px}
  .response-panel .drone-health>b{font-size:20px}
  .response-panel .mission-data{height:auto;margin:0 16px 6px}
  .response-panel .mission-data>div{display:flex;flex-direction:column;justify-content:center;padding:7px}
  .response-panel .mission-data span{font-size:10px}
  .response-panel .mission-data b{font-size:14px}
  .response-panel .dispatch-button{align-self:stretch;width:auto;height:auto;margin:0 16px 6px;font-size:12px}
  .response-panel p{height:auto;margin:0;display:flex;align-items:center;justify-content:center;font-size:10px}
}

/* Final right-column system: preserve every field while using the full vertical canvas. */
@media(min-height:961px){
  .right-column{grid-template-rows:253px 435px minmax(262px,1fr);gap:16px}
  .right-column .panel{border-radius:8px}

  .alert-panel{grid-template-rows:64px 46px minmax(0,1fr)}
  .alert-panel .panel-header{padding:12px 16px}
  .alert-panel .alert-tabs{height:46px;padding:0 14px;gap:10px}
  .alert-panel .alert-tabs button{height:41px;padding:0 12px}
  .alert-panel .alert-items{padding:14px;gap:12px}
  .alert-panel .alert-row{min-height:58px;padding:10px 12px;grid-template-columns:16px 1fr auto}
  .alert-panel .alert-row span small{margin-top:4px}
  .alert-panel .alert-row em{padding:3px 6px}

  .incident-panel{grid-template-rows:64px 76px 122px minmax(100px,1fr) 58px}
  .incident-panel .panel-header{padding:12px 16px}
  .incident-panel .incident-location{margin:12px 14px 0;padding:10px 12px}
  .incident-panel .incident-stats{margin:12px 14px 0}
  .incident-panel .incident-stats>div{padding:10px 12px}
  .incident-panel .incident-stats strong{margin-top:5px}
  .incident-panel .evidence{margin:12px 14px 0;grid-template-rows:24px repeat(3,1fr)}
  .incident-panel .evidence>div{min-height:27px;padding:0 2px}
  .incident-panel .evidence em{padding-left:12px}
  .incident-panel .incident-actions{height:40px;margin:8px 14px 10px;gap:10px}

  .response-panel{grid-template-rows:58px minmax(76px,1fr) 68px 46px 24px}
  .response-panel .panel-header{height:58px;padding:9px 16px}
  .response-panel .drone-health{margin:0 16px;grid-template-columns:50px 1fr auto;gap:14px}
  .response-panel .drone-glyph{width:48px;height:48px}
  .response-panel .mission-data{margin:0 16px 6px}
  .response-panel .mission-data>div{padding:7px 8px}
  .response-panel .mission-data b{margin-top:5px}
  .response-panel .dispatch-button{height:36px;margin:0 16px 10px}
  .response-panel p{padding:0 16px 5px}
}

/* High-screen definitive layout: outer cards and inner sections both stretch. */
@media(min-height:961px){
  .right-column{grid-template-rows:minmax(250px,1fr) minmax(420px,1.72fr) minmax(300px,1.38fr);gap:18px}

  .alert-panel{display:grid;grid-template-rows:64px 48px minmax(0,1fr)}
  .alert-panel .alert-items{display:grid;grid-template-rows:repeat(2,minmax(60px,1fr));gap:14px;padding:16px}
  .alert-panel .alert-row{height:auto;margin:0;padding:12px 14px}

  .incident-panel{display:grid;grid-template-rows:64px minmax(76px,.85fr) minmax(120px,1.25fr) minmax(120px,1.35fr) 64px}
  .incident-panel .incident-location{height:auto;margin:12px 16px 0;padding:12px 14px}
  .incident-panel .incident-stats{height:auto;margin:12px 16px 0}
  .incident-panel .incident-stats>div{height:auto;padding:10px 12px}
  .incident-panel .evidence{height:auto;margin:12px 16px 0;grid-template-rows:26px repeat(3,minmax(28px,1fr))}
  .incident-panel .evidence>div{height:auto;padding:0 4px}
  .incident-panel .incident-actions{height:42px;margin:10px 16px 12px}

  .response-panel{display:grid;grid-template-rows:64px minmax(100px,1.35fr) minmax(84px,1fr) 58px 38px}
  .response-panel .panel-header{height:64px;padding:12px 16px}
  .response-panel .drone-health{height:auto;margin:0 18px;align-self:stretch;grid-template-columns:52px 1fr auto;gap:14px}
  .response-panel .drone-glyph{width:50px;height:50px}
  .response-panel .mission-data{height:auto;margin:0 18px 12px}
  .response-panel .mission-data>div{height:auto;padding:10px 8px}
  .response-panel .dispatch-button{width:auto;height:44px;margin:0 18px 14px}
  .response-panel p{height:38px;margin:0;padding:0 18px 10px;display:flex;align-items:center;justify-content:center}
}

/* Internal layout only. Card dimensions remain controlled by .right-column. */
@media(min-height:700px){
  .alert-panel{display:grid;grid-template-rows:auto auto minmax(0,1fr)}
  .alert-panel .alert-items{min-height:0;display:grid;grid-template-rows:repeat(2,minmax(0,1fr));align-items:stretch}
  .alert-panel .alert-row{height:auto}

  .incident-panel{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto}
  .incident-panel .incident-location,.incident-panel .incident-stats,.incident-panel .evidence,.incident-panel .incident-actions{align-self:stretch}
  .incident-panel .evidence{min-height:0;display:grid;grid-template-rows:auto repeat(3,minmax(0,1fr))}
  .incident-panel .evidence>div{height:auto}

  .response-panel{display:grid;grid-template-rows:auto minmax(0,1.35fr) minmax(0,.9fr) minmax(36px,.48fr) auto}
  .response-panel .drone-health{width:auto;height:auto;align-self:stretch;margin-left:16px;margin-right:16px}
  .response-panel .mission-data{height:auto;align-self:stretch;margin-left:16px;margin-right:16px}
  .response-panel .mission-data>div{height:auto;display:flex;flex-direction:column;justify-content:center}
  .response-panel .dispatch-button{width:auto;height:auto;min-height:36px;align-self:stretch;margin-left:16px;margin-right:16px}
  .response-panel p{height:auto;min-height:28px;align-self:stretch;display:flex;align-items:center;justify-content:center;margin:0;padding:6px 16px 10px}
}

/*
 * Right workflow sizing for the 1080p control screen.
 * This is deliberately the final override: older experimental media rules above
 * must not compress the content back into the top of each card.
 */
@media (min-height: 900px) {
  .right-column {
    grid-template-rows: 260px 410px minmax(270px, 1fr);
    gap: 14px;
  }

  .right-column .panel-header {
    height: 64px;
    padding: 12px 16px;
  }
  .right-column .panel-header h2 { font-size: 17px; }
  .right-column .panel-header span,
  .right-column .panel-header em { font-size: 12px; }

  .alert-panel {
    grid-template-rows: 64px 46px 1fr;
  }
  .alert-panel .alert-tabs {
    height: 46px;
    padding: 0 14px;
    gap: 10px;
  }
  .alert-panel .alert-tabs button {
    height: 41px;
    padding: 0 10px;
    font-size: 13px;
  }
  .alert-panel .alert-items {
    padding: 12px 14px 14px;
    grid-template-rows: repeat(2, 1fr);
    gap: 9px;
  }
  .alert-panel .alert-row {
    min-height: 0;
    padding: 9px 11px;
    grid-template-columns: 16px 1fr auto;
  }
  .alert-panel .alert-row span b { font-size: 13px; }
  .alert-panel .alert-row span small { margin-top: 3px; font-size: 11px; }
  .alert-panel .alert-row em { padding-left: 10px; font-size: 11px; }

  .incident-panel {
    padding-bottom: 0;
    grid-template-rows: 64px 76px 108px 106px 56px;
  }
  .incident-panel .incident-location {
    height: auto;
    margin: 10px 14px 0;
    padding: 10px 12px;
  }
  .incident-panel .incident-location strong { font-size: 14px; }
  .incident-panel .incident-location span { margin-top: 3px; font-size: 11px; }
  .incident-panel .incident-location button { padding: 7px 10px; font-size: 11px; }
  .incident-panel .incident-stats {
    height: auto;
    margin: 10px 14px 0;
  }
  .incident-panel .incident-stats > div {
    height: auto;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .incident-panel .incident-stats span { font-size: 11px; }
  .incident-panel .incident-stats strong { margin-top: 4px; font-size: 14px; }
  .incident-panel .evidence {
    height: auto;
    margin: 8px 14px 0;
    grid-template-rows: 24px repeat(3, 1fr);
  }
  .incident-panel .evidence > span { height: auto; font-size: 12px; }
  .incident-panel .evidence > div { min-height: 0; padding: 0 2px; }
  .incident-panel .evidence b,
  .incident-panel .evidence em { font-size: 11px; }
  .incident-panel .incident-actions {
    position: static;
    width: auto;
    height: 40px;
    margin: 7px 14px 9px;
    gap: 10px;
    background: transparent;
  }
  .incident-panel .incident-actions button { font-size: 12px; }

  .response-panel {
    grid-template-rows: 64px minmax(88px, 1fr) 78px 48px 30px;
  }
  .response-panel .drone-health {
    width: auto;
    height: auto;
    margin: 0 16px;
    grid-template-columns: 48px 1fr auto;
    gap: 13px;
  }
  .response-panel .drone-glyph { width: 48px; height: 48px; }
  .response-panel .drone-health strong { font-size: 14px; }
  .response-panel .drone-health span { margin-top: 4px; font-size: 11px; }
  .response-panel .drone-health > b { font-size: 19px; }
  .response-panel .mission-data {
    height: auto;
    margin: 0 16px 8px;
  }
  .response-panel .mission-data > div {
    height: auto;
    padding: 9px 7px;
  }
  .response-panel .mission-data span { font-size: 10px; }
  .response-panel .mission-data b { margin-top: 5px; font-size: 13px; }
  .response-panel .dispatch-button {
    width: auto;
    height: 38px;
    min-height: 38px;
    margin: 0 16px 10px;
    font-size: 12px;
  }
  .response-panel p {
    height: auto;
    min-height: 30px;
    margin: 0;
    padding: 4px 16px 9px;
    font-size: 10px;
  }
}

/* Unified command / air-operations navigation. */
.topbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(420px, 1fr);
}
.workspace-switch {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.workspace-switch a {
  position: relative;
  min-width: 112px;
  padding: 7px 16px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  color: #738796;
  text-decoration: none;
}
.workspace-switch a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: transparent;
}
.workspace-switch a span { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.workspace-switch a small { margin-top: 1px; color: #43596a; font: 7px/1 Consolas, monospace; letter-spacing: .14em; }
.workspace-switch a:hover { color: #c9d7df; background: rgba(255,255,255,.018); }
.workspace-switch a.active {
  border-color: rgba(76,201,216,.09);
  color: #e8f5f7;
  background: linear-gradient(180deg, rgba(76,201,216,.07), transparent);
}
.workspace-switch a.active::after { background: var(--aqua); }
.workspace-switch a.active small { color: #5faab5; }
.global-status { justify-self: end; }
.global-status .language-toggle {
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
}
.global-status .language-toggle:hover {
  border-color: var(--line);
  background: rgba(255,255,255,.025);
  color: #e3ebef;
}

.feed .live-media {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
  background: #02070d;
}
.feed[data-video-state="checking"] .feed-overlay,
.feed[data-video-state="offline"] .feed-overlay,
.feed[data-video-state="unconfigured"] .feed-overlay { background: rgba(2,7,13,.78); }
.feed-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: min(78%, 280px);
  transform: translate(-50%, -50%);
  text-align: center;
}
.feed-hint strong,
.feed-hint span { display: block; }
.feed-hint strong { color: #d8e2e8; font-size: 12px; }
.feed-hint span { margin-top: 5px; color: #728797; font-size: 9px; }
.feed-top,.feed-bottom,.detection-zone,.flight-reticle { z-index: 5; }
.primary-station-feed {
  position: absolute;
  left: calc(var(--side) + 30px);
  right: calc(var(--side) + 30px);
  top: 16px;
  bottom: 308px;
  border: 1px solid rgba(139,180,202,.2);
  border-radius: var(--radius);
  background: #02070d;
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
}
.primary-station-feed img,
.primary-station-feed .live-media { object-fit: contain; }
.primary-station-feed .feed-overlay {
  background:
    linear-gradient(90deg, rgba(4,10,17,.46), transparent 24%, transparent 76%, rgba(4,10,17,.46)),
    linear-gradient(180deg, rgba(4,10,17,.28), transparent 24%, transparent 64%, rgba(4,10,17,.58));
}
.primary-station-feed .feed-top {
  left: 13px;
  right: 13px;
  top: 11px;
}
.primary-station-feed .feed-bottom {
  left: 13px;
  right: 13px;
  bottom: 10px;
}
.map-feed { isolation: isolate; }
.map-feed .gis-map { z-index: 0; }
.map-feed .gis-map:after {
  background: linear-gradient(180deg, rgba(5,13,23,.18), transparent 35%, rgba(5,13,23,.32));
}
.map-feed .map-search {
  left: 10px;
  top: 10px;
  width: min(55%, 292px);
  height: 32px;
  background: rgba(5,13,23,.88);
}
.map-feed .map-search > span { margin-left: 10px; font-size: 17px; }
.map-feed .map-search p { margin: 0; }
.map-feed .map-search button { padding: 0 11px; }
.map-feed .map-summary {
  left: 10px;
  top: 49px;
  gap: 5px;
}
.map-feed .map-summary > span {
  padding: 3px 7px;
  background: rgba(5,13,23,.84);
  font-size: 9px;
}
.map-feed .map-actions {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5,13,23,.88);
}
.map-feed .map-actions button { width: 30px; height: 30px; font-size: 14px; }
.map-feed .map-offline {
  top: 52%;
  width: 220px;
  padding: 13px;
}
.map-feed-label {
  position: absolute;
  z-index: 9;
  left: 10px;
  right: 10px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  color: #c6d2d9;
  font-size: 9px;
}
.map-feed-label span {
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(3,8,14,.72);
}
.map-feed-label b { font-size: 10px; }
.console-status .dot:not(.green):not(.amber) { background: #647786; }
.dispatch-button.queued {
  border-color: rgba(49,196,141,.3);
  background: rgba(49,196,141,.08);
  color: #7bd9b4;
}
.platform-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 28px;
  max-width: 420px;
  padding: 10px 15px;
  border: 1px solid rgba(139,180,202,.22);
  border-radius: 5px;
  color: #dce7ec;
  background: rgba(5,13,23,.94);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  font-size: 12px;
}
.platform-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1450px) {
  .topbar { grid-template-columns: minmax(220px, 1fr) auto minmax(340px, 1fr); }
  .global-status > span:nth-child(3) { display: none; }
  .workspace-switch a { min-width: 102px; padding-left: 12px; padding-right: 12px; }
}

/* Actual in-app/browser viewport: 720p-class CSS height. */
@media (min-height: 680px) and (max-height: 899px) {
  .side-column { top: 12px; bottom: 12px; gap: 10px; }
  .right-column { grid-template-rows: 184px 298px minmax(148px, 1fr); gap: 7px; }

  .right-column .panel-header {
    height: 48px;
    padding: 7px 12px;
  }
  .right-column .panel-header h2 { font-size: 16px; }
  .primary-station-feed { top: 12px; bottom: 250px; }

  .alert-panel { grid-template-rows: 44px 32px 1fr; }
  .alert-panel .panel-header { height: 44px; padding: 5px 12px; }
  .alert-panel .panel-header > div { min-width: 0; }
  .alert-panel .panel-header h2 { margin-top: 1px; line-height: 1.2; }
  .alert-panel .panel-header .risk { flex: 0 0 auto; margin-left: 12px; }
  .alert-panel .alert-tabs { height: 32px; padding: 0 12px; gap: 8px; align-items: end; }
  .alert-panel .alert-tabs button { height: 29px; padding: 0 8px; font-size: 12px; line-height: 29px; white-space: nowrap; }
  .alert-panel .alert-items {
    padding: 4px 10px;
    grid-template-rows: repeat(2, 48px);
    align-content: center;
    gap: 4px;
  }
  .alert-panel .alert-row {
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 7px 10px;
    grid-template-columns: 16px minmax(0, 1fr) 34px;
    column-gap: 5px;
    overflow: hidden;
  }
  .alert-panel .alert-row > span { min-width: 0; align-self: center; }
  .alert-panel .alert-row span b {
    overflow: hidden;
    font-size: 12px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .alert-panel .alert-row span small {
    overflow: hidden;
    margin-top: 2px;
    font-size: 10px;
    line-height: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .alert-panel .alert-row em {
    width: 34px;
    padding: 0;
    justify-self: end;
    text-align: right;
    font-size: 10px;
    line-height: 16px;
    white-space: nowrap;
  }

  .incident-panel {
    padding-bottom: 0;
    grid-template-rows: 48px 52px 94px 68px 36px;
  }
  .incident-panel .incident-location {
    height: auto;
    margin: 6px 10px 0;
    padding: 6px 8px;
  }
  .incident-panel .incident-location strong { font-size: 13px; }
  .incident-panel .incident-location span { font-size: 10px; }
  .incident-panel .incident-location button { padding: 6px 8px; font-size: 10px; }
  .incident-panel .incident-stats { height: auto; margin: 6px 10px 0; }
  .incident-panel .incident-stats > div {
    height: auto;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .incident-panel .incident-stats span { font-size: 10px; }
  .incident-panel .incident-stats strong { margin-top: 3px; font-size: 13px; }
  .incident-panel .evidence {
    height: auto;
    margin: 4px 10px 0;
    grid-template-rows: 17px repeat(3, 1fr);
  }
  .incident-panel .evidence > span { height: auto; font-size: 11px; }
  .incident-panel .evidence > div { height: auto; min-height: 0; padding: 0 1px; }
  .incident-panel .evidence b,
  .incident-panel .evidence em { font-size: 10px; }
  .incident-panel .incident-actions {
    position: static;
    width: auto;
    height: 30px;
    margin: 3px 10px 6px;
    gap: 7px;
    background: transparent;
  }

  .response-panel {
    grid-template-rows: 42px 40px 32px 25px 9px;
  }
  .response-panel .panel-header { height: 42px; padding-top: 4px; padding-bottom: 4px; }
  .response-panel .drone-health {
    width: auto;
    height: auto;
    margin: 0 10px;
    grid-template-columns: 39px 1fr auto;
    gap: 8px;
  }
  .response-panel .drone-glyph { width: 34px; height: 34px; }
  .response-panel .drone-health strong { font-size: 13px; }
  .response-panel .drone-health span { font-size: 9px; }
  .response-panel .drone-health > b { font-size: 16px; }
  .response-panel .mission-data { height: auto; margin: 0 10px 4px; }
  .response-panel .mission-data > div { height: auto; padding: 3px 4px; }
  .response-panel .mission-data span { font-size: 9px; }
  .response-panel .mission-data b { margin-top: 2px; font-size: 12px; }
  .response-panel .dispatch-button {
    width: auto;
    height: 25px;
    min-height: 25px;
    margin: 0 10px 4px;
    font-size: 10px;
  }
  .response-panel p {
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0 10px 1px;
    font-size: 8px;
  }
}

/*
 * Never let the workflow column exceed the visible workspace.
 * Fractional tracks consume only the height left after the two gutters, so the
 * drone response card always shares the same bottom edge as the other columns.
 */
@media (min-height: 900px) {
  .right-column {
    grid-template-rows:
      minmax(0, .90fr)
      minmax(0, 1.45fr)
      minmax(0, .95fr);
    gap: 12px;
  }
  .right-column > .panel {
    min-height: 0;
    max-height: 100%;
  }

  .incident-panel {
    grid-template-rows: 54px 62px 90px minmax(92px, 1fr) 46px;
  }
  .incident-panel .panel-header { height: 54px; padding: 8px 14px; }
  .incident-panel .incident-location { margin: 8px 14px 0; padding: 8px 10px; }
  .incident-panel .incident-stats { margin: 8px 14px 0; }
  .incident-panel .incident-stats > div { padding: 7px 10px; }
  .incident-panel .evidence { margin: 7px 14px 0; grid-template-rows: 21px repeat(3, 1fr); }
  .incident-panel .evidence > div { min-height: 0; }
  .incident-panel .incident-actions { height: 34px; margin: 5px 14px 7px; }

  .response-panel {
    grid-template-rows: 52px minmax(62px, 1fr) 54px 36px 20px;
  }
  .response-panel .panel-header { height: 52px; padding: 7px 14px; }
  .response-panel .drone-health { margin: 0 14px; grid-template-columns: 42px 1fr auto; gap: 10px; }
  .response-panel .drone-glyph { width: 40px; height: 40px; }
  .response-panel .mission-data { margin: 0 14px 5px; }
  .response-panel .mission-data > div { padding: 5px 6px; }
  .response-panel .dispatch-button { height: 30px; min-height: 30px; margin: 0 14px 6px; }
  .response-panel p { min-height: 20px; padding: 0 14px 4px; font-size: 9px; }
}

/* Alert rows are real two-line records, not text squeezed into a single line. */
.alert-panel .alert-row {
  min-height: 56px;
  padding: 8px 12px;
  grid-template-columns: 16px minmax(0, 1fr) 40px;
  column-gap: 8px;
  align-items: center;
}
.alert-panel .alert-copy {
  min-width: 0;
  min-height: 34px;
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
}
.alert-panel .alert-copy b,
.alert-panel .alert-copy small {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-panel .alert-copy b { font-size: 13px; line-height: 18px; }
.alert-panel .alert-copy small { font-size: 11px; line-height: 14px; }
.alert-panel .alert-row > .dot,
.alert-panel .alert-row > em { align-self: center; }
.alert-panel .alert-row > em {
  width: 40px;
  padding: 0;
  text-align: right;
  white-space: nowrap;
}

@media (min-height: 700px) and (max-height: 899px) {
  .right-column { grid-template-rows: 200px 294px minmax(136px, 1fr); }
  .alert-panel { grid-template-rows: 44px 32px minmax(0, 1fr); }
  .alert-panel .alert-items {
    padding: 4px 10px;
    grid-template-rows: repeat(2, minmax(56px, 1fr));
    gap: 4px;
  }
  .alert-panel .alert-row { height: auto; min-height: 56px; }
}

@media (min-height: 900px) {
  .right-column {
    grid-template-rows: minmax(260px, .95fr) minmax(0, 1.45fr) minmax(0, .95fr);
  }
  .alert-panel { grid-template-rows: 58px 42px minmax(0, 1fr); }
  .alert-panel .alert-items {
    padding: 12px 14px 14px;
    grid-template-rows: repeat(2, minmax(60px, 1fr));
    gap: 10px;
  }
  .alert-panel .alert-row { height: auto; min-height: 60px; padding: 10px 12px; }
}

/* Simplified decision cards: retain operational data and give every row room. */
.incident-panel .incident-location {
  grid-template-columns: 20px minmax(0, 1fr) auto;
}
.incident-panel .incident-location strong {
  line-height: 20px;
}
.incident-panel .incident-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.incident-panel .incident-stats > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.incident-panel .incident-stats span,
.incident-panel .incident-stats strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-panel .evidence {
  display: grid;
  grid-template-rows: auto repeat(2, minmax(28px, 1fr));
}
.incident-panel .evidence > div {
  min-height: 28px;
}
.response-panel {
  display: grid;
}
.response-panel .panel-header {
  justify-content: flex-start;
}
.response-panel .drone-health,
.response-panel .mission-data,
.response-panel .dispatch-button {
  align-self: stretch;
}

@media (min-height: 700px) and (max-height: 899px) {
  .right-column { grid-template-rows: 196px 270px minmax(164px, 1fr); gap: 7px; }
  .alert-panel .alert-items { grid-template-rows: repeat(2, minmax(54px, 1fr)); }
  .alert-panel .alert-row { min-height: 54px; padding-top: 7px; padding-bottom: 7px; }

  .incident-panel {
    grid-template-rows: 46px 54px 64px 64px 42px;
  }
  .incident-panel .panel-header { height: 46px; padding: 6px 12px; }
  .incident-panel .incident-location { margin: 6px 10px 0; padding: 7px 9px; }
  .incident-panel .incident-stats { margin: 6px 10px 0; }
  .incident-panel .incident-stats > div { padding: 6px 7px; }
  .incident-panel .incident-stats span { font-size: 9px; }
  .incident-panel .incident-stats strong { margin-top: 3px; font-size: 12px; }
  .incident-panel .evidence { margin: 5px 10px 0; grid-template-rows: 18px repeat(2, 1fr); }
  .incident-panel .evidence > div { min-height: 0; }
  .incident-panel .incident-actions { height: 32px; margin: 5px 10px; }

  .response-panel { grid-template-rows: 42px 50px 40px 32px; }
  .response-panel .panel-header { height: 42px; padding: 5px 12px; }
  .response-panel .drone-health { margin: 0 10px; }
  .response-panel .mission-data { margin: 0 10px; }
  .response-panel .mission-data > div { padding: 5px 4px; }
  .response-panel .dispatch-button { height: 28px; min-height: 28px; margin: 0 10px 4px; }
}

@media (min-height: 900px) {
  .right-column {
    grid-template-rows: minmax(260px, .92fr) minmax(320px, 1.22fr) minmax(230px, .86fr);
  }
  .incident-panel {
    grid-template-rows: 54px 66px 78px minmax(82px, 1fr) 48px;
  }
  .incident-panel .incident-location { margin: 9px 14px 0; padding: 9px 11px; }
  .incident-panel .incident-stats { margin: 9px 14px 0; }
  .incident-panel .incident-stats > div { padding: 9px 8px; }
  .incident-panel .evidence { margin: 8px 14px 0; grid-template-rows: 22px repeat(2, 1fr); }
  .incident-panel .incident-actions { height: 36px; margin: 6px 14px; }

  .response-panel { grid-template-rows: 52px minmax(72px, 1fr) 58px 42px; }
  .response-panel .drone-health { margin: 0 14px; }
  .response-panel .mission-data { margin: 0 14px; }
  .response-panel .mission-data > div { padding: 7px 6px; }
  .response-panel .dispatch-button { height: 34px; min-height: 34px; margin: 0 14px 8px; }
}
