/* ============================================================================
   BullionPlus — User Dashboard modern theme (override layer)
   Loaded AFTER the vendor theme and scoped under `.bp-modern` so it only
   affects the user dashboard and cannot leak to the public site or admin.
   Purely presentational — no markup/logic depends on it.
   ============================================================================ */

.bp-modern {
  /* ---- Design tokens ---------------------------------------------------- */
  --bp-bg: #f4f6fb;
  --bp-surface: #ffffff;
  --bp-surface-2: #fbfcfe;
  --bp-ink: #0f172a;
  --bp-ink-2: #334155;
  --bp-muted: #64748b;
  --bp-border: rgba(15, 23, 42, 0.08);
  --bp-border-2: rgba(15, 23, 42, 0.12);

  /* Respect the admin brand colour, with a refined fallback */
  --bp-primary: var(--primary-color, #0f172a);
  --bp-gold: #c79a3b;
  --bp-gold-2: #e6c46a;
  --bp-gold-soft: #f6edd6;

  --bp-success: #16a34a;
  --bp-danger: #dc2626;
  --bp-info: #2563eb;

  --bp-radius: 18px;
  --bp-radius-sm: 12px;
  --bp-radius-pill: 999px;

  --bp-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --bp-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 24px rgba(16, 24, 40, 0.06);
  --bp-shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.14);

  --bp-ease: cubic-bezier(0.4, 0, 0.2, 1);

  background: radial-gradient(1200px 600px at 100% -10%, #eef2fe 0%, rgba(238, 242, 254, 0) 60%),
    var(--bp-bg);
  color: var(--bp-ink);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---- Typography --------------------------------------------------------- */
.bp-modern h1, .bp-modern h2, .bp-modern h3,
.bp-modern h4, .bp-modern h5, .bp-modern .title {
  color: var(--bp-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bp-modern p { color: var(--bp-ink-2); }
.bp-modern .text--base { color: var(--bp-gold) !important; }
.bp-modern a { transition: color 0.2s var(--bp-ease); }

/* ---- Header / top nav --------------------------------------------------- */
.bp-modern .header-section {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--bp-border);
  box-shadow: var(--bp-shadow-xs);
}
.bp-modern .header-bottom-area { padding: 6px 0; }
.bp-modern .site-logo img { max-height: 42px; width: auto; }
.bp-modern .main-menu > li > a {
  color: var(--bp-ink-2);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--bp-radius-sm);
  transition: all 0.2s var(--bp-ease);
}
.bp-modern .main-menu > li > a:hover,
.bp-modern .main-menu > li > a.active {
  color: var(--bp-primary);
  background: rgba(15, 23, 42, 0.05);
}
.bp-modern .profile-action-btn img {
  width: 44px;
  height: 44px;
  border-radius: var(--bp-radius-pill);
  object-fit: cover;
  border: 2px solid var(--bp-surface);
  box-shadow: 0 0 0 1px var(--bp-border), var(--bp-shadow-xs);
  transition: transform 0.2s var(--bp-ease);
}
.bp-modern .profile-action-btn:hover img { transform: translateY(-1px); }
.bp-modern .dropdown-btn-list {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-shadow-lg);
  overflow: hidden;
  padding: 6px;
  background: var(--bp-surface);
  margin-top: 10px;
}
.bp-modern .dropdown-list-item li .title-area a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--bp-radius-sm);
  color: var(--bp-ink-2);
  font-weight: 500;
}
.bp-modern .dropdown-list-item li .title-area a:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--bp-primary);
}
.bp-modern .logout-btn { color: var(--bp-danger) !important; }

/* ---- Page shell --------------------------------------------------------- */
.bp-modern .profile-section,
.bp-modern section[class*="ptb-"] { padding-top: 40px; padding-bottom: 40px; }
.bp-modern .custom-container,
.bp-modern .container { max-width: 1200px; }

/* ---- Generic card ------------------------------------------------------- */
.bp-modern .card,
.bp-modern .user-balance-details,
.bp-modern .available-balance,
.bp-modern .dashboard-list-area,
.bp-modern .custom-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-shadow);
}
.bp-modern .card { padding: 4px; }
.bp-modern .card .card-body { border-radius: calc(var(--bp-radius) - 4px); }

/* ---- Wallet card + balance hero ---------------------------------------- */
.bp-modern .user-profile {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-shadow-lg);
  overflow: hidden;
  padding: 0;
}
/* Dark "bullion" hero strip: balance + welcome only */
.bp-modern .user-account-details {
  position: relative;
  overflow: hidden;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(900px 400px at 110% -40%, rgba(231, 196, 106, 0.28), transparent 60%),
    linear-gradient(135deg, #131c31 0%, #0f172a 55%, #0b1322 100%);
}
.bp-modern .user-account-details::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(231, 196, 106, 0.06));
  pointer-events: none;
}
.bp-modern .user-account-details .balance-area label:first-child {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.bp-modern .user-account-details .text--base { color: var(--bp-gold-2) !important; }
.bp-modern .user-account-details .user-account label { color: rgba(255, 255, 255, 0.9); }
.bp-modern .user-account-details .user-account .title { color: #fff; }
.bp-modern .user-account-details .user-account a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
  border-radius: var(--bp-radius-pill);
  font-size: 0.85rem;
  margin: 6px 8px 0 0;
  transition: all 0.2s var(--bp-ease);
}
.bp-modern .user-account-details .user-account a:hover {
  background: rgba(231, 196, 106, 0.16);
  color: #fff;
  border-color: rgba(231, 196, 106, 0.4);
}

/* ---- Stat cards (.available-balance) ----------------------------------- */
.bp-modern .available-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  transition: transform 0.25s var(--bp-ease), box-shadow 0.25s var(--bp-ease);
}
.bp-modern .available-balance:hover {
  transform: translateY(-3px);
  box-shadow: var(--bp-shadow-lg);
  border-color: var(--bp-border-2);
}
.bp-modern .available-balance .left span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--bp-ink);
  line-height: 1;
}
.bp-modern .available-balance .left p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--bp-muted);
  font-weight: 500;
}
.bp-modern .available-balance .right {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.25rem;
  color: var(--bp-primary);
  background: linear-gradient(135deg, var(--bp-gold-soft), #fff);
  border: 1px solid var(--bp-border);
}
.bp-modern .available-balance .right i { color: var(--bp-gold); }

/* ---- Add-money & quick chips ------------------------------------------- */
.bp-modern .reacharge-opestion,
.bp-modern .quick-reacharge { padding: 22px 28px; border-top: 1px solid var(--bp-border); }
.bp-modern .reacharge-opestion form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.bp-modern .reacharge-opestion .form--control { flex: 1 1 200px; }
.bp-modern .recharge--amount {
  cursor: pointer;
  display: inline-flex;
  padding: 9px 16px;
  border-radius: var(--bp-radius-pill);
  border: 1px solid var(--bp-border-2);
  background: var(--bp-surface);
  color: var(--bp-ink-2);
  font-weight: 600;
  transition: all 0.18s var(--bp-ease);
}
.bp-modern .recharge--amount:hover { border-color: var(--bp-gold); color: var(--bp-ink); }
.bp-modern .hide-input:checked + .recharge--amount {
  background: var(--bp-primary);
  border-color: var(--bp-primary);
  color: #fff;
}

/* ---- Buttons ------------------------------------------------------------ */
.bp-modern .btn--base,
.bp-modern .btn-primary,
.bp-modern button.btn--base {
  --b: var(--bp-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--b);
  color: #fff;
  border: 1px solid var(--b);
  border-radius: var(--bp-radius-sm);
  padding: 11px 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s var(--bp-ease), box-shadow 0.18s var(--bp-ease), opacity 0.18s var(--bp-ease);
}
.bp-modern .btn--base:hover,
.bp-modern .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
  color: #fff;
}
.bp-modern .btn--base:active { transform: translateY(0); }
.bp-modern .btn {
  border-radius: var(--bp-radius-sm);
  font-weight: 600;
  padding: 10px 18px;
  transition: all 0.18s var(--bp-ease);
}
.bp-modern .btn--info { background: var(--bp-info); border-color: var(--bp-info); color: #fff; }
.bp-modern .bg--danger { background: var(--bp-danger) !important; border-color: var(--bp-danger) !important; }

/* ---- Forms -------------------------------------------------------------- */
.bp-modern .form--control,
.bp-modern .form-control,
.bp-modern input[type="text"],
.bp-modern input[type="number"],
.bp-modern input[type="email"],
.bp-modern input[type="password"],
.bp-modern textarea,
.bp-modern select {
  border-radius: var(--bp-radius-sm);
  border: 1px solid var(--bp-border-2);
  background: var(--bp-surface-2);
  color: var(--bp-ink);
  padding: 12px 14px;
  transition: border-color 0.18s var(--bp-ease), box-shadow 0.18s var(--bp-ease), background 0.18s var(--bp-ease);
}
.bp-modern .form--control:focus,
.bp-modern .form-control:focus,
.bp-modern input:focus,
.bp-modern textarea:focus,
.bp-modern select:focus {
  outline: none;
  background: var(--bp-surface);
  border-color: var(--bp-gold);
  box-shadow: 0 0 0 4px rgba(199, 154, 59, 0.16);
}
.bp-modern label { color: var(--bp-ink-2); font-weight: 500; }
.bp-modern .nice-select {
  border-radius: var(--bp-radius-sm) !important;
  border: 1px solid var(--bp-border-2) !important;
  background: var(--bp-surface-2) !important;
}

/* ---- Tables ------------------------------------------------------------- */
.bp-modern table { border-collapse: separate; border-spacing: 0; }
.bp-modern .table thead th {
  background: var(--bp-surface-2);
  color: var(--bp-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--bp-border);
}
.bp-modern .table td { color: var(--bp-ink-2); vertical-align: middle; border-color: var(--bp-border); }
.bp-modern .table tbody tr { transition: background 0.15s var(--bp-ease); }
.bp-modern .table tbody tr:hover { background: rgba(15, 23, 42, 0.025); }

/* ---- Badges ------------------------------------------------------------- */
.bp-modern .badge {
  border-radius: var(--bp-radius-pill);
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.72rem;
}

/* ---- Breadcrumb --------------------------------------------------------- */
.bp-modern .breadcrumb-area,
.bp-modern .breadcrumb {
  background: transparent;
  padding: 0;
}
.bp-modern .breadcrumb a { color: var(--bp-muted); }
.bp-modern .breadcrumb .active { color: var(--bp-primary); font-weight: 600; }

/* ---- Modals ------------------------------------------------------------- */
.bp-modern .modal-content,
.bp-modern .modal-alert {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-shadow-lg);
}

/* ---- Footer ------------------------------------------------------------- */
.bp-modern .footer-section {
  background: #0f172a !important;
  margin-top: 48px;
}
.bp-modern .footer-section::before { opacity: 0.35; }
.bp-modern .footer-social-icon a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--bp-radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  margin: 0 4px;
  transition: all 0.2s var(--bp-ease);
}
.bp-modern .footer-social-icon a:hover { background: var(--bp-gold); color: #0f172a; }

/* ---- Misc polish -------------------------------------------------------- */
.bp-modern ::selection { background: rgba(199, 154, 59, 0.25); }
.bp-modern .text--success { color: var(--bp-success) !important; }
.bp-modern .text--danger { color: var(--bp-danger) !important; }

@media (max-width: 575.98px) {
  .bp-modern .user-profile { padding: 22px; }
  .bp-modern .user-profile .user-balance .balance-area label:first-child { font-size: 2rem; }
  .bp-modern .available-balance { padding: 16px; }
}
