/*
 * EngagePay dark theme
 * Re-skins the Sneat/Bootstrap admin + merchant panels to match the EngagePay Figma.
 * Everything is scoped under body.ep-theme so auth pages and other portals are untouched.
 */

body.ep-theme {
  --ep-bg: #0a0a0a;
  --ep-sidebar: #0c0c0d;
  --ep-surface: #111112;
  --ep-surface-2: #161617;
  --ep-border: rgba(255, 255, 255, 0.1);
  --ep-border-strong: rgba(255, 255, 255, 0.18);
  --ep-divider: rgba(255, 255, 255, 0.06);
  --ep-text: #f4f4f2;
  --ep-text-2: #d6d6d3;
  --ep-muted: #8b8b8b;
  --ep-dim: #5e5e5e;
  --ep-gold: #cdaf72;
  --ep-gold-hover: #dbbf85;
  --ep-gold-ink: #17130a;
  --ep-green: #3ddc97;
  --ep-amber: #e9b44c;
  --ep-red: #f2475a;
  --ep-blue: #7aa7ff;
  --ep-radius: 18px;
  --ep-radius-sm: 10px;
  --ep-serif: 'Instrument Serif', 'Times New Roman', serif;
  --ep-sans: 'Inter', 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ep-card-bg:
    radial-gradient(120% 90% at 50% -10%, rgba(205, 175, 114, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--ep-surface);

  --bs-body-bg: var(--ep-bg);
  --bs-body-color: var(--ep-text-2);
  --bs-border-color: var(--ep-border);
  --bs-heading-color: var(--ep-text);
  --bs-link-color: var(--ep-gold);
  --bs-link-hover-color: var(--ep-gold-hover);

  background: var(--ep-bg) !important;
  color: var(--ep-text-2);
  font-family: var(--ep-sans);
  font-size: 0.875rem;
  -webkit-font-smoothing: antialiased;
}

body.ep-theme ::selection { background: rgba(205, 175, 114, 0.35); color: #fff; }

/* ---------- Typography ---------- */
body.ep-theme h1, body.ep-theme h2, body.ep-theme h3,
body.ep-theme h4, body.ep-theme h5, body.ep-theme h6,
body.ep-theme .h1, body.ep-theme .h2, body.ep-theme .h3,
body.ep-theme .h4, body.ep-theme .h5, body.ep-theme .h6 {
  color: var(--ep-text);
  font-family: var(--ep-sans);
  letter-spacing: -0.01em;
}
body.ep-theme a { color: var(--ep-gold); }
body.ep-theme a:hover { color: var(--ep-gold-hover); }
body.ep-theme .text-muted, body.ep-theme small.text-muted { color: var(--ep-muted) !important; }
body.ep-theme .text-body, body.ep-theme .text-dark { color: var(--ep-text-2) !important; }
body.ep-theme .text-primary { color: var(--ep-gold) !important; }
body.ep-theme .text-success { color: var(--ep-green) !important; }
body.ep-theme .text-warning { color: var(--ep-amber) !important; }
body.ep-theme .text-danger { color: var(--ep-red) !important; }
body.ep-theme .text-info { color: var(--ep-blue) !important; }
body.ep-theme hr { border-color: var(--ep-divider); opacity: 1; }

/* Serif display headings (page titles) */
body.ep-theme .ep-display,
body.ep-theme .content-wrapper > .container-xxl > h4.fw-bold:first-child,
body.ep-theme .content-wrapper h4.fw-bold:has(> .ep-crumbs) {
  font-family: var(--ep-serif);
  font-weight: 400 !important;
  font-size: 2.6rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ep-text);
}
/* Breadcrumb trail ("Dashboard / All Admin Users /") on one line, page name on the line below */
body.ep-theme .content-wrapper h4.fw-bold .ep-crumbs {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--ep-sans);
  font-size: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0;
}
body.ep-theme .content-wrapper h4.fw-bold .ep-crumbs .text-muted { display: inline; font-size: inherit; }
body.ep-theme .content-wrapper h4.fw-bold .ep-crumbs a { color: inherit; }
body.ep-theme .content-wrapper h4.fw-bold .ep-crumbs a .text-muted::before { content: ' '; }
body.ep-theme .content-wrapper h4.fw-bold .ep-crumbs a:hover .text-muted { color: var(--ep-text) !important; }
body.ep-theme .ep-subtitle { color: var(--ep-text-2); font-size: 0.85rem; margin-top: 0.35rem; }

/* ---------- Layout shell ---------- */
body.ep-theme .layout-wrapper,
body.ep-theme .layout-container,
body.ep-theme .layout-page,
body.ep-theme .content-wrapper { background: var(--ep-bg) !important; }

body.ep-theme .content-backdrop { background: rgba(0, 0, 0, 0.6); }
body.ep-theme .layout-overlay { background: rgba(0, 0, 0, 0.6) !important; }

/* ---------- Sidebar ---------- */
body.ep-theme .bg-menu-theme,
body.ep-theme #layout-menu {
  background:
    radial-gradient(130% 55% at 0% 72%, rgba(46, 78, 120, 0.32), transparent 70%),
    var(--ep-sidebar) !important;
  color: var(--ep-muted) !important;
  border-right: 1px solid var(--ep-divider);
  box-shadow: none !important;
}
body.ep-theme .menu-inner-shadow { display: none !important; }
body.ep-theme #layout-menu .app-brand { height: auto; padding: 2rem 1.5rem 1.75rem; }
body.ep-theme #layout-menu .app-brand-logo img,
body.ep-theme #layout-menu img.app-brand-logo {
  filter: invert(1) brightness(1.1);
  max-height: 30px;
  width: auto;
}
body.ep-theme #layout-menu .layout-menu-toggle { color: var(--ep-text); }

body.ep-theme .bg-menu-theme .menu-inner { padding: 0 0 1.5rem !important; }
body.ep-theme .bg-menu-theme .menu-header {
  margin: 1.1rem 0.9rem 0.35rem !important;
  padding: 0 0.75rem !important;
  text-transform: none !important;
  font-size: 0.82rem !important;
}
body.ep-theme .bg-menu-theme .menu-header::before { display: none; }
body.ep-theme .bg-menu-theme .menu-header .menu-header-text { color: var(--ep-muted) !important; letter-spacing: 0; }

body.ep-theme .bg-menu-theme .menu-inner > .menu-item { margin: 1px 0.9rem !important; width: auto !important; }
body.ep-theme .bg-menu-theme .menu-sub > .menu-item { margin: 1px 0 !important; }
body.ep-theme .bg-menu-theme .menu-inner > .menu-item > .menu-link,
body.ep-theme .bg-menu-theme .menu-sub > .menu-item > .menu-link {
  color: #9a9a9a !important;
  border: 1px solid transparent;
  border-radius: var(--ep-radius-sm) !important;
  padding: 0.55rem 0.75rem !important;
  margin: 0 !important;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
body.ep-theme .bg-menu-theme .menu-link .menu-icon {
  color: inherit !important;
  font-size: 1.05rem;
  margin-right: 0.6rem;
  opacity: 0.85;
}
body.ep-theme .bg-menu-theme .menu-item:not(.active) > .menu-link:hover {
  color: var(--ep-text) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}
body.ep-theme .bg-menu-theme .menu-inner > .menu-item.active > .menu-link,
body.ep-theme .bg-menu-theme .menu-sub > .menu-item.active > .menu-link {
  color: #fff !important;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) !important;
  border-color: var(--ep-border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* open parent (admin submenus) keeps text bright but without the pill */
body.ep-theme .bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle {
  background: transparent !important;
  border-color: transparent;
  color: var(--ep-text) !important;
}
body.ep-theme .bg-menu-theme .menu-inner > .menu-item.active::before,
body.ep-theme .bg-menu-theme .menu-inner > .menu-item.active:before { display: none !important; }
body.ep-theme .bg-menu-theme .menu-sub { padding-left: 0.4rem; }
body.ep-theme .bg-menu-theme .menu-sub > .menu-item > .menu-link { padding-left: 2.4rem !important; }
body.ep-theme .bg-menu-theme .menu-sub > .menu-item > .menu-link::before { left: 1.1rem !important; }
body.ep-theme .bg-menu-theme .menu-sub > .menu-item > .menu-link::before { background-color: var(--ep-dim) !important; }
body.ep-theme .bg-menu-theme .menu-sub > .menu-item.active > .menu-link::before { background-color: var(--ep-gold) !important; }
body.ep-theme .bg-menu-theme .menu-toggle::after { color: var(--ep-muted); }
body.ep-theme .bg-menu-theme .menu .badge,
body.ep-theme #layout-menu .badge { border: 0; background: var(--ep-red) !important; color: #fff !important; }

/* ---------- Top navbar ---------- */
body.ep-theme .layout-navbar,
body.ep-theme .bg-navbar-theme {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color: var(--ep-text-2) !important;
}
body.ep-theme .layout-navbar .bx-menu { color: var(--ep-text); }
body.ep-theme .ep-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ep-border-strong);
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  color: var(--ep-text) !important;
  font-size: 1.1rem;
  transition: border-color 0.15s;
}
body.ep-theme .ep-icon-btn:hover { border-color: rgba(255, 255, 255, 0.35); }
body.ep-theme .ep-avatar-initial {
  color: var(--ep-gold) !important;
  font-size: 0.95rem;
  font-weight: 500;
}
body.ep-theme .ep-avatar-lg { width: 44px; height: 44px; font-size: 1rem; }

/* "Set up your account" banner */
body.ep-theme .ep-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 1px solid var(--ep-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
body.ep-theme .ep-banner .ep-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ep-gold); flex-shrink: 0; }
body.ep-theme .ep-banner .ep-banner-title { color: var(--ep-text); font-weight: 600; white-space: nowrap; }
body.ep-theme .ep-banner .ep-banner-text { color: var(--ep-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ep-theme .ep-banner .btn { margin-left: auto; flex-shrink: 0; }

/* ---------- Cards ---------- */
body.ep-theme .card {
  background: var(--ep-card-bg) !important;
  border: 1px solid var(--ep-border) !important;
  border-radius: var(--ep-radius) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: var(--ep-text-2);
}
/* cards nested in cards stay flat */
body.ep-theme .card .card {
  background: rgba(255, 255, 255, 0.015) !important;
  box-shadow: none !important;
}
body.ep-theme .card-header,
body.ep-theme .card-footer {
  background: transparent !important;
  border-color: var(--ep-divider) !important;
  color: var(--ep-text);
}
body.ep-theme .card-header h5, body.ep-theme .card-title, body.ep-theme h5.card-header {
  color: var(--ep-text);
  font-size: 0.95rem;
  font-weight: 600;
}
body.ep-theme .card-body { color: var(--ep-text-2); }
body.ep-theme .row-bordered > [class*='col']::before,
body.ep-theme .row-bordered > [class*='col']::after { border-color: var(--ep-divider) !important; }

/* Tinted glass variants used on the reports cards */
body.ep-theme .card.ep-tint-violet { background: radial-gradient(90% 90% at 50% 110%, rgba(130, 140, 220, 0.55), transparent 70%), var(--ep-surface) !important; }
body.ep-theme .card.ep-tint-teal { background: radial-gradient(90% 90% at 50% 110%, rgba(110, 190, 190, 0.5), transparent 70%), var(--ep-surface) !important; }
body.ep-theme .card.ep-tint-rose { background: radial-gradient(90% 90% at 50% 110%, rgba(200, 160, 140, 0.45), transparent 70%), var(--ep-surface) !important; }
body.ep-theme .card.ep-tint-blue { background: radial-gradient(90% 100% at 50% 100%, rgba(120, 140, 200, 0.4), transparent 70%), var(--ep-surface) !important; }

/* Stat cards (dashboard) */
body.ep-theme .ep-stat .card-body { display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 1.1rem 1.1rem 1rem; }
body.ep-theme .ep-stat-label { color: var(--ep-text); font-weight: 600; font-size: 0.85rem; }
body.ep-theme .ep-stat-value {
  font-family: var(--ep-serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--ep-text);
  margin: 1.6rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ep-theme .ep-stat-value .ep-cents { color: var(--ep-dim); }
body.ep-theme .ep-stat-meta { color: var(--ep-muted); font-size: 0.75rem; margin-top: 0.4rem; }

/* Key/value rows (settings, account details) */
body.ep-theme .ep-kv { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--ep-divider); }
body.ep-theme .ep-kv:last-child { border-bottom: 0; }
body.ep-theme .ep-kv .ep-k { color: var(--ep-muted); }
body.ep-theme .ep-kv .ep-v { color: var(--ep-text); font-weight: 600; text-align: right; word-break: break-all; }

/* Transaction list (dashboard "Recent transactions") */
body.ep-theme .ep-tx { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 0; border-bottom: 1px solid var(--ep-divider); }
body.ep-theme .ep-tx:last-child { border-bottom: 0; }
body.ep-theme .ep-tx-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ep-border-strong);
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  color: var(--ep-text); font-size: 1.1rem;
}
body.ep-theme .ep-tx-title { color: var(--ep-text); font-weight: 600; }
body.ep-theme .ep-tx-sub { color: var(--ep-muted); font-size: 0.78rem; }
body.ep-theme .ep-tx-amount { margin-left: auto; color: var(--ep-text); font-weight: 600; white-space: nowrap; }

body.ep-theme .ep-empty { text-align: center; padding: 3rem 1rem; color: var(--ep-muted); }
body.ep-theme .ep-empty .ep-tx-icon { margin-bottom: 1rem; }
body.ep-theme .ep-empty h6 { color: var(--ep-text); font-weight: 600; margin-bottom: 0.35rem; }

/* ---------- Buttons ---------- */
body.ep-theme .btn {
  border-radius: 999px !important;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.5rem 1.1rem;
  box-shadow: none !important;
  transform: none !important;
}
body.ep-theme .btn-sm { padding: 0.3rem 0.8rem; font-size: 0.75rem; }
body.ep-theme .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
body.ep-theme .btn-primary,
body.ep-theme .btn-primary:disabled {
  background: var(--ep-gold) !important;
  border-color: var(--ep-gold) !important;
  color: var(--ep-gold-ink) !important;
}
body.ep-theme .btn-primary:hover, body.ep-theme .btn-primary:focus, body.ep-theme .btn-primary:active {
  background: var(--ep-gold-hover) !important;
  border-color: var(--ep-gold-hover) !important;
  color: var(--ep-gold-ink) !important;
}
body.ep-theme .btn-secondary, body.ep-theme .btn-dark, body.ep-theme .btn-light,
body.ep-theme .btn-outline-primary, body.ep-theme .btn-outline-secondary, body.ep-theme .btn-outline-dark,
body.ep-theme .btn-label-primary, body.ep-theme .btn-label-secondary, body.ep-theme .ep-btn-ghost {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--ep-border-strong) !important;
  color: var(--ep-text) !important;
}
body.ep-theme .btn-secondary:hover, body.ep-theme .btn-dark:hover, body.ep-theme .btn-light:hover,
body.ep-theme .btn-outline-primary:hover, body.ep-theme .btn-outline-secondary:hover, body.ep-theme .btn-outline-dark:hover,
body.ep-theme .btn-label-primary:hover, body.ep-theme .btn-label-secondary:hover, body.ep-theme .ep-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}
body.ep-theme .btn-success, body.ep-theme .btn-outline-success {
  background: rgba(61, 220, 151, 0.08) !important; border: 1px solid rgba(61, 220, 151, 0.45) !important; color: var(--ep-green) !important;
}
body.ep-theme .btn-danger, body.ep-theme .btn-outline-danger {
  background: rgba(242, 71, 90, 0.08) !important; border: 1px solid rgba(242, 71, 90, 0.45) !important; color: var(--ep-red) !important;
}
body.ep-theme .btn-warning, body.ep-theme .btn-outline-warning {
  background: rgba(233, 180, 76, 0.08) !important; border: 1px solid rgba(233, 180, 76, 0.45) !important; color: var(--ep-amber) !important;
}
body.ep-theme .btn-info, body.ep-theme .btn-outline-info {
  background: rgba(122, 167, 255, 0.08) !important; border: 1px solid rgba(122, 167, 255, 0.45) !important; color: var(--ep-blue) !important;
}
body.ep-theme .btn-success:hover, body.ep-theme .btn-danger:hover, body.ep-theme .btn-warning:hover, body.ep-theme .btn-info:hover,
body.ep-theme .btn-outline-success:hover, body.ep-theme .btn-outline-danger:hover, body.ep-theme .btn-outline-warning:hover, body.ep-theme .btn-outline-info:hover {
  filter: brightness(1.2);
}
body.ep-theme .btn-icon { padding: 0; width: 34px; height: 34px; }
body.ep-theme .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ---------- Badges / status pills ---------- */
body.ep-theme .badge {
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: none;
  padding: 0.35em 0.85em;
  border: 1px solid var(--ep-border-strong);
  background: transparent !important;
  color: var(--ep-text-2) !important;
}
body.ep-theme .badge.bg-success, body.ep-theme .badge.bg-label-success, body.ep-theme .badge.badge-success {
  color: var(--ep-green) !important; border-color: rgba(61, 220, 151, 0.4);
}
body.ep-theme .badge.bg-warning, body.ep-theme .badge.bg-label-warning, body.ep-theme .badge.badge-warning {
  color: var(--ep-amber) !important; border-color: rgba(233, 180, 76, 0.45);
}
body.ep-theme .badge.bg-danger, body.ep-theme .badge.bg-label-danger, body.ep-theme .badge.badge-danger, body.ep-theme .badge.badge-required {
  color: var(--ep-red) !important; border-color: rgba(242, 71, 90, 0.45);
}
body.ep-theme .badge.bg-info, body.ep-theme .badge.bg-label-info, body.ep-theme .badge.badge-info {
  color: var(--ep-blue) !important; border-color: rgba(122, 167, 255, 0.4);
}
body.ep-theme .badge.bg-primary, body.ep-theme .badge.bg-label-primary {
  color: var(--ep-gold) !important; border-color: rgba(205, 175, 114, 0.45);
}
body.ep-theme .badge.bg-secondary, body.ep-theme .badge.bg-label-secondary, body.ep-theme .badge.badge-nullable {
  color: var(--ep-muted) !important;
}
body.ep-theme .bg-label-primary, body.ep-theme .bg-label-info, body.ep-theme .bg-label-warning,
body.ep-theme .bg-label-success, body.ep-theme .bg-label-danger, body.ep-theme .bg-label-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ---------- Tables ---------- */
body.ep-theme .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ep-text-2);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.015);
  --bs-table-striped-color: var(--ep-text-2);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.025);
  --bs-table-hover-color: var(--ep-text);
  --bs-table-border-color: var(--ep-divider);
  color: var(--ep-text-2);
  border-color: var(--ep-divider) !important;
  margin-bottom: 0;
}
body.ep-theme .table > :not(caption) > * > * {
  background-color: transparent;
  color: inherit;
  border-bottom-color: var(--ep-divider) !important;
  padding: 0.8rem 1rem;
  vertical-align: middle;
}
body.ep-theme .table th,
body.ep-theme .table thead th,
body.ep-theme .table thead.table-dark th,
body.ep-theme .table thead.table-light th {
  background: transparent !important;
  color: var(--ep-muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  border-color: var(--ep-divider) !important;
}
body.ep-theme .table tbody td { color: var(--ep-text-2); }
body.ep-theme .table tbody tr:hover > * { background: rgba(255, 255, 255, 0.02); }
body.ep-theme .table-bordered > :not(caption) > * > * { border-color: var(--ep-divider) !important; }
body.ep-theme .table-responsive { border-radius: var(--ep-radius-sm); }
body.ep-theme .table-dark { --bs-table-bg: transparent; }
body.ep-theme .table > :not(:first-child) { border-top: 1px solid var(--ep-divider) !important; }
body.ep-theme .table thead, body.ep-theme .table thead tr { border-color: var(--ep-divider) !important; }

/* ---------- Forms ---------- */
body.ep-theme .form-control,
body.ep-theme .form-select,
body.ep-theme .input-group-text,
body.ep-theme .ts-control,
body.ep-theme .dataTables_wrapper input,
body.ep-theme .dataTables_wrapper select {
  background-color: #121213 !important;
  border: 1px solid var(--ep-border) !important;
  color: var(--ep-text) !important;
  border-radius: var(--ep-radius-sm);
}
body.ep-theme .form-control::placeholder { color: var(--ep-dim) !important; }
body.ep-theme .form-control:focus,
body.ep-theme .form-select:focus,
body.ep-theme .ts-wrapper.focus .ts-control {
  border-color: rgba(205, 175, 114, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(205, 175, 114, 0.12) !important;
}
body.ep-theme .form-control:disabled,
body.ep-theme .form-control[readonly],
body.ep-theme .form-select:disabled { background-color: #0e0e0f !important; color: var(--ep-muted) !important; }
body.ep-theme .form-select option { background: #121213; color: var(--ep-text); }
body.ep-theme .form-label, body.ep-theme label, body.ep-theme .col-form-label {
  color: var(--ep-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
}
body.ep-theme .form-check-input { background-color: #121213; border-color: var(--ep-border-strong); }
body.ep-theme .form-check-input:checked { background-color: var(--ep-gold); border-color: var(--ep-gold); }
body.ep-theme .form-text { color: var(--ep-muted); }
body.ep-theme input[type='date']::-webkit-calendar-picker-indicator,
body.ep-theme input[type='datetime-local']::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.6); }
body.ep-theme .input-group:focus-within .input-group-text { border-color: rgba(205, 175, 114, 0.7) !important; }

/* tom-select dropdown */
body.ep-theme .ts-dropdown { background: #141415; border-color: var(--ep-border); color: var(--ep-text-2); }
body.ep-theme .ts-dropdown .active { background: rgba(255, 255, 255, 0.06); color: var(--ep-text); }
body.ep-theme .ts-control .item { color: var(--ep-text); }
body.ep-theme .ts-control input { color: var(--ep-text) !important; }

/* ---------- Dropdowns / modals / alerts ---------- */
body.ep-theme .dropdown-menu {
  background: #141415;
  border: 1px solid var(--ep-border);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
body.ep-theme .dropdown-item { color: var(--ep-text-2); border-radius: 8px; }
body.ep-theme .dropdown-item:hover, body.ep-theme .dropdown-item:focus { background: rgba(255, 255, 255, 0.05); color: var(--ep-text); }
body.ep-theme .dropdown-divider { border-color: var(--ep-divider); }

body.ep-theme .modal-content {
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  color: var(--ep-text-2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}
body.ep-theme .modal-header, body.ep-theme .modal-footer { border-color: var(--ep-divider); }
body.ep-theme .modal-title { color: var(--ep-text); }
body.ep-theme .modal-backdrop.show { opacity: 0.7; }
body.ep-theme .offcanvas { background: var(--ep-surface); color: var(--ep-text-2); }

body.ep-theme .alert {
  background: rgba(255, 255, 255, 0.025) !important;
  border: 1px solid var(--ep-border) !important;
  border-radius: 14px;
  color: var(--ep-text-2) !important;
}
body.ep-theme .alert-success { border-color: rgba(61, 220, 151, 0.35) !important; }
body.ep-theme .alert-danger { border-color: rgba(242, 71, 90, 0.35) !important; }
body.ep-theme .alert-warning { border-color: rgba(233, 180, 76, 0.35) !important; }
body.ep-theme .alert-info, body.ep-theme .alert-primary { border-color: rgba(122, 167, 255, 0.35) !important; }

/* ---------- Tabs / pills (segmented filter like "All · Conversions · Deposits") ---------- */
body.ep-theme .nav-tabs, body.ep-theme .nav-pills { border: 0; gap: 0.5rem; }
body.ep-theme .nav-tabs .nav-link,
body.ep-theme .nav-pills .nav-link {
  border: 1px solid var(--ep-border) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--ep-muted) !important;
  padding: 0.45rem 1.1rem;
  box-shadow: none !important;
}
body.ep-theme .nav-tabs .nav-link.active,
body.ep-theme .nav-pills .nav-link.active {
  border-color: var(--ep-border-strong) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
  font-weight: 600;
}
body.ep-theme .tab-content { background: transparent !important; box-shadow: none !important; padding-left: 0; padding-right: 0; }

/* ---------- Pagination (Laravel + DataTables) ---------- */
body.ep-theme .pagination { gap: 0.35rem; }
body.ep-theme .page-link,
body.ep-theme .dataTables_wrapper .paginate_button {
  background: transparent !important;
  border: 1px solid var(--ep-border) !important;
  border-radius: 999px !important;
  color: var(--ep-text-2) !important;
  min-width: 36px;
  text-align: center;
}
body.ep-theme .page-item.active .page-link,
body.ep-theme .dataTables_wrapper .paginate_button.current {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--ep-border-strong) !important;
  color: #fff !important;
}
body.ep-theme .page-item.disabled .page-link { color: var(--ep-dim) !important; }
body.ep-theme .dataTables_wrapper .dataTables_info,
body.ep-theme .dataTables_wrapper .dataTables_length,
body.ep-theme .dataTables_wrapper .dataTables_filter { color: var(--ep-muted) !important; }

/* ---------- Misc ---------- */
body.ep-theme .list-group-item { background: transparent; color: var(--ep-text-2); border-color: var(--ep-divider); }
body.ep-theme .progress { background: rgba(255, 255, 255, 0.06); }
body.ep-theme .progress-bar { background: var(--ep-gold); }
body.ep-theme .bg-white, body.ep-theme .bg-light, body.ep-theme .bg-body { background: var(--ep-surface) !important; }
body.ep-theme .border, body.ep-theme .border-top, body.ep-theme .border-bottom,
body.ep-theme .border-start, body.ep-theme .border-end { border-color: var(--ep-divider) !important; }
body.ep-theme pre, body.ep-theme code { background: #0f0f10; color: #e6d3a8; border-radius: 8px; }
body.ep-theme pre { border: 1px solid var(--ep-border); padding: 1rem; }

body.ep-theme .footer, body.ep-theme .bg-footer-theme {
  background: transparent !important;
  color: var(--ep-dim) !important;
  font-size: 0.75rem;
}
body.ep-theme .footer .footer-link { color: var(--ep-muted) !important; }

/* sweetalert2 + toastr */
body.ep-theme .swal2-popup {
  background: #121213 !important;
  color: var(--ep-text-2) !important;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius) !important;
}
body.ep-theme .swal2-title { color: var(--ep-text) !important; }
body.ep-theme .swal2-html-container { color: var(--ep-text-2) !important; }
body.ep-theme .swal2-styled { border-radius: 999px !important; }
body.ep-theme .swal2-styled.swal2-confirm { background: var(--ep-gold) !important; color: var(--ep-gold-ink) !important; }
body.ep-theme #toast-container > div { border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); opacity: 1; }

/* scrollbars */
body.ep-theme ::-webkit-scrollbar { width: 8px; height: 8px; }
body.ep-theme ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 8px; }
body.ep-theme ::-webkit-scrollbar-track { background: transparent; }
body.ep-theme .ps__thumb-y, body.ep-theme .ps__thumb-x { background-color: rgba(255, 255, 255, 0.15) !important; }
body.ep-theme .ps__rail-y:hover, body.ep-theme .ps__rail-x:hover { background: transparent !important; }

@media (max-width: 767.98px) {
  body.ep-theme .ep-display,
  body.ep-theme .content-wrapper > .container-xxl > h4.fw-bold:first-child { font-size: 2rem; }
  body.ep-theme .ep-banner .ep-banner-text { display: none; }
  body.ep-theme .ep-stat-value { font-size: 1.7rem; }
}
body.ep-theme .min-w-0 { min-width: 0; }

/* ---------- API keys ---------- */
body.ep-theme .ep-narrow { max-width: 760px; }
body.ep-theme .ep-key-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--ep-divider); }
body.ep-theme .ep-key-row:last-child { border-bottom: 0; }
body.ep-theme .ep-key-row > .min-w-0 { flex: 1; }
body.ep-theme code.ep-key-value {
  display: block;
  background: transparent;
  color: var(--ep-muted);
  padding: 0;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  word-break: break-all;
}
body.ep-theme .ep-key-meta { text-align: right; color: var(--ep-muted); font-size: 0.75rem; line-height: 1.4; white-space: nowrap; }
body.ep-theme a.card { transition: border-color 0.15s; }
body.ep-theme a.card:hover { border-color: var(--ep-border-strong) !important; }

/* ---------- Auth (login / register / admin login) — matches the Figma split screen ---------- */
body.ep-auth { min-height: 100vh; }
body.ep-auth .ep-auth-wrap { display: flex; min-height: 100vh; }
body.ep-auth .ep-auth-form {
  position: relative;
  flex: 0 0 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  padding: 6rem 1rem 3rem;
}
body.ep-auth .ep-auth-logo { position: absolute; top: 1.75rem; left: 1.5rem; }
body.ep-auth .ep-auth-logo img { height: 26px; width: auto; filter: invert(1) brightness(1.1); }
body.ep-auth .ep-auth-body { width: 100%; max-width: 360px; margin: 0 auto; }
body.ep-auth .ep-auth-body .ep-display { font-size: 2.4rem; margin-bottom: 0.4rem !important; }
body.ep-auth .ep-auth-body .ep-subtitle { color: var(--ep-muted); font-size: 0.8rem; margin-bottom: 0 !important; }
body.ep-auth .ep-auth-head { margin-bottom: 1.4rem; }
body.ep-auth .ep-auth-switch { text-align: center; color: var(--ep-muted); font-size: 0.8rem; margin: 1.1rem 0 0; }
body.ep-auth .ep-auth-switch a { color: var(--ep-gold); }

/* pill inputs, placeholder-only like the Figma */
body.ep-auth .ep-field { position: relative; margin-bottom: 0.75rem; }
body.ep-auth .ep-field .form-control,
body.ep-auth .ep-field .form-select {
  height: 44px;
  border-radius: 999px !important;
  padding: 0 1.1rem;
  font-size: 0.82rem;
  background-color: rgba(255, 255, 255, 0.015) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
body.ep-auth .ep-field .form-control::placeholder { color: #7d7d7d !important; }
body.ep-auth .ep-field .form-select {
  color: #7d7d7d !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6d6d3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M12 5v14M6 13l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 14px !important;
  padding-right: 2.5rem;
}
body.ep-auth .ep-field .form-select.has-value { color: var(--ep-text) !important; }
body.ep-auth .ep-field .form-control:focus,
body.ep-auth .ep-field .form-select:focus { border-color: rgba(205, 175, 114, 0.7) !important; box-shadow: 0 0 0 3px rgba(205, 175, 114, 0.1) !important; }
body.ep-auth .ep-field .ep-eye {
  position: absolute; right: 0.45rem; top: 22px; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ep-muted); font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
body.ep-auth .ep-field .ep-eye:hover { color: var(--ep-text); }
body.ep-auth .ep-field .ep-eye + .form-control, body.ep-auth .ep-field.has-eye .form-control { padding-right: 2.75rem; }
body.ep-auth .ep-field .help-block { display: block; padding: 0.3rem 1.1rem 0; font-size: 0.75rem; }
body.ep-auth .ep-row { display: flex; gap: 0.6rem; }
body.ep-auth .ep-row > .ep-field { flex: 1; min-width: 0; }
body.ep-auth .ep-forgot { display: block; text-align: right; font-size: 0.75rem; color: var(--ep-muted); margin: -0.25rem 0.5rem 0.75rem 0; }
body.ep-auth .ep-forgot:hover { color: var(--ep-text); }
body.ep-auth .ep-submit {
  height: 44px;
  margin-top: 0.75rem;
  font-size: 0.82rem !important;
  font-weight: 500;
}
body.ep-auth .alert { font-size: 0.8rem; padding: 0.7rem 2.5rem 0.7rem 1rem; }

/* right-hand artwork panel */
body.ep-auth .ep-auth-art {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    radial-gradient(42% 46% at 52% 52%, rgba(214, 205, 170, 0.55), transparent 70%),
    radial-gradient(60% 55% at 50% 62%, rgba(92, 116, 178, 0.6), transparent 72%),
    #051010;
}
body.ep-auth .ep-auth-art::after {
  /* film grain like the Figma artwork */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3e%3cfilter id='n'%3e%3cfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3e%3c/filter%3e%3crect width='100%25' height='100%25' filter='url(%23n)'/%3e%3c/svg%3e");
  pointer-events: none;
}
/* full-page artwork: the image is dark (#091010) on its left half, so the form sits on top of it */
body.ep-auth .ep-auth-wrap.has-hero { background-color: #091010; }
@media (min-width: 992px) {
  body.ep-auth .ep-auth-wrap.has-hero {
    background-image: var(--ep-auth-hero);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right center;
  }
}
@media (min-width: 992px) {
  body.ep-auth .ep-auth-form { flex: 0 0 50%; max-width: 50%; padding: 3rem 2rem; }
  body.ep-auth .ep-auth-logo { top: 2rem; left: 2.2rem; }
}
@media (max-width: 420px) {
  body.ep-auth .ep-row { flex-direction: column; gap: 0; }
}

/* ---------- DataTables (1.11 jquery.dataTables.css + 1.13 bootstrap5) ---------- */
body.ep-theme table.dataTable,
body.ep-theme table.dataTable tbody tr,
body.ep-theme table.dataTable tbody tr.odd,
body.ep-theme table.dataTable tbody tr.even,
body.ep-theme table.dataTable tbody tr > *,
body.ep-theme table.dataTable thead th,
body.ep-theme table.dataTable thead td,
body.ep-theme table.dataTable tfoot th,
body.ep-theme table.dataTable tfoot td,
body.ep-theme table.dataTable.display tbody tr > .sorting_1,
body.ep-theme table.dataTable.display tbody tr > .sorting_2,
body.ep-theme table.dataTable.display tbody tr > .sorting_3,
body.ep-theme table.dataTable.order-column tbody tr > .sorting_1,
body.ep-theme table.dataTable.stripe tbody tr.odd,
body.ep-theme table.dataTable.display tbody tr.odd {
  background-color: transparent !important;
  color: inherit;
}
body.ep-theme table.dataTable > tbody > tr > * { box-shadow: none !important; }
body.ep-theme table.dataTable.hover tbody tr:hover > *,
body.ep-theme table.dataTable.display tbody tr:hover > *,
body.ep-theme table.dataTable.table-hover > tbody > tr:hover > * { background-color: rgba(255, 255, 255, 0.025) !important; }
body.ep-theme table.dataTable tbody tr.selected > * { background-color: rgba(205, 175, 114, 0.1) !important; color: var(--ep-text) !important; }
body.ep-theme table.dataTable thead th,
body.ep-theme table.dataTable thead td,
body.ep-theme table.dataTable.no-footer,
body.ep-theme table.dataTable tbody th,
body.ep-theme table.dataTable tbody td,
body.ep-theme table.dataTable.row-border tbody tr > *,
body.ep-theme table.dataTable.display tbody tr > * { border-color: var(--ep-divider) !important; }
body.ep-theme table.dataTable td.dataTables_empty { color: var(--ep-muted); text-align: center; padding: 2rem 1rem; }

/* "Processing…" loading box */
body.ep-theme .dataTables_wrapper .dataTables_processing,
body.ep-theme div.dataTables_processing {
  background: #141415 !important;
  color: var(--ep-text-2) !important;
  border: 1px solid var(--ep-border-strong) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
  z-index: 5;
}
body.ep-theme div.dataTables_processing > div:last-child > div { background: var(--ep-gold) !important; }

/* 1.11 pagination buttons (white gradient by default) */
body.ep-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  background-image: none !important;
  box-shadow: none !important;
  margin: 0 0.15rem;
}
body.ep-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--ep-border-strong) !important;
  color: #fff !important;
}
body.ep-theme .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.ep-theme .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover { color: var(--ep-dim) !important; opacity: 0.6; }
body.ep-theme .dataTables_wrapper .dataTables_paginate .ellipsis { color: var(--ep-muted); }

/* length / search controls */
body.ep-theme .dataTables_wrapper .dataTables_filter input { padding: 0.35rem 0.75rem; margin: 0 0.4rem; }
body.ep-theme .dataTables_wrapper .dataTables_length select {
  display: inline-block;
  width: auto;
  min-width: 4.75rem;
  margin: 0 0.4rem;
  padding: 0.35rem 2rem 0.35rem 0.75rem !important;
  line-height: 1.4;
}
/* bootstrap5 integration: the <li> wraps a .page-link, so only the link gets the pill */
body.ep-theme .dataTables_wrapper li.paginate_button {
  border: 0 !important;
  background: transparent !important;
  min-width: 0;
  padding: 0 !important;
  margin: 0;
}
body.ep-theme .page-link:focus,
body.ep-theme .page-item.active .page-link { box-shadow: none !important; }
body.ep-theme .dataTables_wrapper .dataTables_length select option { background: #121213; color: var(--ep-text); }
body.ep-theme .dataTables_scrollHead, body.ep-theme .dataTables_scrollBody, body.ep-theme .dataTables_scrollFoot { background: transparent !important; }
body.ep-theme .dataTables_scrollBody { border-color: var(--ep-divider) !important; }
