/*
 * RageSpace Admin Dashboard - Cyberpunk/Neon Design System
 * A modern, professional admin interface with futuristic aesthetics
 * Version 2.0 - Complete Redesign
 */

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */
:root {
  /* Neon Accent Colors */
  --neon-cyan: #00f5ff;
  --neon-magenta: #ff00ff;
  --neon-blue: #0066ff;
  --neon-purple: #8b5cf6;
  --neon-pink: #ec4899;
  --neon-green: #00ff88;
  --neon-orange: #ff6b35;
  --neon-yellow: #ffd700;
  
  /* Primary Brand */
  --primary: var(--neon-cyan);
  --primary-dim: rgba(0, 245, 255, 0.5);
  --primary-glow: rgba(0, 245, 255, 0.3);
  --secondary: var(--neon-magenta);
  --accent: var(--neon-blue);
  
  /* Status Colors */
  --success: #00ff88;
  --success-dim: rgba(0, 255, 136, 0.2);
  --warning: #ffd700;
  --warning-dim: rgba(255, 215, 0, 0.2);
  --danger: #ff3366;
  --danger-dim: rgba(255, 51, 102, 0.2);
  --info: #00f5ff;
  --info-dim: rgba(0, 245, 255, 0.2);
  
  /* Dark Surfaces */
  --bg-darkest: #050510;
  --bg-dark: #0a0a1a;
  --bg-base: #0f0f23;
  --bg-elevated: #141428;
  --bg-card: rgba(20, 20, 40, 0.7);
  --bg-hover: rgba(30, 30, 60, 0.8);
  
  /* Glass Effect */
  --glass-bg: rgba(15, 15, 35, 0.6);
  --glass-border: rgba(0, 245, 255, 0.1);
  --glass-border-hover: rgba(0, 245, 255, 0.3);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-dim: rgba(255, 255, 255, 0.3);
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.4), 0 0 40px rgba(0, 245, 255, 0.2);
  --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.4), 0 0 40px rgba(255, 0, 255, 0.2);
  --glow-success: 0 0 20px rgba(0, 255, 136, 0.4);
  --glow-danger: 0 0 20px rgba(255, 51, 102, 0.4);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  
  /* Font */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  color-scheme: dark;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(0, 245, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 0, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 102, 255, 0.04) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 50%, var(--bg-base) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Grid Lines Background */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 245, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: var(--primary-dim);
  color: var(--text-primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
  text-shadow: var(--glow-cyan);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 20px currentColor;
}

.mono {
  font-family: var(--font-mono);
}

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

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 32px;
  transition: margin-left var(--transition-base);
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 72px;
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-dark) 100%);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-cyan), transparent, var(--neon-magenta));
  opacity: 0.3;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
}

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

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan);
  font-size: 24px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: all var(--transition-base);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--primary-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::before {
  opacity: 0.5;
}

.nav-link.active {
  color: var(--primary);
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid var(--glass-border-hover);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-blue));
  border-radius: 0 3px 3px 0;
  box-shadow: var(--glow-cyan);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-link span {
  flex: 1;
}

.nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

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

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.user-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-hover);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  background: transparent;
  border: 1px solid rgba(255, 51, 102, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

/* Mobile Sidebar */
.sidebar-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 150;
  display: none;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.sidebar-toggle:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-cyan);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-toggle {
    display: flex;
  }
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

/* Stat Cards */
.stat-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md), var(--glow-cyan);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

.stat-icon.cyan {
  background: var(--info-dim);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.stat-icon.green {
  background: var(--success-dim);
  color: var(--success);
  box-shadow: var(--glow-success);
}

.stat-icon.magenta {
  background: rgba(255, 0, 255, 0.15);
  color: var(--neon-magenta);
  box-shadow: var(--glow-magenta);
}

.stat-icon.danger {
  background: var(--danger-dim);
  color: var(--danger);
  box-shadow: var(--glow-danger);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 20px;
}

.stat-trend.up {
  background: var(--success-dim);
  color: var(--success);
}

.stat-trend.down {
  background: var(--danger-dim);
  color: var(--danger);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: var(--bg-darkest);
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.5), 0 0 60px rgba(0, 245, 255, 0.3);
}

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

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

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #cc0033);
  color: white;
  box-shadow: var(--glow-danger);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #00cc66);
  color: var(--bg-darkest);
  box-shadow: var(--glow-success);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #cc9900);
  color: var(--bg-darkest);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-icon {
  padding: 10px;
  width: 40px;
  height: 40px;
}

/* ============================================
   Form Controls
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input:hover {
  border-color: rgba(0, 245, 255, 0.2);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1), var(--glow-cyan);
  background: rgba(0, 245, 255, 0.03);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
}

/* Search Input */
.search-input {
  position: relative;
}

.search-input input {
  padding-left: 44px;
}

.search-input svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

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

.data-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(0, 245, 255, 0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.badge-warning {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-info {
  background: var(--info-dim);
  color: var(--info);
  border: 1px solid rgba(0, 245, 255, 0.3);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-live {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 51, 102, 0.3);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Status Dots */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
  animation: none;
}

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

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.8); opacity: 0.7; }
}

/* ============================================
   Modals
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg), var(--glow-cyan);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in 0.3s ease;
  max-width: 400px;
}

.toast.success {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: var(--shadow-md), var(--glow-success);
}

.toast.error {
  border-color: rgba(255, 51, 102, 0.3);
  box-shadow: var(--shadow-md), var(--glow-danger);
}

.toast.warning {
  border-color: rgba(255, 215, 0, 0.3);
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 16, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* ============================================
   Console
   ============================================ */
.console {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  padding: 20px;
  height: 400px;
  overflow-y: auto;
}

.console-line {
  display: flex;
  gap: 12px;
}

.console-line .time {
  color: var(--text-dim);
  flex-shrink: 0;
}

.console-line .level {
  flex-shrink: 0;
  font-weight: 600;
}

.console-line .level.info { color: var(--neon-cyan); }
.console-line .level.warn { color: var(--warning); }
.console-line .level.error { color: var(--danger); }

.console-line .message {
  color: var(--text-secondary);
  word-break: break-word;
}

.console-input {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.console-input input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--success);
  outline: none;
}

.console-input input:focus {
  border-color: var(--primary);
}

.console-input input::placeholder {
  color: var(--text-dim);
}

/* ============================================
   Player Avatar
   ============================================ */
.player-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-avatar img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.player-avatar-lg img {
  width: 80px;
  height: 80px;
}

.player-name {
  font-weight: 600;
}

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

/* ============================================
   Service Cards (CloudNet)
   ============================================ */
.service-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-base);
}

.service-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-card.running {
  border-left: 3px solid var(--success);
}

.service-card.stopped {
  border-left: 3px solid var(--danger);
}

.service-card.starting {
  border-left: 3px solid var(--warning);
}

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

.service-name {
  font-weight: 700;
  font-size: 1rem;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.service-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.service-actions {
  display: flex;
  gap: 8px;
}

/* ============================================
   Progress Bar / Gauge
   ============================================ */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  border-radius: 4px;
  transition: width var(--transition-base);
}

.progress-fill.warning {
  background: linear-gradient(90deg, var(--warning), #ff8800);
}

.progress-fill.danger {
  background: linear-gradient(90deg, var(--danger), #ff0044);
}

.gauge {
  position: relative;
  width: 100px;
  height: 100px;
}

.gauge svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--neon-cyan));
  transition: stroke-dashoffset var(--transition-slow);
}

.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-value .number {
  font-size: 1.5rem;
  font-weight: 800;
}

.gauge-value .label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
}

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

.page-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 4px;
  border: 1px solid var(--glass-border);
}

.tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: var(--bg-darkest);
  box-shadow: var(--glow-cyan);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ============================================
   Quick Actions
   ============================================ */
.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 100%;
  text-align: left;
}

.quick-action:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.quick-action-content {
  flex: 1;
}

.quick-action-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.quick-action-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ============================================
   Responsive Grid
   ============================================ */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   Utility Classes
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.w-full { width: 100%; }
.hidden { display: none; }

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 255, 0.4);
}

/* ============================================
   Login Page Specific
   ============================================ */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-cyan));
  animation: gradient-flow 3s linear infinite;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  font-size: 36px;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.login-form .form-group {
  margin-bottom: 24px;
}

.login-form .btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
}

.login-error {
  background: var(--danger-dim);
  border: 1px solid rgba(255, 51, 102, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--danger);
  font-size: 0.9rem;
  display: none;
}

.login-error.visible {
  display: block;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
