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

:root {
  --bg-dark: #000000; /* Vantablack */
  --bg-panel: rgba(5, 5, 5, 0.7);
  --glass-border: rgba(0, 243, 255, 0.15);
  --glass-glow: rgba(0, 243, 255, 0.2);
  
  --text-main: #ffffff;
  --text-muted: #888888;
  
  --table-border: rgba(255,255,255,0.1);
  --table-border-light: rgba(255,255,255,0.05);
  --hover-bg: rgba(255,255,255,0.02);
  --panel-bg: rgba(0,0,0,0.5);
  --sidebar-bg: rgba(0, 0, 0, 0.9);
  
  --accent-cyan: #00f3ff;
  --accent-blue: #0055ff;
  --accent-red: #ff003c;
  --accent-green: #00ff88;
  --accent-purple: #a855f7;
  --accent-yellow: #ffea00;
}

body.light-theme {
  --bg-dark: #f0f2f5; /* Light Icy White */
  --bg-panel: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-glow: rgba(0, 0, 0, 0.05);
  
  --text-main: #111827;
  --text-muted: #6b7280;
  
  --table-border: rgba(0,0,0,0.1);
  --table-border-light: rgba(0,0,0,0.05);
  --hover-bg: rgba(0,0,0,0.03);
  --panel-bg: rgba(255,255,255,0.6);
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  
  /* Deepen accents for visibility on white */
  --accent-cyan: #0088aa; 
  --accent-blue: #0044cc;
  --accent-red: #cc0033;
  --accent-green: #00aa55;
  --accent-purple: #7c3aed;
  --accent-yellow: #d97706; /* Darker amber-yellow */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.03), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(255, 0, 60, 0.03), transparent 40%);
}

/* Glassmorphism Panel Utilities Absolute */
.glass-panel {
  background: var(--bg-panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(0, 243, 255, 0.02);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.05), transparent);
  transition: all 0.5s;
}

.glass-panel:hover::before {
  left: 100%;
}

.glass-panel:hover {
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 20px var(--glass-glow), inset 0 0 15px rgba(0, 243, 255, 0.05);
  transform: translateY(-2px);
}

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

.sidebar {
  width: 280px;
  border-right: 1px solid var(--glass-border);
  background: var(--sidebar-bg);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.8);
  z-index: 50;
  overflow-y: auto;
}

.brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 50px;
  color: var(--text-main);
  text-shadow: 0 0 15px var(--glass-glow);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.brand::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav-link:hover, .nav-link.active {
  background: var(--hover-bg);
  color: var(--text-main);
  text-shadow: 0 0 8px var(--glass-glow);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.main-content {
  flex: 1;
  padding: 50px;
  overflow-y: auto;
  position: relative;
}

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

h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-main);
  text-shadow: 0 0 20px var(--glass-glow);
}

/* Button Premium */
.btn-primary {
  font-family: 'JetBrains Mono', monospace;
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.btn-primary:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(0, 243, 255, 0.2);
  transform: translateY(-2px);
}

.btn-danger {
  font-family: 'JetBrains Mono', monospace;
  background: transparent;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.1);
}

.btn-danger:hover {
  background: rgba(255, 0, 60, 0.1);
  box-shadow: 0 0 25px rgba(255, 0, 60, 0.4), inset 0 0 10px rgba(255, 0, 60, 0.2);
  transform: translateY(-2px);
}

/* Grids & Cards */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.stat-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: 0 0 20px var(--glass-glow);
}

.stat-value.red { color: var(--accent-red); text-shadow: 0 0 20px rgba(255, 0, 60, 0.4); }
.stat-value.green { color: var(--accent-green); text-shadow: 0 0 20px rgba(0, 255, 136, 0.4); }
.stat-value.cyan { color: var(--accent-cyan); text-shadow: 0 0 20px rgba(0, 243, 255, 0.4); }

/* Table Premium */
.glass-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
}

.glass-table th, .glass-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid var(--table-border-light);
}

.glass-table th {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--glass-border);
}

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

.badge {
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid;
}

.badge.active { 
  background: rgba(0, 255, 136, 0.05); 
  color: var(--accent-green); 
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}
.badge.revoked { 
  background: rgba(255, 0, 60, 0.05); 
  color: var(--accent-red); 
  border-color: rgba(255, 0, 60, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 60, 0.1);
}

/* Animations */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 243, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0); }
}

.live-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  margin-right: 12px;
  animation: pulseGlow 2s infinite;
}

.live-indicator.dead {
  background-color: var(--accent-red);
  animation: none;
  box-shadow: 0 0 15px var(--accent-red);
}
