.sf-audit {
  --audit-border: #294152;
  --audit-muted: #9fb6d1;
  color: #e7eef8;
  font-family: inherit;
  padding-top: 16px;
}
.sf-audit[hidden], .sf-audit [hidden] { display: none !important; }
.sf-audit h2 { margin: 0 0 4px; font-size: 23px; font-weight: 700; }
.sf-audit h3 { margin: 0; font-size: 18px; font-weight: 650; }
.sf-audit h4 { margin: 18px 0 10px; }
.sf-audit p { margin: 12px 0; }
.audit-heading, .audit-results-head, .audit-title-row, .audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.audit-heading { margin-bottom: 18px; }
.audit-heading p { color: var(--audit-muted); margin: 0; font-size: 14px; }
.audit-downloads, .audit-tools, .audit-automation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sf-audit button, .audit-downloads a, .sf-audit input, .sf-audit select {
  color: #e4edf8;
  background: #091826;
  border: 1px solid var(--audit-border);
  border-radius: 6px;
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  min-height: 36px;
}
.sf-audit button, .audit-downloads a, .sf-audit summary { cursor: pointer; }
.audit-downloads a { text-decoration: none; }
.sf-audit button:hover, .audit-downloads a:hover { border-color: #348bf7; background: #142d46; }
.sf-audit :focus-visible { outline: 2px solid #459cff; outline-offset: 3px; }
.sf-audit button:disabled { opacity: .4; cursor: default; }
.audit-managed { color: #92bdf6; font-size: 13px; }
[data-audit-notice]:not(:empty) { padding: 12px; margin-bottom: 12px; background: #112840; border-radius: 6px; }
.audit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.audit-card, .audit-panel {
  background: linear-gradient(120deg, #101f2e, #0b1a27);
  border: 1px solid var(--audit-border);
  border-radius: 8px;
}
.audit-card { display: flex; align-items: flex-start; gap: 20px; padding: 20px; min-height: 116px; }
.audit-card svg { flex-shrink: 0; width: 34px; height: 34px; fill: none; stroke: #5d9fff; stroke-width: 1.6; margin-top: 3px; }
.audit-card span { font-size: 14px; }
.audit-card strong { display: block; font-size: 31px; line-height: 1.3; margin: 4px 0; }
.audit-card small { color: #8abafa; font-size: 13px; }
.audit-card.green strong, .audit-success { color: #79d991; }
.audit-card.green svg { stroke: #79d991; }
.audit-card.amber strong { color: #ffb548; }
.audit-card.amber svg { stroke: #ffb548; }
.audit-card.purple svg { stroke: #ae83eb; }
.audit-middle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.audit-panel { padding: 18px; min-width: 0; }
.audit-badge { display: inline-block; border: 1px solid #315475; color: #9ec8ff; background: #102c49; padding: 3px 10px; border-radius: 5px; font-size: 12px; }
.audit-badge.green { border-color: #256342; background: #123725; color: #8fe0a2; }
.audit-badge.amber { border-color: #745424; background: #332915; color: #ffc05a; }
.audit-badge.red { border-color: #894343; background: #3d2026; color: #ffb2b2; }
.audit-progress { height: 10px; border-radius: 8px; overflow: hidden; background: #152c40; margin: 18px 0; }
.audit-progress span { display: block; height: 100%; background: #3188ff; border-radius: inherit; }
.audit-progress.is-running span { width: 35% !important; animation: audit-progress 2s ease-in-out infinite alternate; }
@keyframes audit-progress { to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) { .audit-progress.is-running span { animation: none; } }
.audit-run-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #bacce0; font-size: 13px; }
.sf-audit .audit-callout { padding: 11px 13px; border: 1px solid #75602b; border-radius: 6px; color: #ffc767; background: #27271966; font-size: 13px; }
.audit-counts { margin: 14px 0; }
.audit-counts div { display: flex; justify-content: space-between; border-top: 1px solid #22394b; padding: 10px 0; gap: 12px; }
.audit-counts dd { margin: 0; font-weight: 600; }
.sf-audit .audit-note, .audit-footer { color: var(--audit-muted); font-size: 12px; }
.audit-results, .audit-automation { margin-top: 14px; }
.audit-tools input { width: 220px; }
.audit-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--audit-border); margin: 14px 0 0; overflow-x: auto; }
.sf-audit .audit-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #b9c8dc; white-space: nowrap; padding: 9px 0; }
.sf-audit .audit-tabs button.is-active { border-bottom-color: #308aff; color: #4a9fff; }
.audit-table-wrap { overflow: auto; border: 1px solid #22394b; border-radius: 6px; margin-top: 8px; }
.sf-audit table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
.sf-audit th { color: #aebfd5; background: #0c1a29; font-weight: 600; padding: 13px; white-space: nowrap; }
.sf-audit td { padding: 13px; border-top: 1px solid #22394b; vertical-align: top; overflow-wrap: anywhere; max-width: 420px; }
.sf-audit tbody tr:hover { background: #142b40; }
.sf-audit summary { color: #62adff; }
.audit-pagination { margin-top: 12px; color: var(--audit-muted); font-size: 12px; }
.audit-pagination button { margin-left: 8px; }
.audit-automation-row { margin-top: 15px; font-size: 13px; }
.audit-footer { padding: 18px 0 8px; }
.audit-empty { color: var(--audit-muted); padding: 26px 12px; }
.audit-content { border-bottom: 1px solid var(--audit-border); padding: 15px 0; }
.audit-content details { margin: 12px 0; }
.audit-content .audit-fulltext { line-height: 1.8; white-space: pre-wrap; }
.audit-fulltext strong { color: #fff; font-weight: 750; }
@media (max-width: 1150px) {
  .audit-heading { align-items: flex-start; flex-direction: column; }
  .audit-card { padding: 16px; gap: 12px; }
  .audit-results-head { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .audit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-middle { grid-template-columns: 1fr; }
  .audit-card svg { width: 26px; height: 26px; }
  .audit-tools input { width: 170px; }
  .audit-panel { padding: 14px; }
}
@media (max-width: 400px) {
  .audit-cards { grid-template-columns: 1fr; }
  .audit-downloads { gap: 8px; }
}
