@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #020617;
  --bg-sidebar: #0a0a0a;
  --card-bg: rgba(15, 23, 42, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  
  --accent-primary: #0ea5e9;
  --accent-secondary: #6366f1;
  --accent-glow: rgba(14, 165, 233, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --safe: #10b981;
  --suspicious: #f59e0b;
  --malicious: #ef4444;
  
  --glass-blur: blur(12px);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  transition: var(--transition-smooth);
  overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 5px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent-glow); }
  100% { box-shadow: 0 0 5px var(--accent-glow); }
}

/* Login Components */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: var(--glass-blur);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dashboard Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--card-border);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}

.sidebar-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.nav-item.active {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.sub-nav {
  margin-top: 0.2rem;
  opacity: 0.8;
}

.sub-nav:hover, .sub-nav.active {
  opacity: 1;
}

.main-content {
  flex: 1;
  padding: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-safe { background: var(--safe); box-shadow: 0 0 10px var(--safe); }
.status-malicious { background: var(--malicious); box-shadow: 0 0 10px var(--malicious); }

/* Charts & Lists */
.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.threat-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.threat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.threat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(5px);
}

.badge {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-malicious { background: rgba(239, 68, 68, 0.1); color: var(--malicious); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-safe { background: rgba(16, 185, 129, 0.1); color: var(--safe); border: 1px solid rgba(16, 185, 129, 0.2); }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { width: 80px; padding: 2rem 1rem; }
  .sidebar-logo span { display: none; }
  .nav-item span { display: none; }
  .nav-item { justify-content: center; }
}
