/* ===== DASHBOARD MODERN — BRIGHT & RESPONSIVE ===== */

/* ---- PAGE LOAD BAR ---- */
#pageLoadBar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b00, #ffb347);
  z-index: 9999;
  width: 0;
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ---- LAYOUT ---- */
.dash-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: calc(100vh - 72px);
  background: #f4f6f9;
  align-items: start;
}
[data-theme="dark"] .dash-layout { background: #0e0e0e; }

/* ---- SIDEBAR ---- */
.sidebar {
  background: linear-gradient(180deg, #ff6b00 0%, #cc4e00 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.15) !important;
  width: 256px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,0,0.4) transparent;
  flex-shrink: 0;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,107,0,0.4); border-radius: 4px; }

/* ---- SIDEBAR USER ---- */
.sidebar-user {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 6px;
}
.sidebar-avatar {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  border: 2px solid rgba(255,255,255,0.35);
}
.sidebar-username {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-balance {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sidebar-balance span {
  color: #ffffff;
  font-weight: 700;
}

/* ---- NAV SECTIONS ---- */
.sidebar-nav .nav-section {
  padding: 16px 16px 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

/* ---- NAV LINKS ---- */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.18s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  margin: 1px 0;
  min-height: 44px;
}
.sidebar-nav a i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: rgba(255,255,255,0.65);
  transition: color 0.18s ease;
}
.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.15);
  border-left-color: #fff;
}
.sidebar-nav a:hover i { color: #ffffff; }
.sidebar-nav a.active {
  color: #ff6b00;
  background: #ffffff;
  border-left-color: #fff;
  font-weight: 700;
  border-radius: 0 8px 8px 0;
  margin-right: 8px;
}
.sidebar-nav a.active i { color: #ff6b00; }

/* Admin accent — same orange/white scheme */
.admin-sidebar-nav a:hover  { border-left-color: #fff; }
.admin-sidebar-nav a.active { background: #ffffff; color: #ff6b00; border-left-color: #fff; }
.admin-sidebar-nav a.active i { color: #ff6b00; }

/* ---- SIDEBAR OVERLAY ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
  backdrop-filter: blur(3px);
}
.sidebar-overlay.show { display: block; }

/* ---- DASH CONTENT ---- */
.dash-content {
  padding: 28px 28px;
  overflow-x: hidden;
  min-width: 0;
  animation: dashIn 0.28s ease;
}
@keyframes dashIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- DASH HEADER ---- */
.dash-header { margin-bottom: 22px; }
.dash-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.dash-header p {
  color: var(--text2);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* ---- SIDEBAR TOGGLE (mobile) ---- */
#sidebarToggle {
  display: none;
  margin-bottom: 14px;
  background: #ff6b00;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 8px;
  cursor: pointer;
  align-items: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255,107,0,0.35);
}
#sidebarToggle i { font-size: 0.9rem; }

/* ---- METRICS GRID ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: rgba(255,107,0,0.2);
}
[data-theme="dark"] .metric-card {
  background: #1a1a2e;
  border-color: rgba(255,255,255,0.07);
}
.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.metric-icon.orange { background: rgba(255,107,0,0.12); color: #ff6b00; }
.metric-icon.green  { background: rgba(34,197,94,0.12);  color: #16a34a; }
.metric-icon.blue   { background: rgba(59,130,246,0.12); color: #2563eb; }
.metric-icon.purple { background: rgba(139,92,246,0.12); color: #7c3aed; }
.metric-icon.cyan   { background: rgba(6,182,212,0.12);  color: #0891b2; }
.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 3px;
  font-weight: 500;
}

/* ---- CARDS ---- */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.09); }
[data-theme="dark"] .card {
  background: #1a1a2e;
  border-color: rgba(255,255,255,0.07);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-wrap: wrap;
  gap: 10px;
}
[data-theme="dark"] .card-header { border-bottom-color: rgba(255,255,255,0.07); }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { color: #ff6b00; }

/* ---- TABLES ---- */
.table-wrapper { overflow-x: auto; border-radius: 10px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  background: #f4f6f9;
  color: #6b7280;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="dark"] thead th {
  background: #12122a;
  color: rgba(255,255,255,0.4);
  border-bottom-color: rgba(255,255,255,0.07);
}
tbody tr { border-bottom: 1px solid rgba(0,0,0,0.04); transition: background 0.15s ease; }
[data-theme="dark"] tbody tr { border-bottom-color: rgba(255,255,255,0.05); }
tbody tr:hover { background: rgba(255,107,0,0.04); }
tbody td { padding: 12px 16px; color: var(--text); vertical-align: middle; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-pending     { background: rgba(234,179,8,0.13);  color: #b45309; }
.badge-processing  { background: rgba(59,130,246,0.13); color: #1d4ed8; animation: pulse 1.5s infinite; }
.badge-in_progress { background: rgba(255,107,0,0.13);  color: #c2410c; animation: pulse 1.5s infinite; }
.badge-completed   { background: rgba(34,197,94,0.13);  color: #15803d; }
.badge-partial     { background: rgba(234,179,8,0.13);  color: #b45309; }
.badge-canceled    { background: rgba(239,68,68,0.13);  color: #b91c1c; }
.badge-refunded    { background: rgba(239,68,68,0.09);  color: #b91c1c; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg,#ff6b00,#ff8c38); color:#fff; box-shadow:0 4px 14px rgba(255,107,0,0.3); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(255,107,0,0.4); color:#fff; }
.btn-accent  { background: linear-gradient(135deg,#ffb347,#ff8c38); color:#1a0800; }
.btn-accent:hover { transform:translateY(-2px); color:#1a0800; }
.btn-outline { background:transparent; color:var(--text2); border:1.5px solid rgba(0,0,0,0.14); }
[data-theme="dark"] .btn-outline { border-color:rgba(255,255,255,0.15); color:rgba(255,255,255,0.7); }
.btn-outline:hover { border-color:#ff6b00; color:#ff6b00; background:rgba(255,107,0,0.06); }
.btn-danger  { background:#ef4444; color:#fff; }
.btn-danger:hover  { background:#dc2626; color:#fff; }
.btn-success { background:#22c55e; color:#fff; }
.btn-sm  { padding:7px 14px; font-size:0.8rem; border-radius:7px; }
.btn-lg  { padding:13px 28px; font-size:0.95rem; }
.btn-block { width:100%; justify-content:center; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.11);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="dark"] .form-control { background:#1e1e3a; border-color:rgba(255,255,255,0.1); color:#f0f0f0; }
.form-control:focus { outline:none; border-color:#ff6b00; box-shadow:0 0 0 3px rgba(255,107,0,0.12); }
.form-hint { font-size:0.78rem; color:var(--text2); margin-top:5px; }
.form-row  { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: dashIn 0.3s ease;
}
.alert-success { background:rgba(34,197,94,0.1);  border:1px solid rgba(34,197,94,0.3);  color:#15803d; }
.alert-error   { background:rgba(239,68,68,0.1);  border:1px solid rgba(239,68,68,0.3);  color:#b91c1c; }
.alert-info    { background:rgba(59,130,246,0.1); border:1px solid rgba(59,130,246,0.3); color:#1d4ed8; }
.alert-warning { background:rgba(234,179,8,0.1);  border:1px solid rgba(234,179,8,0.3);  color:#b45309; }

/* ---- COST PREVIEW ---- */
.cost-preview {
  background: #f4f6f9;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  display: none;
  animation: dashIn 0.25s ease;
}
[data-theme="dark"] .cost-preview { background:#1e1e3a; border-color:rgba(255,255,255,0.08); }
.cost-preview.show { display: block; }
.cost-row { display:flex; justify-content:space-between; font-size:0.875rem; padding:4px 0; color:var(--text2); }
.cost-row.total { font-weight:700; font-size:1rem; border-top:1px solid rgba(0,0,0,0.07); margin-top:8px; padding-top:10px; color:#ff6b00; }

/* ---- PAYMENT CARDS ---- */
.payment-methods { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; margin-bottom:20px; }
.payment-card {
  background: #fff;
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="dark"] .payment-card { background:#1e1e3a; border-color:rgba(255,255,255,0.09); }
.payment-card:hover, .payment-card.selected { border-color:#ff6b00; background:rgba(255,107,0,0.05); transform:translateY(-3px); box-shadow:0 8px 24px rgba(255,107,0,0.15); }
.payment-card i  { font-size:1.9rem; margin-bottom:9px; color:#ff6b00; }
.payment-card h4 { font-size:0.88rem; font-weight:700; color:var(--text); }
.payment-card p  { font-size:0.74rem; color:var(--text2); margin-top:3px; }

/* ---- QUICK ACTIONS ---- */
.quick-actions { display:flex; gap:10px; margin-bottom:22px; flex-wrap:wrap; }

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .dash-layout  { grid-template-columns: 220px 1fr; }
  .dash-content { padding: 22px 20px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* Mobile — sidebar becomes a drawer */
@media (max-width: 768px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar drawer */
  .sidebar {
    position: fixed !important;
    left: -280px;
    top: 0;
    width: 270px !important;
    height: 100vh !important;
    z-index: 999;
    transition: left 0.26s cubic-bezier(0.4,0,0.2,1);
    top: 0 !important;
    padding-top: 16px;
  }
  .sidebar.open { left: 0 !important; }

  /* Show toggle button */
  #sidebarToggle { display: inline-flex; }

  .dash-content { padding: 14px 14px; }
  .dash-header h1 { font-size: 1.3rem; }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric-card  { padding: 14px 12px; gap: 10px; }
  .metric-icon  { width: 40px; height: 40px; font-size: 1rem; border-radius: 10px; }
  .metric-value { font-size: 1.35rem; }
  .metric-label { font-size: 0.74rem; }

  .card { padding: 16px; border-radius: 12px; }
  .card-header { padding-bottom: 12px; margin-bottom: 14px; }

  .quick-actions .btn { flex: 1 1 calc(50% - 5px); justify-content: center; }

  .form-row { grid-template-columns: 1fr; gap: 0; }

  thead th { padding: 10px 12px; font-size: 0.68rem; }
  tbody td { padding: 10px 12px; font-size: 0.82rem; }

  /* Sidebar nav bigger tap targets on mobile */
  .sidebar-nav a { padding: 13px 16px; font-size: 0.95rem; min-height: 48px; }
  .sidebar-nav a i { font-size: 1rem; width: 22px; }
  .sidebar-nav .nav-section { font-size: 0.65rem; padding: 14px 16px 4px; }
  .sidebar-username { font-size: 1rem; }
  .sidebar-balance  { font-size: 0.82rem; }
  .sidebar-avatar   { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .dash-content { padding: 12px 10px; }
  .dash-header h1 { font-size: 1.15rem; }
  .dash-header p  { font-size: 0.82rem; }

  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card  { padding: 12px 10px; gap: 8px; border-radius: 12px; }
  .metric-icon  { width: 36px; height: 36px; font-size: 0.9rem; }
  .metric-value { font-size: 1.2rem; }
  .metric-label { font-size: 0.7rem; }

  .card { padding: 14px 12px; }
  .btn  { padding: 9px 16px; font-size: 0.84rem; }
  .btn-sm { padding: 7px 12px; font-size: 0.78rem; }
  .btn-lg { padding: 11px 20px; font-size: 0.9rem; }

  .quick-actions .btn { flex: 1 1 100%; }

  table { font-size: 0.78rem; }
  thead th { padding: 9px 10px; font-size: 0.65rem; }
  tbody td { padding: 9px 10px; }
}

/* ---- SPINNER ---- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   MOBILE PROFESSIONAL & SWIPEABLE ENHANCEMENTS
   ===================================================== */

/* ---- SWIPEABLE METRICS ROW (mobile) ---- */
@media (max-width: 768px) {
  .metrics-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .metrics-grid::-webkit-scrollbar { display: none; }
  .metric-card {
    min-width: 150px;
    flex-shrink: 0;
    scroll-snap-align: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
  }
  .metric-icon { width: 40px; height: 40px; font-size: 1rem; border-radius: 10px; }
  .metric-value { font-size: 1.4rem; }
  .metric-label { font-size: 0.75rem; }
}

/* ---- SWIPEABLE QUICK ACTIONS (mobile) ---- */
@media (max-width: 768px) {
  .quick-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .quick-actions::-webkit-scrollbar { display: none; }
  .quick-actions .btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    white-space: nowrap;
    flex: unset;
  }
}

/* ---- MOBILE ORDER CARDS (replaces table on small screens) ---- */
@media (max-width: 640px) {
  /* Hide table, show cards */
  .mobile-order-cards { display: flex; flex-direction: column; gap: 10px; }
  .mobile-order-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  }
  [data-theme="dark"] .mobile-order-card {
    background: #1a1a2e;
    border-color: rgba(255,255,255,0.07);
  }
  .mobile-order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .mobile-order-card-id {
    font-weight: 800;
    font-size: 0.9rem;
    color: #ff6b00;
  }
  .mobile-order-card-service {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
  }
  .mobile-order-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text2);
  }
  .mobile-order-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f4f6f9;
    padding: 3px 8px;
    border-radius: 6px;
  }
  [data-theme="dark"] .mobile-order-card-meta span {
    background: rgba(255,255,255,0.07);
  }
  /* Hide desktop table on mobile */
  .desktop-table { display: none; }
}
@media (min-width: 641px) {
  .mobile-order-cards { display: none; }
  .desktop-table { display: block; }
}

/* ---- NEW ORDER PAGE — stack on mobile ---- */
@media (max-width: 768px) {
  .new-order-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .new-order-sidebar { order: -1; }
  .new-order-sidebar .card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .new-order-sidebar .card .card-title { margin-bottom: 0 !important; }
}

/* ---- ADD FUNDS PAGE — stack on mobile ---- */
@media (max-width: 768px) {
  .add-funds-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  /* Balance card goes to top on mobile */
  .add-funds-sidebar { order: -1; }
  .add-funds-sidebar .card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  /* Preset amount buttons scroll horizontally */
  .preset-amounts {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .preset-amounts::-webkit-scrollbar { display: none; }
  .preset-amounts .btn { flex-shrink: 0; }
  /* Payment method cards — 2 per row */
  .payment-methods {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .payment-card { padding: 14px 10px; }
  .payment-card i { font-size: 1.6rem; margin-bottom: 6px; }
  .payment-card h4 { font-size: 0.82rem; }
  .payment-card p  { font-size: 0.7rem; }
}

/* ---- TRANSACTION TABLE → CARDS on mobile ---- */
@media (max-width: 640px) {
  .txn-table-wrap { display: none; }
  .txn-cards { display: flex; flex-direction: column; gap: 8px; }
  .txn-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  [data-theme="dark"] .txn-card { background: #1a1a2e; border-color: rgba(255,255,255,0.07); }
  .txn-card-left { flex: 1; min-width: 0; }
  .txn-card-method { font-size: 0.78rem; font-weight: 600; color: var(--text2); }
  .txn-card-date   { font-size: 0.72rem; color: var(--text2); margin-top: 2px; }
  .txn-card-amount { font-size: 1rem; font-weight: 800; }
  .txn-card-amount.credit { color: #16a34a; }
  .txn-card-amount.debit  { color: #dc2626; }
}
@media (min-width: 641px) {
  .txn-cards { display: none; }
  .txn-table-wrap { display: block; }
}

/* ---- DASH HEADER — compact on mobile ---- */
@media (max-width: 480px) {
  .dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
  .dash-header h1 { font-size: 1.1rem; }
  .dash-header p  { font-size: 0.8rem; width: 100%; }
}

/* ---- SCROLL HINT FADE (right edge) ---- */
.scroll-fade-wrap {
  position: relative;
}
.scroll-fade-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, #f4f6f9, transparent);
  pointer-events: none;
  border-radius: 0 14px 14px 0;
}
[data-theme="dark"] .scroll-fade-wrap::after {
  background: linear-gradient(to left, #0e0e0e, transparent);
}
@media (min-width: 769px) {
  .scroll-fade-wrap::after { display: none; }
}

/* ---- ADD FUNDS SIDEBAR — desktop ---- */
.add-funds-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 768px) {
  .add-funds-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 16px;
  }
  .add-funds-sidebar p { display: none; }
}
