/* assets/css/appsec/appsec_dashboards.css — MyCSO report packs (MYC-84..92).
 *
 * Linked from each layout, never inlined: the SPA injector carries only
 * link[rel=stylesheet] into the shell, so a <style> block in a layout renders
 * unstyled (VERITAS-108).
 *
 * Colours come from the app's own theme variables where they exist, with a
 * fallback, so the packs follow light and dark mode rather than fighting them.
 */

.as-dash .dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.as-scope-chip {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--as-chip-bg, rgba(10, 61, 143, 0.10));
  color: var(--text-primary, inherit);
  white-space: nowrap;
}
.as-scope-chip:empty { display: none; }
.as-scope-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; opacity: 0.7; margin-right: 4px; }
.as-scope-persona { opacity: 0.75; margin-left: 6px; }

.as-lede {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 70rem;
  margin: 4px 0 20px;
}
.as-lede:empty { display: none; }

.as-panel {
  background: var(--card-bg, var(--bg-secondary, rgba(127, 127, 127, 0.06)));
  border: 1px solid var(--border-color, rgba(127, 127, 127, 0.18));
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.as-panel-accent { border-left: 4px solid var(--as-accent, #0f8a8c); }
.as-panel-head h3 { margin: 0 0 4px; }
.as-panel-note { margin: 0 0 12px; font-size: 0.85rem; opacity: 0.75; max-width: 60rem; }

.as-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.as-grid-2 > .as-panel,
.as-grid-2 > .chart-container { margin-bottom: 0; }

/* Wide tables scroll inside their panel; the page never scrolls sideways. */
.as-table-wrap { overflow-x: auto; }

.as-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.as-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color, rgba(127, 127, 127, 0.25));
  white-space: nowrap;
}
.as-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color, rgba(127, 127, 127, 0.12));
  vertical-align: top;
}
.as-table .as-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-table code { font-size: 0.8rem; }

.as-sub { font-size: 0.78rem; opacity: 0.65; margin-top: 2px; }
.as-muted { opacity: 0.55; }
.as-empty { opacity: 0.7; font-style: italic; margin: 8px 0; }
.as-just { font-size: 0.82rem; }

.as-tier, .as-sev, .as-flag, .as-tool {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin: 0 4px 2px 0;
  white-space: nowrap;
}
.as-tier { background: rgba(10, 61, 143, 0.12); }
.as-tier-1 { background: #0a3d8f; color: #fff; }
.as-flag { background: rgba(106, 79, 163, 0.14); }
.as-tool { background: rgba(15, 138, 140, 0.14); }

/* Severity colours match SEVERITY_COLOURS in appsec_shared.js. */
.as-sev-critical { background: #b3261e; color: #fff; }
.as-sev-high     { background: #d9730d; color: #fff; }
.as-sev-medium   { background: #c9a100; color: #1b1b1b; }
.as-sev-low      { background: #6b7785; color: #fff; }
.as-sev-info     { background: #a6b0bb; color: #1b1b1b; }

.as-exposed { color: #b3261e; font-weight: 600; }
.as-gap { color: #b3261e; font-weight: 600; }

.as-image-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(15, 138, 140, 0.12);
  display: inline-block;
  margin-bottom: 8px;
}

.as-expand {
  font: inherit;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color, rgba(127, 127, 127, 0.35));
  background: transparent;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.as-expand:hover { background: rgba(10, 61, 143, 0.10); }

.as-detail {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed var(--border-color, rgba(127, 127, 127, 0.4));
}
.as-detail h4 { margin: 0 0 4px; }

.as-check-list { list-style: none; padding: 0; margin: 0; }
.as-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, rgba(127, 127, 127, 0.12));
}
.as-check-mark {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  min-width: 42px;
  text-align: center;
}
.as-pass .as-check-mark { background: #2f7d4f; color: #fff; }
.as-fail .as-check-mark { background: #b3261e; color: #fff; }

.as-state { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.as-state-ok    { background: #2f7d4f; color: #fff; }
.as-state-warn  { background: #c9a100; color: #1b1b1b; }
.as-state-error { background: #b3261e; color: #fff; }
.as-state-no    { background: #6b7785; color: #fff; }

@media (max-width: 720px) {
  .as-grid-2 { grid-template-columns: 1fr; }
  .as-lede { font-size: 1rem; }
}
