/* ===== MODERN ADMIN DASHBOARD STYLES ===== */
/* Anveshan Purity Coins - Professional Admin UI */

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

:root {
  /* Primary Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;

  /* Accent Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  --sidebar-width: 280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1a1f2e 0%, #0d1117 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #8b5cf6 50%, var(--success) 100%);
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.sidebar-header h2::before {
  content: '🌿';
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.sidebar-header p {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-left: 38px;
}

/* Nav Section Label */
.nav-section-label {
  padding: 16px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.sidebar-nav {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  cursor: pointer;
  gap: 14px;
  position: relative;
  margin: 2px 0;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
  transform: translateX(4px);
}

.nav-item:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transform: translateX(4px);
}

.nav-item.active::before {
  display: none;
}

.nav-icon {
  font-size: 20px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-item:hover .nav-icon {
  background: rgba(255,255,255,0.12);
  transform: scale(1.05);
}

.nav-item.active .nav-icon {
  background: rgba(255,255,255,0.2);
}

.nav-text {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
}

/* Nav Divider */
.nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 12px 16px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
}

.sidebar-footer .btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-footer .btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* ===== SIDEBAR ACTIVITY LOGS ===== */
.sidebar-logs {
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  min-height: 280px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0,0,0,0.3);
}

.sidebar-logs.expanded {
  min-height: 450px;
}

/* Minimized State */
.sidebar-logs.minimized {
  min-height: 44px;
  max-height: 44px;
}

.sidebar-logs.minimized .sidebar-logs-container {
  display: none;
}

.sidebar-logs.minimized .sidebar-logs-header {
  cursor: pointer;
  border-radius: 0;
}

.sidebar-logs.minimized #minimizeLogsBtn {
  transform: rotate(180deg);
}

.sidebar-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
  font-size: 13px;
  font-weight: 600;
  color: white;
  position: relative;
  overflow: hidden;
}

.sidebar-logs-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.sidebar-logs-header span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-controls {
  display: flex;
  gap: 4px;
}

.logs-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logs-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

.sidebar-logs-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: linear-gradient(180deg, #080c14 0%, #0a0f1a 100%);
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 11px;
}

.sidebar-logs-container .log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  animation: logFadeIn 0.3s ease;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-logs-container .log-entry:hover {
  background: rgba(255,255,255,0.03);
}

.sidebar-logs-container .log-entry.log-success {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--success);
}

.sidebar-logs-container .log-entry.log-error {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: var(--danger);
}

.sidebar-logs-container .log-entry.log-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--warning);
}

.sidebar-logs-container .log-entry.log-info {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--info);
}

.sidebar-logs-container .log-entry.log-api {
  background: rgba(139, 92, 246, 0.08);
  border-left-color: #8b5cf6;
}

.sidebar-logs-container .log-time {
  color: #64748b;
  font-size: 10px;
  min-width: 55px;
  flex-shrink: 0;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-logs-container .log-icon {
  font-size: 12px;
  min-width: 16px;
  text-align: center;
}

.sidebar-logs-container .log-message {
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
  font-weight: 400;
}

.sidebar-logs-container .log-entry.log-success .log-message {
  color: #6ee7b7;
}

.sidebar-logs-container .log-entry.log-error .log-message {
  color: #fca5a5;
}

.sidebar-logs-container .log-entry.log-warning .log-message {
  color: #fcd34d;
}

.sidebar-logs-container .log-entry.log-info .log-message {
  color: #93c5fd;
}

.sidebar-logs-container .log-entry.log-api .log-message {
  color: #c4b5fd;
}

/* Scrollbar for sidebar logs */
.sidebar-logs-container::-webkit-scrollbar {
  width: 4px;
}

.sidebar-logs-container::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-logs-container::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.sidebar-logs-container::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--gray-100);
}

/* ===== HEADER ===== */
.header {
  background: white;
  padding: 24px 32px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.header-left p {
  font-size: 14px;
  color: var(--gray-500);
}

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

/* ===== TAB CONTENT ===== */
.tab-content {
  display: none;
  padding: 32px;
  animation: fadeIn 0.3s ease;
}

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

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

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.stat-card:nth-child(2)::before { background: var(--success); }
.stat-card:nth-child(3)::before { background: var(--warning); }
.stat-card:nth-child(4)::before { background: var(--info); }

.stat-card:hover {
  transform: translateY(-2px);
}

/* ===== CHARTS GRID ===== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.2s ease;
}

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

.chart-card.wide {
  grid-column: span 2;
}

.chart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

.chart-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 13px;
  color: var(--gray-500);
}

.chart-body {
  padding: 20px 24px;
  height: 280px;
  position: relative;
}

.chart-card.wide .chart-body {
  height: 320px;
}

/* Responsive charts */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-card.wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .chart-body {
    height: 240px;
  }

  .chart-card.wide .chart-body {
    height: 260px;
  }
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--gray-100);
  flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: #eef2ff; }
.stat-card:nth-child(2) .stat-icon { background: #d1fae5; }
.stat-card:nth-child(3) .stat-icon { background: #fef3c7; }
.stat-card:nth-child(4) .stat-icon { background: #dbeafe; }

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
}

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

.stat-change.positive {
  background: var(--success-light);
  color: var(--success);
}

.stat-change.negative {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.quick-actions h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-actions h3::before {
  content: '⚡';
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.action-btn:hover {
  border-color: var(--primary);
  background: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: white;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.action-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.action-desc {
  font-size: 13px;
  color: var(--gray-500);
}

/* Action button color variations */
.action-btn.primary { border-color: var(--primary-light); background: #eef2ff; }
.action-btn.primary .action-icon { background: var(--primary); color: white; }
.action-btn.primary:hover { border-color: var(--primary); }

.action-btn.success { border-color: #86efac; background: #f0fdf4; }
.action-btn.success .action-icon { background: var(--success); color: white; }
.action-btn.success:hover { border-color: var(--success); }

.action-btn.danger { border-color: #fca5a5; background: #fef2f2; }
.action-btn.danger .action-icon { background: var(--danger); color: white; }
.action-btn.danger:hover { border-color: var(--danger); }

.action-btn.info { border-color: #93c5fd; background: #eff6ff; }
.action-btn.info .action-icon { background: var(--info); color: white; }
.action-btn.info:hover { border-color: var(--info); }

.action-btn.warning { border-color: #fcd34d; background: #fffbeb; }
.action-btn.warning .action-icon { background: var(--warning); color: white; }
.action-btn.warning:hover { border-color: var(--warning); }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 300px;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
  color: var(--gray-400);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

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

.btn-success:hover {
  background: #059669;
}

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-block {
  width: 100%;
}

/* ===== TABLE ===== */
.table-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

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

.data-table thead {
  background: linear-gradient(135deg, #4a5fb8 0%, #5a3878 100%);
  border-bottom: 2px solid var(--gray-200);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  color: var(--gray-700);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

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

/* Table action buttons */
.table-actions {
  display: flex;
  gap: 8px;
}

.table-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.table-btn.view {
  background: var(--info-light);
  color: var(--info);
}

.table-btn.edit {
  background: var(--warning-light);
  color: #b45309;
}

.table-btn.delete {
  background: var(--danger-light);
  color: var(--danger);
}

.table-btn:hover {
  transform: scale(1.05);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: #b45309;
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px;
}

.pagination button {
  padding: 10px 16px;
  border: 2px solid var(--gray-200);
  background: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--gray-700);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

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

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination .page-info {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--gray-500);
}

/* ===== LOADING ===== */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.loading.active {
  display: flex;
}

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

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

/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
}

.close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
}

.close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-body {
  padding: 24px;
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-500);
}

/* ===== UPLOAD ===== */
.upload-container {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.upload-container:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

.file-input {
  display: none;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.upload-label:hover {
  background: var(--primary-dark);
}

/* ===== ALERTS ===== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--info-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ===== MODAL OVERLAY (Bulk Operations) ===== */
.modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  overflow-y: auto;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
}

.modal-overlay .modal {
  display: block;
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
  padding: 0;
}

.modal-overlay .modal-header {
  padding: 20px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
}

.modal-overlay .modal-header h2 {
  color: white;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-overlay .modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-overlay .modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.modal-overlay .modal-body {
  padding: 24px;
}

.modal-overlay .form-group {
  margin-bottom: 20px;
}

.modal-overlay .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
}

.modal-overlay .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  transition: all 0.2s ease;
}

.modal-overlay .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-overlay .form-group small {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 12px;
}

.modal-overlay .modal-footer {
  padding: 20px 24px;
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--gray-200);
}

.modal-overlay .btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-overlay .btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.modal-overlay .btn-secondary:hover {
  background: var(--gray-50);
}

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

.modal-overlay .btn-primary:hover {
  background: var(--primary-dark);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

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

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--gray-500);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
  }

  .nav-text,
  .sidebar-header h2,
  .sidebar-header p {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 14px;
  }

  .nav-icon {
    margin: 0;
  }

  .main-content {
    margin-left: 80px;
  }

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

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

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }

  .main-content {
    margin-left: 70px;
  }

  .header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .tab-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .search-container {
    flex-direction: column;
  }

  .search-input {
    min-width: 100%;
  }

  .table-container {
    overflow-x: auto;
  }

  .data-table {
    min-width: 800px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 60px;
  }

  .main-content {
    margin-left: 60px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

  .stat-icon {
    margin: 0 auto;
  }

  .modal-content {
    margin: 20px;
  }
}

/* ===== USER SUMMARY ROW ===== */
.user-summary-row {
  background-color: var(--gray-50) !important;
  border-left: 4px solid var(--primary) !important;
  cursor: pointer;
}

.expand-icon {
  font-size: 16px;
  transition: transform 0.3s;
}

/* ===== COIN PREVIEW ===== */
#coinChangePreview {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}

#coinChangePreview.positive {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #a7f3d0;
}

#coinChangePreview.negative {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
}

/* ===== ACTIVITY LOGS PANEL ===== */
.activity-logs-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-top: 24px;
  overflow: hidden;
}

.logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-bottom: 1px solid var(--gray-200);
}

.logs-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0;
}

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

.logs-actions .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.logs-actions .btn-sm:hover {
  background: rgba(255,255,255,0.25);
}

.logs-container {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: #0f172a;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  animation: logFadeIn 0.3s ease;
}

@keyframes logFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-time {
  color: #64748b;
  font-size: 11px;
  min-width: 70px;
  flex-shrink: 0;
}

.log-icon {
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

.log-message {
  color: #e2e8f0;
  flex: 1;
  word-break: break-word;
}

.log-entry.log-success {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
}

.log-entry.log-success .log-message {
  color: #6ee7b7;
}

.log-entry.log-error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--danger);
}

.log-entry.log-error .log-message {
  color: #fca5a5;
}

.log-entry.log-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--warning);
}

.log-entry.log-warning .log-message {
  color: #fcd34d;
}

.log-entry.log-info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--info);
}

.log-entry.log-info .log-message {
  color: #93c5fd;
}

.log-entry.log-action {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid #8b5cf6;
}

.log-entry.log-action .log-message {
  color: #c4b5fd;
}

/* Scrollbar styling for logs */
.logs-container::-webkit-scrollbar {
  width: 8px;
}

.logs-container::-webkit-scrollbar-track {
  background: #1e293b;
}

.logs-container::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Log icon */
.log-icon {
  font-size: 12px;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Log details tooltip */
.log-details {
  margin-left: 8px;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(100, 116, 139, 0.2);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.log-details:hover {
  background: rgba(100, 116, 139, 0.4);
  color: #94a3b8;
}

/* API log type */
.log-entry.log-api {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid #8b5cf6;
}

.log-entry.log-api .log-message {
  color: #c4b5fd;
}

/* Animation for new logs */
@keyframes logSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.log-entry {
  animation: logSlideIn 0.3s ease-out;
}

/* ===== FILTER SECTION (Transactions Tab) ===== */
.filter-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-end;
}

.filter-row:last-of-type {
  margin-bottom: 0;
}

.filter-group {
  flex: 1;
  min-width: 180px;
}

.filter-group-btn {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-bottom: 0;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.filter-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-input::placeholder {
  color: var(--gray-400);
}

/* Search input group */
.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input-group .filter-input {
  flex: 1;
}

/* Small buttons for filters */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius);
}

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

.btn-info:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-outline {
  background: white;
  color: var(--gray-600);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
  margin-left: 12px;
}

.btn-link:hover {
  color: var(--primary-dark);
}

/* Filter summary */
.filter-summary {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  font-size: 14px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.filter-summary strong {
  color: var(--primary);
}

/* ===== QUICK SEARCH BAR ===== */
.quick-search-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

/* ===== COLLAPSIBLE FILTER SECTION ===== */
.filter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

.filter-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-section-header h3::before {
  content: '🎛️';
}

.btn-close-filters {
  background: var(--gray-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  font-size: 20px;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-filters:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* ===== FILTER ACTIONS ===== */
.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.filter-actions .btn {
  flex: 1;
  max-width: 180px;
}

/* Toggle Filter Button Active State */
#toggleFiltersBtn.active {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Filter Section Animation */
.filter-section {
  animation: filterSlideDown 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group-btn {
    width: 100%;
    justify-content: stretch;
  }

  .filter-group-btn .btn-sm {
    flex: 1;
  }

  .search-input-group {
    flex-direction: column;
  }

  .quick-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search-bar .search-input-group {
    max-width: 100% !important;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-actions .btn {
    max-width: 100%;
  }
}
