/* WebTrust AI – Custom CSS (supplements Tailwind CDN) */

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Sidebar active nav item ───────────────────────────────── */
.nav-active {
  background: linear-gradient(90deg, rgba(6,182,212,.15), transparent);
  border-left: 3px solid #06b6d4;
  color: #06b6d4 !important;
}

/* ── Stat card accent lines ────────────────────────────────── */
.stat-card-teal  { border-top: 2px solid #06b6d4; }
.stat-card-indigo{ border-top: 2px solid #6366f1; }
.stat-card-rose  { border-top: 2px solid #f43f5e; }
.stat-card-amber { border-top: 2px solid #f59e0b; }
.stat-card-green { border-top: 2px solid #10b981; }

/* ── Animated threat pulse ─────────────────────────────────── */
@keyframes threat-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.threat-critical { animation: threat-pulse 1.5s ease-in-out infinite; }

/* ── Severity badges ───────────────────────────────────────── */
.badge-critical { background: #7f1d1d; color: #fca5a5; border: 1px solid #b91c1c; }
.badge-high     { background: #431407; color: #fdba74; border: 1px solid #c2410c; }
.badge-medium   { background: #422006; color: #fcd34d; border: 1px solid #b45309; }
.badge-low      { background: #14532d; color: #86efac; border: 1px solid #15803d; }

/* ── Chart containers ──────────────────────────────────────── */
.chart-container { position: relative; }
.chart-container canvas { max-height: 280px; }

/* ── Code blocks ───────────────────────────────────────────── */
.code-block {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 1.25rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: .8125rem;
  line-height: 1.7;
  color: #c9d1d9;
  overflow-x: auto;
  white-space: pre;
}
.code-block .comment { color: #8b949e; }
.code-block .keyword { color: #ff7b72; }
.code-block .string  { color: #a5d6ff; }
.code-block .fn      { color: #d2a8ff; }

/* ── Glow effects ─────────────────────────────────────────── */
.glow-teal   { box-shadow: 0 0 20px rgba(6,182,212,.25); }
.glow-indigo { box-shadow: 0 0 20px rgba(99,102,241,.25); }
.glow-red    { box-shadow: 0 0 20px rgba(239,68,68,.25); }

/* ── Progress bar animated ─────────────────────────────────── */
@keyframes progress-stripe {
  from { background-position: 1rem 0; }
  to   { background-position: 0 0; }
}
.progress-striped {
  background-image: linear-gradient(45deg,rgba(255,255,255,.1) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.1) 75%,transparent 75%,transparent);
  background-size: 1rem 1rem;
  animation: progress-stripe 1s linear infinite;
}

/* ── Table hover ───────────────────────────────────────────── */
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(51,65,85,.4); }

/* ── Toggle switch ─────────────────────────────────────────── */
.toggle-switch { appearance: none; -webkit-appearance: none; width: 2.75rem; height: 1.5rem; background: #334155; border-radius: 9999px; cursor: pointer; position: relative; transition: background .2s; }
.toggle-switch:checked { background: #06b6d4; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 1.25rem; height: 1.25rem; background: white; border-radius: 50%; transition: transform .2s; }
.toggle-switch:checked::after { transform: translateX(1.25rem); }

/* ── Skeleton loading ─────────────────────────────────────── */
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ── Security score ring ───────────────────────────────────── */
.score-ring { transform: rotate(-90deg); }
.score-ring-track { fill: none; stroke: #1e293b; stroke-width: 8; }
.score-ring-fill  { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }

/* ── Threat type icons ─────────────────────────────────────── */
.threat-icon-bot     { color: #f59e0b; }
.threat-icon-sqli    { color: #ef4444; }
.threat-icon-xss     { color: #f97316; }
.threat-icon-lfi     { color: #ec4899; }
.threat-icon-rce     { color: #dc2626; }
.threat-icon-spam    { color: #84cc16; }
.threat-icon-proxy   { color: #8b5cf6; }
.threat-icon-unknown { color: #94a3b8; }

/* ── Landing page gradient text ────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #06b6d4 0%, #6366f1 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Neon border ───────────────────────────────────────────── */
.border-neon-teal   { border-color: #06b6d4; box-shadow: 0 0 8px rgba(6,182,212,.3), inset 0 0 8px rgba(6,182,212,.05); }
.border-neon-indigo { border-color: #6366f1; box-shadow: 0 0 8px rgba(99,102,241,.3), inset 0 0 8px rgba(99,102,241,.05); }

/* ── Responsive utilities ─────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .chart-container canvas { max-height: 200px; }
}
