/* DigitalPedia Payment — Clean Fintech refresh
   UI-only overrides. Existing HTML, IDs, API calls and scripts are preserved. */
:root {
  --primary: #175cd3 !important;
  --primary-dark: #1249ad !important;
  --primary-light: #528bff !important;
  --primary-xlight: #eff6ff !important;
  --secondary: #175cd3 !important;
  --accent: #175cd3 !important;
  --accent2: #475467 !important;
  --success: #067647 !important;
  --danger: #b42318 !important;
  --warning: #b54708 !important;
  --gold: #b54708 !important;
  --bg: #f5f7fa !important;
  --bg2: #f8fafc !important;
  --surface: #ffffff !important;
  --surface2: #fafbfc !important;
  --border: #e4e7ec !important;
  --text: #172033 !important;
  --text2: #344054 !important;
  --text3: #667085 !important;
  --text4: #98a2b3 !important;
  --sidebar: #ffffff !important;
  --sidebar-bg: #ffffff !important;
  --nav-active: #175cd3 !important;
  --glow: transparent !important;
  --primary-glow: transparent !important;
  --primary-glow-sm: transparent !important;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 4%) !important;
  --shadow: 0 1px 3px rgb(16 24 40 / 6%) !important;
  --shadow-lg: 0 8px 24px rgb(16 24 40 / 8%) !important;
  --shadow-glow: none !important;
  --radius: 10px !important;
  --radius-sm: 8px !important;
  --radius-lg: 12px !important;
  --radius-xl: 16px !important;
  --transition: all .16s ease !important;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  color: #172033 !important;
  background: #f5f7fa !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: 3px; }
button, input, select, textarea { font-family: inherit !important; }
button { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
input, select, textarea {
  border-radius: 8px !important;
  border-color: #d0d5dd !important;
  box-shadow: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #175cd3 !important;
  box-shadow: 0 0 0 3px rgb(23 92 211 / 11%) !important;
}
.card, .panel, .chart-card, .stat-card, .doc-box, .ew-card, .feat-card,
.summary-card, .status-card, .payment-detail, .adm-stat, .adm-sidebar,
.qris-container, .qr-frame, .modal-box, .api-box {
  border: 1px solid #e4e7ec !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.card, .panel, .chart-card, .stat-card, .doc-box, .ew-card, .feat-card,
.summary-card, .status-card, .payment-detail, .adm-stat, .qris-container {
  background: #fff !important;
}
.card-title, .section-title, .chart-title, .doc-box-title {
  color: #172033 !important;
  letter-spacing: -.2px;
}
button, .btn, .btn-primary, .btn-main, .login-btn, .action-btn,
.nav-cta, .cta-btns a, .hero-action-btn {
  border-radius: 8px !important;
  box-shadow: none !important;
}
.btn-primary, .btn-main, .login-btn, .action-btn.btn-add,
.nav-cta, .hero-action-btn.primary {
  background: #175cd3 !important;
  border-color: #175cd3 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-main:hover, .login-btn:hover,
.action-btn.btn-add:hover, .nav-cta:hover {
  background: #1249ad !important;
}
.badge, .status-badge, .waiting-badge, .wt-badge, .dp-status {
  box-shadow: none !important;
  text-shadow: none !important;
}
table { border-collapse: collapse; }
th { color: #667085 !important; }
td, th { border-color: #eef0f3 !important; }
::selection { color: #173b77; background: #dbeafe; }

/* Auth pages */
.login-wrap { max-width: 420px !important; }
.logo-area { animation: none !important; }
.logo-img {
  border-radius: 14px !important;
  border: 1px solid #e4e7ec !important;
  box-shadow: none !important;
}
.logo-brand {
  background: none !important;
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  letter-spacing: -.7px;
}
.login-wrap .card, .login-wrap .panel {
  padding: 30px !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid #e4e7ec !important;
  box-shadow: 0 8px 30px rgb(16 24 40 / 5%) !important;
}
.card-title, .card-sub { text-shadow: none !important; }

/* User dashboard and internal pages */
.sidebar, .adm-sidebar {
  background: #fff !important;
  border-right: 1px solid #e4e7ec !important;
  box-shadow: none !important;
}
.sidebar-brand, .adm-sb-brand, .brand, .adm-brand {
  color: #172033 !important;
}
.sidebar-logo, .adm-sb-logo {
  border-radius: 9px !important;
  box-shadow: none !important;
}
.nav-item, .adm-nav-item, .bottom-nav-item, .menu-item {
  border-radius: 8px !important;
  transition: background .15s ease, color .15s ease !important;
}
.nav-item.active, .adm-nav-item.active, .bottom-nav-item.active {
  background: #eff6ff !important;
  color: #175cd3 !important;
  box-shadow: none !important;
}
.hero-card {
  background: #175cd3 !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}
.hero-card::before, .hero-card::after { opacity: .12 !important; }
.hero-balance-amount, .hero-greeting, .hero-name, .hero-balance-label {
  text-shadow: none !important;
}
.quick-menu-item {
  border: 1px solid #e4e7ec !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  animation: none !important;
}
.quick-menu-item:active { transform: none !important; }
.quick-menu-item i, .card-icon, .stat-card-icon, .menu-item-icon {
  border-radius: 9px !important;
  box-shadow: none !important;
}
.bottom-nav {
  background: rgb(255 255 255 / 97%) !important;
  border-top: 1px solid #e4e7ec !important;
  box-shadow: 0 -4px 18px rgb(16 24 40 / 4%) !important;
  backdrop-filter: blur(12px) !important;
}
.mobile-header, .adm-header, .chat-top {
  background: #fff !important;
  border-bottom: 1px solid #e4e7ec !important;
  box-shadow: none !important;
}
.main-content, .adm-main {
  color: #172033;
}
.api-box, .code-block, .bg-box {
  background: #f8fafc !important;
  border-color: #e4e7ec !important;
}
.copy-btn, .header-btn, .filter-btn, .filter-pill {
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* Public landing page */
.bg-orbs, .grid-bg, .orb { display: none !important; }
body:has(.hero) { background: #fff !important; }
nav {
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid #eef0f3 !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px) !important;
}
.nav-brand, .nav-name, .footer-brand { color: #172033 !important; }
.nav-logo { box-shadow: none !important; border-radius: 9px !important; }
.hero {
  background: #fff !important;
  background-image: none !important;
}
.hero-title {
  color: #172033 !important;
  text-shadow: none !important;
  letter-spacing: -1.5px !important;
}
.hero-title .grad, .grad {
  background: none !important;
  color: #175cd3 !important;
  -webkit-text-fill-color: #175cd3 !important;
}
.hero-eyebrow, .nav-badge {
  box-shadow: none !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  color: #175cd3 !important;
}
.hero-desc, .cta-desc, .feat-desc, .footer-text { color: #667085 !important; }
.hero-stats { border-color: #e4e7ec !important; }
.feat-card, .ew-card, .compare-wrap, .cta-box {
  box-shadow: none !important;
  border: 1px solid #e4e7ec !important;
}
.feat-icon { box-shadow: none !important; border-radius: 10px !important; }
.cta-box { background: #f8fafc !important; }
footer { border-top: 1px solid #e4e7ec !important; }
@media (max-width: 640px) {
  .login-wrap .card, .login-wrap .panel { padding: 23px 18px !important; }
  .hero-title { letter-spacing: -1px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ===== FIX: visible, consistent buttons across every page ===== */
button, .btn, a.btn, .btn-primary, .btn-outline, .btn-main, .login-btn,
.action-btn, .nav-cta, .hero-action-btn, .copy-btn, .step-back,
.filter-btn, .filter-pill, .price-btn, .btn-white, .btn-ghost {
  font-weight: 700 !important;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease !important;
  opacity: 1 !important;
}
.btn-primary, button.btn-primary, a.btn-primary, .login-btn, .nav-cta,
.hero-btns .btn-primary, .price-btn.solid {
  background: #175cd3 !important; color: #fff !important;
  border: 1px solid #175cd3 !important;
}
.btn-primary i, .btn-primary svg, .login-btn i, .nav-cta i,
.hero-btns .btn-primary i { color: #fff !important; }
.btn-outline, .btn-ghost, .price-btn.outline {
  background: #fff !important; color: #175cd3 !important;
  border: 1px solid #b8cdf5 !important;
}
button:not(.btn-primary):not(.login-btn):not(.nav-cta):not(.hero-action-btn),
.copy-btn, .header-btn, .step-back {
  color: #175cd3;
}
.header-btn, .step-back {
  background: #eff6ff !important; border: 1px solid #dbeafe !important;
  color: #175cd3 !important;
}
.header-btn i, .step-back i { color: #175cd3 !important; }
.nav-item.active, .adm-nav-item.active, .bottom-nav-item.active {
  background: #eff6ff !important; color: #175cd3 !important;
}
.nav-item.active i, .adm-nav-item.active i, .bottom-nav-item.active i { color: #175cd3 !important; }
.wtype-card { cursor: pointer; }
.wtype-card.selected { border-color: #175cd3 !important; background: #eff6ff !important; }
.wtype-card.selected .wt-title, .wtype-card.selected .wt-icon { color: #175cd3 !important; }

/* ===== Page banners ===== */
.page-promo-banner {
  width: 100%; margin: 0 0 18px; overflow: hidden;
  border: 1px solid #e4eaf4; border-radius: 16px;
  background: #f5f9ff; box-shadow: 0 2px 8px rgb(16 24 40 / 4%);
  line-height: 0;
}
.page-promo-banner img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.withdraw-promo-banner { margin-bottom: 18px; }

/* Dashboard banner artwork sits behind live HTML balance and real action links. */
.hero-card.dashboard-banner-card {
  background-color: #175cd3 !important;
  background-image: linear-gradient(90deg, rgba(23,92,211,.98) 0%, rgba(23,92,211,.93) 48%, rgba(23,92,211,.14) 100%), url("https://i.ibb.co/b5Z6Sw5c/file-000000006ff482078fdeec7503cc6126.png") !important;
  background-size: cover !important; background-position: center right !important;
  border-radius: 16px !important; min-height: 220px;
}
.hero-card.dashboard-banner-card > * { position: relative; z-index: 2; }
.hero-card.dashboard-banner-card .hero-actions { flex-wrap: wrap; }
.hero-card.dashboard-banner-card .hero-action-btn {
  background: rgba(255,255,255,.17) !important; color: #fff !important;
  border: 1px solid rgba(255,255,255,.32) !important;
}
.hero-card.dashboard-banner-card .hero-action-btn i { color: #fff !important; }
@media (max-width: 480px) {
  .page-promo-banner img { aspect-ratio: 16 / 7; }
  .hero-card.dashboard-banner-card { background-position: 62% center !important; padding: 22px 18px !important; }
  .hero-card.dashboard-banner-card .hero-balance-amount { font-size: clamp(25px, 7vw, 32px) !important; }
  .hero-card.dashboard-banner-card .hero-actions { gap: 7px !important; }
  .hero-card.dashboard-banner-card .hero-action-btn { padding: 10px 7px !important; font-size: 12px !important; }
}


/* ===== Mobile polish pass: fix hidden balance cards and action contrast ===== */
.card.balance-highlight {
  display: block !important;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 18px !important;
  padding: 20px 20px 22px !important;
  min-height: 104px !important;
  color: #fff !important;
  background: linear-gradient(118deg, #103b83 0%, #175cd3 52%, #4387f5 100%) !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(23,92,211,.17) !important;
}
.card.balance-highlight::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px; height: 170px;
  right: -42px; top: -76px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 0 18px rgba(255,255,255,.06), 0 0 0 38px rgba(255,255,255,.045);
}
.card.balance-highlight > div { color: #fff !important; }
.card.balance-highlight #disp_balance,
.card.balance-highlight #userBalance {
  display: block; color: #fff !important;
  font-size: clamp(25px, 6.5vw, 32px) !important;
  font-weight: 900 !important; letter-spacing: -.6px;
  margin-top: 7px !important;
}
.card.balance-highlight #userBalanceSub { opacity: .82 !important; }

/* QRIS actions: prevent generic button rules from tinting icons blue. */
#qrisArea #btnCheck, #qrisArea #btnCheck i {
  background: #087f5b !important; color: #fff !important;
  border-color: #087f5b !important;
}
#qrisArea #btnCheck { box-shadow: 0 5px 14px rgba(8,127,91,.16) !important; }
#qrisArea #btnCancel, #qrisArea #btnCancel i {
  background: #fff !important; color: #175cd3 !important;
  border-color: #c8d8f5 !important;
}
#qrisArea > .qris-container { background: transparent !important; }
#qrisArea .waiting-badge { color: #9a4b0b !important; }
#qrisArea .payment-timer { color: #b42318 !important; }
#qrisArea .payment-detail { background: #fff !important; }
#qrisArea .payment-row.total { color: #175cd3 !important; }
#qrisArea .payment-row.total span { color: #175cd3 !important; }

/* Keep primary actions visible even if older selectors target generic buttons. */
button.btn-primary, button.btn-main, button.login-btn, button.btn-success,
.btn-primary, .btn-main, .login-btn {
  background: linear-gradient(135deg,#2165dc,#174db7) !important;
  color: #fff !important; border-color: #2165dc !important;
}
button.btn-primary i, button.btn-main i, button.login-btn i,
button.btn-success i, .btn-primary i, .btn-main i, .login-btn i { color: #fff !important; }
button.btn-success { background: linear-gradient(135deg,#07845d,#066647) !important; border-color: #07845d !important; }
button.btn-ghost, button.btn-outline, .btn-ghost, .btn-outline {
  background: #fff !important; color: #175cd3 !important; border: 1px solid #c8d8f5 !important;
}
button.btn-ghost i, button.btn-outline i, .btn-ghost i, .btn-outline i { color: #175cd3 !important; }

/* WD option icon: polished glassy gradient with subtle motion, not a flat blue block. */
.wtype-card .wt-icon {
  border: 1px solid #e6edfb !important;
  background: linear-gradient(145deg,#f8fbff,#eaf1ff) !important;
  color: #175cd3 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 5px 14px rgba(23,92,211,.08) !important;
}
.wtype-card.selected .wt-icon {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg,#4b8cff 0%,#2165dc 48%,#1747ad 100%) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.45) !important;
  box-shadow: 0 8px 18px rgba(23,92,211,.26), inset 0 1px 0 rgba(255,255,255,.32) !important;
}
.wtype-card.selected .wt-icon::after {
  content: ""; position: absolute; inset: -45% auto -45% -55%; width: 38%;
  transform: rotate(24deg); background: rgba(255,255,255,.22);
  animation: wdIconShine 3.6s ease-in-out infinite;
}
@keyframes wdIconShine { 0%,35% { left:-55%; } 65%,100% { left:130%; } }
.wtype-card { box-shadow: 0 2px 8px rgba(16,24,40,.025); }
.wtype-card.selected { box-shadow: 0 8px 22px rgba(23,92,211,.09) !important; }

/* Do not leave ad-like blank placeholders: preserve only cards with real content. */
@media (max-width: 600px) {
  .main-content { padding-top: 18px; }
  .page-promo-banner { margin-bottom: 16px !important; }
  .card.balance-highlight { padding: 19px 18px 21px !important; }
  #qrisArea .payment-detail { padding: 16px !important; }
  #qrisArea #btnCheck, #qrisArea #btnCancel { min-height: 48px; font-weight: 800 !important; }
}

/* ===== Final mobile spacing and dashboard action contrast ===== */
@media (max-width: 600px) {
  /* Fixed mobile header must not cover the top of page banners/cards. */
  body:has(.mobile-header) .main-content {
    padding-top: 20px !important;
  }
  body:has(.mobile-header) .main-content.no-bottom {
    padding-top: 20px !important;
  }
  .withdraw-promo-banner {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
    border-radius: 18px !important;
  }
  .hero-card.dashboard-banner-card {
    margin-top: 0 !important;
    min-height: 250px !important;
    padding: 24px 18px 20px !important;
    background-position: 68% center !important;
  }
  .hero-card.dashboard-banner-card .hero-action-btn,
  .hero-card.dashboard-banner-card .hero-action-btn:link,
  .hero-card.dashboard-banner-card .hero-action-btn:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 44px !important;
    padding: 11px 10px !important;
    background: linear-gradient(135deg, #2875ef 0%, #1749b8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.38) !important;
    border-radius: 11px !important;
    box-shadow: 0 5px 14px rgba(5,32,85,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.08) !important;
  }
  .hero-card.dashboard-banner-card .hero-action-btn i {
    color: #ffffff !important;
  }
}

/* Ensure the same spacing on devices where :has() is unavailable. */
@media (max-width: 600px) {
  .mobile-header + .main-content { padding-top: 20px !important; }
}


/* FINAL HOTFIX: compact mobile top spacing and blue dashboard action buttons. */
@media (max-width: 600px) {
  body:has(.mobile-header) .main-content,
  body:has(.mobile-header) .main-content.no-bottom,
  .mobile-header + .main-content { padding-top: 20px !important; }
  .withdraw-promo-banner { margin-top: 0 !important; margin-bottom: 16px !important; }
  .hero-card.dashboard-banner-card { margin-top: 0 !important; }
  .hero-card.dashboard-banner-card .hero-action-btn,
  .hero-card.dashboard-banner-card .hero-action-btn:link,
  .hero-card.dashboard-banner-card .hero-action-btn:visited,
  .hero-card.dashboard-banner-card .hero-action-btn:hover,
  .hero-card.dashboard-banner-card .hero-action-btn:focus {
    background: linear-gradient(135deg, #2875ef 0%, #1749b8 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.42) !important;
    box-shadow: 0 5px 14px rgba(5,32,85,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
  }
  .hero-card.dashboard-banner-card .hero-action-btn i { color: #fff !important; }
}


/* ===== Authoritative fix v4: actual dashboard action buttons + compact top gap ===== */
.hero-card.dashboard-banner-card .hero-action-btn,
.hero-card.dashboard-banner-card .hero-action-btn:link,
.hero-card.dashboard-banner-card .hero-action-btn:visited,
.hero-card.dashboard-banner-card .hero-action-btn:hover,
.hero-card.dashboard-banner-card .hero-action-btn:focus,
.hero-card.dashboard-banner-card .hero-action-btn:active {
  background: linear-gradient(135deg, #2875ef 0%, #1749b8 100%) !important;
  background-color: #2165dc !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  border-radius: 11px !important;
  box-shadow: 0 5px 14px rgba(5,32,85,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
  opacity: 1 !important;
  text-decoration: none !important;
}
.hero-card.dashboard-banner-card .hero-action-btn i,
.hero-card.dashboard-banner-card .hero-action-btn:hover i,
.hero-card.dashboard-banner-card .hero-action-btn:focus i {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
@media (max-width: 600px) {
  /* Header is fixed and 64px tall. Keep just 16px breathing room below it. */
  body:has(.mobile-header) .main-content,
  body:has(.mobile-header) .main-content.no-bottom {
    padding-top: calc(var(--header-h, 64px) + 16px) !important;
  }
  .withdraw-promo-banner {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
  }
  .hero-card.dashboard-banner-card {
    margin-top: 0 !important;
  }
}

/* SIDEBAR MENU VISIBILITY FIX: white drawer needs readable inactive links. */
.sidebar {
  background: #ffffff !important;
  color: #172033 !important;
}
.sidebar .sidebar-header {
  background: linear-gradient(180deg, #e8f0ff 0%, #ffffff 100%) !important;
  border-bottom: 1px solid #e4e7ec !important;
}
.sidebar .sidebar-brand { color: #172033 !important; }
.sidebar .sidebar-sub { color: #667085 !important; }
.sidebar .close-sidebar {
  background: #eff6ff !important;
  color: #175cd3 !important;
}
.sidebar .nav-menu {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  padding: 16px 14px 28px !important;
  gap: 4px !important;
}
.sidebar .nav-menu > .nav-item:not(.active):not(.nav-logout) {
  display: flex !important;
  min-height: 48px !important;
  color: #344054 !important;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #344054 !important;
}
.sidebar .nav-menu > .nav-item:not(.active):not(.nav-logout) i {
  color: #175cd3 !important;
  -webkit-text-fill-color: #175cd3 !important;
}
.sidebar .nav-menu > .nav-item.active {
  display: flex !important;
  min-height: 48px !important;
  color: #175cd3 !important;
  background: #eff6ff !important;
  -webkit-text-fill-color: #175cd3 !important;
}
.sidebar .nav-menu > .nav-item.active i {
  color: #175cd3 !important;
  -webkit-text-fill-color: #175cd3 !important;
}
.sidebar .nav-menu > .nav-item.nav-logout {
  display: flex !important;
  min-height: 48px !important;
  color: #b42318 !important;
  -webkit-text-fill-color: #b42318 !important;
  margin-top: 8px !important;
}
.sidebar .nav-divider {
  display: block !important;
  height: 1px !important;
  min-height: 1px !important;
  background: #e4e7ec !important;
  margin: 10px 0 !important;
}
