/* ============================================
   SpamJammer Dark Mode Dashboard
   Design: Linear.app inspired, glassmorphic
   ============================================ */

:root {
  /* Core palette */
  --bg-root: #0a0a0a;
  --bg-primary: #0f0f0f;
  --bg-secondary: #141414;
  --bg-elevated: #1a1a1a;
  --bg-hover: #1f1f1f;
  --bg-active: #252525;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-strong: rgba(255, 255, 255, 0.1);

  /* Text */
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #5a5a5a;
  --text-inverse: #0a0a0a;

  /* Accent — electric green */
  --accent: #22C55E;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --accent-glow: rgba(34, 197, 94, 0.4);

  /* Secondary accent — cyan */
  --cyan: #06B6D4;
  --cyan-dim: rgba(6, 182, 212, 0.15);

  /* Semantic colors */
  --red: #EF4444;
  --orange: #F97316;
  --yellow: #EAB308;
  --purple: #A855F7;
  --blue: #3B82F6;

  /* Sizing */
  --sidebar-width: 260px;
  --topnav-height: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Dot Grid Background ---- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- Top Navigation ---- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topnav-links {
  display: flex;
  gap: 4px;
}

.topnav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.topnav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.topnav-link.active {
  color: var(--text-primary);
  background: var(--bg-active);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-menu:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---- Layout ---- */
.layout {
  display: flex;
  padding-top: var(--topnav-height);
  position: relative;
  z-index: 1;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--topnav-height));
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  background: rgba(14, 14, 14, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  z-index: 50;
}

.sidebar-nav {
  padding: 16px 12px;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  font-family: var(--font-mono);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--text-primary);
  background: var(--bg-active);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.sidebar-badge.accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.plan-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.usage-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usage-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.usage-mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.usage-bar {
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 1s ease;
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 28px 32px 48px;
  min-height: calc(100vh - var(--topnav-height));
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
  padding: 6px 12px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #1aad50;
  box-shadow: 0 0 30px var(--accent-glow);
}

/* ---- Stats Grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.stat-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange);
}

.stat-icon.green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.stat-icon.accent {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.stat-pct {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.stat-change.positive {
  color: var(--accent);
}

.stat-change.negative {
  color: var(--red);
}

/* ---- Content Grids ---- */
.content-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---- Card ---- */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-root);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.card-tab {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}

.card-tab:hover {
  color: var(--text-secondary);
}

.card-tab.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.card-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.card-link:hover {
  color: #2fda6e;
  text-shadow: 0 0 12px var(--accent-glow);
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Chart ---- */
.chart-container {
  width: 100%;
}

.activity-chart {
  width: 100%;
  height: auto;
  max-height: 240px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.accent {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.legend-dot.orange {
  background: var(--orange);
}

/* ---- Categories ---- */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon.phishing {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.category-icon.promo {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.category-icon.scam {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange);
}

.category-icon.malware {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple);
}

.category-icon.other {
  background: rgba(90, 90, 90, 0.3);
  color: var(--text-secondary);
}

.category-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.category-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.category-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-active);
  border-radius: 3px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.category-bar-fill.phishing {
  background: linear-gradient(90deg, var(--red), #F87171);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.category-bar-fill.promo {
  background: linear-gradient(90deg, var(--blue), #60A5FA);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.category-bar-fill.scam {
  background: linear-gradient(90deg, var(--orange), #FB923C);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.category-bar-fill.malware {
  background: linear-gradient(90deg, var(--purple), #C084FC);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.category-bar-fill.other {
  background: linear-gradient(90deg, #5a5a5a, #777);
}

.category-pct {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}

/* ---- Table ---- */
.table-container {
  overflow-x: auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}

.search-input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  width: 160px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.threats-table {
  width: 100%;
  border-collapse: collapse;
}

.threats-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.threats-table td {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.threats-table tr {
  transition: background 0.15s ease;
}

.threats-table tbody tr:hover {
  background: var(--bg-hover);
}

.sender-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sender-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.mono-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.tag-phishing {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tag-scam {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.tag-malware {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.tag-promo {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.risk-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.risk-bar span {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  display: inline-block;
}

.risk-bar.critical {
  color: var(--red);
}

.risk-bar.critical span {
  background: var(--red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.risk-bar.high {
  color: var(--orange);
}

.risk-bar.high span {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.risk-bar.medium {
  color: var(--yellow);
}

.risk-bar.medium span {
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}

.risk-bar.low {
  color: var(--text-muted);
}

.risk-bar.low span {
  background: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.status-badge.blocked {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-badge.quarantined {
  background: rgba(234, 179, 8, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(234, 179, 8, 0.15);
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-sm:hover {
  background: var(--bg-active);
  border-color: var(--border);
  color: var(--text-primary);
}

/* ---- Blocked Domains ---- */
.blocked-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blocked-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blocked-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-active);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blocked-info {
  min-width: 180px;
}

.blocked-domain {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.blocked-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blocked-bar-wrap {
  flex: 1;
}

.blocked-bar {
  height: 6px;
  background: var(--bg-active);
  border-radius: 3px;
  overflow: hidden;
}

.blocked-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
  transition: width 1s ease;
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-card {
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-body);
}

.action-card:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 24px var(--accent-dim);
  transform: translateY(-2px);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quarantine-icon {
  background: rgba(234, 179, 8, 0.12);
  color: var(--yellow);
}

.rules-icon {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
}

.export-icon {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
}

.api-icon {
  background: var(--accent-dim);
  color: var(--accent);
}

.action-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.action-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: calc(var(--delay, 0) * 0.08s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .topnav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
  }

  .page-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .main-content {
    padding: 20px 16px;
  }

  .threats-table th:nth-child(4),
  .threats-table td:nth-child(4),
  .threats-table th:nth-child(5),
  .threats-table td:nth-child(5) {
    display: none;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ---- Selection ---- */
::selection {
  background: var(--accent-dim);
  color: var(--accent);
}
