/* Attack Linkage SOC triage board. All rules are scoped to this page. */
.dashboard-shell.attack-linkage-active .workspace { background: #f8f9fb; }
.dashboard-shell.attack-linkage-active :is(.sidebar,.top-nav) [data-nav="attack-linkage"].active {
  background: #ffd400; color: #161616; box-shadow: none;
}

.attack-linkage-page {
  --al-primary: #ffd400;
  --al-text: #161616;
  --al-muted: #667085;
  --al-border: #e4e7ec;
  --al-surface: #fff;
  --al-red: #d92d20;
  --al-amber: #dc6803;
  --al-green: #039855;
  min-height: 100%; color: var(--al-text);
}
.attack-linkage-page .card {
  border: 1px solid var(--al-border); border-radius: 14px; background: var(--al-surface);
  box-shadow: 0 1px 2px rgba(16,24,40,.03), 0 5px 16px rgba(16,24,40,.035);
}
.attack-linkage-page .eyebrow { color: #786300; font-weight: 800; letter-spacing: .12em; }
.attack-linkage-page :is(button,input,select):focus-visible {
  outline: 3px solid rgba(255,212,0,.42); outline-offset: 2px;
}
.attack-linkage-heading {
  position: relative; align-items: flex-end; gap: 24px; margin-bottom: 18px;
  padding: 8px 0 16px; border-bottom: 1px solid var(--al-border);
}
.attack-linkage-heading::after {
  position: absolute; bottom: -1px; left: 0; width: 120px; height: 3px;
  border-radius: 99px; background: var(--al-primary); content: "";
}
.attack-linkage-heading h1 { margin: 4px 0 5px; font-size: clamp(27px,2vw,38px); letter-spacing: -.035em; }
.attack-linkage-heading > div:first-child > p:last-child { max-width: 760px; margin: 0; color: var(--al-muted); }
.attack-linkage-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.attack-linkage-actions .compact-field { gap: 5px; color: var(--al-muted); }
.attack-linkage-actions .compact-field > span { font-size: 11px; font-weight: 700; }
.attack-linkage-actions select,
.attack-linkage-filters :is(input,select) {
  height: 40px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff;
  color: var(--al-text); padding: 0 11px;
}
#attackLinkageRefresh { min-height: 40px; border-color: var(--al-primary); background: var(--al-primary); color: #161616; font-weight: 800; }

.attack-linkage-disclaimer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 13px 16px; border: 1px solid #f4d43d;
  border-radius: 12px; background: #fffbea;
}
.attack-linkage-disclaimer-icon {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--al-primary); font-weight: 900;
}
.attack-linkage-disclaimer strong { font-size: 13px; }
.attack-linkage-disclaimer p { margin: 2px 0 0; color: #594f28; font-size: 12px; line-height: 1.5; }
.attack-linkage-disclaimer > span:last-child { color: var(--al-muted); font-size: 11px; white-space: nowrap; }
.attack-linkage-warning {
  margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #fda29b; border-radius: 10px;
  background: #fef3f2; color: #b42318; font-size: 13px; font-weight: 700;
}

.attack-linkage-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.attack-linkage-kpis .card { position: relative; overflow: hidden; min-height: 108px; padding: 16px 18px; }
.attack-linkage-kpis .card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #2e90fa; content: ""; }
.attack-linkage-kpis .red::before { background: var(--al-red); }
.attack-linkage-kpis .purple::before { background: #7f56d9; }
.attack-linkage-kpis .amber::before { background: var(--al-amber); }
.attack-linkage-kpis span { color: var(--al-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.attack-linkage-kpis strong { display: block; margin: 7px 0 2px; font-size: 29px; line-height: 1; }
.attack-linkage-kpis small { color: var(--al-muted); font-size: 11px; }
.attack-linkage-kpis .link-button { padding: 0; border: 0; background: none; color: #175cd3; font: inherit; text-decoration: underline; cursor: pointer; }

.attack-linkage-workbench { display: grid; grid-template-columns: minmax(320px,.72fr) minmax(0,1.45fr); gap: 16px; align-items: start; }
.attack-linkage-cluster-rail { position: sticky; top: 12px; overflow: hidden; }
.attack-linkage-panel-heading,
.attack-linkage-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px; border-bottom: 1px solid var(--al-border); }
.attack-linkage-panel-heading h2,
.attack-linkage-detail-head h2 { margin: 3px 0 0; font-size: 18px; }
.attack-linkage-filters { display: grid; grid-template-columns: 1fr 150px; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--al-border); background: #fcfcfd; }
.attack-linkage-filters label { display: grid; gap: 4px; color: var(--al-muted); font-size: 11px; font-weight: 700; }
.attack-linkage-cluster-list { max-height: 590px; overflow: auto; padding: 8px; }
.attack-linkage-list-empty { padding: 42px 18px; color: var(--al-muted); text-align: center; }
.attack-linkage-group {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; width: 100%;
  margin: 0 0 7px; padding: 13px; border: 1px solid transparent; border-radius: 10px;
  background: #fff; color: inherit; text-align: left; cursor: pointer;
}
.attack-linkage-group:hover { background: #f9fafb; border-color: #d0d5dd; }
.attack-linkage-group.active { border-color: #e1bd00; background: #fffbea; box-shadow: inset 3px 0 #ffd400; }
.attack-linkage-severity { width: 8px; min-height: 52px; border-radius: 99px; background: #98a2b3; }
.attack-linkage-severity.critical { background: #d92d20; }
.attack-linkage-severity.high { background: #f79009; }
.attack-linkage-severity.medium { background: #fdb022; }
.attack-linkage-severity.low { background: #2e90fa; }
.attack-linkage-group-copy { min-width: 0; }
.attack-linkage-group-copy strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.attack-linkage-group-copy small { display: block; margin-top: 5px; color: var(--al-muted); font-size: 11px; }
.attack-linkage-group-meta { text-align: right; }
.attack-linkage-group-meta b { display: block; font-size: 11px; text-transform: uppercase; }
.attack-linkage-group-meta small { color: var(--al-muted); }
.attack-linkage-load-more { display: block; width: calc(100% - 28px); margin: 0 14px 14px; }

.attack-linkage-detail { overflow: hidden; min-height: 520px; }
.attack-linkage-class { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: #ecfdf3; color: #027a48; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.attack-linkage-detail-head p { max-width: 700px; margin: 6px 0 0; color: var(--al-muted); font-size: 12px; }
#attackLinkageOpenIncident { flex: 0 0 auto; border-color: #b69200; background: #ffd400; color: #161616; font-weight: 800; }
.attack-linkage-flow {
  display: flex; align-items: center; justify-content: center; min-height: 86px; padding: 16px;
  border-bottom: 1px solid var(--al-border); background: linear-gradient(90deg,#f9fafb,#fffbea,#f9fafb);
}
.attack-linkage-flow p { margin: 0; color: var(--al-muted); }
.attack-linkage-flow-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; width: 100%; }
.attack-linkage-flow-node { position: relative; padding: 12px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; text-align: center; }
.attack-linkage-flow-node:not(:last-child)::after { position: absolute; top: 50%; right: -20px; color: #b69200; content: "→"; transform: translateY(-50%); }
.attack-linkage-flow-node span { display: block; color: var(--al-muted); font-size: 10px; font-weight: 800; }
.attack-linkage-flow-node strong { display: block; overflow: hidden; margin-top: 3px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attack-linkage-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-bottom: 1px solid var(--al-border); }
.attack-linkage-detail-grid > section { min-height: 170px; padding: 16px; border-right: 1px solid var(--al-border); }
.attack-linkage-detail-grid > section:last-child { border-right: 0; }
.attack-linkage-detail-grid h3 { margin: 0 0 10px; font-size: 13px; }
.attack-linkage-reasons p,
.attack-linkage-indicators p { margin: 6px 0; color: var(--al-muted); font-size: 12px; }
.attack-linkage-chip { display: inline-flex; max-width: 100%; margin: 0 5px 6px 0; padding: 5px 8px; border: 1px solid #e4e7ec; border-radius: 7px; background: #f9fafb; color: #344054; font-size: 11px; overflow-wrap: anywhere; }
.attack-linkage-table-wrap { overflow: auto; }
.attack-linkage-table-wrap table { width: 100%; border-collapse: collapse; }
.attack-linkage-table-wrap th,
.attack-linkage-table-wrap td { padding: 11px 14px; border-bottom: 1px solid #eaecf0; text-align: left; font-size: 12px; }
.attack-linkage-table-wrap th { background: #f9fafb; color: var(--al-muted); font-size: 10px; text-transform: uppercase; }
.attack-linkage-table-wrap tr:last-child td { border-bottom: 0; }
.attack-linkage-table-wrap button { border: 0; background: none; color: #175cd3; font-weight: 700; cursor: pointer; }

@media (max-width: 1180px) {
  .attack-linkage-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .attack-linkage-workbench { grid-template-columns: 1fr; }
  .attack-linkage-cluster-rail { position: static; }
  .attack-linkage-cluster-list { max-height: 380px; }
}
@media (max-width: 760px) {
  .attack-linkage-heading { align-items: flex-start; flex-direction: column; }
  .attack-linkage-actions { justify-content: flex-start; }
  .attack-linkage-disclaimer { grid-template-columns: auto 1fr; }
  .attack-linkage-disclaimer > span:last-child { grid-column: 1/-1; }
  .attack-linkage-kpis { grid-template-columns: 1fr; }
  .attack-linkage-filters,
  .attack-linkage-detail-grid,
  .attack-linkage-flow-grid { grid-template-columns: 1fr; }
  .attack-linkage-detail-grid > section { border-right: 0; border-bottom: 1px solid var(--al-border); }
  .attack-linkage-flow-node:not(:last-child)::after { display: none; }
  .attack-linkage-detail-head { flex-direction: column; }
}
