/* ================================
   THEME VARIABLES
================================ */
:root {
  /* Dark Mode (Default) */
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --neon: #00e5ff;
  --neon-glow: 0 0 10px #00e5ff, 0 0 20px #00e5ff;
  
  --bg: #050b16;
  --bg-secondary: #0a1428;
  --card: #0b1020;
  --card-hover: #121a30;
  --border: rgba(0, 229, 255, 0.15);
  --border-hover: rgba(0, 229, 255, 0.4);
  
  --text: #e8f1ff;
  --text-secondary: #a8b6d6;
  --text-muted: #6b7a94;
  
  --success: #2ecc71;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --danger-hover: #c0392b;
  
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 18px;
  --radius-sm: 12px;
}

/* Light Mode */
[data-theme="light"] {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --neon: #0891b2;
  --neon-glow: 0 0 10px rgba(8, 145, 178, 0.3);
  
  --bg: #f0f4f8;
  --bg-secondary: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Theme Toggle Button */
.theme-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  border-color: var(--neon);
  box-shadow: var(--neon-glow);
  transform: scale(1.1);
}

.hidden { display: none !important; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 25px;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  border-color: var(--neon);
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.2rem;
}

.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Sidebar Navigation Styles */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover, 
.nav-item.active {
  background: rgba(0, 229, 255, 0.1);
  border-left-color: var(--neon);
  color: var(--neon) !important;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  color: var(--neon);
  font-size: 1.3rem;
  margin: 0;
}

/* Close Button */
.close-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon);
}

/* Menu Button */
.menu-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.menu-btn:hover {
  background: rgba(0, 229, 255, 0.1);
}

/* Fix link colors */
a {
  color: inherit;
  text-decoration: none;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-style: italic;
  font-size: 1.1rem;
}

/* Error message styling */
.error-message {
  text-align: center;
  color: var(--danger);
  padding: 14px 20px;
  font-size: 1rem;
  background: rgba(231, 76, 60, 0.1);
  border-radius: var(--radius-sm);
  margin: 20px 0;
  border: 1px solid var(--danger);
}

.success-message {
  text-align: center;
  color: var(--success);
  padding: 14px 20px;
  font-size: 1rem;
  background: rgba(46, 204, 113, 0.1);
  border-radius: var(--radius-sm);
  margin: 20px 0;
  border: 1px solid var(--success);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon);
}

/* Selection Styling */
::selection {
  background: rgba(0, 229, 255, 0.3);
  color: var(--text);
}

/* Focus Styling */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

/* Loading Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
  :root {
    --radius: 14px;
    --radius-sm: 10px;
  }
  
  body {
    font-size: 14px;
  }
  
  .card {
    padding: 20px 15px;
  }
}
/* ================================
   SIDEBAR FIX - CRITICAL
================================ */
.sidebar {
  position: fixed;
  top: 60px;
  left: -280px;
  width: 280px;
  height: calc(100vh - 60px);
  background: var(--card);
  border-right: 1px solid var(--border);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.sidebar.show {
  left: 0;
}

/* Overlay when sidebar is open */
.sidebar-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

.sidebar.show + .sidebar-overlay,
.sidebar-overlay.active {
  display: block;
}

