:root {
  --sa-primary: #D84A15;
  --sa-dark: #16191f;
  --sa-muted: #6c757d;
  --sa-bg: #f5f7fb;
  --sa-card: #ffffff;
  --sa-border: rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sa-bg);
  color: #212529;
  font-family: 'Rubik', sans-serif;
}

.sa-loader,
.sa-denied {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--sa-muted);
  text-align: center;
  padding: 2rem;
}

.sa-denied i {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.sa-page {
  padding: 1.25rem;
}

.sa-header {
  background: linear-gradient(135deg, #1d222b, #3b1f14);
  color: #fff;
  border-radius: 22px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.sa-header h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  margin: .5rem 0;
}

.sa-header p {
  margin: 0;
  opacity: .85;
}

.sa-back-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .9rem;
}

.sa-back-link:hover {
  color: #fff;
}

.sa-header-actions {
  display: flex;
  gap: .5rem;
  min-width: 320px;
}

.sa-card,
.sa-stat-card {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.sa-card {
  padding: 1rem;
}

.sa-card-header {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.sa-card-header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  margin: 0;
}

.sa-stat-card {
  padding: 1rem;
  display: flex;
  gap: .85rem;
  align-items: center;
}

.sa-stat-card strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
}

.sa-stat-card small {
  display: block;
  color: var(--sa-muted);
  margin-top: .25rem;
}

.sa-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.sa-stat-icon.danger { background: linear-gradient(135deg, #ff416c, #ff4b2b); }
.sa-stat-icon.primary { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.sa-stat-icon.warning { background: linear-gradient(135deg, #f7971e, #ffd200); }
.sa-stat-icon.success { background: linear-gradient(135deg, #11998e, #38ef7d); }

.sa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.sa-mini-card {
  background: #f8f9fa;
  border-radius: 14px;
  padding: .85rem;
}

.sa-mini-card strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
}

.sa-mini-card small {
  color: var(--sa-muted);
}

.sa-threat {
  border-left: 4px solid #dc3545;
  background: #fff5f5;
  border-radius: 12px;
  padding: .8rem;
  margin-bottom: .75rem;
}

.sa-threat.medium {
  border-left-color: #ffc107;
  background: #fffaf0;
}

.sa-threat.low {
  border-left-color: #0dcaf0;
  background: #f0fbff;
}

.sa-threat strong {
  display: block;
}

.sa-threat small {
  color: var(--sa-muted);
}

.sa-checklist {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.sa-checklist li {
  margin-bottom: .5rem;
}

.table {
  font-size: .875rem;
}

.badge-status-success {
  background: rgba(25,135,84,.12);
  color: #198754;
}

.badge-status-warning {
  background: rgba(255,193,7,.2);
  color: #946200;
}

.badge-status-danger {
  background: rgba(220,53,69,.12);
  color: #dc3545;
}

@media (max-width: 768px) {
  .sa-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sa-header-actions {
    min-width: 0;
    flex-direction: column;
  }

  .sa-grid {
    grid-template-columns: 1fr;
  }
}
