/* Hollow-Craft Admin Dashboard - Professional Design System v3.0 */
/* Modern dark theme with glassmorphism effects */

:root {
  /* Primary Colors */
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --primary-glow: rgba(139, 92, 246, 0.4);

  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;

  /* Status Colors */
  --success: #10b981;
  --success-light: #34d399;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --info: #3b82f6;
  --info-light: #60a5fa;
  --info-glow: rgba(59, 130, 246, 0.3);

  /* Background Colors */
  --bg-base: #0a0a0f;
  --bg-primary: #0f0f1a;
  --bg-secondary: #151525;
  --bg-tertiary: #1a1a2e;
  --bg-elevated: #1f1f35;
  --bg-card: rgba(30, 30, 50, 0.6);

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(139, 92, 246, 0.3);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-subtle: rgba(255, 255, 255, 0.35);

  /* 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);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
  --glow-purple: 0 0 60px rgba(139, 92, 246, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Sidebar */
  --sidebar-width: 280px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 90%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== Sidebar ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, rgba(15, 15, 26, 0.98) 0%, rgba(15, 15, 26, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-base);
}

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

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

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

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

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 0 12px;
  margin-bottom: 8px;
}

.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;
  transition: all var(--transition-base);
  position: relative;
  margin-bottom: 4px;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), var(--accent-cyan));
  border-radius: 0 4px 4px 0;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.nav-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-light);
  border-color: rgba(16, 185, 129, 0.25);
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-pink), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

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

.user-info .name {
  font-size: 0.875rem;
  font-weight: 600;
}

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

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

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-light);
}

.btn-logout svg {
  width: 16px;
  height: 16px;
}

.server-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

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

.sidebar-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--glass-border-hover);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  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-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

/* ========== Main Content ========== */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 100%;
  min-height: 100vh;
  transition: margin-left var(--transition-base);
}

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

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

.page-title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

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

/* ========== Tab Content ========== */
.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); }
}

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

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glow-purple);
}

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

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

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

/* ========== Stats Grid ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  position: relative;
  padding: 24px;
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.9), rgba(30, 30, 50, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 50%, rgba(139, 92, 246, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card .glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.4;
  pointer-events: none;
  top: -30px;
  right: -30px;
  transition: opacity var(--transition-base);
}

.stat-card:hover .glow {
  opacity: 0.6;
}

.stat-card.purple .glow { background: var(--primary); }
.stat-card.green .glow { background: var(--success); }
.stat-card.blue .glow { background: var(--info); }
.stat-card.red .glow { background: var(--danger); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--primary-light); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success-light); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info-light); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--danger-light); }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

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

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  margin-top: 12px;
}

.stat-change.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-light);
}

.stat-change.down {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-light);
}

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

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

.btn svg {
  width: 16px;
  height: 16px;
}

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

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, #059669, var(--success));
  color: white;
  box-shadow: 0 4px 20px var(--success-glow);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--danger));
  color: white;
  box-shadow: 0 4px 20px var(--danger-glow);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, var(--warning));
  color: white;
  box-shadow: 0 4px 20px var(--warning-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

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

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

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-base);
  outline: none;
}

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

.form-input:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12);
}

.form-input:focus,
.form-select:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: rgba(139, 92, 246, 0.03);
}

.form-select {
  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.4)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 44px;
  cursor: pointer;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-input {
  padding-left: 44px;
}

.input-group-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

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

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

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

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

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

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

.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: var(--radius-full);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

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

/* Status Indicator */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulse-green 2s infinite;
}

.status-dot.offline {
  background: var(--danger);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

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

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

.modal {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(30, 30, 50, 0.95));
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-base);
}

.modal-backdrop.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.15rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 180px);
}

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

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

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(30, 30, 50, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
  max-width: 380px;
}

.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.error { border-color: rgba(239, 68, 68, 0.3); }
.toast.warning { border-color: rgba(245, 158, 11, 0.3); }
.toast.info { border-color: rgba(59, 130, 246, 0.3); }

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

.toast.success .toast-icon { color: var(--success-light); }
.toast.error .toast-icon { color: var(--danger-light); }
.toast.warning .toast-icon { color: var(--warning-light); }
.toast.info .toast-icon { color: var(--info-light); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
}

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

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========== Grid Layouts ========== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

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

/* ========== Quick Actions ========== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
}

.quick-action:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateX(4px);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary-light);
  flex-shrink: 0;
}

.quick-action-icon svg {
  width: 20px;
  height: 20px;
}

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

.quick-action-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.quick-action-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== Player List ========== */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.player-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.player-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border-hover);
}

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

.player-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.player-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* ========== Avatar ========== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* ========== Top Players ========== */
.top-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.top-player-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.top-player-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

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

.top-player-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.top-player-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.top-player-time {
  font-weight: 600;
  color: var(--primary-light);
  font-size: 0.85rem;
}

/* ========== Activity List ========== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--danger-light); }
.activity-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success-light); }
.activity-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }
.activity-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--warning-light); }
.activity-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info-light); }

.activity-icon svg {
  width: 18px;
  height: 18px;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== Services Grid ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all var(--transition-base);
}

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

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

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

.service-task {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.service-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.service-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.service-stat-value {
  font-weight: 600;
  font-size: 0.9rem;
}

.service-stat-value.good { color: var(--success-light); }
.service-stat-value.medium { color: var(--warning-light); }
.service-stat-value.bad { color: var(--danger-light); }

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

/* ========== Staff Grid ========== */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.staff-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all var(--transition-base);
}

.staff-card:hover {
  border-color: var(--glass-border-hover);
}

.staff-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.staff-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

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

.staff-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.staff-rank {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

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

.staff-status.online { color: var(--success-light); }
.staff-status.offline { color: var(--text-muted); }

.staff-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.staff-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.staff-stat-value {
  font-weight: 600;
  font-size: 0.85rem;
}

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

/* ========== Console ========== */
.console-card {
  display: flex;
  flex-direction: column;
}

.console-card .card-body {
  flex: 1;
  min-height: 400px;
}

.console-output {
  height: 400px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
}

.console-input-wrapper {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  background: var(--bg-card);
}

/* ========== Chat ========== */
.chat-card {
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  min-height: 400px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
}

.chat-welcome svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-welcome p {
  font-weight: 600;
  margin-bottom: 8px;
}

.chat-welcome span {
  font-size: 0.85rem;
}

.chat-message {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.chat-message.me {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.chat-sender {
  font-weight: 600;
  color: var(--primary-light);
}

.chat-time {
  color: var(--text-subtle);
  font-size: 0.7rem;
}

.chat-message-content {
  color: var(--text-secondary);
  word-break: break-word;
}

.chat-input-wrapper {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  background: var(--bg-card);
}

.chat-input-wrapper .btn {
  padding: 12px 16px;
}

/* ========== Stats List ========== */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
}

.stat-row:last-child {
  border-bottom: none;
}

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

.stat-row .stat-value {
  font-weight: 600;
  font-size: 1rem;
}

/* ========== Top Moderators ========== */
.top-moderators {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-moderator-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-mod-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.top-mod-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.top-mod-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-mod-bar {
  width: 100px;
  height: 6px;
  background: var(--glass-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.top-mod-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ========== Loading States ========== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-state p {
  font-size: 0.9rem;
}

/* ========== Empty States ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ========== Utility Classes ========== */
.mt-6 { margin-top: 24px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.col-span-full { grid-column: 1 / -1; }
.text-center { text-align: center; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-zinc-400 { color: var(--text-muted); }
.text-zinc-500 { color: var(--text-subtle); }
.text-indigo-400 { color: var(--primary-light); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.max-w-xs { max-width: 20rem; }
.p-0 { padding: 0; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 4px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.mod-content {
  display: none;
}

.mod-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
