/* ============================================
   Merchant Portal - Responsive Design System
   ============================================ */

:root {
  /* Primary Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;

  /* Sidebar Colors */
  --sidebar-bg: #ffffff;
  --sidebar-hover: #f1f5f9;
  --sidebar-active-bg: rgba(37, 99, 235, 0.08);
  --sidebar-text: #475569;
  --sidebar-text-active: #2563eb;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Status Colors */
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Background & Borders */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

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

  /* Transitions */
  --transition: all 0.2s ease;

  /* Layout */
  --header-height: 56px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 72px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-body);
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select {
  font-family: inherit;
}

/* ============================================
   Layout
   ============================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.sidebar-wrapper.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.page-content {
  padding: 16px 20px;
}

.header-relative {
  position: relative;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  z-index: 100;
  transition: width 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-wrapper.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-collapse-btn {
  position: absolute;
  top: 24px;
  right: -14px;
  width: 28px;
  height: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  transition: var(--transition);
}

.sidebar-collapse-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-wrapper.collapsed .sidebar-logo-text,
.sidebar-wrapper.collapsed .menu-text,
.sidebar-wrapper.collapsed .menu-arrow {
  display: none;
}

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

.sidebar-menu-item {
  margin-bottom: 1px;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-menu-link:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
}

.sidebar-menu-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
}

.menu-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.menu-text {
  white-space: nowrap;
  overflow: hidden;
}

.menu-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}

.menu-arrow svg {
  width: 14px;
  height: 14px;
}

.sidebar-menu-item.expanded .menu-arrow {
  transform: rotate(90deg);
}

.sidebar-submenu {
  display: none;
  padding: 4px 0 4px 52px;
}

.sidebar-menu-item.expanded .sidebar-submenu {
  display: block;
}

.sidebar-submenu-link {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sidebar-submenu-link:hover {
  background: var(--sidebar-hover);
  color: var(--primary);
}

.sidebar-submenu-link.active {
  color: var(--primary);
  font-weight: 500;
}

/* ============================================
   Top Header
   ============================================ */

.top-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 150;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition);
}

.hamburger-btn:hover {
  background: var(--gray-100);
}

.header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
  background: transparent;
}

.header-icon-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.header-icon-btn svg {
  width: 18px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  line-height: 1;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.lang-selector svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* ============================================
   Dropdowns
   ============================================ */

/* Language Dropdown */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  z-index: 200;
  display: none;
  overflow: hidden;
}

.lang-dropdown.active {
  display: block;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.lang-dropdown-item:hover {
  background: var(--gray-50);
}

.lang-dropdown-item.active {
  color: var(--primary);
  font-weight: 500;
  background: var(--primary-light);
}

/* Notifications Dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 360px;
  max-height: 480px;
  z-index: 200;
  display: none;
  overflow: hidden;
}

.notif-dropdown.active {
  display: block;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.notif-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-mark-read {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

.notif-mark-read:hover {
  text-decoration: underline;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.notif-item:hover {
  background: var(--gray-50);
}

.notif-item.unread {
  background: #f8fafc;
}

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

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

.notif-icon.blue { background: var(--info-light); color: var(--info); }
.notif-icon.green { background: var(--success-light); color: var(--success); }
.notif-icon.orange { background: var(--warning-light); color: var(--warning); }
.notif-icon.purple { background: #ede9fe; color: #7c3aed; }

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

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.notif-time {
  font-size: 12px;
  color: var(--text-muted);
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.notif-show-all {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.notif-show-all:hover {
  background: var(--primary-dark);
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  display: none;
  overflow: hidden;
}

.profile-dropdown.active {
  display: block;
}

.profile-dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.profile-dropdown-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-dropdown-role {
  font-size: 13px;
  color: var(--text-muted);
}

.profile-dropdown-menu {
  padding: 8px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.profile-dropdown-item:hover {
  background: var(--gray-50);
}

.profile-dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.profile-dropdown-item.logout {
  color: var(--danger);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.profile-dropdown-item.logout svg {
  color: var(--danger);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   Stats Grid
   ============================================ */

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

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.blue { background: var(--info-light); color: var(--info); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }

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

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   Statistics Table (from Excel)
   ============================================ */

.stats-table-container {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

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

.stats-table th {
  padding: 10px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.stats-table td {
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

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

.stats-table .currency-cell {
  text-align: left;
  font-weight: 500;
}

.stats-table .currency-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.stats-table .currency-select svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.cell-green { background: #dcfce7; color: #16a34a; }
.cell-red { background: #fee2e2; color: #dc2626; }
.cell-yellow { background: #fef3c7; color: #d97706; }
.cell-blue { background: #e0f2fe; color: #0284c7; }
.cell-pink { background: #fce7f3; color: #db2777; }
.cell-empty { background: transparent; }

/* ============================================
   Time Tabs
   ============================================ */

.time-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.time-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
  border-right: 1px solid var(--border);
}

.time-tab:last-child {
  border-right: none;
}

.time-tab.active {
  background: var(--primary);
  color: var(--white);
}

.time-tab:hover:not(.active) {
  background: var(--gray-50);
}

/* ============================================
   Summary Cards
   ============================================ */

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.summary-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-card-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-card-value.green { color: var(--success); }
.summary-card-value.red { color: var(--danger); }
.summary-card-value.blue { color: var(--primary); }

/* ============================================
   Quick Actions
   ============================================ */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
}

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

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

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

.action-btn-icon.blue { background: var(--info-light); color: var(--info); }
.action-btn-icon.green { background: var(--success-light); color: var(--success); }
.action-btn-icon.orange { background: var(--warning-light); color: var(--warning); }

.action-btn-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   Tables
   ============================================ */

.table-container {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

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

.table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

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

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

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 16px;
}

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

.form-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  transition: var(--transition);
}

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

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

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

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

.btn-outline {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ============================================
   Modal (Bottom Sheet)
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

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

.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 10px 18px 18px;
  max-width: 460px;
  width: 100%;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 3px;
  background: var(--gray-300);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* ============================================
   Badges
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

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

/* ============================================
   Section Title
   ============================================ */

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* ============================================
   Responsive - Desktop (1400px+)
   ============================================ */

@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Responsive - Large Tablet (1200px)
   ============================================ */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ============================================
   Responsive - Tablet (1024px)
   ============================================ */

@media (max-width: 1024px) {
  .sidebar-wrapper {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar-wrapper.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .page-content {
    padding: 20px;
  }

  .stats-table-wrapper {
    overflow-x: auto;
  }

  .stats-table {
    min-width: 1000px;
  }
}

/* ============================================
   Responsive - Mobile Landscape (768px)
   ============================================ */

@media (max-width: 768px) {
  .page-content {
    padding: 16px;
  }

  .top-header {
    padding: 0 16px;
  }

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

  .summary-row {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .lang-selector span {
    display: none;
  }

  .time-tabs {
    flex-wrap: wrap;
  }

  .time-tab {
    flex: 1 1 calc(33.33% - 1px);
    min-width: 0;
  }
}

/* ============================================
   Responsive - Mobile Portrait (480px)
   ============================================ */

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

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

  .stat-value {
    font-size: 18px;
  }

  .header-title {
    font-size: 16px;
  }

  .summary-card-value {
    font-size: 16px;
  }

  .time-tab {
    font-size: 12px;
    padding: 10px 8px;
  }

.stats-table th,
    .stats-table td {
      padding: 12px 8px;
      font-size: 12px;
    }
}

/* ============================================
   Dashboard Master Design System
   Exact clone of Admin Dashboard
   ============================================ */

/* --- Section Layout --- */
.dash-section {
  margin-bottom: var(--space-6, 24px);
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4, 16px);
}

.dash-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.dash-section-subtitle {
  font-size: var(--font-size-sm, 13px);
  color: var(--gray-500);
  margin-top: 2px;
}

/* --- Grid System --- */
.dash-grid {
  display: grid;
  gap: var(--space-4, 16px);
}

.dash-grid-6 { grid-template-columns: repeat(6, 1fr); }
.dash-grid-5 { grid-template-columns: repeat(5, 1fr); }
.dash-grid-4 { grid-template-columns: repeat(4, 1fr); }
.dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dash-grid-2 { grid-template-columns: repeat(2, 1fr); }
.dash-grid-1 { grid-template-columns: 1fr; }

/* --- Card System --- */
.dash-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-card-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dash-card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  line-height: 1;
}

.dash-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dash-card-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--gray-500);
}

.dash-card-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  font-size: 11px;
}

.dash-card-trend.up { color: var(--success); }
.dash-card-trend.down { color: var(--danger); }
.dash-card-trend.neutral { color: var(--gray-400); }

/* --- Card Icon --- */
.dash-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-card-icon.blue { background: var(--info-light); color: var(--info); }
.dash-card-icon.green { background: var(--success-light); color: var(--success); }
.dash-card-icon.yellow { background: var(--warning-light); color: var(--warning); }
.dash-card-icon.red { background: var(--danger-light); color: var(--danger); }
.dash-card-icon.purple { background: #ede9fe; color: #7c3aed; }
.dash-card-icon.orange { background: #ffedd5; color: #ea580c; }
.dash-card-icon.teal { background: #ccfbf1; color: #0d9488; }
.dash-card-icon.pink { background: #fce7f3; color: #db2777; }

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

.status-dot.green { background: var(--success); box-shadow: 0 0 0 3px var(--success-light); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-light); }
.status-dot.red { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
.status-dot.gray { background: var(--gray-400); box-shadow: 0 0 0 3px var(--gray-100); }

/* --- Button System --- */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.5;
}

.dash-btn:active { transform: scale(0.97); }

.dash-btn.primary,
.dash-btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.dash-btn.primary:hover,
.dash-btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

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

.dash-btn.success,
.dash-btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.dash-btn.success:hover,
.dash-btn-success:hover { background: #16a34a; border-color: #16a34a; }

.dash-btn.warning,
.dash-btn-warning {
  background: var(--warning);
  color: var(--white);
  border-color: var(--warning);
}
.dash-btn.warning:hover,
.dash-btn-warning:hover { background: #d97706; border-color: #d97706; }

.dash-btn.danger,
.dash-btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.dash-btn.danger:hover,
.dash-btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.dash-btn.outline,
.dash-btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.dash-btn.outline:hover,
.dash-btn-outline:hover { background: var(--primary-light); }

.dash-btn.ghost,
.dash-btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.dash-btn.ghost:hover,
.dash-btn-ghost:hover { background: var(--gray-100); }

.dash-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-md);
}

.dash-btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.dash-btn-lg {
  padding: 10px 20px;
  font-size: 13px;
}

/* --- Quick Action Cards --- */
.action-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.action-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  transition: var(--transition);
}

.action-card:hover .action-card-icon {
  background: var(--primary);
  color: var(--white);
}

.action-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
}

.action-card-desc {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* --- Filter Bar --- */
.dash-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  padding: 10px 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4, 16px);
  flex-wrap: wrap;
}

.dash-filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
}

.dash-filter-btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

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

.dash-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.dash-filter-select {
  padding: 5px 28px 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--gray-700);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: var(--transition);
}

.dash-filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dash-filter-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--white);
  transition: var(--transition);
  min-width: 180px;
}

.dash-filter-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dash-filter-search svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.dash-filter-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-700);
  width: 100%;
}

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

.dash-filter-date {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--gray-700);
  transition: var(--transition);
}

.dash-filter-date:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dash-filter-separator {
  color: var(--gray-400);
  font-size: 13px;
}

/* --- Page Header --- */
.dash-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4, 16px);
}

.dash-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.dash-page-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.dash-page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
}

/* --- Empty State --- */
.dash-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

.dash-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.5;
}

.dash-empty-text {
  font-size: 14px;
  font-weight: 500;
}

/* --- Table Card --- */
.dash-table-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.dash-table-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.dash-table-wrapper {
  overflow-x: auto;
}

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

.dash-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: left;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.dash-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.dash-table tbody tr {
  transition: all 0.2s ease;
}

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

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

/* --- Status Badge --- */
.dash-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.dash-status-badge.success { background: var(--success-light); color: #15803d; }
.dash-status-badge.warning { background: var(--warning-light); color: #b45309; }
.dash-status-badge.danger { background: var(--danger-light); color: #b91c1c; }
.dash-status-badge.info { background: var(--info-light); color: #1d4ed8; }
.dash-status-badge.neutral { background: var(--gray-100); color: var(--gray-600); }

/* --- Table Footer & Pagination --- */
.dash-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.dash-table-info {
  font-size: 13px;
  color: var(--gray-500);
}

.dash-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-pagination button:hover:not(:disabled):not(.active) {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

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

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

/* --- Action Buttons --- */
.dash-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* --- Footer Note --- */
.footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: var(--space-6, 24px);
  padding-bottom: var(--space-6, 24px);
}

/* --- Customer Service --- */
.cs-channels-grid {
  margin-bottom: 32px;
}

.cs-channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 28px 24px;
}

.cs-channel-card .dash-card-icon {
  width: 64px;
  height: 64px;
}

.cs-channel-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.cs-channel-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cs-channel-card .dash-btn {
  margin-top: auto;
}

.cs-hours-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
}

.cs-hours-card .dash-card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.cs-hours-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cs-hours-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Profile Detail Grid --- */
.dash-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dash-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-detail-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
}

/* --- Modal --- */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.dash-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.dash-modal-overlay.active .dash-modal {
  transform: translateY(0);
}

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

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

.dash-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

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

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

.dash-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* --- Form --- */
.dash-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.dash-form-group:last-child {
  margin-bottom: 0;
}

.dash-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.dash-form-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.2s ease;
}

.dash-form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* --- Responsive: Tablet --- */
@media (max-width: 1439px) {
  .dash-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Responsive: Mobile --- */
@media (max-width: 767px) {
  .dash-grid-6,
  .dash-grid-5,
  .dash-grid-4,
  .dash-grid-3,
  .dash-grid-2 {
    grid-template-columns: 1fr;
  }

  .dash-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3, 12px);
  }

  .dash-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-filter-group {
    flex-wrap: wrap;
  }

  .dash-page-title {
    font-size: 20px;
  }

  .dash-card-value {
    font-size: 24px;
  }

  .notif-dropdown {
    width: 300px;
    right: -20px;
  }
}

@media (max-width: 480px) {
  .notif-dropdown {
    width: 280px;
    right: -30px;
  }
}

/* ============================================
   Additional Merchant Page Styles
   ============================================ */

/* Modal */
.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.2s ease-out;
}

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

.modal-close:hover {
  opacity: 0.7;
}

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button Hover States */
.dash-btn:hover {
  opacity: 0.9;
}

.dash-btn.primary:hover {
  background-color: #1d4ed8;
}

/* Card hover effects */
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table row hover */
.dash-table tbody tr:hover {
  background-color: #f9fafb;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .dash-grid {
    grid-template-columns: 1fr !important;
  }
  
  .dash-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .dash-page-header-actions {
    width: 100%;
  }
  
  .dash-page-header-actions .dash-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .dash-grid[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .dash-grid[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  
  .modal-content {
    margin: 8px;
    padding: 20px;
  }
}

/* ============================================
   Common Page Styles (shared across pages)
   ============================================ */

/* Page Headers */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.page-header-left h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 3px;
}

.page-header-left p {
  font-size: 12px;
  color: #6b7280;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #6b7280;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: #2563eb;
  color: #ffffff;
}

.filter-pill:hover:not(.active) {
  background: #f9fafb;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.filter-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

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

.filter-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  transition: all 0.2s ease;
}

.filter-search input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-search input::placeholder {
  color: #9ca3af;
}

.filter-select {
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-export-btn:hover {
  background: #1d4ed8;
}

.filter-export-btn svg {
  width: 18px;
  height: 18px;
}

/* Table Container */
.table-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 16px;
}

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

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

.data-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-align: left;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: #1a1a2e;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
}

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

.data-table tr:hover {
  background: #f9fafb;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-pending .dot {
  background: #d97706;
}

.status-paid, .status-success {
  background: #dcfce7;
  color: #16a34a;
}

.status-paid .dot, .status-success .dot {
  background: #16a34a;
}

.status-timeout, .status-cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.status-timeout .dot, .status-cancelled .dot {
  background: #dc2626;
}

.status-notified {
  background: #dcfce7;
  color: #16a34a;
}

.status-notified .dot {
  background: #16a34a;
}

.status-not-notified {
  background: #f1f5f9;
  color: #64748b;
}

.status-not-notified .dot {
  background: #64748b;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 12px;
  color: #6b7280;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(.active):not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}

.page-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

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

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

/* Support Cards */
.support-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.support-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.support-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.support-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-card-icon svg {
  width: 32px;
  height: 32px;
}

.support-card-icon.telegram { background: #e0f2fe; color: #0284c7; }
.support-card-icon.whatsapp { background: #dcfce7; color: #16a34a; }
.support-card-icon.livechat { background: #ede9fe; color: #7c3aed; }
.support-card-icon.email { background: #ffedd5; color: #ea580c; }

.support-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.support-card-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.support-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.support-card-btn:hover {
  background: #1d4ed8;
}

/* Profile Card */
.profile-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 40px;
  max-width: 640px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.profile-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 14px;
  color: #6b7280;
}

.profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-detail-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-detail-value {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
}

.profile-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* Notification Cards */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.notification-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all 0.2s ease;
}

.notification-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notification-card.unread {
  background: #f8fafc;
  border-color: #bfdbfe;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

/* Mark All Button */
.mark-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mark-all-btn:hover {
  background: #1d4ed8;
}

.mark-all-btn svg {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
  .support-channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-search {
    max-width: none;
  }
  
  .filter-export-btn {
    justify-content: center;
  }
  
  .filter-pills {
    flex-wrap: wrap;
  }
  
  .profile-card {
    padding: 24px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-details {
    grid-template-columns: 1fr;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .pagination {
    flex-direction: column;
    align-items: center;
  }
  
  .data-table {
    min-width: 800px;
  }
}

@media (max-width: 480px) {
  .support-channels-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Withdrawal Management Page (wm-*)
   ============================================ */

/* Stats Grid */
.wm-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.wm-stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wm-stat-card .dash-card-content {
  flex: 1;
}

.wm-stat-card .dash-card-footer {
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

/* Card Icon Colors */
.dash-card-icon.red {
  background: #fef2f2;
  color: #ef4444;
}

.dash-card-icon.purple {
  background: #faf5ff;
  color: #a855f7;
}

.dash-card-icon.cyan {
  background: #ecfeff;
  color: #06b6d4;
}

/* Trend Indicators */
.dash-card-trend {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-card-trend.up {
  color: #16a34a;
}

.dash-card-trend.down {
  color: #ef4444;
}

/* Filter Card */
.wm-filter-card {
  margin-bottom: 24px;
}

.wm-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.wm-filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.wm-filter-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.wm-filter-search-icon svg {
  width: 18px;
  height: 18px;
}

.wm-filter-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.wm-filter-search input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wm-filter-search input::placeholder {
  color: #9ca3af;
}

.wm-filter-group {
  position: relative;
}

.wm-filter-select {
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.wm-filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wm-filter-dates {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.wm-filter-date-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wm-filter-date-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.wm-filter-date-input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.wm-filter-date-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table Card */
.wm-table-card {
  margin-bottom: 24px;
}

.wm-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.wm-table-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.wm-table-responsive {
  overflow-x: auto;
}

.wm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.wm-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-align: left;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wm-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #1a1a2e;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
}

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

.wm-table tbody tr:hover {
  background: #f9fafb;
}

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

/* Center toggle in Status column */
.wm-table td:has(.wm-text-switch) {
  text-align: center;
}

.wm-table td:has(.wm-text-switch) .wm-text-switch {
  display: inline-flex;
}

/* Center Status header */
.wm-table th:has([data-i18n="wd_status"]) {
  text-align: center;
}

.wm-text-muted {
  color: #6b7280;
  font-size: 13px;
}

.wm-text-bold {
  font-weight: 600;
}

.wm-address-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: #6b7280;
}

/* Badges */
.wm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.wm-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wm-badge-pending {
  background: #fef3c7;
  color: #d97706;
}

.wm-badge-pending::before {
  background: #d97706;
}

.wm-badge-success {
  background: #dcfce7;
  color: #16a34a;
}

.wm-badge-success::before {
  background: #16a34a;
}

.wm-badge-rejected {
  background: #fee2e2;
  color: #dc2626;
}

.wm-badge-rejected::before {
  background: #dc2626;
}

.wm-badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.wm-badge-danger::before {
  background: #dc2626;
}

/* Action Buttons */
.wm-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wm-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
}

.wm-action-btn:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}

.wm-action-delete:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* Toggle Button (Disable/Enable) */
.wm-toggle-btn.active {
  color: #10b981;
  background: #f0fdf4;
  border-color: #10b981;
}

.wm-toggle-btn.active:hover {
  background: #dcfce7;
  color: #059669;
}

.wm-toggle-btn:not(.active) {
  color: #ef4444;
  background: #fef2f2;
}

.wm-toggle-btn:not(.active):hover {
  background: #fecaca;
  color: #dc2626;
}

/* Toggle Switch */
.wm-status-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wm-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.wm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wm-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  transition: 0.3s;
  border-radius: 22px;
}

.wm-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wm-switch input:checked + .wm-switch-slider {
  background-color: #22c55e;
}

.wm-switch input:checked + .wm-switch-slider:before {
  transform: translateX(18px);
}

.wm-switch input:focus + .wm-switch-slider {
  box-shadow: 0 0 1px #22c55e;
}

/* Text Toggle Switch (ACTIVE/INACTIVE) */
.wm-text-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.wm-text-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.wm-text-switch-slider {
  position: relative;
  display: flex;
  align-items: center;
  width: 100px;
  height: 30px;
  background-color: #ef4444;
  border-radius: 30px;
  transition: 0.3s;
  overflow: hidden;
}

.wm-text-switch-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.wm-text-switch input:checked + .wm-text-switch-slider {
  background-color: #22c55e;
}

.wm-text-switch input:checked + .wm-text-switch-slider:before {
  transform: translateX(70px);
}

.wm-text-switch-text {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: 0.3s;
}

.wm-text-switch-text.active-text {
  left: 10px;
}

.wm-text-switch-text.inactive-text {
  right: 10px;
}

.wm-text-switch input:checked + .wm-text-switch-slider .active-text {
  opacity: 1;
}

.wm-text-switch input:checked + .wm-text-switch-slider .inactive-text {
  opacity: 0;
}

.wm-text-switch input:not(:checked) + .wm-text-switch-slider .active-text {
  opacity: 0;
}

.wm-text-switch input:not(:checked) + .wm-text-switch-slider .inactive-text {
  opacity: 1;
}

/* Confirm Modal */
.wm-confirm-icon {
  margin-bottom: 16px;
}

.wm-confirm-message {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

/* Pagination */
.wm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 10px;
}

.wm-pagination-info {
  font-size: 12px;
  color: #6b7280;
}

.wm-pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.wm-page-btn {
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wm-page-btn:hover:not(.active):not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}

.wm-page-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.wm-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   Modals
   ============================================ */
.wm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.wm-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.wm-modal-overlay.active .wm-modal {
  transform: translateY(0);
}

.wm-modal-sm {
  max-width: 420px;
}

.wm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.wm-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.wm-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6b7280;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.wm-modal-close:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}

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

.wm-modal-body-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.wm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}

.wm-modal-footer-center {
  justify-content: center;
}

/* Form Elements */
.wm-form-group {
  margin-bottom: 16px;
}

.wm-form-group:last-child {
  margin-bottom: 0;
}

.wm-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
}

.wm-form-input,
.wm-form-select {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.wm-form-input:focus,
.wm-form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wm-form-input::placeholder {
  color: #9ca3af;
}

.wm-form-input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.wm-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Amount Input with All Button */
.wm-amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.wm-amount-input {
  width: 100%;
  padding-right: 60px !important;
}

.wm-all-btn {
  position: absolute;
  right: 8px;
  padding: 4px 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wm-all-btn:hover {
  background: #1d4ed8;
}

.wm-all-btn:active {
  transform: scale(0.95);
}

/* Amount Error Message */
.wm-amount-error {
  display: block;
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  min-height: 18px;
}

/* No Wallet Warning */
.wm-no-wallet-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 13px;
  margin-bottom: 16px;
}

.wm-no-wallet-warning svg {
  flex-shrink: 0;
  color: #d97706;
}

/* Input Error State */
.wm-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Disabled Button State */
.dash-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Detail Grid for View Modal */
.wm-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.wm-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wm-detail-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.wm-detail-value {
  font-size: 14px;
  color: #1a1a2e;
  font-weight: 500;
}

/* Responsive for detail grid */
@media (max-width: 480px) {
  .wm-detail-grid {
    grid-template-columns: 1fr;
  }
}

.wm-form-row {
  display: flex;
  gap: 16px;
}

.wm-form-half {
  flex: 1;
}

/* Success Icon */
.wm-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-success-message {
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   Responsive: Withdrawal Management
   ============================================ */
@media (max-width: 1280px) {
  .wm-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .wm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wm-filter-dates {
    width: 100%;
  }

  .wm-filter-date-group {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .wm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .wm-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .wm-filter-search {
    max-width: none;
  }

  .wm-filter-dates {
    flex-direction: column;
  }

  .wm-filter-date-group {
    width: 100%;
  }

  .wm-filter-date-input {
    width: 100%;
    box-sizing: border-box;
  }

  .wm-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wm-export-btn {
    width: 100%;
    justify-content: center;
  }

  .wm-pagination {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .wm-form-row {
    flex-direction: column;
    gap: 0;
  }

  .wm-modal {
    margin: 8px;
    max-height: 95vh;
  }

  /* Mobile Card View for Tables */
  .wm-table-responsive {
    border: none;
  }

  .wm-table thead {
    display: none;
  }

  .wm-table,
  .wm-table tbody,
  .wm-table tr,
  .wm-table td {
    display: block;
    width: 100%;
  }

  .wm-table tr {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .wm-table td {
    padding: 6px 0;
    border: none;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .wm-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    min-width: 100px;
  }

  .wm-table td:last-child {
    justify-content: flex-end;
    border-top: 1px solid #f3f4f6;
    margin-top: 8px;
    padding-top: 12px;
  }

  .wm-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .wm-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .wm-stat-card .dash-card-icon {
    width: 36px;
    height: 36px;
  }

  .wm-stat-card .dash-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .wm-stat-card .dash-card-title {
    font-size: 11px;
  }

  .wm-stat-card .dash-card-value {
    font-size: 18px;
  }

  .dash-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .dash-page-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .dash-page-header-actions .dash-btn {
    flex: 1;
    justify-content: center;
  }

  .wm-table td {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .wm-table td::before {
    min-width: auto;
  }
}

/* ============================================
   Processing Badge (Blue)
   ============================================ */
.wm-badge-processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.wm-badge-processing::before {
  background: #1d4ed8;
}

/* ============================================
   Sticky Table Header
   ============================================ */
.wm-table-responsive {
  position: relative;
}

.wm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafb;
}

.wm-table thead th::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #e5e7eb;
}

/* ============================================
   Search Tabs
   ============================================ */
.wm-search-tabs {
  display: flex;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.wm-search-tab {
  position: relative;
  flex: 1;
  min-width: 0;
}

.wm-search-tab-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.wm-search-tab:first-child .wm-search-tab-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.wm-search-tab:last-child .wm-search-tab-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.wm-search-tab-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  z-index: 1;
  position: relative;
}

.wm-search-tab-input::placeholder {
  color: #9ca3af;
}

.wm-search-tab-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.wm-search-tab-icon svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Wallet Address Tooltip
   ============================================ */
.wm-address-wrapper {
  position: relative;
  display: inline-block;
}

.wm-address-wrapper .wm-address-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #1e293b;
  color: #ffffff;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  word-break: break-all;
  max-width: 320px;
}

.wm-address-wrapper .wm-address-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.wm-address-wrapper:hover .wm-address-tooltip {
  display: block;
}

/* ============================================
   Empty State
   ============================================ */
.wm-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}

.wm-empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

.wm-empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.wm-empty-state-desc {
  font-size: 13px;
  color: #94a3b8;
}

/* ============================================
   User Info (Two-line layout)
   ============================================ */
.wm-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wm-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.wm-user-id {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  line-height: 1.3;
}

/* ============================================
   Filter Bar Improvements
   ============================================ */
.wm-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.wm-filter-bar .wm-filter-group {
  min-width: 140px;
}

/* ============================================
   Responsive: Search Tabs
   ============================================ */
@media (max-width: 768px) {
  .wm-search-tabs {
    flex-direction: column;
    gap: 0;
  }

  .wm-search-tab:first-child .wm-search-tab-input {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
  }

  .wm-search-tab:last-child .wm-search-tab-input {
    border-top-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 8px;
  }
}

/* ============================================
   Responsive: Filter Bar
   ============================================ */
@media (max-width: 1024px) {
  .wm-filter-bar {
    gap: 10px;
  }

  .wm-filter-bar .wm-filter-group {
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .wm-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .wm-filter-bar .wm-filter-group {
    min-width: auto;
    width: 100%;
  }

  .wm-filter-bar .wm-filter-select {
    width: 100%;
  }

  .wm-filter-dates {
    flex-direction: column;
    width: 100%;
  }

  .wm-filter-date-group {
    width: 100%;
  }

  .wm-filter-date-input {
    width: 100%;
    box-sizing: border-box;
  }
}
