/* ===== Platform upgrade: portal switch, network map, backups, security, AI tickets, network health, client portal ===== */
[hidden] { display: none !important; }
html { overflow-x: hidden; }
.label { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 4px; font-size: 12.5px; font-weight: 600; font-family: var(--mono); letter-spacing: .02em; }
.seg button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(34,211,238,.4), 0 0 14px rgba(34,211,238,.15); }
.seg .short { display: none; }
.org-pick { display: flex; align-items: center; gap: 8px; }
body.is-client .live { color: var(--accent); }

/* ---------- Section tabs ---------- */
.views { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--border); background: rgba(10,14,19,.9); overflow-x: auto; scrollbar-width: none; position: sticky; top: 57px; z-index: 9; backdrop-filter: blur(6px); }
.views::-webkit-scrollbar { display: none; }
.vtab { background: none; border: 0; color: var(--muted); padding: 11px 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; font-family: var(--mono); }
.vtab:hover { color: var(--text); }
.vtab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); text-shadow: 0 0 12px rgba(34,211,238,.45); }
.tab-alert { display: inline-grid; place-items: center; min-width: 17px; height: 17px; border-radius: 9px; background: var(--bad); color: #1a0505; font-size: 10.5px; margin-left: 4px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .45; } }
.view { animation: viewslide .35s ease-out; }
@keyframes viewslide { from { transform: translateY(6px); } to { transform: none; } }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Monograms + icons ---------- */
.mono-badge { --h: 190; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 7px; font: 700 11.5px/1 var(--mono); letter-spacing: .02em; color: hsl(var(--h) 85% 78%); background: linear-gradient(140deg, hsl(var(--h) 60% 22%), hsl(var(--h) 55% 12%)); box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 40% / .55); }
.mono-badge.sm { width: 22px; height: 22px; font-size: 9.5px; border-radius: 5px; }
.mono-badge.lg { width: 58px; height: 58px; font-size: 20px; border-radius: 12px; box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 45% / .7), 0 0 24px hsl(var(--h) 70% 45% / .35); }
.org-cell { display: inline-flex; align-items: center; gap: 8px; }
.type-ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; opacity: .85; }
.monos { display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; }

/* ---------- Scan / glow effects ---------- */
.scanfx { position: relative; overflow: hidden; }
.scanfx::after { content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(34,211,238,.06) 70%, rgba(34,211,238,.16)); animation: scan 6s linear infinite; }
@keyframes scan { to { top: 110%; } }
.card { transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: #26384a; }
.kpi .value { text-shadow: 0 0 18px currentColor; }
.kpi .value:not(.s-ok):not(.s-warn):not(.s-bad) { text-shadow: 0 0 18px rgba(34,211,238,.25); }
.feed li.fresh { animation: slide .35s ease-out, freshglow 2.4s ease-out; }
@keyframes freshglow { 0% { background: rgba(34,211,238,.16); box-shadow: inset 3px 0 0 var(--accent); } 100% { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
#dist .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- Hero strip ---------- */
.cmd-hero { position: relative; overflow: hidden; isolation: isolate; margin: -20px calc(50% - 50vw) 14px; padding: 40px max(20px, calc(50vw - 640px)) 28px; border-bottom: 1px solid #1f3a48; }
.cmd-bg { position: absolute; inset: 0; z-index: -2; background: url("img/hero-network.jpg") center 40%/cover no-repeat, #070a0e; }
.cmd-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,10,14,.9) 0%, rgba(7,10,14,.5) 48%, rgba(7,10,14,.12) 100%), linear-gradient(180deg, transparent 60%, var(--bg) 100%), linear-gradient(rgba(34,211,238,.045) 1px, transparent 1px) 0 0/28px 28px, linear-gradient(90deg, rgba(34,211,238,.045) 1px, transparent 1px) 0 0/28px 28px; }
.cmd-title { max-width: 640px; margin-bottom: 22px; }
.cmd-title h1 { font-size: 34px; letter-spacing: -.01em; margin: 6px 0 8px; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.cmd-title p { margin: 0; color: #b7c6d4; font-size: 14px; }
.kb-zoom { animation: kenburns 32s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
.hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; position: relative; overflow: visible; }
.hero.scanfx { overflow: hidden; border-radius: 10px; }
.hero-stat { padding: 18px 20px; border-radius: 10px; background: rgba(13,20,27,.45); border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.hero-stat.big { border-color: rgba(34,211,238,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 30px rgba(34,211,238,.12); }
.hero-num { font: 600 34px/1.1 var(--mono); margin: 6px 0 4px; text-shadow: 0 0 22px rgba(34,211,238,.35); font-variant-numeric: tabular-nums; }
.hero-stat.big .hero-num { font-size: 52px; color: var(--accent); }

/* ---------- Network map ---------- */
.map-card { margin-bottom: 14px; overflow: hidden; }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 11.5px; color: var(--muted); }
.lgd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.lgd.ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); } .lgd.warn { background: var(--warn); box-shadow: 0 0 6px var(--warn); } .lgd.bad { background: var(--bad); box-shadow: 0 0 6px var(--bad); }
.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.map-stage { position: relative; height: 520px; background: radial-gradient(closest-side, rgba(34,211,238,.07), transparent 75%), radial-gradient(rgba(34,211,238,.09) 1px, transparent 1px) 0 0/22px 22px; }
.map-stage canvas { display: block; position: absolute; left: 0; top: 0; touch-action: manipulation; }
.map-tip { position: absolute; z-index: 3; pointer-events: none; max-width: 250px; padding: 9px 11px; font-size: 12px; background: rgba(9,14,19,.94); border: 1px solid rgba(34,211,238,.4); border-radius: 6px; box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 0 18px rgba(34,211,238,.12); display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; }
.map-tip > div { grid-column: 1 / -1; }
.tip-ic { width: 20px; height: 20px; }
.map-hint { position: absolute; left: 12px; bottom: 10px; color: var(--faint); font-family: var(--mono); transition: opacity .4s; }
.map-hint.gone { opacity: 0; }
.spec { border-left: 1px solid var(--border); padding: 16px; background: linear-gradient(180deg, rgba(34,211,238,.04), transparent 40%); max-height: 520px; overflow-y: auto; }
.spec-empty { display: grid; gap: 6px; padding-top: 30px; text-align: center; }
.spec-empty::before { content: ""; width: 72px; height: 72px; margin: 0 auto 6px; background: url("icon-server.svg") center/44px no-repeat, radial-gradient(circle, rgba(34,211,238,.15), transparent 70%); border: 1px dashed rgba(34,211,238,.35); border-radius: 50%; }
.spec-title { font-weight: 700; font-size: 15px; }
.spec-hero { --photo: none; display: flex; align-items: flex-end; gap: 12px; padding: 12px; min-height: 120px; margin-bottom: 12px; border-radius: 8px; border: 1px solid rgba(34,211,238,.25); background: linear-gradient(180deg, rgba(7,10,14,.15), rgba(7,10,14,.88)), radial-gradient(120px 80px at 20% 70%, rgba(34,211,238,.22), transparent), var(--photo) center/cover no-repeat, linear-gradient(135deg, #0c1c24, #0a1016); animation: viewin .3s ease-out; }
.spec-hero img { width: 56px; height: 56px; filter: drop-shadow(0 0 10px rgba(34,211,238,.45)); }
.spec-hero-meta { display: grid; }
.spec-hero-meta span { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.spec-hero-meta b { font-size: 13px; }
.spec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.spec-rows .row { padding: 6px 0; }
.spec-rows .row span:last-child { text-align: right; }
.spec-open { margin-top: 12px; width: 100%; justify-content: center; }

/* ---------- Mini KPIs + chips ---------- */
.mini-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 4px; padding: 4px 10px; font: 600 11.5px var(--mono); }
.chip:hover { color: var(--text); border-color: #2a3a4c; }
.chip.on { color: var(--accent); border-color: rgba(34,211,238,.5); background: var(--accent-soft); }
.card-f { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ---------- Backup matrix ---------- */
.matrix td { padding: 8px 12px; }
.matrix tr.grp td { background: rgba(34,211,238,.035); padding-top: 12px; border-bottom-color: #1a2430; }
.matrix tr.grp-bad td { box-shadow: inset 3px 0 0 var(--bad); }
.matrix .job { padding-left: 42px; white-space: nowrap; }
.matrix tbody tr { cursor: default; }
.row-bad td { background: rgba(248,113,113,.05); }
.runs { display: flex; gap: 2px; }
.runs i { width: 7px; height: 16px; border-radius: 1.5px; background: var(--ok); opacity: .8; }
.runs i.r-w { background: var(--warn); } .runs i.r-f { background: var(--bad); opacity: 1; box-shadow: 0 0 6px var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.inc { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); color: var(--bad); white-space: nowrap; padding: 3px 8px; border: 1px solid rgba(248,113,113,.4); border-radius: 4px; background: var(--bad-soft); }
.inc .dot { animation: blink 1.2s infinite; }

/* ---------- Security ---------- */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sev { display: grid; grid-template-columns: 74px minmax(0, 1fr) 52px; gap: 10px; align-items: center; margin: 10px 0; }
.sev-k { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sev-bar { height: 16px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.sev-bar i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width 1s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px currentColor; }
.sev-bar i.in { width: var(--w); }
.sev b { text-align: right; }
.sec-cov .row { display: flex; justify-content: space-between; padding: 6px 0 2px; font-size: 12.5px; }
.sec-cov .row span:last-child { font-family: var(--mono); }
.cov-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.big-num { font-size: 30px; font-weight: 600; margin-top: 4px; }
.big-num small { font-size: 14px; color: var(--muted); }
.cvss { --c: .5; display: inline-block; min-width: 40px; text-align: center; padding: 2px 6px; border-radius: 4px; font-weight: 700; color: #0b0f14; background: hsl(calc(120 - var(--c) * 120) 85% 60%); }

/* ---------- AI tickets ---------- */
.tk-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-list li { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.tk-list li:hover { background: var(--surface-2); }
.tk-list li.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tk-li { min-width: 0; flex: 1; }
.tk-li .top { display: flex; justify-content: space-between; font-size: 12px; }
.tk-t { font-weight: 600; font-size: 13px; margin: 2px 0; }
.tk-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tk-body { padding: 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; margin-bottom: 14px; }
.ai-panel { border: 1px solid rgba(34,211,238,.35); border-radius: 8px; padding: 14px; background: linear-gradient(180deg, rgba(34,211,238,.07), rgba(34,211,238,.015)); position: relative; overflow: hidden; }
.ai-panel.busy::before { content: ""; position: absolute; left: -40%; top: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: sweep 1.2s linear infinite; }
@keyframes sweep { to { left: 100%; } }
.ai-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ai-head .spacer { flex: 1; }
.ai-badge { font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #06232a; background: var(--accent); padding: 3px 8px; border-radius: 3px; box-shadow: 0 0 14px rgba(34,211,238,.4); }
.thinking::after { content: " ..."; animation: blink 1s infinite; }
.ai-sec { margin-top: 14px; animation: viewin .3s ease-out; }
.ai-sec h4 { font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.ai-sec p, .ai-sec li { font-size: 13px; margin: 0 0 4px; }
.ai-sec ul, .ai-sec ol { margin: 0; padding-left: 18px; }
.cause { margin-bottom: 8px; }
.cause .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.cause .meter i { transition: width .9s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 8px var(--accent); }
.risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.risk-grid > div { padding: 10px 12px; border-radius: 6px; background: var(--surface-2); display: grid; gap: 4px; align-content: start; justify-items: start; }
.risk-grid p { margin: 0; }
.sla { font-size: 18px; color: var(--warn); }
.kb { margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: #0a0f14; animation: viewin .3s ease-out; }
.kb-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.kb-text { white-space: pre-wrap; font: 12.5px/1.55 var(--mono); color: var(--text); margin: 0; min-height: 120px; }
.kb-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- Network health ---------- */
.blind { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; border: 1px solid rgba(248,113,113,.5); border-radius: 6px; font-size: 13px;
  background: repeating-linear-gradient(135deg, rgba(248,113,113,.08) 0 12px, rgba(248,113,113,.03) 12px 24px), var(--surface); box-shadow: 0 0 24px rgba(248,113,113,.12); }
.blind > div:nth-child(2) { flex: 1; min-width: 220px; }
.blind b { color: var(--bad); }
.blind-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 18px var(--mono); color: #1a0505; background: var(--bad); box-shadow: 0 0 0 0 rgba(248,113,113,.6); animation: pingred 1.6s infinite; }
@keyframes pingred { 100% { box-shadow: 0 0 0 12px rgba(248,113,113,0); } }
.row-blind td { background: rgba(248,113,113,.07) !important; }
.row-blind td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
#nh-body tr { cursor: default; }

/* ---------- Client portal ---------- */
.scope-banner { position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 14px; border: 1px solid #1f3a48; min-height: 170px; display: flex; align-items: flex-end; }
.scope-photo { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,10,14,.97) 0%, rgba(7,10,14,.85) 50%, rgba(7,10,14,.45) 100%), url("img/office-team.jpg") center 45%/cover no-repeat, linear-gradient(135deg, #0c2430, #070a0e); }
.scope-inner { position: relative; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 22px 24px; width: 100%; }
.scope-inner > div:nth-child(2) { flex: 1; min-width: 220px; }
.scope-k { font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.scope-inner h1 { font-size: 26px; margin: 4px 0 6px; }
.scope-inner p { margin: 0; font-size: 13px; color: #bdeef7; display: inline-flex; gap: 8px; align-items: center; padding: 5px 10px; border-radius: 5px; background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.35); }
.lock { color: var(--ok); font-size: 9px; }
.scope-stats { display: flex; gap: 10px; }
.scope-stats > div { display: grid; text-align: center; padding: 8px 14px; border-radius: 6px; background: rgba(13,18,24,.7); border: 1px solid var(--border); backdrop-filter: blur(4px); }
.scope-stats b { font-size: 20px; color: var(--text); }
.scope-stats span { font-size: 11px; color: var(--muted); }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.health-b { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; }
.ring-wrap { position: relative; width: 180px; height: 180px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring-fg { fill: none; stroke-width: 12; stroke-linecap: round; filter: drop-shadow(0 0 8px currentColor); }
.ring-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-val b { font: 600 46px/1 var(--mono); text-shadow: 0 0 20px currentColor; }
.ring-val span { font-size: 11px; color: var(--muted); }
.band { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.band.ok { color: var(--ok); background: var(--ok-soft); box-shadow: 0 0 14px rgba(52,211,153,.25); }
.band.warn { color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 14px rgba(251,191,36,.2); }
.band.bad { color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 14px rgba(248,113,113,.25); }
.area { margin-bottom: 10px; }
.area .row { display: flex; justify-content: space-between; font-size: 13px; }
.area .meter { height: 7px; }
.area .meter i { transition: width 1s cubic-bezier(.2,.8,.2,1); }
.p-bk { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.p-bk:last-child { border-bottom: 0; }
.p-bk-t { font-weight: 600; }
.p-bk .runs { margin-top: 6px; }
.p-bk-r { text-align: right; display: grid; gap: 4px; justify-items: end; align-content: start; }
.p-tickets, .p-renew { list-style: none; margin: 0; padding: 0; }
.p-tickets li, .p-renew li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.p-tickets li:last-child, .p-renew li:last-child { border-bottom: 0; }
.p-tickets li.flash { animation: freshglow 3s ease-out; }

/* chat */
.chat-card { grid-row: span 2; display: flex; flex-direction: column; }
.chat-card .card-h { background: linear-gradient(90deg, rgba(13,18,24,.96), rgba(13,18,24,.75)), url("img/monitors.jpg") center 42%/cover no-repeat; min-height: 72px; }
.chat { height: 360px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; max-width: 92%; animation: viewin .25s ease-out; }
.msg.me { align-self: flex-end; }
.msg .b { padding: 9px 12px; border-radius: 10px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.msg.me .b { background: rgba(34,211,238,.14); border-color: rgba(34,211,238,.35); }
.msg .av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7ff0ff, var(--accent) 45%, #0b5563); box-shadow: 0 0 12px rgba(34,211,238,.5); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.tk-card { margin-top: 8px; padding: 10px; border-radius: 6px; border: 1px solid rgba(52,211,153,.4); background: var(--ok-soft); display: grid; gap: 3px; }
.tk-card .row { display: flex; justify-content: space-between; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-in { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.chat-in input { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 8px 10px; }
.chat-in input:focus { outline: none; border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.btn.btn-primary { background: var(--accent); border-color: var(--accent); color: #06232a; font-weight: 650; box-shadow: 0 0 14px rgba(34,211,238,.25); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .map-body, .noc { grid-template-columns: minmax(0, 1fr); }
  .spec { border-left: 0; border-top: 1px solid var(--border); max-height: none; }
  .spec-empty { padding-top: 6px; }
  .tk-grid, .portal-grid, .sec-grid { grid-template-columns: 1fr; }
  .chat-card { grid-row: auto; }
  .mini-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .cmd-title h1 { font-size: 27px; }
  .map-stage { height: 440px; }
  .views { padding: 0 12px; top: 0; position: relative; }
  .topbar { position: relative; }
}
@media (max-width: 640px) {
  .seg .long { display: none; } .seg .short { display: inline; }
  .org-pick label { display: none; }
  .org-pick { order: 4; flex: 1 1 100%; min-width: 0; }
  .org-pick select { flex: 1; min-width: 0; }
  .topbar .spacer { display: none; }
  .live { order: 5; width: 100%; }
  .hero-num { font-size: 26px; } .hero-stat.big .hero-num { font-size: 36px; }
  .hero-stat { padding: 14px; }
  .cmd-hero { margin-top: -12px; padding: 26px 12px 18px; }
  .cmd-title h1 { font-size: 23px; }
  .cmd-title p { font-size: 13px; }
  .hero { gap: 8px; }
  .map-stage { height: 380px; }
  .health-b { grid-template-columns: 1fr; justify-items: center; }
  .areas { width: 100%; }
  .scope-stats { width: 100%; } .scope-stats > div { flex: 1; }
  .scope-inner h1 { font-size: 21px; }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-grid { grid-template-columns: 1fr; }
  .card-h { flex-wrap: wrap; }
  .kpi .value { font-size: 24px; }
  .wrap { padding: 12px; }
}
@media (max-width: 400px) {
  .hero-stat.big .hero-num { font-size: 30px; }
  .ring-wrap { width: 150px; height: 150px; }
  .ring-val b { font-size: 38px; }
  .map-stage { height: 340px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scanfx::after { display: none; }
  .sev-bar i { width: var(--w); }
}
.stack-v > * { min-width: 0; }
.matrix th, .matrix td, td.num, th.num { white-space: nowrap; }

/* ---------- Photo cards and strips ---------- */
.org-cards-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.org-cards-h h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.org-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 12px 16px 16px; }
.org-card { position: relative; display: block; padding: 0; text-align: left; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface-2); color: var(--text); min-height: 150px; transition: transform .2s, border-color .2s, box-shadow .2s; }
button.org-card:hover { transform: translateY(-2px); border-color: rgba(34,211,238,.5); box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 20px rgba(34,211,238,.12); }
.oc-photo { position: absolute; inset: 0; }
.oc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.org-card:hover .oc-photo img { transform: scale(1.06); }
.oc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,14,.2) 0%, rgba(7,10,14,.92) 72%); }
.oc-body { position: relative; display: grid; gap: 6px; padding: 54px 12px 12px; }
.oc-name { font-weight: 650; font-size: 14px; }
.oc-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); align-items: baseline; }
.oc-stats b { font-size: 16px; color: var(--text); }
.org-card.site .oc-body { padding-top: 70px; }

.photo-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.photo-strip figure { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); min-height: 150px; background: #0a1016; }
.photo-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-strip figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,14,.1), rgba(7,10,14,.88)); }
.photo-strip .ps-main::after { background: linear-gradient(90deg, rgba(7,10,14,.9), rgba(7,10,14,.35)); }
.photo-strip figcaption { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: grid; gap: 2px; }
.photo-strip .ps-main figcaption b { font-size: 18px; }
.photo-strip .ps-side figcaption b { font-size: 24px; color: var(--accent); text-shadow: 0 0 16px rgba(34,211,238,.4); }
.photo-strip .ps-side figcaption span { font-size: 12px; color: #c4d2df; }

.ai-photo { position: relative; margin: -14px -14px 12px; height: 128px; overflow: hidden; border-bottom: 1px solid rgba(34,211,238,.3); }
.ai-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 48%; display: block; }
.ai-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,16,22,.95) 0%, rgba(6,16,22,.7) 55%, rgba(6,16,22,.25) 100%); }
.ai-photo-t { position: absolute; z-index: 1; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); display: grid; gap: 3px; max-width: 460px; }
.ai-photo-t b { font-size: 15px; }
.ai-photo-t .small { color: #b7c6d4; }
.queue-photo { position: relative; height: 96px; overflow: hidden; border-radius: 6px 6px 0 0; }
.queue-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.queue-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,10,14,.92), rgba(7,10,14,.35)); }
.queue-photo > div { position: absolute; z-index: 1; left: 14px; bottom: 12px; display: grid; gap: 2px; }
.scope-photo.kb-zoom { transform-origin: 40% 50%; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip .ps-main { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .org-cards { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 12px; }
  .org-card { min-height: 130px; }
  .oc-body { padding: 44px 10px 10px; }
  .oc-name { font-size: 12.5px; }
  .photo-strip figure { min-height: 120px; }
  .photo-strip .ps-side figcaption b { font-size: 19px; }
  .ai-photo { height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .kb-zoom { animation: none !important; transform: none !important; }
  .org-card:hover .oc-photo img { transform: none; }
}
