/* Global Defense overview — white/gold live cyber-defense map */
.dashboard-shell.overview-active { grid-template-columns: minmax(0, 1fr); }
.dashboard-shell.overview-active .sidebar,
.dashboard-shell.overview-active .feed-panel { display: none; }
.dashboard-shell.overview-active .workspace { grid-column: 1 / -1; padding: 0; overflow: visible; }
.dashboard-shell.overview-active .topbar { grid-template-columns: 230px minmax(0,1fr) auto; }

.global-defense-page { min-height: calc(100vh - 72px); overflow-x: hidden; overflow-y: visible; background: #f9fafb; }
.global-defense-stage {
  --defense-gold: #f2b900;
  --defense-yellow: #ffd437;
  --defense-red: #ff5a3d;
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, 300px) minmax(640px, 1fr) minmax(270px, 300px);
  grid-template-rows: 210px minmax(390px, 1fr) 168px;
  gap: 16px 22px;
  height: max(calc(100svh - 72px), 848px);
  min-height: calc(100svh - 72px);
  overflow: hidden;
  padding: 24px clamp(22px, 1.7vw, 32px);
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,208,40,.11), transparent 28%),
    linear-gradient(115deg, rgba(255,255,255,.99), rgba(246,248,251,.95) 56%, rgba(255,255,255,.99));
}
.global-defense-stage::before { content: ""; position: absolute; z-index: -3; inset: 0; opacity: .46; background-image: linear-gradient(rgba(118,130,146,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(118,130,146,.045) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); }
.global-defense-stage::after { content: ""; position: absolute; z-index: -2; left: 18%; right: 14%; bottom: -18%; height: 62%; border-radius: 50%; border: 1px solid rgba(211,164,0,.16); box-shadow: 0 0 0 42px rgba(255,196,0,.025), 0 0 0 88px rgba(255,196,0,.018), inset 0 0 80px rgba(255,196,0,.035); transform: perspective(700px) rotateX(66deg); }

.defense-atmosphere { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.defense-atmosphere > i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--defense-yellow); box-shadow: 0 0 18px rgba(255,196,0,.7); animation: defense-float 7s ease-in-out infinite; }
.defense-atmosphere > i:nth-child(1) { left: 31%; top: 18%; }
.defense-atmosphere > i:nth-child(2) { left: 72%; top: 28%; animation-delay: -2.7s; }
.defense-atmosphere > i:nth-child(3) { left: 64%; top: 77%; animation-delay: -4.8s; }
.defense-atmosphere > span { position: absolute; left: 43%; top: 20%; width: 36%; aspect-ratio: 1; border: 1px solid rgba(255,204,30,.11); border-radius: 50%; animation: defense-orbit 28s linear infinite; }

.defense-copy { grid-column: 1; grid-row: 1; align-self: start; z-index: 5; min-width: 0; padding: 7px 8px 0 6px; }
.defense-copy .eyebrow { margin: 0 0 11px; color: #a87300; font-size: 12px; letter-spacing: .16em; }
.defense-copy h1 { margin: 0; color: #303640; font-size: clamp(23px, 1.45vw, 28px); line-height: 1.16; letter-spacing: -.035em; }
.defense-copy h1 strong { color: #d29a00; font-weight: 900; }
.defense-copy #overviewPostureReason { max-width: 280px; margin: 14px 0 0; color: #667180; font-size: 12px; line-height: 1.55; }
.defense-copy .overview-visibility-gaps { max-width: 360px; margin: 8px 0 0; padding: 7px 9px; border: 1px solid rgba(207, 143, 0, .3); border-radius: 8px; background: rgba(255, 246, 214, .76); color: #785a16; font: 700 9px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }

.defense-panel { position: relative; z-index: 4; min-width: 0; border: 1px solid rgba(176,186,199,.48); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 14px 38px rgba(47,57,72,.075), inset 0 1px rgba(255,255,255,.98); backdrop-filter: blur(16px) saturate(1.08); }
.defense-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(130deg, rgba(255,255,255,.58), transparent 42%); }
.defense-panel-title { position: relative; z-index: 1; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px 9px; border-bottom: 1px solid rgba(211,217,225,.72); }
.defense-panel-title h2 { margin: 0; color: #343b46; font-size: 12px; letter-spacing: .025em; }
.defense-panel-title h2 span, .defense-panel-title > span { color: #d39800; font-weight: 850; }
.defense-panel-title > span { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.defense-panel-title > span > i { width: 5px; height: 5px; border-radius: 50%; background: var(--defense-gold); box-shadow: 0 0 0 4px rgba(255,196,0,.1); animation: defense-status-pulse 2.2s ease-in-out infinite; }
.defense-panel-title small { color: #7f8997; font-size: 10px; }
.defense-panel-title .muted { color: #929aa6; }

.telemetry-panel { grid-column: 2; grid-row: 1; z-index: 8; width: min(680px, calc(100% - 32px)); height: 112px; margin-top: 14px; align-self: start; justify-self: center; }
.telemetry-panel .defense-panel-title { min-height: 37px; padding-block: 10px 5px; border-bottom: 0; }
.telemetry-panel .defense-panel-title h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telemetry-panel .defense-panel-title small { flex: 0 0 auto; }
.telemetry-metrics { display: grid; grid-template-columns: repeat(5,1fr); padding: 3px 12px 12px; }
.telemetry-metrics > span { position: relative; display: grid; gap: 2px; text-align: center; }
.telemetry-metrics > span + span::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 1px; background: #e1e5ea; }
.telemetry-metrics b { color: #303742; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.telemetry-metrics span:nth-child(-n+2) b { color: #d59c00; }
.telemetry-metrics small { color: #657080; font-size: 10px; }

.active-threat-panel { grid-column: 1; grid-row: 2; align-self: stretch; min-height: 0; max-height: none; overflow: hidden; }
.defense-threat-list { position: relative; z-index: 1; display: grid; padding: 5px 15px 11px; }
.defense-threat-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 62px; border-bottom: 1px solid rgba(226,230,235,.82); }
.defense-threat-row:last-child { border-bottom: 0; }
.defense-threat-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--defense-red); border-radius: 9px; color: var(--defense-red); background: rgba(255,90,61,.04); font-size: 12px; font-weight: 900; }
.defense-threat-row.medium .defense-threat-icon { border-color: #f0a80f; color: #cf8c00; background: rgba(255,196,0,.06); }
.defense-threat-row.low .defense-threat-icon { border-color: #e0bd39; color: #ad8200; }
.defense-threat-copy { min-width: 0; }
.defense-threat-copy b, .defense-threat-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.defense-threat-copy b { color: #343c48; font-size: 13px; }
.defense-threat-copy small { margin-top: 4px; color: #707b89; font-size: 11px; }
.defense-threat-risk { color: var(--defense-red); font-size: 10px; font-weight: 800; white-space: nowrap; }
.defense-threat-row.medium .defense-threat-risk, .defense-threat-row.low .defense-threat-risk { color: #c78d00; }
.defense-empty { margin: 28px 0; color: #75808e; text-align: center; font-size: 12px; }

.defense-globe-wrap { position: relative; z-index: 1; grid-column: 2; grid-row: 1 / 3; align-self: stretch; min-width: 0; min-height: 0; margin: 0; overflow: hidden; border: 1px solid rgba(187,196,207,.38); border-radius: 30px; background: radial-gradient(circle at 49% 58%, rgba(255,209,46,.13), transparent 34%), linear-gradient(180deg, rgba(255,255,255,.73), rgba(247,249,252,.48)); box-shadow: 0 24px 70px rgba(44,54,69,.065), inset 0 1px rgba(255,255,255,.88); pointer-events: none; }
.defense-globe-fallback { position: absolute; z-index: 0; left: var(--defense-globe-center-x, 49%); top: var(--defense-globe-center-y, 58%); width: min(calc(var(--defense-globe-radius, 220px) * 2), 760px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid rgba(154,167,183,.48); border-radius: 50%; background: radial-gradient(circle at 35% 27%, rgba(255,255,255,.98), rgba(244,247,250,.94) 53%, rgba(208,216,225,.65)); box-shadow: inset -24px -12px 50px rgba(130,145,162,.15), 0 0 0 18px rgba(255,208,42,.035), 0 0 60px rgba(255,208,42,.1); opacity: .86; pointer-events: none; }
.defense-globe-fallback::before, .defense-globe-fallback::after { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(130,145,162,.18); border-radius: 50%; }
.defense-globe-fallback::before { transform: scaleX(.42); box-shadow: 0 0 0 1px rgba(130,145,162,.12), 0 0 0 32px rgba(130,145,162,.08); }
.defense-globe-fallback::after { transform: scaleY(.42); box-shadow: 0 0 0 1px rgba(130,145,162,.12), 0 0 0 32px rgba(130,145,162,.08); }
.defense-globe-wrap.defense-map-ready .defense-globe-fallback { display: none; }
.defense-map-heading { position: absolute; z-index: 7; top: 140px; left: 22px; display: grid; gap: 4px; padding: 9px 12px; border: 1px solid rgba(174,184,196,.42); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(47,57,72,.075); backdrop-filter: blur(10px); }
.defense-map-heading span { display: flex; align-items: center; gap: 7px; color: #915f00; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.defense-map-heading span i { width: 8px; height: 8px; border-radius: 50%; background: var(--defense-red); box-shadow: 0 0 0 4px rgba(255,90,61,.13); }
.defense-map-heading small { color: #697483; font-size: 10px; }
.world-map-backdrop { position: absolute; z-index: 2; left: 49%; top: 58%; width: min(44%, 430px); aspect-ratio: 1; transform: translate(-50%,-50%); display: grid; place-items: center; overflow: hidden; border-radius: 50%; opacity: .28; pointer-events: none; }
.world-map-backdrop svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.world-map-backdrop path { fill: rgba(124,136,152,.58); stroke: rgba(83,98,116,.72); stroke-width: .8; vector-effect: non-scaling-stroke; }
#defenseIncidentPins { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.defense-incident-pin { position: absolute; z-index: 1; left: 0; top: 0; display: flex; align-items: center; gap: 6px; width: max-content; max-width: min(235px, 35%); padding: 5px 9px; border: 1px solid rgba(255,90,61,.5); border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 7px 16px rgba(61,70,82,.14); color: #6b4b00; font: 800 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; will-change: transform, opacity; }
.defense-incident-pin::before { content: ""; position: absolute; left: -7px; top: 50%; width: 7px; border-top: 1px solid currentColor; opacity: .65; }
.defense-incident-pin > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.defense-incident-pin > i { position: absolute; left: -17px; top: 50%; width: 9px; height: 9px; transform: translateY(-50%); border: 2px solid #fff; flex: 0 0 auto; border-radius: 50%; background: var(--defense-red); box-shadow: 0 0 0 3px rgba(255,90,61,.16), 0 0 12px rgba(255,90,61,.75); }
.defense-incident-pin.medium { border-color: rgba(240,168,15,.5); color: #8a6500; }
.defense-incident-pin.medium i { background: #f0a80f; box-shadow: 0 0 0 3px rgba(240,168,15,.16); }
.defense-incident-pin.low { border-color: rgba(224,189,57,.55); color: #8a7100; }
.defense-incident-pin.low i { background: #efc62a; box-shadow: 0 0 0 3px rgba(239,198,42,.16); }
#defenseGlobeCanvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.defense-core { position: absolute; z-index: 4; left: 49%; top: 58%; width: 74px; height: 88px; transform: translate(-50%,-50%); display: grid; place-items: center; filter: drop-shadow(0 12px 18px rgba(188,130,0,.17)); }
.defense-core > span { position: absolute; inset: -38px; border-radius: 50%; background: radial-gradient(circle, rgba(255,205,39,.26), rgba(255,205,39,.07) 35%, transparent 69%); animation: defense-core-breathe 3.6s ease-in-out infinite; }
.defense-core img { position: relative; z-index: 2; width: 74px; height: 74px; object-fit: contain; filter: brightness(1.02) saturate(1.12); }
.defense-core > i { position: absolute; z-index: 1; width: 86px; height: 86px; border: 1px solid rgba(244,184,0,.32); border-radius: 50%; animation: defense-ring-pulse 3.2s ease-out infinite; }
.defense-agent { position: absolute; z-index: 5; display: flex; align-items: center; gap: 7px; color: #636c79; animation: defense-agent-hover 4s ease-in-out infinite; }
.defense-agent > i { width: 40px; height: 46px; display: grid; place-items: center; border: 2px solid #efb900; border-radius: 10px 10px 14px 14px; background: rgba(255,255,255,.94); color: #6a5622; box-shadow: 0 7px 16px rgba(179,127,0,.12); font-size: 10px; font-style: normal; font-weight: 900; }
.defense-agent b, .defense-agent small { display: block; white-space: nowrap; }
.defense-agent b { color: #9f6c00; font-size: 11px; }
.defense-agent small { margin-top: 3px; color: #707b89; font-size: 10px; }
.agent-one { right: 7%; top: 32%; }
.agent-two { right: 3%; top: 57%; animation-delay: -1.5s; }
.agent-three { right: 10%; top: 78%; animation-delay: -3s; }
.defense-geo-attribution { position: absolute; z-index: 7; left: 20px; bottom: 13px; display: block; width: 230px; max-width: calc(100% - 40px); box-sizing: border-box; overflow: hidden; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.72); color: rgba(95,106,121,.72); font-size: 8px; line-height: 1.2; letter-spacing: .025em; pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
.defense-flow-panel { position: absolute; z-index: 8; left: 18px; bottom: 35px; width: min(440px, 52%); padding: 10px 11px 9px; border: 1px solid rgba(174,184,196,.5); border-radius: 14px; background: rgba(255,255,255,.88); box-shadow: 0 12px 28px rgba(47,57,72,.12), inset 0 1px rgba(255,255,255,.95); backdrop-filter: blur(13px) saturate(1.12); pointer-events: auto; }
.defense-flow-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 7px; border-bottom: 1px solid rgba(215,221,228,.75); }
.defense-flow-heading span, .defense-flow-heading small { display: block; }
.defense-flow-heading span { display: flex; align-items: center; gap: 6px; color: #936300; font-size: 10px; font-weight: 900; letter-spacing: .07em; }
.defense-flow-heading span i { width: 7px; height: 7px; border-radius: 50%; background: #ff5a3d; box-shadow: 0 0 0 4px rgba(255,90,61,.13), 0 0 13px rgba(255,90,61,.72); animation: defense-flow-blink 1.6s ease-in-out infinite; }
.defense-flow-heading small { margin-top: 3px; color: #7c8795; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.defense-flow-heading > b { color: #7c8795; font-size: 9px; white-space: nowrap; }
.defense-ip-flow { display: grid; gap: 5px; margin-top: 7px; }
.defense-flow-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr); align-items: center; gap: 7px; width: 100%; min-height: 54px; padding: 6px 7px; border: 1px solid rgba(226,230,235,.9); border-radius: 9px; background: rgba(255,255,255,.72); color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.defense-flow-row::after { content: ""; position: absolute; inset: 0; border-left: 2px solid #ff8978; opacity: .8; pointer-events: none; }
.defense-flow-row.high::after, .defense-flow-row.critical::after { border-color: #ff5a3d; }.defense-flow-row.medium::after { border-color: #e0a20d; }.defense-flow-row.low::after { border-color: #ddc03e; }
.defense-flow-row:hover { border-color: #e2b934; background: #fffaf0; box-shadow: 0 5px 14px rgba(203,157,0,.1); }
.defense-flow-endpoint { min-width: 0; display: grid; gap: 1px; }
.defense-flow-endpoint small { color: #987018; font-size: 8px; font-weight: 900; letter-spacing: .09em; }
.defense-flow-endpoint .defense-flow-country { color: #ad7800; font-size: 8px; letter-spacing: .025em; text-transform: none; }
.defense-flow-endpoint .defense-flow-side { color: #987018; font-size: 7px; letter-spacing: .12em; }
.defense-flow-endpoint strong, .defense-flow-endpoint em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.defense-flow-endpoint strong { color: #283548; font: 800 10px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }
.defense-flow-endpoint em { color: #7a8695; font-size: 8px; font-style: normal; }
.defense-flow-connector { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 7px 0 4px; }
.defense-flow-connector::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 13px; border-top: 1px solid rgba(211,159,0,.55); box-shadow: 0 0 7px rgba(255,196,0,.35); }
.defense-flow-connector b, .defense-flow-connector small { position: relative; z-index: 1; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.defense-flow-connector b { padding: 1px 4px; border-radius: 4px; background: rgba(255,253,245,.94); color: #986d00; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.defense-flow-connector small { color: #8b96a2; font-size: 7px; }
.defense-flow-packet { position: absolute; z-index: 2; top: 9px; left: 0; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 3px; background: #ffc400; box-shadow: 0 0 0 2px rgba(255,196,0,.22), 0 0 12px rgba(255,196,0,.95); animation: defense-ip-flow-packet 2.2s cubic-bezier(.42,0,.58,1) var(--flow-delay, 0ms) infinite; }
.defense-flow-row.high .defense-flow-packet, .defense-flow-row.critical .defense-flow-packet { background: #ff5a3d; box-shadow: 0 0 0 2px rgba(255,90,61,.2), 0 0 13px rgba(255,90,61,.9); }
.defense-flow-empty { margin: 8px 2px 3px; color: #7b8694; font-size: 9px; text-align: center; }
.defense-country-panel { position: relative; z-index: 8; grid-column: 3; grid-row: 1; align-self: stretch; min-width: 0; padding: 10px 11px 9px; border: 1px solid rgba(174,184,196,.5); border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 12px 28px rgba(47,57,72,.12), inset 0 1px rgba(255,255,255,.95); backdrop-filter: blur(13px) saturate(1.12); pointer-events: auto; }
.defense-country-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 7px; border-bottom: 1px solid rgba(215,221,228,.75); }
.defense-country-heading span { display: flex; align-items: center; gap: 6px; color: #936300; font-size: 10px; font-weight: 900; letter-spacing: .07em; }
.defense-country-heading span i { width: 7px; height: 7px; border-radius: 50%; background: #ffc400; box-shadow: 0 0 0 4px rgba(255,196,0,.13), 0 0 13px rgba(255,196,0,.72); }
.defense-country-heading small { display: block; margin-top: 3px; color: #7c8795; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.defense-country-heading > b { color: #7c8795; font-size: 9px; white-space: nowrap; }
.defense-country-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 7px; }
.defense-country-columns h3 { margin: 0 0 3px; color: #987018; font-size: 8px; letter-spacing: .13em; }
.defense-country-columns ol { display: grid; gap: 1px; max-height: 150px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.defense-country-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 4px; min-height: 18px; padding: 1px 3px; border-bottom: 1px solid rgba(230,234,239,.7); }
.defense-country-row b { color: #b58a1b; font: 800 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.defense-country-row span { overflow: hidden; color: #354152; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.defense-country-row em { color: #a06f00; font: 800 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; font-style: normal; }
.defense-country-empty { padding: 12px 2px; color: #7b8694; font-size: 9px; text-align: center; }
@keyframes defense-flow-blink { 50% { opacity: .38; transform: scale(.72); } }
@keyframes defense-ip-flow-packet { 0% { left: 0; opacity: 0; transform: scale(.72); } 9% { opacity: 1; } 47% { opacity: 1; transform: scale(1); } 91% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; transform: scale(.72); } }

.defense-network-panel { grid-column: 3; grid-row: 2; align-self: stretch; max-height: none; }
.defense-network-panel ul { position: relative; z-index: 1; display: grid; margin: 0; padding: 6px 15px 12px; list-style: none; }
.defense-network-panel li { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 60px; }
.defense-network-panel li > i { width: 32px; height: 36px; display: grid; place-items: center; border: 1px solid #efb900; border-radius: 8px 8px 11px 11px; color: #9e6c00; background: rgba(255,196,0,.05); font-size: 10px; font-style: normal; font-weight: 900; }
.defense-network-panel b, .defense-network-panel small { display: block; }
.defense-network-panel b { color: #343c48; font-size: 12px; }
.defense-network-panel small { margin-top: 3px; color: #707b89; font-size: 10px; }
.defense-network-panel em { color: #23845a; font-size: 10px; font-style: normal; font-weight: 800; }

.threat-map-panel { grid-column: 1; grid-row: 3; overflow: hidden; }
.defense-mini-map { position: relative; height: 83px; margin: 2px 12px 0; overflow: hidden; border: 1px solid rgba(174,184,196,.28); border-radius: 8px; background: linear-gradient(180deg, rgba(244,248,251,.96), rgba(232,239,245,.82)); }
#defenseMiniMapCanvas { display: block; width: 100%; height: 100%; }
.defense-map-status { display: block; max-width: calc(100% - 24px); margin: 4px 12px 0; overflow: hidden; color: #7d8998; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.map-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 4px 8px 10px; color: #677281; font-size: 9px; }
.map-legend span { display: flex; align-items: center; gap: 3px; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; background: #9aa3af; }
.map-legend i.critical { background: var(--defense-red); }.map-legend i.medium { background: #e99400; }.map-legend i.low { background: #efc62a; }.map-legend i.private { background: #3192d4; }

.defense-status-panel { grid-column: 2; grid-row: 3; z-index: 7; width: 100%; justify-self: center; }
.defense-status-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5,1fr); height: calc(100% - 44px); align-items: center; padding: 6px 10px; }
.defense-status-grid > span { display: grid; grid-template-columns: 36px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 6px 9px; }
.defense-status-grid i { grid-row: 1 / 3; width: 31px; height: 36px; display: grid; place-items: center; border: 2px solid #eab500; border-radius: 9px 9px 12px 12px; color: #a87500; font-size: 12px; font-style: normal; font-weight: 900; }
.defense-status-grid b { color: #3e4753; font-size: 11px; }
.defense-status-grid small { color: #6e7987; font-size: 10px; }
.defense-status-grid > span.warning i { border-color: #e0a400; background: rgba(255,196,0,.07); color: #9a6b00; }
.defense-status-grid > span.alert i { border-color: var(--defense-red); background: rgba(255,90,61,.06); color: var(--defense-red); }
.global-defense-stage[data-defense-state="critical"] #defenseStatusLabel { color: var(--defense-red); }
.global-defense-stage[data-defense-state="elevated"] #defenseStatusLabel { color: #d18d00; }

.defense-impact-panel { grid-column: 3; grid-row: 3; overflow: hidden; }
#defenseImpactChart { position: relative; z-index: 1; width: 100%; height: 96px; padding: 8px 12px 0; overflow: visible; }
#defenseImpactArea { fill: url(#defenseImpactFill); }
#defenseImpactLine { fill: none; stroke: #e4aa00; stroke-width: 2; vector-effect: non-scaling-stroke; }
#defenseImpactDots circle { fill: #ffc400; stroke: #fff; stroke-width: 1.5; }
.defense-impact-score { position: absolute; z-index: 2; right: 11px; bottom: 8px; display: flex; align-items: flex-end; gap: 6px; text-align: right; }
.defense-impact-score b { color: #c99200; font-size: 22px; line-height: 1; }
.defense-impact-score span { color: #66717f; font-size: 9px; line-height: 1.35; }

/* Phase 1 overview modes and unified investigation queue */
.overview-mode-switch { display: inline-flex; gap: 3px; margin-bottom: 12px; padding: 3px; border: 1px solid #e0e5eb; border-radius: 10px; background: rgba(255,255,255,.9); box-shadow: 0 5px 15px rgba(45,56,70,.06); }
.overview-mode-switch button { min-width: 74px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: #6a7482; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; }
.overview-mode-switch button.active { background: #171c26; color: #ffd437; }
.overview-mode-switch button:focus-visible { outline: 3px solid rgba(242,185,0,.3); outline-offset: 2px; }
.defense-panel-link { padding: 6px 8px; border: 1px solid #e5d58f; border-radius: 7px; background: #fffaf0; color: #8b6500; font-size: 9px; font-weight: 850; cursor: pointer; }
.defense-panel-link:hover, .defense-panel-link:focus-visible { border-color: #d7aa00; outline: none; background: #fff3c5; }
.defense-threat-list { max-height: calc(100% - 48px); overflow-y: auto; }
.defense-threat-row { width: 100%; padding: 0; border: 0; border-bottom: 1px solid rgba(226,230,235,.82); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.defense-threat-row:hover { background: #fffcf3; }
.defense-threat-row:focus-visible { outline: 3px solid rgba(234,180,0,.33); outline-offset: -3px; }
.defense-threat-risk { max-width: 68px; overflow: hidden; text-overflow: ellipsis; }

.executive-overview-panel { display: none; grid-column: 2 / 4; grid-row: 2 / 4; padding: 24px; overflow: auto; }
.global-defense-stage[data-overview-mode="executive"] .executive-overview-panel { display: block; }
.global-defense-stage[data-overview-mode="executive"] .defense-globe-wrap,
.global-defense-stage[data-overview-mode="executive"] .defense-network-panel,
.global-defense-stage[data-overview-mode="executive"] .threat-map-panel,
.global-defense-stage[data-overview-mode="executive"] .defense-status-panel,
.global-defense-stage[data-overview-mode="executive"] .defense-impact-panel { display: none; }
.global-defense-stage[data-overview-mode="executive"] .active-threat-panel { grid-row: 2 / 4; }
.executive-posture { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid #e5e9ee; }
.executive-posture .eyebrow { margin: 0; }
.executive-posture h2 { margin: 6px 0 0; color: #273141; font-size: clamp(22px, 2vw, 31px); }
.executive-posture p:last-child { max-width: 670px; margin: 8px 0 0; color: #697485; font-size: 12px; line-height: 1.6; }
.executive-posture > strong { flex: 0 0 auto; padding: 10px 13px; border-radius: 9px; background: #eef1f4; color: #647080; font-size: 11px; }
.executive-posture > strong[data-tone="protected"] { background: #e8f7ef; color: #18734c; }
.executive-posture > strong[data-tone="elevated"] { background: #fff4d2; color: #8a6200; }
.executive-posture > strong[data-tone="critical"] { background: #ffeaeb; color: #b42f32; }
.executive-risk-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.executive-risk-grid article { min-width: 0; padding: 16px; border: 1px solid #e5e9ee; border-radius: 12px; background: #fbfcfd; }
.executive-risk-grid small, .executive-risk-grid b, .executive-risk-grid span { display: block; }
.executive-risk-grid small { color: #7c8795; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.executive-risk-grid b { margin-top: 6px; color: #2c3543; font-size: 29px; font-variant-numeric: tabular-nums; }
.executive-risk-grid span { margin-top: 4px; overflow: hidden; color: #7e8896; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.executive-risk-grid article:first-child b { color: #c83a38; }
.executive-risk-grid article:nth-child(2) b { color: #bd6b13; }
.executive-lifecycle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.executive-lifecycle-grid article { padding: 12px 14px; border: 1px dashed #dce2e8; border-radius: 10px; background: #fafbfc; }
.executive-lifecycle-grid small, .executive-lifecycle-grid b, .executive-lifecycle-grid span { display: block; }
.executive-lifecycle-grid small { color: #7d8795; font-size: 8px; font-weight: 850; letter-spacing: .09em; }
.executive-lifecycle-grid b { margin-top: 5px; color: #3a4656; font-size: 17px; }
.executive-lifecycle-grid span { margin-top: 3px; color: #8a94a0; font-size: 8px; }
.executive-lifecycle-grid > p { grid-column: 1 / -1; margin: 0; padding: 9px 11px; border-left: 3px solid #d7aa00; background: #fffaf0; color: #785f22; font-size: 9px; line-height: 1.5; }
.executive-lifecycle-grid > p[hidden] { display: none; }
.executive-trend-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 4px 18px; margin-top: 20px; padding: 18px; border: 1px solid #e5e9ee; border-radius: 14px; background: linear-gradient(180deg,#fff,#fbfcfd); }
.executive-trend-card .eyebrow { margin: 0; }
.executive-trend-card h3 { margin: 4px 0 0; color: #303a49; font-size: 14px; }
.executive-trend-card > span { color: #74808e; font-size: 9px; }
#executiveTrendChart { grid-column: 1 / -1; width: 100%; height: 190px; margin-top: 8px; overflow: visible; }
#executiveTrendGrid line { stroke: #e9edf1; stroke-width: 1; vector-effect: non-scaling-stroke; }
#executiveIncidentTrend, #executiveCampaignTrend { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
#executiveIncidentTrend { stroke: #e05b45; }
#executiveCampaignTrend { stroke: #d6a500; }
.executive-trend-legend { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 14px; color: #687383; font-size: 9px; }
.executive-trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.executive-trend-legend i { width: 14px; border-top: 2px solid; }
.executive-trend-legend i.incident { border-color: #e05b45; }
.executive-trend-legend i.campaign { border-color: #d6a500; }

.defense-map-slot-0 { left: 8%; top: 22%; }.defense-map-slot-1 { left: 17%; top: 38%; }.defense-map-slot-2 { left: 26%; top: 56%; }.defense-map-slot-3 { left: 35%; top: 29%; }
.defense-map-slot-4 { left: 44%; top: 64%; }.defense-map-slot-5 { left: 53%; top: 43%; }.defense-map-slot-6 { left: 62%; top: 24%; }.defense-map-slot-7 { left: 71%; top: 59%; }
.defense-map-slot-8 { left: 80%; top: 34%; }.defense-map-slot-9 { left: 89%; top: 68%; }.defense-map-slot-10 { left: 13%; top: 73%; }.defense-map-slot-11 { left: 23%; top: 18%; }
.defense-map-slot-12 { left: 32%; top: 77%; }.defense-map-slot-13 { left: 41%; top: 46%; }.defense-map-slot-14 { left: 50%; top: 21%; }.defense-map-slot-15 { left: 59%; top: 72%; }
.defense-map-slot-16 { left: 68%; top: 41%; }.defense-map-slot-17 { left: 77%; top: 19%; }.defense-map-slot-18 { left: 86%; top: 52%; }.defense-map-slot-19 { left: 10%; top: 51%; }
.defense-map-slot-20 { left: 29%; top: 39%; }.defense-map-slot-21 { left: 48%; top: 81%; }.defense-map-slot-22 { left: 67%; top: 80%; }.defense-map-slot-23 { left: 84%; top: 77%; }
.defense-map-delay-0 { animation-delay: 0ms; }.defense-map-delay-1 { animation-delay: -500ms; }.defense-map-delay-2 { animation-delay: -1000ms; }.defense-map-delay-3 { animation-delay: -1500ms; }.defense-map-delay-4 { animation-delay: -2000ms; }

@keyframes defense-float { 50% { transform: translate3d(8px,-13px,0); opacity: .42; } }
@keyframes defense-orbit { to { transform: rotate(360deg); } }
@keyframes defense-status-pulse { 50% { opacity: .45; box-shadow: 0 0 0 7px rgba(255,196,0,0); } }
@keyframes defense-core-breathe { 50% { transform: scale(1.16); opacity: .66; } }
@keyframes defense-ring-pulse { 0% { transform: scale(.82); opacity: .9; } 75%,100% { transform: scale(1.45); opacity: 0; } }
@keyframes defense-agent-hover { 50% { transform: translateY(-7px); } }
@keyframes defense-map-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,61,.4); } 80%,100% { box-shadow: 0 0 0 9px rgba(255,90,61,0); } }

@media (max-width: 1240px) {
  .global-defense-stage { grid-template-columns: 210px minmax(450px,1fr) 220px; grid-template-rows: 205px minmax(380px,1fr) 160px; padding-inline: 18px; }
  .defense-copy h1 { font-size: 22px; }
  .defense-copy #overviewPostureReason { font-size: 11px; }
  .defense-agent span { display: none; }
  .telemetry-panel { width: 92%; }
  .defense-incident-pin { max-width: 170px; font-size: 9px; }
}

@media (max-width: 980px) {
  .global-defense-stage { grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); grid-template-rows: auto 460px auto auto; height: auto; min-height: auto; overflow: visible; }
  .defense-copy { grid-column: 1; grid-row: 1; }
  .telemetry-panel { grid-column: 2; grid-row: 1; width: 100%; }
  .active-threat-panel { grid-column: 1; grid-row: 2; align-self: stretch; max-height: none; }
  .defense-globe-wrap { grid-column: 2; grid-row: 2; margin: 0; border-radius: 24px; }
  .defense-country-panel { grid-column: 1 / -1; grid-row: 5; min-height: 170px; }
  .defense-map-heading { top: 18px; left: 18px; }
  #defenseIncidentPins { inset: 0; }
  .world-map-backdrop, .defense-core { top: 55%; }
  .defense-network-panel { grid-column: 1; grid-row: 3; align-self: stretch; max-height: none; }
  .defense-status-panel { grid-column: 2; grid-row: 3; width: 100%; }
  .threat-map-panel { grid-column: 1; grid-row: 4; }
  .defense-impact-panel { grid-column: 2; grid-row: 4; }
  .executive-overview-panel { grid-column: 2; grid-row: 2 / 5; }
  .global-defense-stage[data-overview-mode="executive"] .active-threat-panel { grid-row: 2 / 5; }
  .executive-risk-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .executive-lifecycle-grid { grid-template-columns: 1fr; }
  .defense-status-grid { grid-template-columns: repeat(2,1fr); }
  .defense-status-grid > span:last-child { display: none; }
}

@media (max-width: 780px) {
  .dashboard-shell.overview-active { display: block; padding-top: 64px; }
  .dashboard-shell.overview-active .sidebar { display: flex; }
  .dashboard-shell.overview-active .topbar { grid-template-columns: 42px 1fr auto; }
  .global-defense-page { min-height: calc(100dvh - 64px); }
  .global-defense-stage { display: flex; flex-direction: column; gap: 10px; padding: 16px 11px 26px; min-height: auto; }
  .defense-copy { order: 1; padding: 0 3px 7px; }
  .defense-copy h1 { font-size: 24px; }
  .defense-copy #overviewPostureReason { max-width: 560px; }
  .telemetry-panel { order: 2; width: 100%; height: auto; }
  .telemetry-metrics { grid-template-columns: repeat(3,1fr); gap: 9px 0; }
  .telemetry-metrics > span:nth-child(4)::before { display: none; }
  .defense-globe-wrap { order: 3; width: 100%; height: 440px; margin: 0; flex: none; }
  .defense-country-panel { order: 4; width: 100%; }
  .active-threat-panel { order: 5; max-height: none; }
  .defense-network-panel { order: 6; max-height: none; }
  .defense-status-panel { order: 7; width: 100%; }
  .defense-status-grid { grid-template-columns: repeat(2,1fr); padding-block: 10px; }
  .threat-map-panel { order: 8; }
  .defense-impact-panel { order: 9; min-height: 165px; }
  .executive-overview-panel { order: 3; width: 100%; padding: 18px; }
  .global-defense-stage[data-overview-mode="executive"] .active-threat-panel { order: 4; }
  .executive-posture { display: grid; }
  .executive-posture > strong { width: fit-content; }
  .defense-agent span { display: block; }
  .agent-one { right: 4%; }.agent-two { right: 0; }.agent-three { right: 7%; }
}

@media (max-width: 480px) {
  .defense-copy h1 { font-size: 20px; }
  .telemetry-metrics { grid-template-columns: repeat(2,1fr); }
  .telemetry-metrics > span:nth-child(3)::before, .telemetry-metrics > span:nth-child(5)::before { display: none; }
  .defense-globe-wrap { height: 370px; }
  .defense-country-panel { top: auto; }
  .defense-map-heading { left: 4%; top: 3%; }
  #defenseIncidentPins { inset: 0; }
  .defense-geo-attribution { left: 12px; bottom: 9px; font-size: 7px; }
  .defense-agent span { display: none; }
  .defense-status-grid { grid-template-columns: 1fr; }
  .overview-mode-switch { width: 100%; }
  .overview-mode-switch button { flex: 1; }
  .executive-risk-grid { grid-template-columns: 1fr 1fr; }
  .executive-risk-grid article { padding: 12px; }
  .executive-risk-grid b { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .defense-atmosphere *, .defense-core *, .defense-agent, .defense-map-dot, .defense-panel-title > span > i { animation: none !important; }
}

/* Active Threat Queue triage cards: the queue must explain the signal before
   asking an operator to open the underlying campaign. */
.defense-threat-list { gap: 10px; padding: 8px 11px 13px; align-content: start; }
.defense-threat-group { display: grid; gap: 7px; min-width: 0; }
.defense-threat-group + .defense-threat-group { padding-top: 10px; border-top: 1px solid rgba(211,217,225,.82); }
.defense-threat-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 0 3px; }
.defense-threat-group-heading > span { display: grid; gap: 2px; min-width: 0; }
.defense-threat-group-heading b { color: #896100; font-size: 9px; letter-spacing: .075em; }
.defense-threat-group-heading small { color: #7d8794; font-size: 9px; line-height: 1.3; }
.defense-threat-group-heading em { flex: 0 0 auto; padding: 3px 5px; border-radius: 999px; background: #fff5d7; color: #946d00; font-size: 8px; font-style: normal; font-weight: 850; }
.defense-threat-group.candidate .defense-threat-group-heading b { color: #61748e; }
.defense-threat-group.candidate .defense-threat-group-heading em { background: #eef3f8; color: #61748e; }
.defense-threat-more { margin: -1px 3px 0; color: #7c8794; font-size: 9px; }

.defense-threat-row { display: block; width: auto; min-height: 0; padding: 10px; border: 1px solid rgba(211,218,226,.92); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 4px 12px rgba(53,64,79,.045); font: inherit; text-align: left; cursor: default; }
.defense-threat-row:hover { background: #fffdf7; border-color: rgba(222,181,49,.72); }
.defense-threat-row:focus-visible { outline: 0; }
.defense-threat-card-header { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: start; gap: 7px; min-width: 0; }
.defense-threat-icon { width: 25px; height: 25px; border-radius: 8px; font-size: 11px; }
.defense-threat-copy { min-width: 0; }
.defense-threat-copy b { display: block; overflow: hidden; color: #283342; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.defense-threat-copy small { display: block; overflow: hidden; margin-top: 2px; color: #74808e; font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.defense-threat-copy .defense-threat-technique { color: #556678; }
.defense-threat-copy .defense-threat-recurrence { color: #a16e00; font-weight: 850; }
.defense-threat-badges { display: grid; justify-items: end; gap: 3px; max-width: 105px; text-align: right; }
.defense-threat-status { padding: 3px 5px; border-radius: 5px; background: #fff4d0; color: #8e6800; font-size: 8px; line-height: 1; white-space: nowrap; }
.defense-threat-status.candidate { background: #edf2f7; color: #5c718a; }
.defense-threat-severity { color: #c5523b; font-size: 8px; line-height: 1.15; }
.defense-threat-row.medium .defense-threat-severity, .defense-threat-row.low .defense-threat-severity { color: #b47c00; }

.defense-threat-meaning { display: grid; gap: 5px; margin-top: 9px; padding: 8px; border-radius: 8px; background: #fafbfc; }
.defense-threat-explain { display: grid; grid-template-columns: 78px minmax(0,1fr); align-items: start; gap: 6px; }
.defense-threat-explain b { color: #8b6500; font-size: 8px; letter-spacing: .04em; line-height: 1.35; }
.defense-threat-explain p { margin: 0; color: #4f5d6d; font-size: 9px; line-height: 1.38; }
.defense-threat-row.candidate .defense-threat-explain b { color: #5c718a; }

.defense-threat-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; margin-top: 8px; }
.defense-threat-facts > span { display: grid; gap: 2px; min-width: 0; padding: 5px 6px; border: 1px solid #edf0f3; border-radius: 7px; background: #fff; }
.defense-threat-facts > span.wide { grid-column: 1 / -1; }
.defense-threat-facts small { color: #8993a0; font-size: 8px; line-height: 1.2; }
.defense-threat-facts b { overflow: hidden; color: #354253; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.defense-threat-facts .mono b { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }

.defense-threat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.defense-threat-action { padding: 5px 6px; border: 1px solid #e5d58f; border-radius: 6px; background: #fffaf0; color: #805e00; font-family: inherit; font-size: 8px; font-weight: 800; line-height: 1.1; cursor: pointer; }
.defense-threat-action:hover, .defense-threat-action:focus-visible { border-color: #c99600; background: #fff2c5; outline: none; }
.defense-threat-operator-actions { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; padding-top: 5px; border-top: 1px dashed #e2e6eb; }
.defense-threat-operator-actions::before { content: "OPERATOR WORKFLOW"; flex: 0 0 100%; color: #8993a0; font-size: 7px; font-weight: 900; letter-spacing: .06em; }
.defense-threat-row.candidate .defense-threat-operator-actions::after { content: "Candidate ไม่มี isolate / block โดยตรง"; flex: 1 0 100%; color: #64788f; font-size: 7px; line-height: 1.2; }

@media (max-width: 1240px) {
  .defense-threat-explain { grid-template-columns: 70px minmax(0,1fr); }
  .defense-threat-copy b { font-size: 10px; }
  .defense-threat-explain p, .defense-threat-facts b { font-size: 8px; }
}

@media (max-width: 480px) {
  .defense-threat-card-header { grid-template-columns: 27px minmax(0,1fr); }
  .defense-threat-badges { grid-column: 2; grid-template-columns: auto auto; justify-items: start; justify-content: start; max-width: none; text-align: left; }
  .defense-threat-facts { grid-template-columns: 1fr; }
  .defense-threat-facts > span.wide { grid-column: auto; }
  .defense-threat-explain { grid-template-columns: 1fr; gap: 1px; }
}
