/* ============================================
   DESIGN SYSTEM — Modern Dark Theme
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Cairo:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Background Colors */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #334155;
  --bg-card-hover: #3E4F6A;
  --bg-elevated: #1a2332;

  /* Border Colors */
  --border-color: #475569;
  --border-subtle: rgba(71, 85, 105, 0.4);

  /* Text Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Accent Colors */
  --accent-blue: #3B82F6;
  --accent-blue-light: #60A5FA;
  --accent-blue-dark: #2563EB;
  --accent-emerald: #10B981;
  --accent-emerald-light: #34D399;
  --accent-violet: #8B5CF6;
  --accent-violet-light: #A78BFA;
  --accent-amber: #F59E0B;
  --accent-amber-light: #FBBF24;
  --accent-red: #EF4444;
  --accent-red-light: #F87171;
  --accent-cyan: #06B6D4;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3B82F6, #8B5CF6);
  --gradient-success: linear-gradient(135deg, #10B981, #06B6D4);
  --gradient-danger: linear-gradient(135deg, #EF4444, #F59E0B);
  --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.6));
  --gradient-sidebar: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);

  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(148, 163, 184, 0.15);
  --glass-blur: blur(16px);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-violet: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.3);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
  --navbar-height: 72px;
}

/* ── Base Styles ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-primary);
}

/* ── Typography ── */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-success {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ── Cards ── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color);
}

.card-compact {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-blue::before { background: var(--accent-blue); opacity: 1; }
.stat-card-emerald::before { background: var(--accent-emerald); opacity: 1; }
.stat-card-violet::before { background: var(--accent-violet); opacity: 1; }
.stat-card-amber::before { background: var(--accent-amber); opacity: 1; }

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon-violet { background: rgba(139, 92, 246, 0.15); color: var(--accent-violet); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-icon-red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Inter', monospace;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--accent-emerald);
  color: white;
}

.btn-success:hover {
  background: var(--accent-emerald-light);
  box-shadow: var(--shadow-glow-emerald);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-danger:hover {
  background: var(--accent-red-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Form Inputs ── */
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', 'Cairo', sans-serif;
  transition: var(--transition-smooth);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input-icon {
  position: relative;
}

.form-input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.form-input-icon input {
  padding-left: 42px;
}

.form-input-icon input:focus + i,
.form-input-icon:focus-within i {
  color: var(--accent-blue);
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.form-group {
  margin-bottom: 20px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue-light);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald-light);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber-light);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red-light);
}

.badge-violet {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet-light);
}

/* ── Tables ── */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.modern-table thead th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
  border: none;
}

.modern-table tbody tr {
  background: var(--bg-secondary);
  transition: var(--transition-smooth);
}

.modern-table tbody tr:hover {
  background: var(--bg-card);
  transform: translateX(4px);
}

.modern-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border: none;
}

.modern-table tbody td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.modern-table tbody td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--gradient-sidebar);
  border-right: 1px solid var(--border-subtle);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  list-style: none;
}

.sidebar-nav-item {
  margin-bottom: 4px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
}

.sidebar-nav-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-nav-link:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
}

.sidebar-nav-link.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue-light);
}

.sidebar-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-blue);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sidebar-section-title {
  padding: 16px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.sidebar-user {
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sidebar mobile toggle */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
  }
}

@media (min-width: 1025px) {
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* ── Top Navbar ── */
.top-navbar {
  height: var(--navbar-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-fast);
}

.navbar-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

@media (max-width: 1024px) {
  .navbar-toggle {
    display: flex;
  }
}

.navbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--accent-blue);
  cursor: pointer;
  transition: var(--transition-fast);
}

.navbar-avatar:hover {
  border-color: var(--accent-violet);
  box-shadow: var(--shadow-glow-violet);
}

.navbar-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-emerald-light);
}

.navbar-balance i {
  color: var(--accent-emerald);
}

/* ── Country Info Boxes ── */
.country-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  min-width: 200px;
}

.country-info-card:hover {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.country-info-card img {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
}

.country-info-card .country-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.country-info-card .country-amount {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.country-info-card .country-currency {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ── Date Info ── */
.date-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-emerald);
  border-radius: var(--radius-md);
}

.date-info-card i {
  font-size: 16px;
}

.date-info-card .date-label {
  font-size: 12px;
  color: var(--text-muted);
}

.date-info-card .date-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Progress Bar ── */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  transition: width 0.5s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

/* ── Order Items ── */
.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  animation: fadeSlideUp 0.4s ease forwards;
}

.order-number {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.order-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.order-content:hover {
  border-color: var(--border-color);
  background: var(--bg-card);
}

/* ── Category Cards ── */
.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-blue);
  background: var(--bg-card);
}

.category-card .pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.category-card img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.category-card .category-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.category-card .category-count {
  margin-left: auto;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue-light);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 0 8px;
}

/* ── Type Buttons ── */
.type-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 14px;
  color: white;
  transition: var(--transition-smooth);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.type-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.type-btn-auto {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
}

.type-btn-manual {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
}

.type-btn-pro {
  background: linear-gradient(135deg, var(--accent-violet), #7C3AED);
}

.type-btn .type-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

/* ── Modals / SweetAlert Theme ── */
.swal2-popup.modern-swal {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-xl) !important;
  color: var(--text-primary) !important;
}

.swal2-popup.modern-swal .swal2-title {
  color: var(--text-primary) !important;
}

.swal2-popup.modern-swal .swal2-html-container {
  color: var(--text-secondary) !important;
}

.swal2-popup.modern-swal .swal2-confirm {
  background: var(--gradient-primary) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
}

.swal2-popup.modern-swal .swal2-cancel {
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) !important;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes increaseProfit {
  0% { transform: scale(1); color: var(--text-primary); }
  40% { transform: scale(1.1); color: var(--accent-amber); }
  70% { transform: scale(1.15); color: var(--accent-emerald); text-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); color: var(--accent-emerald); }
}

/* ── Utility Animations ── */
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-slide-up { animation: fadeSlideUp 0.5s ease forwards; }
.animate-slide-down { animation: fadeSlideDown 0.5s ease forwards; }
.animate-slide-right { animation: fadeSlideRight 0.5s ease forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--accent-blue);
  margin-bottom: 20px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 360px;
}

/* ── Loading Spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Responsive Grid ── */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.flex-wrap-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

.divider-gradient {
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
  margin: 16px 0;
}

/* ── Tooltip ── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

[data-tooltip]:hover::after {
  opacity: 1;
}
