/*
 * Oaktree Payments - Custom Styles
 */

/* === Color Palette === */
:root {
  /* Brand axis (Oaktree Payments — extracted from logo) */
  --brand-900: #0d3324;
  --brand-700: #177a3d;
  --brand-500: #1ea150;
  --brand-300: #34c759;
  --brand-50:  #eaf6ee;

  /* Primary mapped to brand green */
  --primary: var(--brand-500);
  --primary-light: var(--brand-300);
  --primary-dark: var(--brand-700);

  /* Secondary - Teal (kept distinct for crypto/tech accents) */
  --secondary: #0d9488;
  --secondary-light: #14b8a6;
  --secondary-dark: #0f766e;

  /* Accent - deep brand surface for premium accents */
  --accent: var(--brand-900);
  --accent-light: var(--brand-700);

  /* Neutral Colors */
  --dark: #0f1726;
  --light: #f9fafb;
  --border: #e3eae5;

  /* Status Colors (deliberately non-green to stay distinguishable) */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* === Theme Colors (Light) === */
  --body-bg: #f7f9f7;
  --body-color: #0f1726;
  --heading-color: #0f1726;
  --text-muted: #5f6b75;
  --text-secondary: #8a96a3;
  --text-tertiary: #94a3b8;

  --surface: #ffffff;
  --surface-hover: #f1f5f1;
  --surface-alt: #eef3ef;
  --surface-inset: #f7f9f7;
  --border-color: #e3eae5;
  --border-light: #eef3ef;
  --border-subtle: #f1f5f1;

  --navbar-bg: #ffffff;
  --navbar-border: rgba(0, 0, 0, 0.08);
  --footer-bg: #ffffff;
  --nav-text: rgba(0, 0, 0, 0.65);
  --nav-text-strong: rgba(0, 0, 0, 0.92);
  --nav-overlay: rgba(0, 0, 0, 0.05);
  --nav-overlay-strong: rgba(0, 0, 0, 0.08);
  --nav-border-subtle: rgba(0, 0, 0, 0.1);
  --footer-text: rgba(0, 0, 0, 0.55);
  --footer-text-soft: rgba(0, 0, 0, 0.4);

  --input-bg: #fff;
  --input-border: #d1d5db;
  --input-color: #0f1726;
  --input-placeholder: #c0c7d0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  --code-bg: #eef3ef;
  --code-color: var(--brand-700);

  --auth-header-bg: var(--brand-900);

  /* Override Bootstrap's primary so utility classes (.text-primary, .btn-info, etc.) use brand green */
  --bs-primary: var(--brand-500);
  --bs-primary-rgb: 30, 161, 80;
  --bs-link-color: var(--brand-700);
  --bs-link-color-rgb: 23, 122, 61;
  --bs-link-hover-color: var(--brand-900);
}

/* === Dark Theme === */
[data-theme="dark"] {
  /* In dark mode, primary brightens for AA contrast on dark surfaces */
  --primary: var(--brand-300);
  --primary-light: #5dd47b;
  --primary-dark: var(--brand-500);
  --accent: var(--brand-700);
  --accent-light: var(--brand-300);

  --body-bg: #0a1f17;
  --body-color: #e2eae5;
  --heading-color: #f1f7f3;
  --text-muted: #9ab0a4;
  --text-secondary: #7a8c83;
  --text-tertiary: #5a6c64;

  --surface: #13322a;
  --surface-hover: #1c4a3c;
  --surface-alt: #13322a;
  --surface-inset: #0a1f17;
  --border-color: #1f4536;
  --border-light: #163a2e;
  --border-subtle: #122c24;

  /* Chrome bg matches the logo JPG's baked-in background (#032d23) so the
     logo edges blend invisibly with the navbar/footer surface. */
  --navbar-bg: #032d23;
  --navbar-border: rgba(255, 255, 255, 0.08);
  --footer-bg: #032d23;
  --nav-text: rgba(255, 255, 255, 0.65);
  --nav-text-strong: #ffffff;
  --nav-overlay: rgba(255, 255, 255, 0.06);
  --nav-overlay-strong: rgba(255, 255, 255, 0.1);
  --nav-border-subtle: rgba(255, 255, 255, 0.1);
  --footer-text: rgba(255, 255, 255, 0.4);
  --footer-text-soft: rgba(255, 255, 255, 0.35);

  --input-bg: #13322a;
  --input-border: #2d5746;
  --input-color: #e2eae5;
  --input-placeholder: #6c8077;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);

  --code-bg: #1c4a3c;
  --code-color: var(--brand-300);

  --auth-header-bg: var(--brand-900);

  /* In dark mode, Bootstrap utility classes brighten for contrast */
  --bs-primary: var(--brand-300);
  --bs-primary-rgb: 52, 199, 89;
  --bs-link-color: var(--brand-300);
  --bs-link-color-rgb: 52, 199, 89;
  --bs-link-hover-color: #5dd47b;

  color-scheme: dark;
}

/* === Typography === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--body-color);
  background-color: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: -0.02em;
}

/* === Navigation Bar === */
.navbar-dark {
  background: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--navbar-border);
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-brand-logo {
  height: 72px;
  width: auto;
  display: block;
}

.navbar-brand-logo--dark-theme { display: none; }
[data-theme="dark"] .navbar-brand-logo--light-theme { display: none; }
[data-theme="dark"] .navbar-brand-logo--dark-theme { display: block; }

/* Toggler icon — Bootstrap's navbar-dark renders a white SVG; in light mode, swap to a dark stroke */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.65%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  padding: 0.5rem 0.875rem !important;
  border-radius: 8px;
  color: var(--nav-text) !important;
}

.nav-link:hover {
  color: var(--nav-text-strong) !important;
  background: var(--nav-overlay);
}

.nav-link.active-nav {
  color: var(--nav-text-strong) !important;
  background: var(--nav-overlay-strong);
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem !important;
  border-radius: 10px !important;
  border: 1px solid var(--nav-border-subtle) !important;
  transition: all 0.2s ease;
}

.nav-user-btn:hover {
  background: var(--nav-overlay) !important;
  border-color: var(--nav-overlay-strong) !important;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0d3324, #1ea150);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.nav-user-email {
  font-size: 0.8rem;
  color: var(--nav-text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Language switcher pill */
.lang-switcher .nav-link {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem !important;
  border: 1px solid var(--nav-border-subtle);
  border-radius: 8px;
}

.lang-switcher .nav-link:hover {
  border-color: var(--nav-overlay-strong);
}

/* === Buttons === */
.btn-primary-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  border-color: var(--brand-500);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%);
  border-color: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 161, 80, 0.3);
  color: white;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* === Auth Cards === */
.auth-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 480px;
  width: 100%;
}

.auth-card-header {
  background: #0d3324;
  padding: 2.5rem 2rem;
  text-align: center;
  color: white;
}

.auth-card-header i {
  font-size: 3rem;
  color: var(--brand-300);
  margin-bottom: 1rem;
}

.auth-card-header h2 {
  color: white;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.auth-card-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.auth-card-body {
  padding: 2.5rem 2rem;
}

/* === Form Styling === */
.form-label {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-control {
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(30, 161, 80, 0.12);
}

.form-check-input {
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  cursor: pointer;
  font-weight: 500;
  color: var(--body-color);
}

/* === Links === */
.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* === Alerts (fallback) === */
.alert {
  border-radius: 0.75rem;
  border: none;
  font-weight: 500;
}

.alert-info {
  background-color: var(--brand-50);
  color: var(--brand-700);
  border-color: rgba(30, 161, 80, 0.25);
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 420px;
  width: calc(100% - 2rem);
}

.toast-notification {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid transparent;
  transform: translateX(110%);
  opacity: 0;
  transition: none;
}

.toast-notification.toast-visible {
  animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.toast-notification.toast-hiding {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
}

.toast-body {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.8rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
}

.toast-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

/* Toast variants */
.toast-success {
  border-left-color: #10b981;
}

.toast-success .toast-icon {
  color: #10b981;
}

.toast-warning {
  border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-danger {
  border-left-color: #ef4444;
}

.toast-danger .toast-icon {
  color: #ef4444;
}

.toast-info {
  border-left-color: var(--info);
}

.toast-info .toast-icon {
  color: var(--info);
}

/* === Dropdown Menu === */
.dropdown-menu {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 0.5rem;
  min-width: 220px;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--brand-500);
  color: #fff;
}

.dropdown-item.active i,
.dropdown-item:active i {
  color: #fff;
}

.dropdown-item i {
  width: 20px;
  text-align: center;
}

.dropdown-header {
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-divider {
  margin: 0.5rem 0;
}

/* === Footer === */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--navbar-border);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-logo {
  height: 56px;
  width: auto;
  display: block;
}

.footer-brand-logo--dark-theme { display: none; }
[data-theme="dark"] .footer-brand-logo--light-theme { display: none; }
[data-theme="dark"] .footer-brand-logo--dark-theme { display: block; }

.footer-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--footer-text);
  font-size: 0.8rem;
}

.footer-trust i {
  color: #10b981;
  font-size: 0.75rem;
}

.footer-copyright {
  color: var(--footer-text-soft);
  font-size: 0.78rem;
}

/* === Home Page Hero === */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--accent) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.hero-section h1 {
  color: white;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero-icon {
  font-size: 4rem;
  color: var(--secondary-light);
  margin-bottom: 2rem;
}

/* === Feature Cards === */
.feature-card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-300);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 1.75rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--heading-color);
}

.feature-card p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* === Error Messages === */
.field_with_errors {
  display: inline;
}

.field_with_errors .form-control {
  border-color: var(--danger);
}

#error_explanation {
  background-color: #fee2e2;
  border: 2px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

#error_explanation h2 {
  color: #991b1b;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#error_explanation ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #991b1b;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .auth-card-body {
    padding: 2rem 1.5rem;
  }

  .auth-card-header {
    padding: 2rem 1.5rem;
  }
}

/* === Utilities === */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === OTP Input Styling === */
.otp-input {
  font-family: 'Courier New', monospace;
  text-align: center;
  font-size: 2rem;
  letter-spacing: 1rem;
  font-weight: bold;
  padding: 1rem;
}

.otp-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Remove number input spinners */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-input[type=number] {
  -moz-appearance: textfield;
}

/* Dashboard Stats Icons */
.stat-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* Clickable Row / Card */
.clickable {
  cursor: pointer;
}

/* Flash message slide-out animation */
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slide-out {
  animation: slideOut 0.3s ease-out;
}

/* Avatar Circle */
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ============================================================
   DASHBOARDS — Modern component system
   ============================================================ */

/* Page header */
.dash-header {
  margin-bottom: 2rem;
}

.dash-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.15rem;
}

.dash-header p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

.dash-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-greeting-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-greeting-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

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

.stat-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  border-color: var(--brand-300);
  box-shadow: 0 4px 12px rgba(30, 161, 80, 0.08);
  color: inherit;
  text-decoration: none;
}

.stat-card-active {
  border-color: var(--brand-500);
  box-shadow: 0 4px 16px rgba(30, 161, 80, 0.15);
  background: var(--brand-50);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-card-icon.blue    { background: #eff6ff; color: #3b82f6; }
.stat-card-icon.green   { background: #ecfdf5; color: #10b981; }
.stat-card-icon.amber   { background: #fffbeb; color: #f59e0b; }
.stat-card-icon.purple  { background: #f5f3ff; color: #8b5cf6; }
.stat-card-icon.rose    { background: #fff1f2; color: #f43f5e; }
.stat-card-icon.cyan    { background: #ecfeff; color: #06b6d4; }
.stat-card-icon.teal    { background: #f0fdfa; color: #0d9488; }

.stat-card-info {
  min-width: 0;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.stat-card-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-value.small-value {
  font-size: 0.95rem;
}

.stat-card-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard tabs */
.dash-tabs {
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.dash-tab:hover:not(.active) {
  color: #475569;
  background: rgba(255, 255, 255, 0.5);
}

.dash-tab.active {
  background: white;
  color: var(--brand-700);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dash-tab i {
  font-size: 1rem;
}

.dash-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.dash-tab.active .dash-tab-count {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Dashboard tab panes */
.dash-tab-pane {
  display: none;
}

.dash-tab-pane.active {
  display: block;
  animation: dashFadeIn 0.25s ease;
}

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

/* Quick access bar */
.quick-bar {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.quick-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.quick-bar-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.quick-bar-icon.blue   { background: #eff6ff; color: #3b82f6; }
.quick-bar-icon.red    { background: #fef2f2; color: #ef4444; }
.quick-bar-icon.green  { background: #ecfdf5; color: #10b981; }
.quick-bar-icon.amber  { background: #fffbeb; color: #f59e0b; }
.quick-bar-icon.purple { background: #f5f3ff; color: #8b5cf6; }

.quick-bar-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
}

.quick-bar-meta {
  font-size: 0.78rem;
  color: #6b7280;
}

.quick-bar-right {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Action buttons */
.btn-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.475rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1.5px solid #e2e8f0;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-dash:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  background: var(--brand-50);
  text-decoration: none;
}

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

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

.btn-dash.success {
  border-color: #d1fae5;
  color: #059669;
  background: #ecfdf5;
}

.btn-dash.success:hover {
  background: #d1fae5;
}

.btn-dash:disabled,
.btn-dash[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.btn-dash:disabled:hover,
.btn-dash[disabled]:hover {
  background: white;
  border-color: #e2e8f0;
  color: #374151;
}

.btn-dash.primary:disabled:hover,
.btn-dash.primary[disabled]:hover {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* Panel cards */
.dash-panel {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.dash-panel-header.collapsible-toggle {
  cursor: pointer;
  user-select: none;
}

.dash-panel-header.collapsible-toggle:hover {
  background-color: rgba(148, 163, 184, 0.08);
}

.collapsible-icon {
  transition: transform 0.28s ease;
  color: #6b7280;
  font-size: 0.9rem;
}

.collapsible-icon-collapsed {
  transform: rotate(-90deg);
}

.collapsible-content {
  overflow: hidden;
  max-height: 4000px;
  opacity: 1;
  transition: max-height 0.32s ease, opacity 0.22s ease, padding 0.32s ease;
}

.collapsible-content-collapsed {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.dash-panel--collapsed .dash-panel-header {
  border-bottom-color: transparent;
  transition: border-bottom-color 0.32s ease;
}

.dash-panel-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.dash-panel-title i {
  color: #6b7280;
  font-size: 1rem;
}

.dash-panel-body {
  padding: 1.25rem;
}

.dash-panel-body.flush {
  padding: 0;
}

/* Tables */
.dash-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.dash-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.dash-table td {
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f8fafc;
  color: #374151;
  vertical-align: middle;
}

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

.dash-table tbody tr:hover {
  background: #f8fafc;
}

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

.dash-table .border-top-2 td {
  border-top: 2px solid var(--border-color);
}

.settlement-payout-amount {
  font-size: 2rem;
  color: var(--dash-primary, var(--brand-700));
}

.dash-table .clickable {
  cursor: pointer;
}

.dash-table .cell-mono {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--brand-700);
  font-weight: 600;
}

.dash-table .cell-muted {
  color: #9ca3af;
  font-size: 0.78rem;
}

.dash-table .cell-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Badges */
.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-badge.green  { background: #ecfdf5; color: #059669; }
.dash-badge.amber  { background: #fffbeb; color: #d97706; }
.dash-badge.red    { background: #fef2f2; color: #dc2626; }
.dash-badge.blue   { background: #eff6ff; color: #2563eb; }
.dash-badge.purple { background: #f5f3ff; color: #7c3aed; }
.dash-badge.gray   { background: #f3f4f6; color: #6b7280; }

/* Profile card items */
.profile-item {
  margin-bottom: 0.875rem;
}

.profile-item:last-child {
  margin-bottom: 0;
}

.profile-item-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.profile-item-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
}

/* User row (avatar + name/email) */
.user-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-row-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.user-row-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1f2937;
}

.user-row-sub {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* System status list */
.status-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f8fafc;
}

.status-list-item:last-child {
  border-bottom: none;
}

.status-list-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.status-list-left i {
  font-size: 0.9rem;
}

/* Quick actions row */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* Empty state */
.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
}

.dash-empty i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}

.dash-empty p {
  font-size: 0.875rem;
  margin: 0;
}

/* KYC alert banner — uses sky-blue info palette to stay distinct from brand green */
.kyc-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.kyc-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--info);
  font-size: 1.15rem;
}

.kyc-alert-body h6 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #075985;
  margin: 0 0 0.25rem;
}

.kyc-alert-body p {
  font-size: 0.8rem;
  color: #075985;
  margin: 0 0 0.5rem;
  opacity: 0.85;
}

/* Dashboard 2-column layout */
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dash-columns.main-sidebar {
  grid-template-columns: 1fr 340px;
}

.dash-columns.sidebar-main {
  grid-template-columns: 340px 1fr;
}

@media (max-width: 991px) {
  .dash-columns,
  .dash-columns.main-sidebar,
  .dash-columns.sidebar-main {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CHECKOUT — Stripe-inspired modern design
   ============================================================ */

/* Layout */
.checkout-page {
  padding: 2rem 1rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.checkout-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.checkout-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.checkout-header p {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

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

/* Payment method selector (segmented control) */
.payment-method-selector {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 2rem;
}

.payment-method-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
}

.payment-method-option i {
  font-size: 1.1rem;
}

.payment-method-option.active {
  background: white;
  color: #1e3a8a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.payment-method-option:hover:not(.active) {
  color: #475569;
}

/* Form panel */
.checkout-form-panel {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.checkout-form-body {
  padding: 2rem;
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.form-section-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 1.75rem 0;
}

/* Form fields */
.checkout-field {
  margin-bottom: 1.25rem;
}

.checkout-field:last-child {
  margin-bottom: 0;
}

.checkout-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.checkout-label .required {
  color: #ef4444;
  margin-left: 2px;
}

.checkout-label .optional-tag {
  font-weight: 400;
  color: #9ca3af;
  font-size: 0.8rem;
}

.checkout-input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.875rem;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: #1f2937;
  background-color: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.checkout-input::placeholder {
  color: #c0c7d0;
}

.checkout-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.checkout-input.is-valid {
  border-color: #10b981;
}

.checkout-input.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.checkout-input.is-invalid {
  border-color: #ef4444;
}

.checkout-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

textarea.checkout-input {
  resize: vertical;
  min-height: 64px;
}

select.checkout-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  padding-right: 2.25rem;
}

/* Amount input group */
.amount-input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.amount-input-group:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.amount-prefix,
.amount-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  border: none;
}

.amount-prefix {
  border-right: 1px solid #e5e7eb;
}

.amount-suffix {
  border-left: 1px solid #e5e7eb;
}

.amount-input-group input,
.checkout-amount-input {
  flex: 1;
  border: none;
  padding: 0.7rem 0.875rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  outline: none;
  background: white;
  min-width: 0;
}

.amount-input-group input::placeholder {
  color: #c0c7d0;
  font-weight: 400;
}

.amount-hint {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

/* Row helpers */
.checkout-row {
  display: grid;
  gap: 0.75rem;
}

.checkout-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.checkout-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 480px) {
  .checkout-row.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
  .checkout-row.cols-3 .checkout-field:last-child {
    grid-column: span 2;
  }
}

/* Card number with icon */
.card-number-wrapper {
  position: relative;
}

.card-type-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* Interactive card preview */
.card-preview {
  perspective: 1000px;
  margin-bottom: 1.75rem;
}

.card-preview-inner {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.586;
  margin: 0 auto;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 20px 40px -12px rgba(102, 126, 234, 0.35);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-preview-inner:hover {
  transform: translateY(-4px) rotateX(2deg);
  box-shadow: 0 25px 50px -12px rgba(102, 126, 234, 0.4);
}

.card-preview-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.card-chip {
  width: 45px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e8d5b0 0%, #c9a96e 100%);
  position: relative;
  overflow: hidden;
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1px;
  background: rgba(0,0,0,0.15);
}

.card-chip::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(0,0,0,0.15);
}

.card-preview-number {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  font-family: 'Courier New', monospace;
  margin: 0.5rem 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card-preview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.card-preview-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-preview-expiry .expiry-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 2px;
}

.card-preview-expiry .expiry-value {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.card-preview-type {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.9;
  z-index: 1;
}

/* Card type color variants */
.card-preview-inner[data-card-type="VISA"] {
  background: linear-gradient(135deg, #1a1f71 0%, #2d3494 100%);
}

.card-preview-inner[data-card-type="MASTERCARD"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.card-preview-inner[data-card-type="AMEX"] {
  background: linear-gradient(135deg, #006fcf 0%, #00aeef 100%);
}

.card-preview-inner[data-card-type="DISCOVER"] {
  background: linear-gradient(135deg, #ff6000 0%, #f7941d 100%);
}

/* Pay button */
.checkout-submit {
  margin-top: 1.75rem;
}

.pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  cursor: pointer;
  transition: all 0.25s ease;
}

.pay-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  color: white;
}

.pay-button:active:not(:disabled) {
  transform: translateY(0);
}

.pay-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pay-button .pay-amount {
  font-variant-numeric: tabular-nums;
}

.pay-button-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: 2px solid #6366f1;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #6366f1;
  background: white;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pay-button-outline:hover:not(:disabled) {
  background: #f5f3ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

/* Sidebar */
.checkout-sidebar {
  position: sticky;
  top: 1.5rem;
}

@media (max-width: 991px) {
  .checkout-sidebar {
    position: static;
    order: -1;
  }
}

.sidebar-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.sidebar-section {
  padding: 1.5rem;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid #f1f5f9;
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 1rem;
}

/* User info */
.user-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-info-details {
  min-width: 0;
}

.user-info-details .user-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-details .user-email {
  color: #6b7280;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* KYC badges */
.kyc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.kyc-badge-verified {
  background: #ecfdf5;
  color: #059669;
}

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

/* Live amount summary */
.summary-amount {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
}

.summary-amount.summary-total {
  border-top: 2px solid #e2e8f0;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.summary-label {
  color: #6b7280;
  font-size: 0.875rem;
}

.summary-value {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.summary-total .summary-value {
  font-size: 1.25rem;
  color: #1e3a8a;
}

.summary-empty {
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}

/* Security footer */
.security-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.security-footer i {
  color: #10b981;
  font-size: 1rem;
}

.security-footer span {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Accepted cards */
.accepted-cards {
  display: flex;
  gap: 0.5rem;
}

.card-brand-icon {
  width: 40px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #64748b;
}

/* KYC warning */
.kyc-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  margin-top: 0.75rem;
}

.kyc-warning-banner i {
  color: #d97706;
  font-size: 0.9rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.kyc-warning-banner span {
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Redirect info banner */
.redirect-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.redirect-info-banner .info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.redirect-info-banner .info-icon i {
  color: #0284c7;
  font-size: 1rem;
}

.redirect-info-banner p {
  margin: 0;
  color: #0c4a6e;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Security notice */
.security-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.security-notice .security-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-notice .security-icon i {
  color: #10b981;
  font-size: 1.1rem;
}

.security-notice .security-text h6 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.15rem;
}

.security-notice .security-text p {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Tab pane transitions */
.checkout-tab-pane {
  display: none;
}

.checkout-tab-pane.active {
  display: block;
  animation: checkoutFadeIn 0.25s ease;
}

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

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] body,
[data-theme="dark"] {
  background-color: var(--body-bg);
  color: var(--body-color);
}

/* Typography */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--heading-color);
}

[data-theme="dark"] p,
[data-theme="dark"] .dash-header p,
[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

/* Panels */
[data-theme="dark"] .dash-panel {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .dash-panel-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .dash-panel-title {
  color: var(--heading-color);
}

[data-theme="dark"] .dash-panel-title i {
  color: var(--text-muted);
}

/* Tables */
[data-theme="dark"] .dash-table th {
  background: var(--surface-inset);
  color: var(--text-secondary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .dash-table td {
  color: var(--body-color);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .dash-table tbody tr:hover {
  background: var(--surface-hover);
}

[data-theme="dark"] .dash-table .cell-mono {
  color: #a5b4fc;
}

[data-theme="dark"] .dash-table .cell-muted {
  color: var(--text-secondary);
}

[data-theme="dark"] .dash-table .cell-amount {
  color: var(--body-color);
}

/* Stat cards */
[data-theme="dark"] .stat-card {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .stat-card:hover {
  border-color: var(--brand-300);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.18);
}

[data-theme="dark"] .stat-card-active {
  border-color: var(--brand-300);
  background: rgba(52, 199, 89, 0.1);
}

[data-theme="dark"] .stat-card-label {
  color: var(--text-secondary);
}

[data-theme="dark"] .stat-card-value {
  color: var(--heading-color);
}

/* Stat card icon backgrounds (dark variants) */
[data-theme="dark"] .stat-card-icon.blue   { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .stat-card-icon.green  { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .stat-card-icon.amber  { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .stat-card-icon.purple { background: rgba(139, 92, 246, 0.15); }
[data-theme="dark"] .stat-card-icon.teal   { background: rgba(13, 148, 136, 0.15); }
[data-theme="dark"] .stat-card-icon.rose   { background: rgba(244, 63, 94, 0.15); }
[data-theme="dark"] .stat-card-icon.cyan   { background: rgba(6, 182, 212, 0.15); }

/* Badges */
[data-theme="dark"] .dash-badge.green  { background: rgba(16, 185, 129, 0.15); color: #34d399; }
[data-theme="dark"] .dash-badge.amber  { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
[data-theme="dark"] .dash-badge.red    { background: rgba(239, 68, 68, 0.15); color: #f87171; }
[data-theme="dark"] .dash-badge.blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
[data-theme="dark"] .dash-badge.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
[data-theme="dark"] .dash-badge.gray   { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

/* Tabs */
[data-theme="dark"] .dash-tabs {
  background: var(--surface);
}

[data-theme="dark"] .dash-tab {
  color: var(--text-secondary);
}

[data-theme="dark"] .dash-tab:hover:not(.active) {
  color: var(--body-color);
  background: var(--surface-hover);
}

[data-theme="dark"] .dash-tab.active {
  background: var(--surface-hover);
  color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dash-tab-count {
  background: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .dash-tab.active .dash-tab-count {
  background: rgba(52, 199, 89, 0.2);
  color: var(--brand-300);
}

/* Buttons */
[data-theme="dark"] .btn-dash {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--body-color);
}

[data-theme="dark"] .btn-dash:hover {
  border-color: var(--brand-300);
  color: var(--brand-300);
  background: rgba(52, 199, 89, 0.1);
}

[data-theme="dark"] .btn-dash.primary {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

[data-theme="dark"] .btn-dash.primary:hover {
  background: var(--brand-300);
  border-color: var(--brand-300);
}

[data-theme="dark"] .btn-dash.success {
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .btn-dash:disabled:hover,
[data-theme="dark"] .btn-dash[disabled]:hover {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--body-color);
}

[data-theme="dark"] .btn-dash.primary:disabled:hover,
[data-theme="dark"] .btn-dash.primary[disabled]:hover {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* Forms */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .checkout-input {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-color);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .checkout-input::placeholder {
  color: var(--input-placeholder);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .checkout-input:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

[data-theme="dark"] .form-label {
  color: var(--body-color);
}

/* Read-only inputs (e.g. existing-user lookup result) — themed for both modes */
.form-control[readonly]:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.04);
  cursor: not-allowed;
}
[data-theme="dark"] .form-control[readonly]:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--input-color);
  border-color: var(--input-border);
}

/* Amount input group */
[data-theme="dark"] .amount-input-group {
  border-color: var(--input-border);
}

[data-theme="dark"] .amount-prefix,
[data-theme="dark"] .amount-suffix {
  background: var(--surface-alt);
  color: var(--text-muted);
  border-color: var(--border-color);
}

[data-theme="dark"] .amount-input-group input {
  background: var(--input-bg);
  color: var(--input-color);
}

/* Profile items */
[data-theme="dark"] .profile-item-label {
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-item-value {
  color: var(--body-color);
}

/* User rows */
[data-theme="dark"] .user-row-name {
  color: var(--body-color);
}

[data-theme="dark"] .user-row-sub {
  color: var(--text-secondary);
}

/* Status list */
[data-theme="dark"] .status-list-item {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .status-list-left {
  color: var(--body-color);
}

/* Quick bar */
[data-theme="dark"] .quick-bar {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .quick-bar-title {
  color: var(--body-color);
}

[data-theme="dark"] .quick-bar-meta {
  color: var(--text-muted);
}

/* Quick bar icon backgrounds (dark) */
[data-theme="dark"] .quick-bar-icon.blue   { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .quick-bar-icon.red    { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .quick-bar-icon.green  { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .quick-bar-icon.amber  { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .quick-bar-icon.purple { background: rgba(139, 92, 246, 0.15); }

/* Empty states */
[data-theme="dark"] .dash-empty {
  color: var(--text-secondary);
}

/* Toast notifications */
[data-theme="dark"] .toast-notification {
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .toast-body {
  color: var(--body-color);
}

[data-theme="dark"] .toast-close {
  color: var(--text-secondary);
}

[data-theme="dark"] .toast-close:hover {
  background: var(--surface-hover);
  color: var(--body-color);
}

/* Dropdown menu */
[data-theme="dark"] .dropdown-menu {
  background: var(--surface);
  border-color: var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dropdown-item {
  color: var(--body-color);
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--body-color);
}

[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .dropdown-item:active {
  background: var(--brand-500);
  color: #fff;
}

[data-theme="dark"] .dropdown-item.active i,
[data-theme="dark"] .dropdown-item:active i {
  color: #fff;
}

/* Alerts */
[data-theme="dark"] .alert-info {
  background: rgba(52, 199, 89, 0.1);
  color: var(--brand-300);
  border-color: rgba(52, 199, 89, 0.25);
}

[data-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
}

[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Auth pages */
[data-theme="dark"] .auth-container {
  background-color: var(--body-bg);
}

[data-theme="dark"] .auth-card {
  background: var(--surface);
  border-color: var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .auth-card-header {
  background: var(--auth-header-bg);
}

[data-theme="dark"] .auth-card-body {
  background: var(--surface);
}

/* Cards (Bootstrap fallback) */
[data-theme="dark"] .card {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .card-header {
  background: var(--surface) !important;
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .table {
  color: var(--body-color);
}

[data-theme="dark"] .table-light {
  background: var(--surface-inset) !important;
}

/* KYC alert */
[data-theme="dark"] .kyc-alert {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .kyc-alert-body h6 { color: #93c5fd; }
[data-theme="dark"] .kyc-alert-body p { color: #93c5fd; }

/* Wallet setup */
[data-theme="dark"] .wallet-setup-alert {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-color: rgba(251, 191, 36, 0.3);
}
[data-theme="dark"] .wallet-setup-alert-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}
[data-theme="dark"] .wallet-setup-alert-body h6 { color: #fcd34d; }
[data-theme="dark"] .wallet-setup-alert-body p { color: #fcd34d; }
[data-theme="dark"] .wallet-spec-card {
  background: var(--surface-inset, #1e293b);
  border-color: var(--border-color);
}
[data-theme="dark"] .wallet-spec-card h6 { color: var(--heading-color); }
[data-theme="dark"] .wallet-spec-card-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}
[data-theme="dark"] .wallet-spec-card-info-heading { color: #93c5fd; }
[data-theme="dark"] .wallet-spec-card-info-text { color: #93c5fd; }
[data-theme="dark"] .wallet-help-link {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}
[data-theme="dark"] .wallet-help-link:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

/* Checkout */
[data-theme="dark"] .checkout-form-panel {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .checkout-form-body {
  background: var(--surface);
}

[data-theme="dark"] .form-section-title {
  color: var(--text-secondary);
}

[data-theme="dark"] .form-section-divider {
  background: var(--border-color);
}

[data-theme="dark"] .sidebar-card {
  background: var(--surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .sidebar-title {
  color: var(--text-secondary);
}

[data-theme="dark"] .checkout-label {
  color: var(--body-color);
}

[data-theme="dark"] .checkout-input {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-color);
}

[data-theme="dark"] .summary-label {
  color: var(--text-muted);
}

[data-theme="dark"] .summary-value {
  color: var(--body-color);
}

[data-theme="dark"] .security-footer {
  background: var(--surface-inset);
  border-top-color: var(--border-color);
}

[data-theme="dark"] .security-notice {
  background: var(--surface-inset);
  border-top-color: var(--border-color);
}

/* Payment method selector */
[data-theme="dark"] .payment-method-selector {
  background: var(--surface);
}

[data-theme="dark"] .payment-method-option {
  color: var(--text-secondary);
}

[data-theme="dark"] .payment-method-option.active {
  background: var(--surface-hover);
  color: #a5b4fc;
  box-shadow: var(--shadow-sm);
}

/* Code blocks */
[data-theme="dark"] code {
  background: var(--code-bg);
  color: var(--code-color);
}

[data-theme="dark"] pre {
  background: #1e293b !important;
}

/* Scrollbar (webkit) */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--surface-inset);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Theme toggle button — uses nav vars so it adapts to light/dark navbar */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--nav-border-subtle);
  background: transparent;
  color: var(--nav-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--nav-overlay);
  color: var(--nav-text-strong);
  border-color: var(--nav-overlay-strong);
}

/* Duration radio toggle buttons */
.dash-radio-btn {
  cursor: pointer;
}
.dash-radio-btn .btn-check {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}
.dash-radio-btn .btn-check:checked + .btn-dash {
  background: var(--dash-primary, var(--brand-500));
  color: #fff;
  border-color: var(--dash-primary, var(--brand-500));
}

/* Honeypot bot protection — hidden off-screen */
.hp-field {
  overflow: hidden;
  height: 0;
  width: 0;
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Wallet setup wizard */
.wallet-setup-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fbbf24;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}
.wallet-setup-alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #b45309;
  font-size: 1.25rem;
}
.wallet-setup-alert-body h6 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 0.25rem;
}
.wallet-setup-alert-body p {
  font-size: 0.8rem;
  color: #92400e;
  margin: 0 0 0.75rem;
  opacity: 0.85;
}

.wallet-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}
.wallet-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  position: relative;
}
.wallet-step:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin-left: 0.5rem;
}
.wallet-step.completed:not(:last-child)::after {
  background: #10b981;
}
.wallet-step.active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--brand-500) 0%, var(--border-color) 100%);
}
.wallet-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: var(--surface);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.wallet-step.active .wallet-step-number {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
}
.wallet-step.completed .wallet-step-number {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.wallet-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.wallet-step.active .wallet-step-label {
  color: var(--brand-700);
}
.wallet-step.completed .wallet-step-label {
  color: #10b981;
}

.wallet-spec-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.wallet-spec-card h6 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--heading-color);
}
.wallet-spec-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--body-color);
}
.wallet-spec-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}
.wallet-spec-item i {
  color: var(--brand-700);
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.wallet-spec-item strong {
  color: var(--heading-color);
}

.wallet-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.wallet-help-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--info);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.wallet-help-link:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.wallet-address-input {
  position: relative;
}
.wallet-address-input input {
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 1rem;
  padding-left: 2.75rem;
  border-radius: 12px;
}
.wallet-address-input .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}
.wallet-address-input .char-count {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.wallet-address-code {
  font-size: 0.8rem;
  word-break: break-all;
}
.wallet-address-code-sm {
  font-size: 0.75rem;
}
.wallet-copy-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--info);
  cursor: pointer;
}
.wallet-copy-btn:hover {
  color: #0369a1;
}
.wallet-cooldown-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.wallet-toggle-link {
  font-size: 0.8rem;
  color: var(--info);
}
.wallet-toggle-link:hover {
  color: #0369a1;
}
.wallet-spec-card-info {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.wallet-spec-card-info-heading {
  color: #075985;
}
.wallet-spec-card-info-text {
  color: #075985;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .wallet-stepper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .wallet-step:not(:last-child)::after {
    display: none;
  }
  .wallet-step {
    width: 100%;
  }
}

/* ============================================================
   CSP-Compliant Utility Classes
   Replaces inline style="" attributes to avoid CSP violations
   ============================================================ */

/* Icon sizes for status pages */
.icon-status-lg { font-size: 4rem; }
.icon-status-md { font-size: 2.5rem; }

/* Small code/text sizes */
.code-sm { font-size: 0.7rem; }
.code-sm-75 { font-size: 0.75rem; }
.text-sm-custom { font-size: 0.9rem; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Negative margin */
.mt-n2 { margin-top: -0.5rem; }

/* Disabled-look button */
.btn-disabled-look { opacity: 0.6; cursor: default; }

/* Max-width constraint */
.max-w-600 { max-width: 600px; }

/* Stat grids with explicit column counts */
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-5 { grid-template-columns: repeat(5, 1fr); }
/* 6 columns stays single-row down to tablet; minmax(0, ...) lets columns
   shrink gracefully without overflowing on narrower desktops. */
.stat-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Compact overrides for the 6-col layout — cards are tighter, so shrink
   padding/icon/value to keep 4-5 digit dollar amounts from truncating. */
.stat-grid-6 .stat-card { padding: 0.85rem; gap: 0.6rem; }
.stat-grid-6 .stat-card-icon { width: 36px; height: 36px; font-size: 1rem; }
.stat-grid-6 .stat-card-value { font-size: 1.1rem; }
.stat-grid-6 .stat-card-label { font-size: 0.68rem; }
.stat-grid-6 .stat-card-sub { font-size: 0.65rem; }

@media (max-width: 1199px) {
  .stat-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .stat-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid-6 { grid-template-columns: repeat(2, 1fr); }
  /* At tablet/mobile widths cards have room again — restore default sizing. */
  .stat-grid-6 .stat-card { padding: 1.25rem; gap: 1rem; }
  .stat-grid-6 .stat-card-icon { width: 44px; height: 44px; font-size: 1.15rem; }
  .stat-grid-6 .stat-card-value { font-size: 1.35rem; }
  .stat-grid-6 .stat-card-label { font-size: 0.75rem; }
  .stat-grid-6 .stat-card-sub { font-size: 0.7rem; }
}
@media (max-width: 479px) {
  .stat-grid-5 { grid-template-columns: 1fr; }
  .stat-grid-6 { grid-template-columns: 1fr; }
}

/* Status icon colors */
.text-blue { color: #3b82f6; }
.text-cyan { color: #06b6d4; }
.text-amber { color: #f59e0b; }

/* Muted description text */
.text-muted-sm { color: #6b7280; font-size: 0.875rem; }

/* Avatar gradient backgrounds */
.avatar-gradient-super-admin { background: linear-gradient(135deg, #ef4444, #f97316); }
.avatar-gradient-admin { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
.avatar-gradient-client { background: linear-gradient(135deg, #3b82f6, #06b6d4); }

/* OTP input styling */
.otp-input-lg { font-size: 2rem; letter-spacing: 1rem; font-weight: bold; }

/* Checkout field error (hidden by default, shown via JS) */
.checkout-field-error { display: none; color: #ef4444; font-size: 0.8rem; margin-top: 0.3rem; }

/* Small badge/button variant */
.dash-badge-sm { font-size: 0.78rem; padding: 0.35rem 0.75rem; }

/* Small action button (compact btn-dash) */
.btn-dash-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

/* Stat card as link (removes text decoration) */
a.stat-card { text-decoration: none; color: inherit; }

/* Sticky form sidebar (admin generators) */
.dash-sticky-form { position: sticky; top: 1rem; }

/* Flatpickr — match dash design system */
.flatpickr-calendar { font-family: inherit; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
  background: var(--brand-500);
  border-color: var(--brand-500);
}
.flatpickr-day.inRange { background: var(--brand-50); border-color: var(--brand-50); box-shadow: -5px 0 0 var(--brand-50), 5px 0 0 var(--brand-50); }
.fp-presets { background: #f8fafc; }

/* Tom Select — align with form-control */
.ts-wrapper.single .ts-control { min-height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 0.75rem; border-color: #ced4da; }
.ts-wrapper.single .ts-control:focus, .ts-wrapper.focus .ts-control { border-color: var(--brand-500); box-shadow: 0 0 0 0.2rem rgba(30, 161, 80, 0.18); }
.ts-dropdown { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
.ts-dropdown .active { background: var(--brand-50); color: inherit; }

/* Flatpickr — dark mode */
[data-theme="dark"] .flatpickr-calendar {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--body-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .flatpickr-calendar.arrowTop:before,
[data-theme="dark"] .flatpickr-calendar.arrowBottom:before { border-bottom-color: var(--border-color); border-top-color: var(--border-color); }
[data-theme="dark"] .flatpickr-calendar.arrowTop:after,
[data-theme="dark"] .flatpickr-calendar.arrowBottom:after { border-bottom-color: var(--surface); border-top-color: var(--surface); }
[data-theme="dark"] .flatpickr-months .flatpickr-month,
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
[data-theme="dark"] .flatpickr-current-month input.cur-year,
[data-theme="dark"] .flatpickr-weekday {
  background: var(--surface);
  color: var(--body-color);
  fill: var(--body-color);
}
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { background: var(--surface); }
[data-theme="dark"] .flatpickr-months .flatpickr-prev-month,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month { color: var(--body-color); fill: var(--body-color); }
[data-theme="dark"] .flatpickr-months .flatpickr-prev-month:hover svg,
[data-theme="dark"] .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--brand-300); }
[data-theme="dark"] .flatpickr-day {
  color: var(--body-color);
  background: transparent;
  border-color: transparent;
}
[data-theme="dark"] .flatpickr-day:hover,
[data-theme="dark"] .flatpickr-day:focus { background: var(--surface-hover); border-color: var(--surface-hover); }
[data-theme="dark"] .flatpickr-day.today { border-color: var(--brand-300); }
[data-theme="dark"] .flatpickr-day.today:hover { background: var(--brand-300); color: #fff; }
[data-theme="dark"] .flatpickr-day.flatpickr-disabled,
[data-theme="dark"] .flatpickr-day.flatpickr-disabled:hover,
[data-theme="dark"] .flatpickr-day.prevMonthDay,
[data-theme="dark"] .flatpickr-day.nextMonthDay { color: var(--text-tertiary); }
[data-theme="dark"] .flatpickr-day.inRange { background: rgba(52, 199, 89, 0.2); border-color: rgba(52, 199, 89, 0.2); box-shadow: -5px 0 0 rgba(52, 199, 89, 0.2), 5px 0 0 rgba(52, 199, 89, 0.2); }
[data-theme="dark"] .fp-presets { background: var(--surface-inset); border-color: var(--border-color); }
[data-theme="dark"] .fp-presets .btn-outline-secondary { color: var(--body-color); border-color: var(--border-color); }
[data-theme="dark"] .fp-presets .btn-outline-secondary:hover { background: var(--surface-hover); border-color: var(--surface-hover); color: #fff; }

/* Tom Select — dark mode */
[data-theme="dark"] .ts-wrapper.single .ts-control,
[data-theme="dark"] .ts-wrapper.multi .ts-control {
  background: var(--input-bg);
  color: var(--input-color);
  border-color: var(--input-border);
}
[data-theme="dark"] .ts-wrapper .ts-control input::placeholder { color: var(--input-placeholder); }
[data-theme="dark"] .ts-dropdown {
  background: var(--surface);
  color: var(--body-color);
  border-color: var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .ts-dropdown .option,
[data-theme="dark"] .ts-dropdown .optgroup-header { color: var(--body-color); background: var(--surface); }
[data-theme="dark"] .ts-dropdown .active { background: rgba(52, 199, 89, 0.2); color: var(--body-color); }
[data-theme="dark"] .ts-dropdown .create:hover,
[data-theme="dark"] .ts-dropdown .option:hover { background: var(--surface-hover); }
[data-theme="dark"] .ts-wrapper.single .ts-control > .item { color: var(--input-color); }
[data-theme="dark"] .ts-wrapper.single.input-active .ts-control { background: var(--input-bg); }

/* Bootstrap modal — dark mode */
[data-theme="dark"] .modal-content {
  background: var(--surface);
  color: var(--body-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .modal-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .modal-footer { border-top-color: var(--border-color); }
[data-theme="dark"] .modal-title { color: var(--heading-color); }
[data-theme="dark"] .modal-body { color: var(--body-color); }
[data-theme="dark"] .modal-body strong { color: var(--heading-color); }
[data-theme="dark"] .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
[data-theme="dark"] .modal-backdrop.show { opacity: 0.7; }

/* Settlement Summary — per-type section visual breakdown.
   Borders applied to td (not tr) so Bootstrap's table styles don't suppress them. */
.settlement-summary-section-row > td {
  border-bottom: 3px solid var(--brand-500);
  background-color: rgba(30, 161, 80, 0.08);
}
.settlement-summary-subtotal-row > td {
  border-top: 4px solid var(--brand-500);
  background-color: rgba(30, 161, 80, 0.15);
}
.settlement-summary-subtotal-row > td:first-child {
  border-left: 4px solid var(--brand-500);
}
