.audits-ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.audits-page-wrapper {
  max-width: 1400px;
  margin: 80px auto 0 auto;
  padding: 16px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.audits-hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 12px;
  max-width: 880px;
  margin: 0 auto;
}

.audits-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 9999px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.audits-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 12px 0;
}

.audits-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.audits-stats-banner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 820px;
}

@media (min-width: 640px) {
  .audits-stats-banner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.audit-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.audit-stat-card .stat-number {
  font-size: 1.65rem;
  font-weight: 900;
  font-family: var(--font-mono, monospace);
  color: #f8fafc;
  line-height: 1.1;
  margin-bottom: 4px;
}

.audit-stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.audit-stat-card.stat-approved .stat-number {
  color: #34d399;
}

.audit-stat-card.stat-caution .stat-number {
  color: #fbbf24;
}

.audit-stat-card.stat-flagged .stat-number {
  color: #f87171;
}

.audits-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
}

.audits-search-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .audits-search-row {
    flex-direction: row;
    align-items: center;
  }
}

.audits-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.audits-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.audit-input {
  width: 100%;
  background: #090e17;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 11px 38px 11px 40px;
  color: #f8fafc;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}

.audit-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.clear-btn:hover {
  color: #ffffff;
}

.audits-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sort-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.audit-select {
  background: #090e17;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.audits-filters-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 992px) {
  .audits-filters-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.audits-score-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.score-tab:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.35);
}

.score-tab.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-weight: 700;
}

.score-tab.tab-warning.active {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.audits-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-pill {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-pill:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.3);
}

.category-pill.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 700;
}

.audits-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.audits-showing-text {
  font-size: 0.86rem;
  color: #94a3b8;
}

.audits-showing-text strong {
  color: #f8fafc;
}

.audits-rule-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
}

.audits-grid {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 767px) {
  .audits-grid {
    flex-direction: column;
  }
}

.audits-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

.audit-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  max-height: 560px;
  box-sizing: border-box;
  padding: 18px 20px;
  border-radius: 14px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .audit-card {
    padding: 16px 14px;
  }
}

.audit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(148, 163, 184, 0.35);
}

.audit-card-disqualified {
  border-left: 3.5px solid #ef4444 !important;
}

.audit-card:not(.audit-card-disqualified) {
  border-left: 3.5px solid #10b981 !important;
}

.audit-card-pinned {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 4px 22px rgba(245, 158, 11, 0.1);
}

.audit-card-top-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.audit-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  padding: 2px 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.audit-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 9999px;
  padding: 2px 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.audit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.audit-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.audit-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.audit-provider-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.audit-category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.audit-card-aka-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 9px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  margin-top: 6px;
}

.audit-aka-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #38bdf8;
  flex-shrink: 0;
}

.audit-aka-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.audit-aka-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.3;
}

.audit-score-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.audit-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1.2;
}

.audit-tier-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audit-score-elite {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.audit-score-good {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
}

.audit-score-warning {
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.38);
  color: #fb923c;
}

.audit-score-danger {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #f87171;
}

.audit-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.audit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  line-height: 1.3;
}

.audit-pill-difficulty {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.audit-pill-tracking {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.audit-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  margin: 6px 0 10px 0;
}

.audit-card-body::-webkit-scrollbar {
  width: 4px;
}

.audit-card-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.05);
  border-radius: 9999px;
}

.audit-card-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
}

.audit-card-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

.audit-message-box {
  background: linear-gradient(135deg, var(--msg-bg, rgba(56, 189, 248, 0.08)) 0%, rgba(10, 17, 28, 0.88) 100%), #0a121e;
  border: 1px solid var(--msg-border, rgba(148, 163, 184, 0.16));
  border-left: 3.5px solid var(--msg-color, #38bdf8);
  border-radius: 8px;
  padding: 9px 11px;
  box-sizing: border-box;
}

.audit-notes-text {
  font-size: 0.84rem;
  color: #f1f5f9;
  line-height: 1.5;
  margin: 0;
}

.audit-card-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, rgba(10, 17, 28, 0.88) 100%), #0a121e;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 3.5px solid #38bdf8;
  border-radius: 8px;
  padding: 9px 11px;
  box-sizing: border-box;
}

.audit-details-heading {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.audit-details-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.52;
}

.audit-details-text p {
  margin: 0 0 6px 0;
}

.audit-details-text p:last-child {
  margin-bottom: 0;
}

.audit-details-text a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.audit-details-text a:hover {
  color: #7dd3fc;
}

.audit-warnings-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(18, 10, 14, 0.88) 100%), #120a0e;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-left: 3.5px solid #ef4444;
  border-radius: 8px;
  padding: 9px 11px;
  box-sizing: border-box;
  font-size: 0.82rem;
  color: #fee2e2;
  line-height: 1.45;
}

.audit-warnings-box .warning-icon {
  color: #f87171;
  font-size: 0.88rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.audit-warnings-box span {
  color: #fee2e2;
  flex: 1;
}

.audit-card-resource-row {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.audit-resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: #030712;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  transition: all 0.16s ease;
  box-sizing: border-box;
}

.audit-resource-btn:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  transform: translateY(-1px);
  color: #030712;
}

.audit-resource-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  margin-top: auto;
  flex-shrink: 0;
}

.audit-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.audit-action-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-action-btn.btn-compare {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.audit-action-btn.btn-compare:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

.audit-action-btn.btn-live {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.audit-action-btn.btn-live:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: #cbd5e1;
  color: #ffffff;
}

.audit-action-btn.btn-resource {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.25) 100%);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
}

.audit-action-btn.btn-resource:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #38bdf8;
  color: #030712;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.audit-action-btn.disabled,
.audit-action-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.65);
  pointer-events: auto;
  user-select: none;
}

.audit-action-btn.disabled:hover,
.audit-action-btn[disabled]:hover {
  background: rgba(148, 163, 184, 0.05) !important;
  border-color: rgba(148, 163, 184, 0.15) !important;
  color: #64748b !important;
  transform: none !important;
  box-shadow: none !important;
}

.audits-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  margin: 24px 0;
}

.empty-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #64748b;
  margin-bottom: 16px;
}

.audits-empty-card h3 {
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.audits-empty-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 420px;
  margin: 0 0 20px 0;
  line-height: 1.5;
}
