:root {
  --primary: #2196F3;
  --primary-dark: #1565C0;
  --secondary: #FF9800;
  --success: #4CAF50;
  --danger: #f44336;
  --warning: #FFC107;
  --info: #00BCD4;
  --dark: #263238;
  --sidebar-width: 260px;
  --topbar-height: 60px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Tajawal', sans-serif;
  background: #f0f2f5;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ============ Login ============ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f4e 40%, #2d1b69 70%, #0a0e27 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  border-radius: 50%;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  border-radius: 50%;
}

.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  width: 420px;
  max-width: 92%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h2 {
  color: #fff;
  font-weight: 700;
  margin-top: 8px;
}

.login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ADM Logo */
.adm-logo {
  margin-bottom: 16px;
}

.adm-logo-text {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  display: inline-block;
}

.sidebar-adm-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Login Form Styling */
.login-card .form-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 14px;
}

.login-card .input-group-text {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
}

.login-card .form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.3s;
}

.login-card .form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-card .form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  color: #fff;
}

.login-card .btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.3s;
  font-size: 16px;
}

.login-card .btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.login-card .btn-outline-secondary {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  border-radius: 12px;
  padding: 10px;
}

.login-card .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.login-card .alert-danger {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ff8a80;
  border-radius: 10px;
}

/* TOTP / 2FA Styles */
.totp-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 2px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.totp-icon {
  font-size: 30px;
  color: #a855f7;
}

.totp-input-group {
  display: flex;
  justify-content: center;
}

.totp-input {
  text-align: center;
  font-size: 32px !important;
  font-weight: 700;
  letter-spacing: 12px;
  max-width: 220px;
  padding: 12px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.1) !important;
  border: 2px solid rgba(99, 102, 241, 0.4) !important;
  color: #fff !important;
}

.totp-input:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25) !important;
}

.login-icon {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ============ Sidebar ============ */
.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: white;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid rgba(99, 102, 241, 0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,0.3) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 4px; }

.sidebar.collapsed {
  right: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
  position: relative;
  overflow: hidden;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6366f1, #a855f7, transparent);
}

.sidebar-header i {
  color: var(--secondary);
  margin-left: 8px;
  font-size: 24px;
}

/* Sidebar Section Label */
.sidebar-section {
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(99, 102, 241, 0.6);
}

.sidebar-nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: all 0.25s ease;
  border-right: 3px solid transparent;
  margin: 2px 10px 2px 10px;
  border-radius: 10px;
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-nav .nav-link:hover {
  color: white;
  background: rgba(99, 102, 241, 0.1);
  border-right-color: transparent;
}

.sidebar-nav .nav-link.active {
  color: white;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
  border-right-color: transparent;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 4px;
}

.sidebar-nav .nav-link i {
  width: 20px;
  margin-left: 12px;
  font-size: 15px;
  text-align: center;
  transition: transform 0.2s;
}

.sidebar-nav .nav-link:hover i {
  transform: scale(1.15);
}

.sidebar-nav .nav-link.active i {
  color: #a78bfa;
}

/* Sidebar User Info at Bottom */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  margin-top: auto;
}

/* ============ Main Content ============ */
.main-content {
  margin-right: var(--sidebar-width);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  background: #f8fafc;
}

.main-content.expanded {
  margin-right: 0;
}

/* ============ Topbar ============ */
.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-right, .topbar-left {
  display: flex;
  align-items: center;
}

.topbar-right h5 {
  font-weight: 700;
  color: #1e293b;
  font-size: 17px;
}

.topbar .btn-link {
  color: #475569;
  font-size: 18px;
  text-decoration: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
}

.topbar .btn-link:hover {
  background: #f1f5f9;
  color: #6366f1;
}

/* Topbar Center — Balance Section */
.topbar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Balance Wrap */
.topbar-balance-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #bbf7d0;
  padding: 8px 18px;
  border-radius: 16px;
  cursor: default;
  transition: box-shadow 0.2s;
}
.topbar-balance-wrap:hover {
  box-shadow: 0 2px 12px rgba(34,197,94,0.15);
}
.topbar-balance-wrap.zero-balance {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}
.topbar-balance-wrap.zero-balance:hover {
  box-shadow: 0 2px 12px rgba(239,68,68,0.12);
}

.topbar-balance-icon {
  font-size: 22px;
  color: #22c55e;
  filter: drop-shadow(0 2px 4px rgba(34,197,94,0.3));
}
.topbar-balance-wrap.zero-balance .topbar-balance-icon {
  color: #ef4444;
  filter: drop-shadow(0 2px 4px rgba(239,68,68,0.25));
}

.topbar-balance-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-balance-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topbar-balance-value {
  font-size: 18px;
  font-weight: 800;
  color: #15803d;
  letter-spacing: -0.3px;
}
.topbar-balance-wrap.zero-balance .topbar-balance-value {
  color: #dc2626;
}

/* Add Balance Button */
.topbar-add-balance-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #6366f1;
  border: 1.5px solid #e0e7ff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  height: 34px;
}
.topbar-add-balance-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}
.topbar-add-balance-btn:active {
  transform: scale(0.96);
  background: #e0e7ff;
}
.topbar-add-balance-btn i {
  font-size: 13px;
}

/* Topbar Separator */
.topbar-separator {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  margin: 0 8px;
}

/* Notification Button */
.notif-btn-topbar {
  position: relative;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: #f1f5f9;
  font-size: 19px !important;
  color: #6366f1 !important;
  transition: all 0.25s;
}

.notif-btn-topbar:hover {
  background: #e0e7ff !important;
  color: #4f46e5 !important;
  transform: scale(1.05);
}

#notifBtn {
  position: relative;
}

#notifBadge {
  position: absolute;
  top: 2px;
  right: 0px;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* User Dropdown */
.topbar .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s;
  font-weight: 500;
  color: #334155;
}

.topbar .dropdown-toggle:hover {
  background: #f1f5f9;
}

.topbar .dropdown-toggle .fa-user-circle {
  color: #6366f1;
  font-size: 22px;
}

.topbar .dropdown-menu {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 8px;
  min-width: 200px;
}

.topbar .dropdown-item {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.15s;
}

.topbar .dropdown-item:hover {
  background: #f1f5f9;
}

/* ============ Page Content ============ */
.page-content {
  padding: 24px;
}

/* ============ Stats Cards ============ */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
  border-right: 4px solid var(--primary);
}

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

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
}

.stat-card .stat-label {
  color: #888;
  font-size: 14px;
}

/* ============ Cards ============ */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
  background: white;
  border-bottom: 1px solid #eee;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0 !important;
}

/* ============ Tables ============ */
.table {
  margin-bottom: 0;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
}

/* ============ Status Badges ============ */
.badge-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-completed { background: #e8f5e9; color: #2e7d32; }
.badge-processing { background: #e3f2fd; color: #1565c0; }
.badge-pending { background: #fff3e0; color: #e65100; }
.badge-failed { background: #fce4ec; color: #c62828; }
.badge-refunded { background: #f3e5f5; color: #6a1b9a; }
.badge-cancelled { background: #eceff1; color: #455a64; }

/* ============ Role Badges ============ */
.badge-super_admin { background: linear-gradient(135deg, #FFD700, #FFA000); color: #333; }
.badge-admin { background: linear-gradient(135deg, #2196F3, #1565C0); color: white; }
.badge-user { background: linear-gradient(135deg, #66BB6A, #388E3C); color: white; }

/* ============ Modals ============ */
.modal-header {
  background: var(--primary);
  color: white;
  border-radius: 0;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* ============ Notifications ============ */
.notifications-dropdown {
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.notif-item {
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.notif-item:hover { background: #f8f9fa; }
.notif-item.unread { background: #e3f2fd; }

/* ============ Responsive ============ */

/* Mobile overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
    --topbar-height: 56px;
  }

  /* Sidebar: slide-in drawer */
  .sidebar {
    right: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
  }
  .sidebar.show {
    right: 0;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }

  .sidebar-header {
    padding: 18px 16px;
    font-size: 18px;
  }
  .sidebar-header i { font-size: 20px; }

  .sidebar-section {
    padding: 12px 16px 4px;
    font-size: 10px;
  }

  .sidebar-nav .nav-link {
    padding: 12px 16px;
    margin: 2px 8px;
    font-size: 14px;
    border-radius: 10px;
  }
  .sidebar-nav .nav-link i {
    width: 22px;
    margin-left: 10px;
    font-size: 16px;
  }

  /* Main content: full width */
  .main-content { margin-right: 0; }

  /* Topbar: compact mobile */
  .topbar {
    padding: 0 12px;
    height: var(--topbar-height);
  }
  .topbar-right h5 {
    font-size: 14px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar .btn-link {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  .topbar .dropdown-toggle {
    padding: 6px 8px;
    font-size: 13px;
  }
  .topbar .dropdown-toggle .fa-user-circle { font-size: 24px; }
  .topbar .dropdown-toggle span:not(.badge) { display: none; }
  .notifications-dropdown { width: 280px; }

  /* Page Content: tighter padding */
  .page-content { padding: 12px; }

  /* Generic stat cards */
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }

  /* Cards & Tables */
  .card-header { padding: 12px 14px; font-size: 14px; }
  .table th, .table td { padding: 10px 8px; font-size: 13px; }

  /* Modals mobile friendly */
  .modal-dialog { margin: 10px; }
  .modal-form-icon, .modal-form-avatar { width: 50px; height: 50px; font-size: 20px; border-radius: 14px; }
}

/* Tablets & landscape phones (up to 1024px): same slide-in drawer behavior as
   phones, otherwise phones in landscape (>768px CSS width) show the desktop
   layout with the sidebar always visible and a 260px content gap. */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
  }
  .sidebar {
    right: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
  }
  .sidebar.show {
    right: 0;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }
  .main-content { margin-right: 0; }
}

/* ============ Chart ============ */
.chart-container {
  position: relative;
  height: 300px;
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ddd;
}

/* ============ Misc ============ */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Dashboard Enhanced ============ */

/* Loading */
.dash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

.dash-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(99, 102, 241, 0.15);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: dash-spin 0.8s linear infinite;
}

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

/* Welcome Banner */
.dash-welcome-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  border-radius: 16px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  color: white;
}

.dash-welcome-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.dash-welcome-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dash-welcome-sub {
  color: rgba(255,255,255,0.65);
  margin: 0;
  font-size: 14px;
}

.dash-welcome-date {
  background: rgba(255,255,255,0.12);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
}

.dash-welcome-particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  z-index: 1;
}

/* Stat Cards */
.dash-stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
}

.dash-stat-card.dash-visible {
  opacity: 1;
  transform: translateY(0);
}

.dash-stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.dash-stat-bg {
  position: absolute;
  top: -20px;
  left: -20px;
  font-size: 100px;
  opacity: 0.04;
  transform: rotate(-15deg);
  pointer-events: none;
}

.dash-stat-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.dash-stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dash-stat-icon-wrap.blue { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.dash-stat-icon-wrap.green { background: linear-gradient(135deg, #10b981, #059669); }
.dash-stat-icon-wrap.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dash-stat-icon-wrap.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.dash-stat-icon-wrap.purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.dash-stat-icon-wrap.emerald { background: linear-gradient(135deg, #34d399, #10b981); }
.dash-stat-icon-wrap.red { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.dash-stat-icon-wrap.steel { background: linear-gradient(135deg, #64748b, #475569); }

.dash-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.dash-stat-label {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

.dash-stat-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
  position: relative;
  z-index: 2;
}

.text-purple { color: #a855f7; }

/* Hover accent lines */
.dash-stat-blue:hover { border-bottom: 3px solid #6366f1; }
.dash-stat-green:hover { border-bottom: 3px solid #10b981; }
.dash-stat-orange:hover { border-bottom: 3px solid #f59e0b; }
.dash-stat-cyan:hover { border-bottom: 3px solid #06b6d4; }
.dash-stat-purple:hover { border-bottom: 3px solid #a855f7; }
.dash-stat-emerald:hover { border-bottom: 3px solid #34d399; }
.dash-stat-red:hover { border-bottom: 3px solid #f43f5e; }
.dash-stat-steel:hover { border-bottom: 3px solid #64748b; }

/* Chart Cards */
.dash-chart-card, .dash-table-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.dash-chart-card.dash-visible, .dash-table-card.dash-visible {
  opacity: 1;
  transform: translateY(0);
}

.dash-chart-header, .dash-table-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-chart-title {
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  font-size: 15px;
}

.dash-chart-badge {
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #64748b;
}

.dash-chart-body {
  padding: 20px;
}

.dash-view-all {
  color: #6366f1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
}

.dash-view-all:hover {
  color: #4f46e5;
}

/* Dashboard Table */
.dash-table-body {
  padding: 0;
}

.dash-table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #64748b;
  font-size: 13px;
  padding: 14px 16px;
  border-bottom: 2px solid #f1f5f9;
  white-space: nowrap;
}

.dash-table-row {
  animation: dashRowIn 0.4s ease both;
}

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

.dash-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.dash-order-code {
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.dash-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.dash-amount {
  font-weight: 700;
  color: #059669;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .dash-welcome-content { flex-direction: column; text-align: center; gap: 12px; }
  .dash-welcome-banner { padding: 18px 16px; border-radius: 14px; }
  .dash-welcome-title { font-size: 18px; }
  .dash-welcome-sub { font-size: 12px; }
  .dash-welcome-date { padding: 6px 12px; font-size: 12px; }

  /* Stat cards: 2 per row, compact */
  .dash-stat-card { padding: 14px; border-radius: 14px; }
  .dash-stat-value { font-size: 20px; }
  .dash-stat-label { font-size: 11px; }
  .dash-stat-icon-wrap { width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
  .dash-stat-content { gap: 10px; }
  .dash-stat-footer { margin-top: 10px; padding-top: 8px; font-size: 11px; }
  .dash-stat-bg { font-size: 70px; }

  /* Charts & tables compact */
  .dash-chart-card, .dash-table-card { border-radius: 14px; }
  .dash-chart-header, .dash-table-header { padding: 14px 16px; }
  .dash-chart-title { font-size: 14px; }
  .dash-chart-body { padding: 12px; }
  .dash-chart-body canvas { max-height: 220px; }

  .dash-table thead th { padding: 10px 10px; font-size: 12px; }
  .dash-table td { padding: 10px; font-size: 13px; }
  .dash-user-avatar { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
  .dash-order-code { font-size: 11px; padding: 3px 8px; }
}

.filter-bar {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ============ Users Page Enhanced ============ */
.users-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.users-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.users-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.users-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.users-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.users-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.users-add-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.users-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
  color: #fff;
}
.users-refresh-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.3s;
}
.users-refresh-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: rotate(90deg);
}
.users-export-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}
.users-export-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-1px);
}

/* Mini Stats */
.users-mini-stat {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.users-mini-stat::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.users-mini-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.users-mini-stat.clickable {
  cursor: pointer;
}
.users-mini-stat.clickable:hover {
  border-color: var(--accent);
}
.users-mini-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  flex-shrink: 0;
}
.users-mini-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.users-mini-stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Search & Filter Bar */
.users-filter-bar {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.users-filter-group {
  display: flex;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}
.users-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.users-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}
.users-search-input {
  padding-right: 40px;
  padding-left: 32px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
}
.users-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.users-search-clear {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.users-search-clear:hover {
  background: #fee2e2;
  color: #ef4444;
}
.users-filter-select-wrap {
  position: relative;
  min-width: 140px;
}
.users-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}
.users-filter-select {
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
}
.users-filter-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.users-filter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.users-filter-count {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}
.users-active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.users-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #c7d2fe;
}
.users-filter-chip:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Users Table */
.users-table-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.users-table {
  margin: 0;
}
.users-table thead {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.users-table thead th {
  border: none;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.users-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.users-table-row {
  animation: usersRowFadeIn 0.4s ease both;
  transition: background 0.2s;
}
.users-table-row:hover {
  background: #fafbff;
}
@keyframes usersRowFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* User Cell with Avatar */
.users-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.users-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.users-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.users-online-dot {
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.users-online-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.2);
}
.users-online-dot.offline {
  background: #cbd5e1;
}
.users-user-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 14px;
}
.users-user-username {
  font-size: 12px;
  color: #94a3b8;
}
.users-user-phone {
  font-size: 11px;
  color: #64748b;
  display: block;
  margin-top: 1px;
}
.users-user-phone i {
  font-size: 9px;
  color: #94a3b8;
}
.users-td-num {
  font-weight: 700;
  color: #94a3b8;
  font-size: 13px;
}
.users-td-date {
  font-size: 13px;
  color: #64748b;
}

/* Disabled row */
.users-row-disabled {
  opacity: 0.6;
}
.users-row-disabled:hover {
  opacity: 0.8;
}

/* Role Badge */
.users-role-badge {
  padding: 5px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* App Badge */
.users-app-badge {
  padding: 5px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

/* Balance */
.users-balance {
  font-weight: 800;
  font-size: 15px;
  color: #1e293b;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}
.users-balance.zero {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Toggle Switch (replaces status badge) */
.users-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  margin: 0;
}
.users-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.users-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e2e8f0;
  border-radius: 24px;
  transition: all 0.3s;
}
.users-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.users-toggle-switch input:checked + .users-toggle-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 8px rgba(16,185,129,0.3);
}
.users-toggle-switch input:checked + .users-toggle-slider::before {
  transform: translateX(-20px);
}
.users-toggle-switch:hover .users-toggle-slider {
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* Status Badge (kept for backward compat) */
.users-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.users-status-badge.active {
  background: rgba(16,185,129,0.1);
  color: #059669;
}
.users-status-badge.inactive {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
}
.users-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.users-status-badge.active .users-status-dot {
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Action Buttons */
.users-actions-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.users-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.users-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.25s;
}
.users-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.users-action-btn.edit { background: rgba(99,102,241,0.1); color: #6366f1; }
.users-action-btn.edit:hover { background: #6366f1; color: #fff; }
/* Wallet PRIMARY - big isolated button */
.users-action-btn.wallet-primary {
  width: auto !important;
  height: 44px !important;
  padding: 0 20px;
  font-size: 15px !important;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  gap: 4px;
  letter-spacing: 0.3px;
}
.users-action-btn.wallet-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  color: #fff;
}
.users-action-btn.wallet-primary:active {
  transform: translateY(0);
}

/* Divider between wallet and other actions */
.users-actions-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  margin: 0 6px;
  flex-shrink: 0;
}

.users-action-btn.wallet { background: rgba(16,185,129,0.1); color: #10b981; }
.users-action-btn.wallet:hover { background: #10b981; color: #fff; }
.users-action-btn.totp-on { background: rgba(6,182,212,0.1); color: #06b6d4; }
.users-action-btn.totp-on:hover { background: #06b6d4; color: #fff; }
.users-action-btn.totp-off { background: rgba(245,158,11,0.1); color: #f59e0b; }
.users-action-btn.totp-off:hover { background: #f59e0b; color: #fff; }
.users-action-btn.impersonate {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.users-action-btn.impersonate:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
}
.users-action-btn.logout-all {
  background: rgba(100,116,139,0.1);
  color: #64748b;
}
.users-action-btn.logout-all:hover {
  background: #475569;
  color: #fff;
}
.users-action-btn.delete { background: rgba(239,68,68,0.1); color: #ef4444; }
.users-action-btn.delete:hover { background: #ef4444; color: #fff; }

/* Delete small - isolated */
.users-action-btn.delete-small {
  width: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
  border-radius: 8px;
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  opacity: 0.7;
  align-self: center;
}
.users-action-btn.delete-small:hover {
  background: #ef4444;
  color: #fff;
  opacity: 1;
}

/* Actions outer: spread wallet group and delete apart */
.users-actions-outer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

/* Delete isolated - pushed to far side */
.users-action-btn.delete-isolated {
  width: 28px !important;
  height: 28px !important;
  font-size: 11px !important;
  border-radius: 8px;
  background: rgba(239,68,68,0.06);
  color: #ef4444;
  opacity: 0.5;
  flex-shrink: 0;
  margin-right: auto;
  transition: all 0.25s;
}
.users-action-btn.delete-isolated:hover {
  background: #ef4444;
  color: #fff;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* Reset device - full size button in actions wrap */
.users-action-btn.reset-device {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
}
.users-action-btn.reset-device:hover {
  background: #f59e0b;
  color: #fff;
}

/* Device history dropdown (last 5 devices) in users table */
.users-device-select {
  width: auto;
  min-width: 120px;
  max-width: 170px;
  font-size: 11px;
  padding: 4px 24px 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* Loading Spinner */
.users-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f1f5f9;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 10px auto;
}

/* Empty State */
.users-empty-state {
  padding: 40px 20px;
}
.users-empty-state i {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 12px;
}
.users-empty-state h5 {
  color: #475569;
  margin-bottom: 4px;
}

/* Pagination */
/* All paginations must wrap on narrow screens — Bootstrap keeps them in one
   row which overflows horizontally on mobile (worst on transactions page) */
.pagination {
  flex-wrap: wrap;
  row-gap: 6px;
}
.users-pagination .page-item .page-link {
  border: none;
  border-radius: 10px;
  margin: 0 3px;
  color: #64748b;
  font-weight: 600;
  padding: 8px 14px;
  transition: all 0.2s;
}
.users-pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  box-shadow: 0 3px 10px rgba(99,102,241,0.3);
}
.users-pagination .page-item .page-link:hover {
  background: #f1f5f9;
  color: #6366f1;
}

/* Modal Enhancements */
.modal-form-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}
.modal-form-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.modal-form-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.users-modal-save-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s;
}
.users-modal-save-btn:hover {
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
  color: #fff;
  transform: translateY(-1px);
}

/* Users Responsive */

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .users-header-banner { padding: 22px 24px; }
  .users-header-title { font-size: 22px; }
  .users-header-actions { gap: 8px; }
  .users-mini-stat { padding: 16px; }
  .users-mini-stat-value { font-size: 22px; }
  .users-avatar { width: 38px; height: 38px; font-size: 13px; border-radius: 10px; }
  .users-action-btn { width: 38px; height: 38px; font-size: 16px; }
  .users-table thead th { font-size: 12px; padding: 12px 10px; }
  .users-table tbody td { padding: 12px 10px; font-size: 13px; }
  .users-role-badge { font-size: 11px; padding: 4px 10px; }
  .users-balance { font-size: 14px; padding: 3px 10px; }
  .users-status-badge { font-size: 11px; padding: 4px 10px; }
  .users-td-date { font-size: 12px; }
}

/* Mobile */
@media (max-width: 768px) {
  .users-header-banner { padding: 18px 16px; border-radius: 14px; }
  .users-header-content { flex-direction: column; text-align: center; gap: 14px; }
  .users-header-title { font-size: 18px; }
  .users-header-sub { font-size: 12px; }
  .users-header-actions { width: 100%; justify-content: center; flex-wrap: wrap; }
  .users-add-btn { flex: 1; padding: 12px; font-size: 15px; border-radius: 12px; }
  .users-refresh-btn, .users-export-btn { flex-shrink: 0; }

  .users-mini-stat { padding: 12px; border-radius: 12px; }
  .users-mini-stat-value { font-size: 18px; }
  .users-mini-stat-label { font-size: 10px; }
  .users-mini-stat-icon { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; }

  .users-filter-bar { flex-direction: column; padding: 12px 14px; border-radius: 12px; gap: 10px; }
  .users-filter-group { flex-direction: column; width: 100%; gap: 8px; }
  .users-search-wrap { max-width: 100%; min-width: unset; }
  .users-filter-select-wrap { min-width: unset; width: 100%; }
  .users-search-input, .users-filter-select { font-size: 15px; padding: 10px 14px; padding-right: 40px; border-radius: 10px; }
  .users-filter-meta { width: 100%; justify-content: space-between; }

  /* Table → Card Layout on Mobile */
  .users-table-card { background: transparent; box-shadow: none; border: none; overflow: visible; }
  .users-table { border-collapse: separate; border-spacing: 0 8px; }
  .users-table thead { display: none; }
  .users-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    position: relative;
    align-items: center;
    gap: 8px;
  }
  .users-table tbody td {
    border: none;
    padding: 0;
    font-size: 13px;
  }

  /* Hide # column */
  .users-table tbody td.users-td-num { display: none; }

  /* User info: full width top row */
  .users-table tbody td:nth-child(2) {
    flex: 1 1 60%;
    min-width: 0;
  }
  .users-user-cell { gap: 10px; }
  .users-avatar { width: 44px; height: 44px; font-size: 15px; border-radius: 12px; }
  .users-user-name { font-size: 15px; }
  .users-user-username { font-size: 12px; }

  /* Role badge: inline */
  .users-table tbody td:nth-child(3) {
    flex: 0 0 auto;
  }
  .users-role-badge { font-size: 10px; padding: 3px 10px; }

  /* App: inline next to role */
  .users-table tbody td:nth-child(4) {
    flex: 0 0 auto;
  }

  /* Balance */
  .users-table tbody td:nth-child(5) {
    flex: 0 0 auto;
  }
  .users-balance { font-size: 14px; }

  /* Status */
  .users-table tbody td:nth-child(6) {
    flex: 0 0 auto;
  }

  /* Date */
  .users-table tbody td.users-td-date {
    flex: 0 0 auto;
    font-size: 11px;
    color: #94a3b8;
  }

  /* Actions: full width bottom row */
  .users-table tbody td:last-child {
    flex: 1 1 100%;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
  }
  .users-actions-wrap {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .users-action-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 12px;
  }
  .users-action-btn.wallet-primary {
    width: 100% !important;
    height: 48px !important;
    font-size: 17px !important;
    border-radius: 12px;
    order: -1;
    margin-bottom: 4px;
  }
  .users-actions-divider {
    display: none;
  }

  /* Pagination */
  .users-pagination .page-item .page-link { padding: 8px 12px; font-size: 13px; }

  /* Users table card override */
  .users-table-card .table-responsive { overflow: visible; }
}

/* Small phones */
@media (max-width: 400px) {
  .users-mini-stat { padding: 10px; gap: 10px; }
  .users-mini-stat-value { font-size: 16px; }
  .users-mini-stat-icon { width: 34px; height: 34px; font-size: 14px; }
  .users-action-btn { width: 40px; height: 40px; font-size: 16px; }
  .users-avatar { width: 40px; height: 40px; font-size: 13px; }
}

.btn-action {
  padding: 4px 8px;
  font-size: 14px;
  margin: 0 2px;
}

/* ============ Categories Enhanced ============ */

/* Header Banner */
.cats-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.cats-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.cats-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.cats-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.cats-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.cats-add-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
  cursor: pointer;
}
.cats-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
  color: #fff;
}
.cats-sort-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  cursor: pointer;
}
.cats-sort-btn:hover, .cats-sort-btn.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Mini Stats */
.cats-mini-stat {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.cats-mini-stat::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.cats-mini-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.cats-mini-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  flex-shrink: 0;
}
.cats-mini-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.cats-mini-stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Filter Bar */
.cats-filter-bar {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.cats-filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}
.cats-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}
.cats-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}
.cats-search-input {
  padding-right: 40px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 14px;
}
.cats-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.cats-filter-select-wrap {
  position: relative;
  min-width: 120px;
}
.cats-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}
.cats-filter-select {
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 13px;
}
.cats-filter-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.cats-filter-count {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  font-weight: 600;
}

/* Sort Mode Bar */
.cats-sort-bar {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  border: none;
}

/* Category Cards */
.cats-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: relative;
}
.cats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: #e0e7ff;
}
.cats-card-inactive {
  opacity: 0.55;
}
.cats-card-inactive:hover {
  opacity: 0.8;
}

/* Drag Handle */
.cats-card .drag-handle {
  cursor: grab;
  padding: 6px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border-bottom: 1px solid #e2e8f0;
  color: #94a3b8;
}

/* Toggle Buttons */
.cats-card-toggles {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cats-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cats-toggle-btn:hover {
  transform: scale(1.1);
}
.cats-toggle-active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.cats-toggle-app {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}
.cats-toggle-pin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.cats-toggle-off {
  background: rgba(255,255,255,0.9);
  color: #94a3b8;
  backdrop-filter: blur(4px);
}

/* API Badge */
.cats-api-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

/* Card Image */
.cats-card-image {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.cats-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.cats-card:hover .cats-card-image img {
  transform: scale(1.05);
}
.cats-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cats-card-icon i {
  font-size: 48px;
  color: #a5b4fc;
  transition: all 0.3s;
}
.cats-card:hover .cats-card-icon i {
  color: #6366f1;
  transform: scale(1.1);
}

/* Card Body */
.cats-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}
.cats-card-subtitle {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}
.cats-card-badges {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cats-badge-products {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #3b82f6;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.cats-badge-manual {
  background: #f1f5f9;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Card Actions */
.cats-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}
.cats-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.cats-action-edit {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #3b82f6;
}
.cats-action-edit:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.cats-action-products {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #22c55e;
}
.cats-action-products:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

/* ============ Drag & Drop Sorting ============ */
.category-item[draggable="true"] {
  cursor: grab;
  transition: transform 0.2s, opacity 0.2s;
}
.category-item[draggable="true"]:active {
  cursor: grabbing;
}
.category-item.drag-over {
  transform: scale(1.03);
}
.category-item.drag-over .card {
  border: 2px dashed #6366f1 !important;
  box-shadow: 0 0 15px rgba(99,102,241,0.3);
}

/* ============ Image Upload ============ */
.image-upload-preview {
  width: 120px;
  height: 120px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.image-upload-preview:hover {
  border-color: var(--primary);
  background: #f8f9fa;
}
.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-upload-preview .upload-icon {
  font-size: 32px;
  color: #999;
}
.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============ Categories Responsive ============ */

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .cats-header-banner { padding: 22px 24px; }
  .cats-header-title { font-size: 20px; }
  .cats-card-image { height: 140px; }
  .cats-card-title { font-size: 13px; }
  .cats-card-subtitle { font-size: 10px; }
  .cats-toggle-btn { width: 28px; height: 28px; font-size: 11px; }
  .cats-action-btn { width: 32px; height: 32px; font-size: 13px; }
  .cats-api-badge { font-size: 10px; padding: 3px 8px; }
  .cats-mini-stat { padding: 14px; }
  .cats-mini-stat-icon { width: 40px; height: 40px; font-size: 16px; }
  .cats-mini-stat-value { font-size: 20px; }
}

/* Mobile */
@media (max-width: 576px) {
  .cats-header-banner { padding: 18px 16px; border-radius: 14px; }
  .cats-header-content { flex-direction: column; text-align: center; gap: 14px; }
  .cats-header-title { font-size: 18px; }
  .cats-header-sub { font-size: 12px; }
  .cats-add-btn, .cats-sort-btn { padding: 8px 16px; font-size: 13px; }
  .cats-mini-stat { padding: 12px; gap: 10px; }
  .cats-mini-stat-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .cats-mini-stat-value { font-size: 18px; }
  .cats-mini-stat-label { font-size: 11px; }
  .cats-filter-bar { flex-direction: column; padding: 12px 14px; border-radius: 12px; gap: 8px; }
  .cats-filter-group { flex-direction: column; width: 100%; gap: 8px; }
  .cats-search-wrap { max-width: 100%; min-width: unset; }
  .cats-filter-select-wrap { min-width: unset; width: 100%; }
  .cats-card-image { height: 110px; }
  .cats-card-title { font-size: 12px; }
  .cats-card-subtitle { font-size: 10px; }
  .cats-toggle-btn { width: 26px; height: 26px; font-size: 10px; border-radius: 8px; }
  .cats-card-toggles { gap: 3px; top: 5px; left: 5px; }
  .cats-api-badge { font-size: 9px; padding: 2px 6px; border-radius: 8px; top: 5px; right: 5px; }
  .cats-action-btn { width: 30px; height: 30px; font-size: 12px; }
  .cats-card-actions { padding: 8px; gap: 6px; }
  .cats-card-badges { gap: 3px; }
  .cats-badge-products, .cats-badge-manual { font-size: 10px; padding: 2px 6px; }
  .cats-sort-bar { padding: 10px 14px; font-size: 13px; border-radius: 10px; }
}

/* ============ Products Enhanced ============ */

/* Header Banner */
.prods-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.prods-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.prods-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.prods-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.prods-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.prods-add-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
  cursor: pointer;
}
.prods-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
  color: #fff;
}
.prods-import-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  cursor: pointer;
}
.prods-import-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Mini Stats */
.prods-mini-stat {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.prods-mini-stat::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.prods-mini-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.prods-mini-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  flex-shrink: 0;
}
.prods-mini-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.prods-mini-stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Filter Bar */
.prods-filter-bar {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.prods-filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}
.prods-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}
.prods-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}
.prods-search-input {
  padding-right: 40px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 14px;
}
.prods-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.prods-filter-select-wrap {
  position: relative;
  min-width: 120px;
}
.prods-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}
.prods-filter-select {
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 13px;
}
.prods-filter-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.prods-filter-count {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  font-weight: 600;
}

/* Products Table */
.prods-table-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.prods-table {
  margin: 0;
}
.prods-table thead th {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 14px 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.prods-table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.prods-table-row {
  transition: all 0.2s;
}
.prods-table-row:hover {
  background: #fafbff !important;
}

/* Row Elements */
.prods-row-num {
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.prods-row-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.prods-row-img-placeholder {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 18px;
}
.prods-row-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 14px;
}
.prods-row-name-en {
  font-size: 11px;
  color: #94a3b8;
}
.prods-badge-cat {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.prods-badge-currency {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.prods-badge-usd {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #2563eb;
}
.prods-badge-syp {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #d97706;
}
.prods-price-base {
  font-weight: 800;
  color: #1e293b;
  font-size: 13px;
}
.prods-price-admin {
  font-weight: 700;
  color: #6366f1;
  font-size: 13px;
}
.prods-price-user {
  font-weight: 700;
  color: #10b981;
  font-size: 13px;
}
.prods-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.prods-status-active {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.prods-status-active:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}
.prods-status-inactive {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}
.prods-status-inactive:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}
.prods-status-hidden {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #e2e8f0;
}
.prods-status-hidden:hover {
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff;
}
.prods-move-select {
  min-width: 140px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
}
.prods-move-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* Searchable Move Input */
.prods-move-input {
  min-width: 140px;
  font-size: 12px;
  border-radius: 10px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.2s;
}
.prods-move-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.prods-move-input::placeholder {
  color: #94a3b8;
  font-size: 11px;
}

/* Category search input (in modals) */
.cat-search-input {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  font-size: 14px;
  transition: all 0.2s;
}
.cat-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.prods-row-actions {
  display: flex;
  gap: 6px;
}
.prods-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.prods-action-edit {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #3b82f6;
}
.prods-action-edit:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.prods-action-delete {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #ef4444;
}
.prods-action-delete:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* ============ Products Responsive ============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .prods-header-banner { padding: 22px 24px; }
  .prods-header-title { font-size: 20px; }
  .prods-mini-stat { padding: 14px; }
  .prods-mini-stat-icon { width: 40px; height: 40px; font-size: 16px; }
  .prods-mini-stat-value { font-size: 20px; }
  .prods-table thead th { font-size: 11px; padding: 10px 8px; }
  .prods-table tbody td { padding: 10px 8px; }
  .prods-row-img, .prods-row-img-placeholder { width: 40px; height: 40px; }
  .prods-action-btn { width: 30px; height: 30px; font-size: 12px; }
}

@media (max-width: 768px) {
  .prods-header-banner { padding: 18px 16px; border-radius: 14px; }
  .prods-header-content { flex-direction: column; text-align: center; gap: 14px; }
  .prods-header-title { font-size: 18px; }
  .prods-header-sub { font-size: 12px; }
  .prods-add-btn, .prods-import-btn { padding: 8px 16px; font-size: 13px; }
  .prods-mini-stat { padding: 12px; gap: 10px; }
  .prods-mini-stat-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .prods-mini-stat-value { font-size: 18px; }
  .prods-mini-stat-label { font-size: 11px; }
  .prods-filter-bar { flex-direction: column; padding: 12px 14px; border-radius: 12px; gap: 8px; }
  .prods-filter-group { flex-direction: column; width: 100%; gap: 8px; }
  .prods-search-wrap { max-width: 100%; min-width: unset; }
  .prods-filter-select-wrap { min-width: unset; width: 100%; }
  .prods-table thead th { font-size: 10px; padding: 8px 6px; }
  .prods-table tbody td { padding: 8px 6px; font-size: 12px; }
  .prods-row-img, .prods-row-img-placeholder { width: 38px; height: 38px; border-radius: 8px; }
  .prods-row-name { font-size: 12px; }
  .prods-move-select { min-width: 110px; font-size: 11px; }
  .prods-move-input { min-width: 110px; font-size: 11px; }
  .prods-action-btn { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
  .prods-status-badge { font-size: 11px; padding: 4px 8px; }
  .prods-price-base, .prods-price-admin, .prods-price-user { font-size: 11px; }
}

/* ============ Products Mobile Cards (same pattern as users page) ============ */
@media (max-width: 768px) {
  .prods-table-card { background: transparent; box-shadow: none; border: none; overflow: visible; }
  .prods-table-card .table-responsive { overflow: visible; }
  .prods-table { border-collapse: separate; border-spacing: 0 8px; }
  .prods-table thead { display: none; }
  .prods-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
  }
  .prods-table tbody td { border: none; padding: 0; font-size: 13px; }

  /* Hide # column */
  .prods-table tbody td.prods-cell-num { display: none; }

  /* Image: fixed small */
  .prods-table tbody td.prods-cell-img { flex: 0 0 auto; }
  .prods-row-img, .prods-row-img-placeholder { width: 44px; height: 44px; border-radius: 12px; }

  /* Name: full width top row */
  .prods-table tbody td.prods-cell-name { flex: 1 1 55%; min-width: 0; }
  .prods-cell-name .prods-row-name { font-size: 15px; }

  /* Badges & prices: inline */
  .prods-table tbody td.prods-cell-type,
  .prods-table tbody td.prods-cell-cat,
  .prods-table tbody td.prods-cell-cur,
  .prods-table tbody td.prods-cell-base,
  .prods-table tbody td.prods-cell-admin,
  .prods-table tbody td.prods-cell-user,
  .prods-table tbody td.prods-cell-status { flex: 0 0 auto; }

  /* Move to category: full width row */
  .prods-table tbody td.prods-cell-move {
    flex: 1 1 100%;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
  }
  .prods-cell-move .prods-move-input { width: 100%; min-width: 0; }

  /* Actions: full width bottom row */
  .prods-table tbody td.prods-cell-actions {
    flex: 1 1 100%;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
  }
  .prods-cell-actions .prods-row-actions { justify-content: center; gap: 8px; }
  .prods-action-btn { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
}

/* ============ Category Products Modal Mobile Cards ============ */
@media (max-width: 1024px) {
  .cat-prods-manage-table thead { display: none; }
  .cat-prods-manage-table, .cat-prods-manage-table tbody { display: block; width: 100%; }
  .cat-prods-manage-table tbody tr {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .cat-prods-manage-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: none !important;
    padding: 5px 0;
    font-size: 13px;
  }
  .cat-prods-manage-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #64748b;
    font-size: 12px;
    flex-shrink: 0;
  }
  .catp-cell-handle, .catp-cell-num { display: none !important; }
  .catp-cell-name { display: block !important; border-bottom: 1px dashed #f1f5f9 !important; padding-bottom: 8px !important; }
  .catp-cell-name::before { display: none; }
  .catp-cell-move select { flex: 1; min-width: 0; }
}

/* ============ Orders & Transactions Enhanced ============ */

/* Header Banner */
.orders-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.orders-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.orders-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.orders-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.orders-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}

/* Mini Stats */
.orders-mini-stat {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.orders-mini-stat::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.orders-mini-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.orders-mini-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  flex-shrink: 0;
}
.orders-mini-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.orders-mini-stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Filter Bar */
.orders-filter-bar {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.orders-filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}
.orders-search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 220px;
}
.orders-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}
.orders-search-input {
  padding-right: 40px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 14px;
}
.orders-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.orders-filter-select-wrap, .orders-date-wrap {
  position: relative;
  min-width: 120px;
}
.orders-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}
.orders-filter-select {
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 13px;
}
.orders-filter-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.orders-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  flex-shrink: 0;
}
.orders-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

/* Table */
.orders-table-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.orders-table {
  margin: 0;
}
.orders-table thead th {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 14px 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.orders-table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.orders-table-row {
  transition: all 0.2s;
}
.orders-table-row:hover {
  background: #fafbff !important;
}

/* Row Elements */
.orders-row-num {
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.orders-order-num {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.5px;
}
.orders-user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
}
.orders-product-name {
  font-weight: 600;
  color: #475569;
  font-size: 13px;
}
.orders-qty-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.orders-price {
  font-weight: 800;
  color: #1e293b;
  font-size: 14px;
}
.orders-date {
  font-size: 12px;
  color: #64748b;
}
.orders-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Action Buttons */
.orders-row-actions {
  display: flex;
  gap: 5px;
}
.orders-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.orders-action-view {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  color: #0891b2;
}
.orders-action-view:hover {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(8,145,178,0.3);
}
.orders-action-complete {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.orders-action-complete:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}
.orders-action-fail {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}
.orders-action-fail:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.orders-action-refund {
  background: linear-gradient(135deg, #e0e7ff, #eef2ff);
  color: #6366f1;
}
.orders-action-refund:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.orders-action-cancel {
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
  color: #64748b;
}
.orders-action-cancel:hover {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100,116,139,0.3);
}
.orders-action-resend {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #d97706;
}
.orders-action-resend:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217,119,6,0.3);
}

/* Transaction-specific styles */
.txn-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.txn-amount {
  font-weight: 800;
  font-size: 14px;
}
.txn-amount-plus { color: #16a34a; }
.txn-amount-minus { color: #dc2626; }
.txn-balance {
  font-weight: 600;
  color: #475569;
  font-size: 13px;
}
.txn-desc {
  font-size: 12px;
  color: #64748b;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Transaction Header Total */
.txn-header-total {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 14px 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}
.txn-header-total-label {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  margin-bottom: 2px;
}
.txn-header-total-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

/* Transaction User Cell */
.txn-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.txn-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Transaction Type Badge Enhanced */
.txn-type-badge i {
  font-size: 11px;
}

/* Filter Count */
.orders-filter-count {
  min-height: 24px;
}
.txn-filter-active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
  padding: 5px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Empty State */
.txn-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}
.txn-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #94a3b8;
}
.txn-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
}
.txn-empty-sub {
  font-size: 13px;
  color: #94a3b8;
}

/* ============ Orders Responsive ============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .orders-header-banner { padding: 22px 24px; }
  .orders-header-title { font-size: 20px; }
  .orders-mini-stat { padding: 14px; }
  .orders-mini-stat-icon { width: 40px; height: 40px; font-size: 16px; }
  .orders-mini-stat-value { font-size: 20px; }
  .orders-table thead th { font-size: 11px; padding: 10px 8px; }
  .orders-table tbody td { padding: 10px 8px; }
  .orders-action-btn { width: 28px; height: 28px; font-size: 12px; }
}

@media (max-width: 768px) {
  .orders-header-banner { padding: 18px 16px; border-radius: 14px; }
  .orders-header-content { flex-direction: column; text-align: center; gap: 10px; }
  .orders-header-title { font-size: 18px; }
  .orders-header-sub { font-size: 12px; }
  .orders-mini-stat { padding: 12px; gap: 10px; }
  .orders-mini-stat-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .orders-mini-stat-value { font-size: 18px; }
  .orders-mini-stat-label { font-size: 11px; }
  .orders-filter-bar { flex-direction: column; padding: 12px 14px; border-radius: 12px; gap: 8px; }
  .orders-filter-group { flex-direction: column; width: 100%; gap: 8px; }
  .orders-search-wrap { max-width: 100%; min-width: unset; }
  .orders-filter-select-wrap, .orders-date-wrap { min-width: unset; width: 100%; }
  .orders-search-btn { width: 100%; height: 38px; border-radius: 10px; }
  .orders-table thead th { font-size: 10px; padding: 8px 6px; }
  .orders-table tbody td { padding: 8px 6px; font-size: 12px; }
  .orders-order-num { font-size: 10px; padding: 3px 8px; }
  .orders-user-name, .orders-product-name { font-size: 11px; }
  .orders-price { font-size: 12px; }
  .orders-status-badge { font-size: 10px; padding: 3px 8px; }
  .orders-action-btn { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
  .txn-amount { font-size: 12px; }
  .txn-balance { font-size: 11px; }
  .txn-desc { max-width: 120px; font-size: 11px; }
  .txn-header-total { padding: 10px 16px; }
  .txn-header-total-value { font-size: 20px; }
  .txn-user-avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
  .txn-type-badge { font-size: 10px; padding: 3px 8px; }
  .txn-empty-icon { width: 48px; height: 48px; font-size: 18px; border-radius: 14px; }
  .txn-empty-title { font-size: 14px; }
  .txn-empty-sub { font-size: 11px; }
}

/* ============ Reports Enhanced ============ */

/* Report Header Banner */
.rpt-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.rpt-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(16,185,129,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.rpt-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.rpt-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.rpt-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.rpt-header-badge {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 10px 18px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}
.rpt-header-badge i {
  color: #a855f7;
}

/* Report Filter Bar */
.rpt-filter-bar {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.rpt-filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}
.rpt-date-wrap, .rpt-select-wrap {
  position: relative;
  min-width: 130px;
}
.rpt-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}
.rpt-filter-input, .rpt-filter-select {
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s;
  font-size: 13px;
}
.rpt-filter-input:focus, .rpt-filter-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.rpt-search-btn {
  padding: 8px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  white-space: nowrap;
}
.rpt-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

/* Report Chart */
.rpt-chart-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.rpt-chart-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  font-weight: 700;
  color: #475569;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.rpt-chart-body {
  padding: 20px;
  height: 320px;
}

/* Report Table Extras */
.rpt-period-badge {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.rpt-profit {
  font-weight: 800;
  color: #10b981;
  font-size: 14px;
}

/* ============ Banners Enhanced ============ */

/* Banner Header */
.bnr-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.bnr-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(236,72,153,0.12) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.bnr-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.bnr-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.bnr-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.bnr-add-btn {
  padding: 10px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
  white-space: nowrap;
}
.bnr-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
  color: #fff;
}

/* Banner Card */
.bnr-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  transition: all 0.3s;
}
.bnr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}
.bnr-card-inactive {
  opacity: 0.6;
}
.bnr-card-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.bnr-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.bnr-card:hover .bnr-card-img {
  transform: scale(1.05);
}
.bnr-card-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.bnr-status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.bnr-badge-active {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}
.bnr-badge-inactive {
  background: rgba(148,163,184,0.2);
  color: #64748b;
  border: 1px solid rgba(148,163,184,0.3);
}
.bnr-order-badge {
  background: rgba(15,23,42,0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.bnr-app-badge {
  background: rgba(99,102,241,0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.bnr-global-badge {
  background: rgba(245,158,11,0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.bnr-card-global {
  border: 2px dashed #f59e0b;
}
.bnr-action-claim {
  color: #f59e0b;
}
.bnr-action-claim:hover {
  background: rgba(245,158,11,0.15);
  color: #d97706;
}

/* ===== Banner Management ===== */
.bnr-app-filter {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Status badges */
.bnr-status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.bnr-status-active {
  background: rgba(16,185,129,0.85);
  color: #fff;
}
.bnr-status-inactive {
  background: rgba(148,163,184,0.85);
  color: #fff;
}

/* Card states */
.bnr-card-inactive {
  opacity: 0.7;
}
.bnr-card-inactive .bnr-card-img {
  filter: grayscale(0.4);
}

/* Submitter info */
.bnr-submitter-info {
  font-size: 11px;
  color: #6366f1;
  margin-top: 4px;
  font-weight: 500;
}
.bnr-card-body {
  padding: 14px 16px 8px;
}
.bnr-card-title {
  font-weight: 700;
  color: #1e293b;
  font-size: 14px;
  margin: 0 0 4px;
}
.bnr-card-link {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnr-card-actions {
  padding: 10px 16px 14px;
  display: flex;
  gap: 6px;
}
.bnr-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.bnr-action-edit {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
}
.bnr-action-edit:hover {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.bnr-action-hide {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #d97706;
}
.bnr-action-hide:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  transform: translateY(-2px);
}
.bnr-action-show {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.bnr-action-show:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  transform: translateY(-2px);
}
.bnr-action-delete {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}
.bnr-action-delete:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.bnr-action-pause {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: #ea580c;
}
.bnr-action-pause:hover {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234,88,12,0.3);
}
.bnr-action-play {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.bnr-action-play:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

/* ============ App Configs Enhanced ============ */

/* Config Header */
.cfg-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.cfg-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 60% 30%, rgba(59,130,246,0.12) 0%, transparent 60%),
              radial-gradient(circle at 20% 70%, rgba(168,85,247,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.cfg-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.cfg-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.cfg-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}

/* Config Card */
.cfg-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  padding: 20px;
  transition: all 0.3s;
}
.cfg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}
.cfg-card-inactive { opacity: 0.6; }
.cfg-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.cfg-card-logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}
.cfg-card-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 15px;
}
.cfg-card-pkg {
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}
.cfg-card-colors {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cfg-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.05);
}
.cfg-card-admin {
  font-size: 11px;
  color: #64748b;
  margin-right: auto;
}
.cfg-card-status {
  margin-bottom: 12px;
}
.cfg-status-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.cfg-badge-active {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.cfg-badge-inactive {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}
.cfg-card-actions {
  display: flex;
  gap: 6px;
}

/* ============ API Providers Enhanced ============ */

/* Provider Header */
.pvd-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.pvd-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 70% 40%, rgba(16,185,129,0.12) 0%, transparent 60%),
              radial-gradient(circle at 30% 70%, rgba(99,102,241,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.pvd-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.pvd-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.pvd-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}
.pvd-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pvd-sync-all-btn {
  padding: 10px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.pvd-sync-all-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Provider Card */
.pvd-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  padding: 20px;
  transition: all 0.3s;
}
.pvd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}
.pvd-card-inactive { opacity: 0.55; }
.pvd-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pvd-card-name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pvd-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.pvd-icon-active {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #10b981;
}
.pvd-icon-inactive {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #ef4444;
}
.pvd-card-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 15px;
}
.pvd-card-code {
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}
.pvd-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pvd-type-badge {
  color: #fff;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pvd-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.pvd-dot-active {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.pvd-dot-inactive {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239,68,68,0.4);
}
.pvd-card-url {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 12px;
}
.pvd-balance-box {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border-radius: 14px;
  padding: 14px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 14px;
  border: 1px solid #f1f5f9;
}
.pvd-balance-empty {
  color: #94a3b8;
  font-size: 12px;
}
.pvd-balance-value {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}
.pvd-balance-email {
  font-size: 10px;
  color: #94a3b8;
}
.pvd-balance-error {
  font-size: 12px;
  color: #dc2626;
}
.pvd-card-actions {
  display: flex;
  gap: 6px;
}
.pvd-action-btn {
  flex: 1;
  height: 36px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.pvd-action-sync {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}
.pvd-action-sync:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  transform: translateY(-2px);
}
.pvd-action-edit {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
}
.pvd-action-edit:hover {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  transform: translateY(-2px);
}
.pvd-action-test {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  color: #0891b2;
}
.pvd-action-test:hover {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  transform: translateY(-2px);
}
.pvd-action-delete {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
}
.pvd-action-delete:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  transform: translateY(-2px);
}

/* ============ Sync Products Enhanced ============ */

.sync-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.sync-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(59,130,246,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.sync-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.sync-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.sync-header-sub {
  color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
  font-size: 14px;
}

/* Sync Tabs */
.sync-tabs {
  display: flex;
  gap: 8px;
  border: none;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}
.sync-tab-link {
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  color: #64748b;
  transition: all 0.3s;
  background: transparent;
}
.sync-tab-link:hover {
  color: #6366f1;
  background: #f8fafc;
}
.sync-tab-link.active {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}

/* ============ All Pages Responsive ============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .rpt-header-banner, .bnr-header-banner, .cfg-header-banner, .pvd-header-banner, .sync-header-banner { padding: 22px 24px; }
  .rpt-header-title, .bnr-header-title, .cfg-header-title, .pvd-header-title, .sync-header-title { font-size: 20px; }
  .rpt-chart-body { height: 260px; }
  .bnr-card-img-wrap { height: 150px; }
  .pvd-card { padding: 16px; }
  .pvd-card-icon { width: 38px; height: 38px; font-size: 16px; }
  .pvd-balance-value { font-size: 18px; }
}

@media (max-width: 768px) {
  .rpt-header-banner, .bnr-header-banner, .cfg-header-banner, .pvd-header-banner, .sync-header-banner { padding: 18px 16px; border-radius: 14px; }
  .rpt-header-content, .bnr-header-content, .cfg-header-content, .pvd-header-content, .sync-header-content { flex-direction: column; text-align: center; gap: 10px; }
  .rpt-header-title, .bnr-header-title, .cfg-header-title, .pvd-header-title, .sync-header-title { font-size: 18px; }
  .rpt-header-sub, .bnr-header-sub, .cfg-header-sub, .pvd-header-sub, .sync-header-sub { font-size: 12px; }
  .rpt-filter-bar { flex-direction: column; padding: 12px 14px; gap: 8px; }
  .rpt-filter-group { flex-direction: column; width: 100%; gap: 8px; }
  .rpt-date-wrap, .rpt-select-wrap { min-width: unset; width: 100%; }
  .rpt-search-btn { width: 100%; }
  .rpt-chart-body { height: 220px; padding: 12px; }
  .bnr-card-img-wrap { height: 140px; }
  .bnr-add-btn { width: 100%; text-align: center; }
  .bnr-action-btn { width: 32px; height: 32px; font-size: 13px; }
  .cfg-card { padding: 14px; }
  .cfg-card-logo { width: 40px; height: 40px; font-size: 16px; border-radius: 10px; }
  .cfg-card-name { font-size: 13px; }
  .pvd-header-actions { flex-direction: column; width: 100%; gap: 8px; }
  .pvd-sync-all-btn { text-align: center; }
  .pvd-card { padding: 14px; }
  .pvd-card-icon { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
  .pvd-card-name { font-size: 13px; }
  .pvd-balance-value { font-size: 18px; }
  .pvd-action-btn { height: 32px; font-size: 13px; border-radius: 10px; }
  .sync-tabs { flex-direction: column; border-radius: 14px; }
  .sync-tab-link { text-align: center; border-radius: 10px !important; }
}

/* ============ Service Type Selector (Product Modals) ============ */
.service-type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.service-type-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px solid rgba(148,163,184,0.15);
  background: rgba(15,23,42,0.3);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.service-type-option:hover {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.06);
  color: #c7d2fe;
}
.service-type-option.active {
  border-color: #6366f1;
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  box-shadow: 0 0 20px rgba(99,102,241,0.15);
}
.service-type-option i {
  font-size: 22px;
  margin-bottom: 2px;
}
.service-type-option span {
  font-size: 12px;
  font-weight: 600;
}

/* ============ Service Type Badges (Products) ============ */
.prods-stype-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.prods-stype-api {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.prods-stype-manual {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.25);
}
.prods-stype-telegram {
  background: rgba(6,182,212,0.12);
  color: #67e8f9;
  border: 1px solid rgba(6,182,212,0.25);
}

/* ============ Service Type Badges (Orders) ============ */
.orders-stype-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.orders-stype-api {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.orders-stype-manual {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.25);
}
.orders-stype-telegram {
  background: rgba(6,182,212,0.12);
  color: #67e8f9;
  border: 1px solid rgba(6,182,212,0.25);
}

/* ============ Manual Orders Page ============ */
.manual-header-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(251,191,36,0.06) 100%);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}
.manual-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.manual-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0 0 4px;
}
.manual-header-sub {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}
.manual-stats-row {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.manual-stat-card {
  flex: 1;
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.manual-stat-value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 2px;
}
.manual-stat-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.manual-stat-pending .manual-stat-value { color: #fbbf24; }
.manual-stat-processing .manual-stat-value { color: #6366f1; }
.manual-stat-completed .manual-stat-value { color: #10b981; }

.manual-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.manual-search-input {
  flex: 1;
  min-width: 200px;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  color: #e2e8f0;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  transition: border-color 0.2s;
}
.manual-search-input:focus {
  outline: none;
  border-color: #f59e0b;
}
.manual-status-filter {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  color: #e2e8f0;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  min-width: 140px;
}
.manual-status-filter:focus {
  outline: none;
  border-color: #f59e0b;
}

/* Manual Order Cards */
.manual-order-card {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.manual-order-card:hover {
  border-color: rgba(245,158,11,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.manual-order-pending {
  border-right: 4px solid #f59e0b;
}
.manual-order-processing {
  border-right: 4px solid #6366f1;
}
.manual-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(245,158,11,0.04);
  border-bottom: 1px solid rgba(148,163,184,0.06);
}
.manual-order-number {
  font-weight: 700;
  color: #fbbf24;
  font-size: 14px;
}
.manual-order-time {
  font-size: 11px;
  color: #64748b;
}
.manual-order-body {
  padding: 16px 18px;
}
.manual-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.manual-detail i {
  width: 18px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}
.manual-detail span {
  color: #e2e8f0;
}
.manual-detail .text-muted {
  color: #64748b !important;
}
.manual-player-data {
  background: rgba(15,23,42,0.4);
  border: 1px solid rgba(148,163,184,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
}
.manual-player-data-title {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.manual-data-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}
.manual-data-key {
  color: #94a3b8;
  font-weight: 600;
  min-width: 80px;
}
.manual-data-val {
  color: #e2e8f0;
}

/* Manual Order Actions */
.manual-order-actions {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(148,163,184,0.06);
}
.manual-response-wrap {
  margin-bottom: 10px;
}
.manual-response-input {
  width: 100%;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
}
.manual-response-input:focus {
  outline: none;
  border-color: #f59e0b;
}
.manual-action-buttons {
  display: flex;
  gap: 8px;
}
.manual-complete-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}
.manual-complete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(16,185,129,0.35);
}
.manual-fail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.1);
  color: #f87171;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}
.manual-fail-btn:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
}

/* ============ Responsive: Service Types & Manual Orders ============ */

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .service-type-option { padding: 12px 10px; }
  .service-type-option i { font-size: 20px; }
  .manual-header-banner { padding: 22px 24px; }
  .manual-header-title { font-size: 20px; }
  .manual-stat-card { padding: 16px; }
  .manual-stat-value { font-size: 24px; }
  .manual-order-card { border-radius: 14px; }
  .manual-response-input { font-size: 13px; }
  .manual-complete-btn, .manual-fail-btn { font-size: 13px; }
}

/* Mobile */
@media (max-width: 768px) {
  .service-type-selector { flex-direction: column; }
  .service-type-option { flex-direction: row; padding: 10px 14px; gap: 10px; }
  .service-type-option i { font-size: 18px; margin-bottom: 0; }
  .manual-header-banner { padding: 18px 16px; border-radius: 14px; }
  .manual-header-content { flex-direction: column; text-align: center; gap: 10px; }
  .manual-header-title { font-size: 18px; }
  .manual-header-sub { font-size: 12px; }
  .manual-stats-row { flex-direction: column; gap: 10px; }
  .manual-stat-card { padding: 14px 16px; border-radius: 12px; }
  .manual-stat-value { font-size: 22px; }
  .manual-stat-label { font-size: 11px; }
  .manual-filter-bar { flex-direction: column; }
  .manual-search-input { min-width: unset; width: 100%; }
  .manual-status-filter { width: 100%; }
  .manual-order-card { border-radius: 14px; }
  .manual-order-header { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; }
  .manual-order-number { font-size: 13px; }
  .manual-order-body { padding: 12px 14px; }
  .manual-detail { font-size: 12px; }
  .manual-player-data { padding: 8px 12px; }
  .manual-order-actions { padding: 10px 14px 14px; }
  .manual-response-input { font-size: 14px; min-height: 50px; }
  .manual-action-buttons { flex-direction: column; }
  .manual-complete-btn, .manual-fail-btn { padding: 12px 16px; font-size: 14px; border-radius: 12px; }
  .prods-stype-badge, .orders-stype-badge { font-size: 10px; padding: 2px 8px; }
}

/* Small phones */
@media (max-width: 400px) {
  .manual-header-banner { padding: 14px 12px; }
  .manual-header-title { font-size: 16px; }
  .manual-stat-card { padding: 12px; }
  .manual-stat-value { font-size: 18px; }
  .manual-order-header { padding: 10px 12px; }
  .manual-order-body { padding: 10px 12px; }
  .manual-order-actions { padding: 8px 12px 12px; }
  .manual-complete-btn, .manual-fail-btn { padding: 10px 14px; font-size: 13px; }
  .service-type-option { padding: 8px 12px; }
  .service-type-option i { font-size: 16px; }
  .service-type-option span { font-size: 11px; }

  /* Extra compact for products & orders tables with new column */
  .prods-table thead th { font-size: 9px; padding: 6px 4px; }
  .prods-table tbody td { padding: 6px 4px; font-size: 11px; }
  .prods-stype-badge { font-size: 9px; padding: 2px 6px; }
  .orders-table thead th { font-size: 9px; padding: 6px 4px; }
  .orders-table tbody td { padding: 6px 4px; font-size: 11px; }
  .orders-stype-badge { font-size: 9px; padding: 2px 6px; }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 64px;
  height: 64px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
  z-index: 1050;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  animation: whatsapp-pulse 2s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.7);
}
.whatsapp-float i {
  color: #fff;
  font-size: 34px;
}

/* Disabled product badge */
.prod-disabled-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f44336;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  z-index: 2;
}
.prod-card-disabled {
  pointer-events: none;
}
@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 6px 36px rgba(37, 211, 102, 0.8); }
}

/* ============ Transactions Mobile Cards (same pattern as users page) ============ */
@media (max-width: 768px) {
  .txn-table-card { background: transparent; box-shadow: none; border: none; overflow: visible; }
  .txn-table-card .table-responsive { overflow: visible; }
  .txn-table { border-collapse: separate; border-spacing: 0 8px; }
  .txn-table thead { display: none; }
  .txn-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
  }
  .txn-table tbody td { border: none; padding: 0; font-size: 13px; }
  .txn-table tbody td.txn-cell-num { display: none; }
  .txn-table tbody td.txn-cell-user { flex: 1 1 55%; min-width: 0; }
  .txn-cell-user .orders-user-name { font-size: 15px; }
  .txn-table tbody td.txn-cell-type,
  .txn-table tbody td.txn-cell-amount,
  .txn-table tbody td.txn-cell-before,
  .txn-table tbody td.txn-cell-after { flex: 0 0 auto; }
  .txn-table tbody td.txn-cell-desc { flex: 1 1 100%; font-size: 12px; color: #64748b; }
  .txn-table tbody td.txn-cell-date { flex: 1 1 100%; font-size: 11px; color: #94a3b8; }
}

/* ============ Verification (KYC) Badges & Modal ============ */
.vrf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: default;
  white-space: nowrap;
}
button.vrf-badge { cursor: pointer; }
.vrf-approved { background: linear-gradient(135deg, #dcfce7, #f0fdf4); color: #16a34a; }
.vrf-pending { background: linear-gradient(135deg, #fef3c7, #fffbeb); color: #d97706; }
.vrf-pending:hover { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.vrf-rejected { background: linear-gradient(135deg, #fee2e2, #fef2f2); color: #dc2626; }
.vrf-rejected:hover { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.vrf-none { background: #f1f5f9; color: #94a3b8; }
.vrf-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.2s;
}
.vrf-img:hover { transform: scale(1.02); }

/* ============ Payment Methods Cards ============ */
.pm-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.25s;
  height: 100%;
}
.pm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.pm-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.pm-card-status {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.pm-enabled { background: #dcfce7; color: #16a34a; }
.pm-disabled { background: #f1f5f9; color: #94a3b8; }
.pm-empty {
  border: 2px dashed #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.pm-empty i { font-size: 28px; }

/* Payment method icon */
.pm-icon-clickable { cursor: pointer; position: relative; overflow: hidden; }
.pm-icon-clickable::after {
  content: "\f030";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s;
}
.pm-icon-clickable:hover::after { opacity: 1; }
.pm-icon-img { width: 100%; height: 100%; object-fit: cover; }

/* ── Debts accordion rows ── */
.debt-toggle-row:hover { background: #fef9f0 !important; }
.debt-chevron { display: inline-block; }
.debt-detail-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.debt-detail-card.debt-detail-active { border-right: 4px solid #dc2626; }
.debt-payments-box {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.debt-payment-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.debt-payment-line:last-child { border-bottom: none; }
.debt-payment-date {
  font-size: 12px;
  color: #64748b;
  background: #eef2f7;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.debt-payment-amount { font-weight: 700; color: #16a34a; font-size: 13px; }
