/* Sign-in: hide console chrome. After login: restore sidebar + header. */
html.pub-route-boot #app-shell,
body.public-mode #app-shell{
  display:block !important;
  height:auto !important;
  overflow:visible !important;
  flex-direction:unset !important;
}
html.pub-route-boot #app-sidebar,
html.pub-route-boot #app-header,
body.public-mode #app-sidebar,
body.public-mode #app-header{
  display:none !important;
}
html.pub-route-boot #app-main,
body.public-mode #app-main{
  width:100% !important;
  flex:none !important;
}
html.pub-route-boot #tab-public-site,
body.public-mode #tab-public-site{
  display:block !important;
}
html.pub-route-boot #mc > .tab-c:not(#tab-public-site),
body.public-mode #mc > .tab-c:not(#tab-public-site){
  display:none !important;
}

html:not(.pub-route-boot) body:not(.public-mode) #app-shell{
  display:flex !important;
  flex-direction:row !important;
  height:100vh !important;
  overflow:hidden !important;
}
html:not(.pub-route-boot) body:not(.public-mode) #app-sidebar{
  display:flex !important;
  flex-direction:column !important;
}
html:not(.pub-route-boot) body:not(.public-mode) #app-header{
  display:grid !important;
}
html:not(.pub-route-boot) body:not(.public-mode) #app-main{
  width:auto;
  flex:1 1 auto !important;
  min-width:0;
}
html:not(.pub-route-boot) body:not(.public-mode) #tab-public-site{
  display:none !important;
}
html:not(.pub-route-boot) body:not(.public-mode) #mc > .tab-c:not(.hidden):not(#tab-public-site){
  display:block !important;
}
html:not(.pub-route-boot) body:not(.public-mode){
  overflow:hidden;
  height:100vh;
}

/* Customer install: branded auth, no SaaS marketing CTAs. */
html[data-customer-install="1"].pub-route-boot .pub-nav-cta--figma a[href="/contact"],
html[data-customer-install="1"].pub-route-boot .pub-nav-cta--figma a[href="/signin"],
html[data-customer-install="1"] .pub-alt-link a[href="/signup"],
html[data-customer-install="1"] #pub-signin-method-sso-btn{
  display:none !important;
}
html[data-product-site="cva"] .pub-nav img,
html[data-product-site="xdr"] .pub-nav img,
html[data-product-site="cpa"] .pub-nav img{
  max-height:36px;
  width:auto;
}

/* Keep header as enterprise 3-column chrome after login. */
html:not(.pub-route-boot) body:not(.public-mode) #header-left-cluster{
  overflow:hidden;
}
html:not(.pub-route-boot) body:not(.public-mode) #header-left-cluster #ptitle{
  min-width:0;
  max-width:min(22rem,42vw);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
html[data-customer-install="1"]:not(.pub-route-boot) #header-support-quick-grant,
html[data-customer-install="1"]:not(.pub-route-boot) #header-support-end-btn{
  display:none !important;
}
html:not(.pub-route-boot) .profile-menu.hidden{
  display:none !important;
}

/* Empty org preview must not reserve a blank stripe when hashed .hidden loses to display:flex. */
.pub-org-preview.hidden{
  display:none !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
}

/* Customer console stays dark enterprise chrome unless the user explicitly chose light. */
html[data-customer-install="1"]:not([data-theme="light"]):not([data-theme="professional"]) #app-sidebar,
html[data-customer-install="1"]:not([data-theme="light"]):not([data-theme="professional"]) #app-sidebar .sidebar-foot,
html[data-customer-install="1"]:not([data-theme="light"]):not([data-theme="professional"]) #app-sidebar #sidebar-profile{
  background:#0b1220 !important;
  color:#cbd5e1 !important;
  border-color:rgba(148,163,184,.18) !important;
}
html[data-customer-install="1"]:not([data-theme="light"]):not([data-theme="professional"]) #sidebar-profile-trigger{
  background:transparent !important;
  color:#e2e8f0 !important;
}
html[data-customer-install="1"] #sidebar-user-name{color:#e2e8f0 !important;font-size:12px !important;line-height:1.2 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-customer-install="1"] #sidebar-user-role{color:#64748b !important;font-size:10px !important;line-height:1.2 !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-customer-install="1"] #sidebar-profile-trigger{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:8px !important;
  width:100% !important;
  padding:6px !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
html[data-customer-install="1"] #sidebar-user-avatar{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  min-height:20px !important;
  max-width:20px !important;
  max-height:20px !important;
  border-radius:9999px !important;
  overflow:hidden !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:10px !important;
  font-weight:700 !important;
  flex:0 0 20px !important;
}
html[data-customer-install="1"] #sidebar-user-initials{font-size:10px !important;line-height:1 !important}
html[data-customer-install="1"] #sidebar-profile,
html[data-customer-install="1"] .sidebar-foot{
  background:#0b1220 !important;
  border-top:1px solid rgba(148,163,184,.16) !important;
  box-shadow:none !important;
}
html[data-customer-install="1"] #app-sidebar .sidebar-foot,
html[data-customer-install="1"] #app-sidebar #sidebar-profile{
  position:relative !important;
  overflow:visible;
  z-index:20;
  max-width:100%;
}
html[data-customer-install="1"] #sidebar-collapsed-tooltip.hidden{
  display:none !important;
}
html[data-customer-install="1"] #app-sidebar:not(.sidebar-collapsed) ~ #sidebar-collapsed-tooltip,
html[data-customer-install="1"]:not([data-sidebar-collapsed="1"]) #sidebar-collapsed-tooltip{
  display:none !important;
}

/* Fallback when cpa-shell.css is stale-cached: CVA/XDR console layout.
   Loaded after the shell so these rules win when an older shell is cached. */
.console-exec{display:flex !important;flex-direction:column;gap:12px;min-width:0;width:100%}
.console-exec__head,.console-exec__head-actions,.console-exec__lenses,.console-exec__soc-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.console-exec__kpis{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.console-exec__kpi{display:flex !important;align-items:flex-start;gap:10px;text-align:left;padding:12px;border-radius:10px;border:1px solid rgba(148,163,184,.22);cursor:pointer;min-width:0;background:rgba(15,23,42,.4);white-space:normal}
.console-exec__kpi-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.console-exec__grid{display:grid !important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:10px}
.console-exec__sitrep{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin:2px 0 6px}
.console-exec__sitrep-chip{display:flex !important;flex-direction:column;gap:2px;padding:10px 12px;border-radius:10px;border:1px solid rgba(129,140,248,.22);background:rgba(10,16,30,.55);min-width:0}
.console-exec__sitrep-chip span,.console-exec__obs-item span,.console-exec__corr-metric span,.console-exec__kpi-label{display:block !important;font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:#94a3b8}
.console-exec__sitrep-chip b,.console-exec__obs-item b,.console-exec__corr-metric b,.console-exec__kpi-value{display:block !important;margin-top:4px;font-size:16px;color:#f8fafc;font-variant-numeric:tabular-nums}
.console-exec__obs{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.console-exec__obs-item{display:flex !important;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:8px 10px;border-radius:8px;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.45);white-space:normal}
.console-exec__obs-item em{display:block;font-style:normal;font-size:11px;color:#94a3b8}
.console-exec__corr-grid{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.console-exec__corr-metric{display:flex !important;flex-direction:column;gap:2px;padding:10px;border-radius:10px;border:1px solid rgba(148,163,184,.12)}
.console-exec__hero-analytics{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start !important}
.console-exec__lens{display:inline-flex !important;align-items:center;gap:7px;padding:7px 12px;border-radius:8px;border:1px solid rgba(148,163,184,.22);background:rgba(15,23,42,.45);cursor:pointer;white-space:nowrap}
.console-exec__panel{display:block;min-width:0;padding:12px;border-radius:12px;border:1px solid rgba(148,163,184,.16)}
.console-exec__panel header{display:flex !important;justify-content:space-between;gap:8px;align-items:flex-start;flex-wrap:wrap}
.console-exec__panel h3{margin:0;font-size:13px;font-weight:650;color:#f1f5f9}
.console-exec__panel-sub{margin:4px 0 0;font-size:11px;color:#94a3b8;line-height:1.4}
#tab-xdr-enterprise-workspace .xdr-ent-grid{display:grid !important;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:12px}
#tab-xdr-enterprise-workspace .xdr-ent-nav{display:flex;flex-direction:column;gap:4px}
#tab-xdr-enterprise-workspace .xdr-ent-cap-btn{display:flex !important;flex-direction:column;align-items:flex-start;width:100%;text-align:left;white-space:normal;padding:8px 10px;margin:0 0 4px;border-radius:8px;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.45);color:#cbd5e1;cursor:pointer}
#tab-xdr-enterprise-workspace .xdr-ent-cap-key,#tab-xdr-enterprise-workspace .xdr-ent-cap-title,#tab-xdr-enterprise-workspace .xdr-ent-cap-pct{display:block !important;width:100%}
#tab-xdr-enterprise-workspace .xdr-ent-cap-title{font-weight:600;margin-top:2px}
#tab-xdr-enterprise-workspace .xdr-ent-cap-pct{margin-top:4px;font-size:10px;color:#94a3b8}
#tab-xdr-enterprise-workspace .xdr-subtabs-wrap{display:flex !important;flex-wrap:wrap;gap:6px;padding:4px 0 10px}
#tab-xdr-enterprise-workspace .xdr-subtab{display:inline-flex !important;align-items:center;gap:6px;padding:8px 14px;border-radius:10px;border:1px solid rgba(99,102,241,.35);background:rgba(99,102,241,.16);color:#e2e8f0;white-space:nowrap}
body.product-site-cva #tab-admin .cy-card,
body.product-site-xdr #tab-admin .cy-card,
body.product-site-cva #tab-settings .cy-card,
body.product-site-xdr #tab-settings .cy-card{display:block;padding:12px;margin-bottom:12px}
body.product-site-cva #tab-admin table,
body.product-site-xdr #tab-admin table,
body.product-site-cva #tab-settings table,
body.product-site-xdr #tab-settings table{width:100%;border-collapse:collapse}
body.product-site-cva #tab-admin th,
body.product-site-cva #tab-admin td,
body.product-site-xdr #tab-admin th,
body.product-site-xdr #tab-admin td,
body.product-site-cva #tab-settings th,
body.product-site-cva #tab-settings td,
body.product-site-xdr #tab-settings th,
body.product-site-xdr #tab-settings td{padding:6px 8px;text-align:left;vertical-align:top}
@media(max-width:1100px){.console-exec__kpis,.console-exec__obs{grid-template-columns:repeat(2,minmax(0,1fr))}.console-exec__grid,.console-exec__hero-analytics,#tab-xdr-enterprise-workspace .xdr-ent-grid{grid-template-columns:1fr}}
@media(max-width:640px){.console-exec__kpis,.console-exec__obs{grid-template-columns:1fr}}
.cy-color-kpi{cursor:pointer}
.cy-color-kpi--g0{background:linear-gradient(135deg,rgba(255,59,92,.22) 0%,rgba(255,140,66,.12) 55%,rgba(139,92,246,.16) 100%) !important;border-color:rgba(255,59,92,.4) !important}
.cy-color-kpi--g1{background:linear-gradient(135deg,rgba(45,212,191,.22) 0%,rgba(56,189,248,.12) 55%,rgba(34,211,238,.16) 100%) !important;border-color:rgba(45,212,191,.4) !important}
.cy-color-kpi--g2{background:linear-gradient(135deg,rgba(255,140,66,.22) 0%,rgba(255,207,68,.12) 55%,rgba(244,114,182,.16) 100%) !important;border-color:rgba(255,140,66,.4) !important}
.cy-color-kpi--g3{background:linear-gradient(135deg,rgba(139,92,246,.22) 0%,rgba(0,180,216,.12) 55%,rgba(20,184,166,.16) 100%) !important;border-color:rgba(139,92,246,.4) !important}
.cy-color-kpi--g4{background:linear-gradient(135deg,rgba(56,189,248,.22) 0%,rgba(34,211,238,.12) 55%,rgba(45,212,191,.16) 100%) !important;border-color:rgba(56,189,248,.4) !important}
.cy-color-kpi--g5{background:linear-gradient(135deg,rgba(255,207,68,.22) 0%,rgba(255,140,66,.12) 55%,rgba(255,59,92,.14) 100%) !important;border-color:rgba(255,207,68,.4) !important}

/* XDR command surface — keep labels,
selects,
charts,
and legends from collapsing inline */
.console-exec__soc-toolbar,
.console-exec__soc-toolbar{display:flex !important;flex-wrap:wrap;align-items:flex-end;gap:12px 18px;padding:12px 14px}
.console-exec__soc-toolbar-brand,
.console-exec__soc-toolbar-group{display:flex !important;flex-direction:column;align-items:flex-start;gap:4px;min-width:148px}
.console-exec__soc-toolbar-actions{display:flex !important;flex-wrap:wrap;align-items:center;gap:10px;margin-left:auto}
.console-exec__soc-label{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8}
.console-exec__soc-select{display:block;min-width:148px;height:32px;padding:4px 8px;border-radius:8px}
.console-exec__band{display:flex !important;align-items:baseline;gap:10px;margin:8px 0 4px}
.console-exec__hero-analytics:not(.console-exec__hero-analytics--cva){display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px;align-items:start !important}
.console-exec__hero-analytics--cva{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:10px;align-items:start !important}
.console-exec__hero-analytics .console-exec__chart-bars{min-height:0 !important;max-height:118px;padding:4px 2px 0}
.console-exec__hero-analytics .console-exec__chart-bar-track{height:72px !important;max-width:38px}
.console-exec__hero-analytics .console-exec__posture-ring{width:112px !important;margin:0 auto 6px}
.console-exec__hero-analytics .console-exec__trend svg{height:64px !important;max-height:64px}
.console-exec__hero-analytics .console-exec__donut-svg,
.console-exec__hero-analytics .console-exec__donut-center{width:96px !important;height:96px !important}
.console-exec__hero-analytics .console-exec__donut-center{margin-left:-96px !important}
.console-exec__soc-gauges .console-exec__chart-gauge svg{max-width:96px}
#ctem-console-hub .console-exec__hero-analytics--cva,
#ctem-console-hub .console-exec__chart-bars{max-width:100%}
.console-exec__chart-donut{display:grid !important;grid-template-columns:128px minmax(0,1fr);gap:8px 16px;align-items:center}
.console-exec__donut-svg{width:128px;height:128px}
.console-exec__donut-legend{display:flex !important;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.console-exec__donut-legend li{display:grid !important;grid-template-columns:12px minmax(0,1fr) auto auto;gap:8px;align-items:center}
.console-exec__donut-legend b,
.console-exec__donut-legend em{display:inline !important;margin:0}
.console-exec__chart-bars{display:flex !important;align-items:flex-end;gap:10px;min-height:100px}
.console-exec__chart-bar{display:flex !important;flex-direction:column;align-items:center;gap:6px;flex:1;min-width:0}
.console-exec__chart-bar-label,
.console-exec__chart-bar-val{display:block}
@media(max-width:1100px){.console-exec__hero-analytics{grid-template-columns:1fr}}

/* XDR/CVA executive dashboard — full layout when shell CSS is stale (v58) */
.console-exec__soc-wrap,
.console-exec__soc-wrap{display:flex !important;flex-direction:column;gap:10px;width:100%}
.console-exec__soc-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.console-exec__rows{list-style:none !important;margin:0;padding:0;display:flex !important;flex-direction:column;gap:6px}
.console-exec__row{display:grid !important;grid-template-columns:44px minmax(0,1.4fr) minmax(0,.9fr) auto !important;gap:8px;align-items:center;width:100%;padding:8px 10px;border-radius:8px;border:1px solid rgba(148,163,184,.12);background:rgba(15,23,42,.45);text-align:left;cursor:pointer;color:inherit;font:inherit;font-family:inherit}
.console-exec__row-time{display:block;font-family:IBM Plex Mono,ui-monospace,monospace;font-size:10px;color:#64748b}
.console-exec__row-title{display:block;font-size:12px;font-weight:600;color:#f1f5f9;min-width:0}
.console-exec__row-meta{display:block;font-size:11px;color:#94a3b8;min-width:0}
.console-exec__row-status{display:block;font-style:normal;font-size:10px;font-weight:700;text-transform:uppercase;color:#38bdf8}
.console-exec__incident-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.console-exec__incident-col ul{list-style:none !important;margin:0;padding:0;display:flex !important;flex-direction:column;gap:4px}
.console-exec__incident-row{display:block !important;width:100%;text-align:left;padding:6px 4px;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit}
.console-exec__incident-row strong{display:block !important;font-size:12px;color:#f1f5f9;font-weight:600}
.console-exec__incident-row em{display:block !important;font-style:normal;font-size:10px;color:#64748b;margin-top:2px}
.console-exec__mitre-heatmap{display:grid !important;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px}
.console-exec__mitre-cell{display:flex !important;flex-direction:column;gap:4px;min-height:56px;padding:8px;border-radius:8px;border:1px solid rgba(148,163,184,.1);background:rgba(15,23,42,.3);font-size:10px;text-align:left;cursor:pointer;color:#64748b;font:inherit}
.console-exec__mitre-cell b{display:block;font-size:16px;color:#f8fafc}
.console-exec__story-flow{display:flex !important;flex-wrap:wrap;align-items:center;gap:6px}
.console-exec__story-node{display:flex !important;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;border:1px solid rgba(148,163,184,.15);background:rgba(15,23,42,.45);min-width:140px;text-align:left;cursor:pointer;color:inherit;font:inherit}
.console-exec__story-node-idx{display:grid !important;place-items:center;width:24px;height:24px;border-radius:999px;flex-shrink:0;font-size:11px;font-weight:700;background:rgba(129,140,248,.2);color:#c7d2fe}
.console-exec__story-node strong{display:block !important;font-size:12px;color:#f1f5f9;font-weight:600}
.console-exec__story-node em{display:block !important;font-style:normal;font-size:10px;color:#94a3b8}
.console-exec__findings{display:flex !important;flex-direction:column;gap:8px}
.console-exec__finding{display:block !important;width:100%;text-align:left;padding:8px;border-radius:8px;border:1px solid rgba(148,163,184,.12);background:rgba(15,23,42,.4);cursor:pointer;color:inherit;font:inherit}
.console-exec__soc-split{display:grid !important;grid-template-columns:1fr 1fr;gap:10px}
.console-exec__chart-gauge{display:flex !important;flex-direction:column;align-items:center;gap:4px;text-align:center}
.console-exec__chart-gauge b{display:block;font-size:18px;color:#f8fafc}
.console-exec__chart-gauge span{display:block;font-size:10px;color:#94a3b8}
.console-exec__soc-gauges{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
@media(max-width:1100px){.console-exec__soc-grid{grid-template-columns:1fr}.console-exec__incident-grid{grid-template-columns:1fr}}
@media(max-width:640px){.console-exec__row{grid-template-columns:44px minmax(0,1fr) auto !important}.console-exec__row-meta{display:none !important}}

/* CVA / XDR module pages — CPA-equivalent layout (grid,
tabs,
cards) when product CSS loads late */
#tab-cva-assurance .cva-hub{display:block !important;width:100%;min-width:0;box-sizing:border-box}
#tab-cva-assurance .cva-hub__hero{display:flex !important;flex-wrap:wrap;justify-content:space-between;gap:1rem;width:100%;box-sizing:border-box}
#tab-cva-assurance .cva-hub__body{display:grid !important;grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:1.25rem;align-items:start;width:100%}
#tab-cva-assurance .cva-hub__toolbar,
#tab-cva-assurance .cva-tabs,
#tab-cva-assurance .cva-lenses{display:flex !important;flex-wrap:wrap;align-items:center;gap:.35rem}
#tab-cva-assurance .cva-analytics-strip{display:grid !important;grid-template-columns:1fr 1fr minmax(200px,.85fr);gap:.75rem}
#tab-cva-assurance .cva-analytics-summary__grid,
#tab-cva-assurance .cva-kpi-row{display:flex !important;flex-wrap:wrap;gap:.35rem}
#tab-cva-assurance .cva-rail{display:block !important;position:sticky;top:.75rem}
#tab-cva-assurance .cva-hub--console-mode .cva-rail,
#tab-cva-assurance .cva-hub--console-mode .cva-hub__toolbar{display:none !important}
#tab-cva-assurance .cva-hub--console-mode .cva-hub__body{grid-template-columns:minmax(0,1fr)}
@media(max-width:960px){#tab-cva-assurance .cva-hub__body{grid-template-columns:1fr}#tab-cva-assurance .cva-analytics-strip{grid-template-columns:1fr}}
