/* ============================================
   ATLAS STYLE - PREMIUM ADMIN PANEL
   Поддержка тёмной и светлой темы
   ============================================ */

/* ==================== DARK THEME (default) ==================== */
:root,
[data-theme="dark"] {
  --bg-body: #000000;
  --bg-sidebar: #000000;
  --bg-card: #0a0a0a;
  --bg-hover: #151515;
  --bg-input: #0a0a0a;
  --bg-footer: #050505;
  
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --border: #252525;
  --border-hover: #404040;
  
  --radius: 12px;
  --radius-sm: 8px;
  
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
}

/* ==================== LIGHT THEME ==================== */
[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e2e8f0;
  --bg-input: #ffffff;
  --bg-footer: #f8fafc;
  
  --text-primary: #020617;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border: #cbd5e1;
  --border-hover: #94a3b8;
}

/* ==================== RESET ==================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

html, body {
  height: 100%;
  background: var(--bg-body) !important;
  color: var(--text-primary) !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================== SIDEBAR ==================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar) !important;
  border-right: 1px solid var(--border) !important;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border) !important;
  min-height: 72px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sidebar-logo i {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-logo-text {
  opacity: 0;
  width: 0;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.sidebar-toggle i {
  transition: transform 0.3s;
}

.sidebar.collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: var(--accent);
  color: #ffffff;
}

.sidebar-nav a i {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-nav a {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-nav a span {
  display: none;
}

/* Theme Toggle */
.theme-toggle-atlas {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.theme-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.sidebar.collapsed .theme-label {
  display: none;
}

.theme-switcher-atlas {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.theme-btn-atlas {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn-atlas:hover {
  color: var(--text-primary);
}

.theme-btn-atlas.active {
  background: var(--accent);
  color: #ffffff;
}

.theme-btn-atlas i {
  font-size: 14px;
}

.sidebar.collapsed .theme-switcher-atlas {
  flex-direction: column;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.user-info i {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.user-info span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .user-info span {
  display: none;
}

.sidebar.collapsed .user-info {
  justify-content: center;
  padding: 10px;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  overflow: hidden;
}

.btn-logout:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.sidebar.collapsed .btn-logout span {
  display: none;
}

/* ==================== MAIN CONTENT ==================== */

.content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 32px 40px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: hidden;
  background: var(--bg-body) !important;
}

.sidebar.collapsed ~ .content {
  margin-left: var(--sidebar-collapsed);
  max-width: calc(100vw - var(--sidebar-collapsed));
}

/* ==================== PAGE HEADER ==================== */

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.page-header h1 i {
  color: var(--accent);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* ==================== CARDS ==================== */

.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border) !important;
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  font-size: 15px;
  font-weight: 600;
}

.card-header i {
  color: var(--accent);
}

.card-body {
  padding: 24px;
  background: var(--bg-card) !important;
  color: var(--text-primary);
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border) !important;
  background: var(--bg-footer) !important;
}

/* ==================== STAT CARDS ==================== */

.stat-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 24px;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--accent) !important;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Colored stat cards override */
.stat-card[style*="gradient"] .stat-label,
.stat-card[style*="gradient"] .stat-number {
  color: #ffffff !important;
}

/* ==================== TABLES ==================== */

.table {
  width: 100%;
  color: var(--text-primary) !important;
  border-collapse: collapse;
  background: transparent !important;
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-hover-bg: var(--bg-hover) !important;
}

.table > :not(caption) > * > * {
  background: transparent !important;
  color: var(--text-primary) !important;
  border-bottom-color: var(--border) !important;
}

.table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border) !important;
  text-align: left;
  background: transparent !important;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border) !important;
  font-size: 14px;
  vertical-align: middle;
  color: var(--text-primary) !important;
  background: transparent !important;
}

.table tbody tr {
  background: transparent !important;
}

.table tbody tr:hover {
  background: var(--bg-hover) !important;
}

.table tbody tr:hover > * {
  background: transparent !important;
}

.table tbody tr:last-child td {
  border-bottom: none !important;
}

.table-responsive {
  overflow-x: auto;
  background: transparent !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.table-striped > tbody > tr:nth-of-type(even) > * {
  background: transparent !important;
  --bs-table-accent-bg: transparent !important;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-primary:hover {
  background: var(--accent-hover) !important;
  color: #ffffff !important;
}

.btn-secondary {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.btn-secondary:hover {
  background: var(--border) !important;
}

.btn-danger {
  background: var(--danger) !important;
  color: #ffffff !important;
}

.btn-success {
  background: var(--success) !important;
  color: #ffffff !important;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-light {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

/* ==================== BADGES ==================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.bg-primary { background: var(--accent) !important; color: #fff; }
.bg-success { background: var(--success) !important; color: #fff; }
.bg-danger { background: var(--danger) !important; color: #fff; }
.bg-warning { background: var(--warning) !important; color: #000; }
.bg-info { background: var(--info) !important; color: #fff; }
.bg-secondary { background: var(--text-muted) !important; color: #fff; }

/* ==================== FORMS ==================== */

.form-control {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary) !important;
  transition: all 0.2s;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
  background: var(--bg-input) !important;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-select {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary) !important;
  cursor: pointer;
}

/* ==================== PAGINATION ==================== */

.pagination {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  color: var(--text-secondary) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.page-item .page-link:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.page-item.active .page-link {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
}

/* ==================== ALERTS ==================== */

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none !important;
  margin-bottom: 12px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

.alert .btn-close {
  margin-left: auto;
  opacity: 0.5;
}

[data-theme="dark"] .alert .btn-close {
  filter: invert(1);
}

/* ==================== NOTIFICATIONS ==================== */

.notifications-container {
  margin-bottom: 24px;
}

/* ==================== LOGIN PAGE ==================== */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-body) !important;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header i {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form .btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}

/* ==================== UTILITIES ==================== */

.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-center { text-align: center !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 16px !important; }

.p-0 { padding: 0 !important; }
.p-2 { padding: 16px !important; }
.p-3 { padding: 24px !important; }
.p-4 { padding: 32px !important; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.gap-2 { gap: 16px !important; }

.w-100 { width: 100% !important; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ==================== MODAL ==================== */

.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 20px 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  background: var(--bg-card) !important;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  padding: 16px 24px;
  background: var(--bg-footer) !important;
}

[data-theme="dark"] .btn-close {
  filter: invert(1);
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 1;
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }
  
  .sidebar .sidebar-logo-text,
  .sidebar .sidebar-nav a span,
  .sidebar .theme-label,
  .sidebar .user-info span,
  .sidebar .btn-logout span {
    display: none;
  }
  
  .sidebar .sidebar-nav a {
    justify-content: center;
    padding: 12px;
  }
  
  .sidebar .user-info {
    justify-content: center;
  }
  
  .sidebar .theme-switcher-atlas {
    flex-direction: column;
  }
  
  .content {
    margin-left: var(--sidebar-collapsed);
    max-width: calc(100vw - var(--sidebar-collapsed));
    padding: 24px;
  }
}

/* ==================== MOBILE MENU ==================== */

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left 0.3s;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .sidebar .sidebar-logo-text,
  .sidebar .sidebar-nav a span,
  .sidebar .theme-label,
  .sidebar .user-info span,
  .sidebar .btn-logout span {
    display: block;
  }
  
  .sidebar .sidebar-nav a {
    justify-content: flex-start;
    padding: 12px 14px;
  }
  
  .sidebar .user-info {
    justify-content: flex-start;
  }
  
  .sidebar .theme-switcher-atlas {
    flex-direction: row;
  }
  
  .content {
    margin-left: 0;
    max-width: 100vw;
    padding: 70px 16px 20px 16px;
  }
  
  .page-header h1 {
    font-size: 22px;
  }
  
  .stat-number {
    font-size: 24px;
  }
}

/* ==================== LIVE INDICATOR ==================== */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  vertical-align: middle;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* ==================== REAL-TIME ANIMATIONS ==================== */
.stat-number {
  transition: transform 0.2s ease, color 0.3s ease;
}

.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

/* Table row animation for new data */
@keyframes row-highlight {
  0% {
    background: rgba(139, 92, 246, 0.2);
  }
  100% {
    background: transparent;
  }
}

.table tbody tr.new-row {
  animation: row-highlight 1s ease;
}

/* Loading spinner for tables */
.table-loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== USERS PAGE IMPROVEMENTS ==================== */
.users-table img {
  object-fit: cover;
}

.user-search {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-search:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  outline: none;
}

.user-search::placeholder {
  color: var(--text-muted);
}

.users-total-info {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Pagination improvements */
.users-pagination {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.users-pagination .page-item .page-link {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.users-pagination .page-item .page-link:hover {
  background: var(--bg-hover) !important;
  border-color: var(--accent) !important;
}

.users-pagination .page-item.active .page-link {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: white !important;
}

.users-pagination .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== USER PROFILE PAGE ==================== */
.user-profile-card {
  text-align: center;
}

.user-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.user-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 12px;
  object-fit: cover;
}

.user-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.user-tag {
  color: var(--text-muted);
  font-size: 14px;
}

/* Level Section */
.user-level-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.level-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  border-radius: 50%;
  flex-shrink: 0;
}

.level-number {
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.level-label {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
}

.xp-progress-wrapper {
  flex: 1;
  min-width: 0;
}

.xp-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.xp-progress-bar {
  height: 10px;
  background: var(--bg-hover);
  border-radius: 5px;
  overflow: hidden;
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #6366f1 100%);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Quick Stats */
.user-quick-stats {
  display: flex;
  justify-content: space-around;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.user-quick-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.user-quick-stats .stat-item i {
  font-size: 18px;
  color: var(--accent);
}

.user-quick-stats .stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-quick-stats .stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Dates */
.user-dates {
  text-align: left;
}

.date-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.date-item i {
  color: var(--text-muted);
  width: 16px;
}

/* Action Buttons */
.action-buttons .btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Punishment Items */
.punishment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.punishment-item:last-child {
  border-bottom: none;
}

.punishment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.punishment-info {
  flex: 1;
  min-width: 0;
}

.punishment-info strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}

.punishment-info small {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

.punishment-expires,
.punishment-date {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tabs */
.nav-tabs-custom {
  border-bottom: 1px solid var(--border);
  gap: 4px;
}

.nav-tabs-custom .nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.2s ease;
}

.nav-tabs-custom .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-tabs-custom .nav-link.active {
  color: var(--accent);
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
}

.nav-tabs-custom .nav-link i {
  margin-right: 6px;
}

.card-tab {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

/* Compact Table */
.table-compact th,
.table-compact td {
  padding: 10px 12px;
  font-size: 13px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Modal Styles */
.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-primary);
}

.modal-header .btn-close {
  filter: var(--bs-btn-close-white-filter);
}

.modal-body {
  color: var(--text-primary);
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
}

.modal-title {
  color: var(--text-primary);
}

.modal-title i {
  margin-right: 8px;
}

[data-theme="light"] .modal-header .btn-close {
  filter: none;
}

/* ==================== COMMANDS PAGE ==================== */
.command-categories {
  display: flex;
  flex-direction: column;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.category-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.category-item.active {
  background: var(--bg-hover);
  color: var(--accent);
  border-left-color: var(--accent);
}

.category-item i {
  width: 20px;
  text-align: center;
}

.category-item .badge {
  margin-left: auto;
}

/* Commands List */
.commands-list {
  max-height: 70vh;
  overflow-y: auto;
}

.command-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.command-item:hover {
  background: var(--bg-hover);
}

.command-item:last-child {
  border-bottom: none;
}

.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.command-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-name {
  font-family: monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.command-category {
  font-size: 11px;
  text-transform: uppercase;
}

.command-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 6px;
}

.command-usage {
  margin-bottom: 10px;
}

.command-usage code {
  background: var(--bg-hover);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.command-settings {
  display: flex;
  align-items: center;
  gap: 12px;
}

.permission-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.permission-badge i {
  margin-right: 4px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-hover);
  border: 1px solid var(--border);
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
  border-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Form controls in dark theme */
.form-select,
.form-control {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

.form-select:focus,
.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 6px;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Action Groups */
.action-group {
  margin-bottom: 12px;
}

.action-group-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.action-group .btn-group-vertical {
  width: 100%;
}

.action-group .btn-group-vertical .btn {
  justify-content: flex-start;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
}

.action-group .btn-group-vertical .btn i {
  width: 20px;
  margin-right: 8px;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.toast-notification.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.toast-notification.toast-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.toast-notification.toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Punishment item button */
.punishment-item .btn {
  flex-shrink: 0;
  margin-left: auto;
}

/* Empty state improvements */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Search results */
.search-results {
  max-height: 200px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item.selected {
  background: var(--accent);
  color: white;
}

.search-result-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Alert styling in modals */
.modal-body .alert {
  border: none;
  border-radius: var(--radius);
}

.modal-body .alert-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.modal-body .alert-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Modal header danger */
.modal-header.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ==================== CLICKABLE STAT CARDS ==================== */
.stat-card-link {
  text-decoration: none;
  display: block;
}

.stat-card.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-card.clickable::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card.clickable:hover::after {
  opacity: 1;
}

.stat-hint {
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  margin-top: 8px;
}

.stat-card.clickable:hover .stat-hint {
  opacity: 0.8;
  transform: translateY(0);
}

/* ==================== XP FLASK ANIMATION ==================== */
.xp-flask-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.xp-flask {
  width: 50px;
  height: 80px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 2px solid var(--border);
  border-radius: 8px 8px 20px 20px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.xp-flask::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 12px;
  background: var(--border);
  border-radius: 4px 4px 0 0;
}

.xp-flask-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #a855f7 0%, #8b5cf6 50%, #7c3aed 100%);
  border-radius: 0 0 18px 18px;
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.xp-flask-liquid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-2px) scaleY(1.2); }
}

.xp-flask-bubbles {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
}

.xp-flask-bubbles .bubble {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: bubble-rise 3s ease-in-out infinite;
}

.xp-flask-bubbles .bubble:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
}

.xp-flask-bubbles .bubble:nth-child(2) {
  left: 50%;
  animation-delay: 1s;
  width: 4px;
  height: 4px;
}

.xp-flask-bubbles .bubble:nth-child(3) {
  left: 75%;
  animation-delay: 2s;
  width: 5px;
  height: 5px;
}

@keyframes bubble-rise {
  0% { 
    bottom: 0; 
    opacity: 1;
    transform: scale(1);
  }
  100% { 
    bottom: 100%; 
    opacity: 0;
    transform: scale(0.5);
  }
}

.xp-flask-shine {
  position: absolute;
  top: 0;
  left: 4px;
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 2px;
}

.xp-flask-info {
  flex: 1;
}

.xp-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.xp-current {
  color: var(--accent);
}

.xp-divider {
  color: var(--text-muted);
  margin: 0 4px;
}

.xp-max {
  color: var(--text-secondary);
}

.xp-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

.xp-percent {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.xp-next-level {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==================== ADMIN HIERARCHY ==================== */
.admin-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.admin-level-badge.level-100 {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.admin-level-badge.level-90 {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.admin-level-badge.level-80 {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.admin-level-badge.level-70 {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.admin-level-badge.level-60 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.admin-level-badge.level-50 {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.admin-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.admin-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.admin-card.is-owner {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, transparent 100%);
}

.admin-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-info {
  flex: 1;
  min-width: 0;
}

.admin-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.admin-permission-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
