/* Vanpay Blue UI V2 — Phase 4B.1
 * Sidebar & Dashboard final polish.
 * Visual only: tidak mengubah alur transaksi/AJAX.
 */
:root {
  --vp4b-blue: #079bd3;
  --vp4b-blue-strong: #047aa9;
  --vp4b-blue-soft: #eaf8ff;
  --vp4b-ink: #142437;
  --vp4b-muted: #6e7f90;
  --vp4b-line: #dce9f0;
  --vp4b-surface: #ffffff;
  --vp4b-bg: #f2faff;
  --vp4b-shadow: 0 9px 26px rgba(8, 72, 105, .075);
}

/* ========================= Sidebar ========================= */
.pc-sidebar .navbar-content { padding-bottom: 14px; }
.pc-sidebar .pc-user-card {
  margin: 10px 12px 8px;
  border: 1px solid var(--vp4b-line);
  border-radius: 16px;
  box-shadow: none;
  background: #fff;
}
.pc-sidebar .pc-user-card .card-body { padding: 11px 12px; }
.pc-sidebar .pc-navbar {
  display: block !important;
  padding: 4px 10px 16px !important;
}

.pc-sidebar .vp-sidebar-quick {
  list-style: none;
  margin: 4px 2px 10px;
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  border: 1px solid var(--vp4b-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f7fcff);
}
.pc-sidebar .vp-sidebar-quick-title {
  grid-column: 1 / -1;
  padding: 2px 2px 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--vp4b-ink);
  line-height: 1.25;
}
.pc-sidebar .vp-sidebar-quick-title span { font-size: 12px; font-weight: 800; }
.pc-sidebar .vp-sidebar-quick-title small { color: var(--vp4b-muted); font-size: 9px; }
.pc-sidebar .vp-sidebar-quick-link {
  min-width: 0;
  min-height: 55px;
  padding: 9px 9px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  color: #315066;
  background: #fff;
  border: 1px solid #e4eef4;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.15;
  transition: .18s ease;
}
.pc-sidebar .vp-sidebar-quick-link-wide { grid-column: 1 / -1; min-height: 48px; flex-direction: row; align-items: center; }
.pc-sidebar .vp-sidebar-quick-link i { color: var(--vp4b-blue); font-size: 15px; }
.pc-sidebar .vp-sidebar-quick-link:hover,
.pc-sidebar .vp-sidebar-quick-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--vp4b-blue), #14b8e7);
  border-color: transparent;
  box-shadow: 0 7px 17px rgba(7, 155, 211, .17);
}
.pc-sidebar .vp-sidebar-quick-link:hover i,
.pc-sidebar .vp-sidebar-quick-link.is-active i { color: #fff; }

.pc-sidebar .pc-caption.vp-sidebar-caption {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  margin: 4px 2px !important;
  padding: 0 !important;
  line-height: normal !important;
}
.pc-sidebar .vp-sidebar-caption-btn {
  width: 100%;
  min-height: 43px;
  border: 1px solid #e4eef4;
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #516b7d;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 3px 12px rgba(8, 72, 105, .035);
}
.pc-sidebar .vp-sidebar-caption-copy { display: inline-flex; align-items: center; gap: 10px; }
.pc-sidebar .vp-sidebar-caption-copy > i {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--vp4b-blue-strong);
  background: var(--vp4b-blue-soft);
  font-size: 12px;
}
.pc-sidebar .vp-sidebar-caption-btn:hover,
.pc-sidebar .vp-sidebar-caption.is-open .vp-sidebar-caption-btn {
  color: var(--vp4b-blue-strong);
  border-color: #c9eaf7;
  background: #f8fdff;
}
.pc-sidebar .vp-sidebar-caption-btn .vp-sidebar-chevron {
  color: #8ba0ae;
  font-size: 10px;
  transition: transform .18s ease;
}
.pc-sidebar .vp-sidebar-caption.is-open .vp-sidebar-chevron { transform: rotate(90deg); color: var(--vp4b-blue-strong); }

.pc-sidebar .vp-sidebar-group-item {
  overflow: hidden;
  max-height: 58px;
  opacity: 1;
  transition: max-height .18s ease, opacity .15s ease, margin .18s ease;
}
.pc-sidebar .vp-sidebar-group-item.vp-sidebar-hidden {
  max-height: 0;
  opacity: 0;
  margin: 0 !important;
  pointer-events: none;
}
.pc-sidebar .vp-sidebar-group-item > .pc-link {
  min-height: 38px;
  margin: 1px 4px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11.5px;
}
.pc-sidebar .vp-sidebar-group-item > .pc-link .pc-micon { width: 24px; font-size: 13px; }
.pc-sidebar .vp-sidebar-group-item > .pc-link:hover,
.pc-sidebar .vp-sidebar-group-item.active > .pc-link,
.pc-sidebar .vp-sidebar-group-item > .pc-link.active {
  color: var(--vp4b-blue-strong);
  background: var(--vp4b-blue-soft);
}
.pc-sidebar .vp-sidebar-duplicate-caption,
.pc-sidebar .vp-sidebar-original-quick,
.pc-sidebar .vp-sidebar-quick-caption { display: none !important; }

/* ========================= Dashboard ========================= */
.vp-dashboard-v2 { --bs-gutter-x: 14px; }
.vp-dashboard-v2 > [class*="col-"] { margin-bottom: 12px !important; }
.vp-dashboard-v2 .card {
  border: 1px solid var(--vp4b-line) !important;
  border-radius: 17px !important;
  box-shadow: var(--vp4b-shadow) !important;
  overflow: hidden;
}

.vp-dashboard-v2 .vp-welcome-card {
  background: linear-gradient(135deg, #ffffff 0%, #f1fbff 100%);
  border: 1px solid #d4edf7 !important;
  border-left: 4px solid var(--vp4b-blue) !important;
}
.vp-dashboard-v2 .vp-welcome-card .card-body {
  min-height: 138px;
  padding: 18px 20px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.vp-dashboard-v2 .vp-welcome-copy { min-width: 0; flex: 1; }
.vp-dashboard-v2 .vp-welcome-kicker {
  margin-bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--vp4b-blue-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.vp-dashboard-v2 .vp-welcome-title {
  margin: 0 0 6px;
  color: var(--vp4b-ink);
  font-size: 1.3rem;
  font-weight: 850;
  line-height: 1.2;
}
.vp-dashboard-v2 .vp-welcome-status {
  color: #405b6e;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}
.vp-dashboard-v2 .vp-welcome-help {
  margin-top: 3px !important;
  color: var(--vp4b-muted);
  font-size: 11px;
  line-height: 1.4;
}
.vp-dashboard-v2 .vp-welcome-help a { color: var(--vp4b-blue-strong); font-weight: 750; }
.vp-dashboard-v2 .vp-welcome-logo {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  padding: 9px;
  border: 1px solid #cceaf6;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 20px rgba(7, 122, 169, .09);
}
.vp-dashboard-v2 .vp-welcome-logo img { width: 100%; height: 100%; object-fit: contain; }

.vp-dashboard-v2 .vp-dashboard-stat .card-body {
  min-height: 92px;
  padding: 14px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vp-dashboard-v2 .vp-dashboard-stat .small,
.vp-dashboard-v2 .vp-dashboard-stat .text-muted { color: var(--vp4b-muted) !important; }
.vp-dashboard-v2 .vp-dashboard-stat h5 {
  margin-top: 1px;
  color: var(--vp4b-ink);
  font-size: 1.05rem;
  font-weight: 850;
}
.vp-dashboard-v2 .vp-dashboard-stat[data-vp-stat="saldo"] h5,
.vp-dashboard-v2 .vp-dashboard-stat .text-primary { color: var(--vp4b-blue-strong) !important; }

.vp-dashboard-v2 .vp-dashboard-quick .card-body { padding: 15px !important; }
.vp-dashboard-v2 .vp-dashboard-quick h5 { color: var(--vp4b-ink); font-size: 1rem; font-weight: 850; }
.vp-dashboard-v2 .vp-dashboard-quick .btn-light {
  min-height: 50px;
  padding: 11px 12px !important;
  border: 1px solid #e2edf3;
  color: #294559;
  background: #f8fcff;
  font-size: 12px;
  font-weight: 750;
}
.vp-dashboard-v2 .vp-dashboard-quick .btn-light:hover {
  color: var(--vp4b-blue-strong);
  background: var(--vp4b-blue-soft);
  border-color: #c7eaf8;
}
.vp-dashboard-v2 .vp-dashboard-duplicate-summary { display: none !important; }

.vp-dashboard-v2 .vp-dashboard-section-toggle { cursor: pointer; user-select: none; }
.vp-dashboard-v2 .vp-dashboard-section-toggle .vp-dashboard-chevron {
  margin-left: auto;
  color: #7b8d9c;
  transition: transform .18s ease;
}
.vp-dashboard-v2 .vp-dashboard-collapsible.is-open .vp-dashboard-chevron { transform: rotate(180deg); }
.vp-dashboard-v2 .vp-dashboard-collapse-body {
  max-height: 1800px;
  opacity: 1;
  transition: max-height .25s ease, opacity .2s ease;
}
.vp-dashboard-v2 .vp-dashboard-collapsible:not(.is-open) .vp-dashboard-collapse-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0 !important;
}
.vp-dashboard-v2 .vp-dashboard-updates .list-group-item { padding: 12px 4px; border-color: #edf2f5; }
.vp-dashboard-v2 .vp-dashboard-updates .btn-icon { width: 38px; height: 38px; min-width: 38px; }
.vp-dashboard-v2 .vp-dashboard-update-hidden { display: none !important; }
.vp-dashboard-v2 .vp-dashboard-show-more {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid #d6eaf4;
  border-radius: 11px;
  color: var(--vp4b-blue-strong);
  background: #f4fbff;
  font-weight: 700;
}
.vp-dashboard-v2 .vp-dashboard-promo-toggle { display: none; }
.vp-dashboard-v2 .carousel-inner { border-radius: 17px; }
.vp-dashboard-v2 .carousel-item img { max-height: 220px; object-fit: cover; }

body.vanpay-ui-phase4b1[data-vp-page="dashboard"] .wa-fab,
body.vanpay-ui-phase4b1[data-vp-page="home"] .wa-fab {
  width: 46px !important;
  height: 46px !important;
  right: 13px !important;
  opacity: .92;
}

@media (max-width: 767.98px) {
  .vp-dashboard-v2 { --bs-gutter-x: 10px; }
  .vp-dashboard-v2 > [class*="col-"] { margin-bottom: 9px !important; }
  .vp-dashboard-v2 .card {
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(8, 72, 105, .065) !important;
  }
  .vp-dashboard-v2 .vp-welcome-card .card-body {
    min-height: 116px;
    padding: 14px 15px !important;
    gap: 12px;
  }
  .vp-dashboard-v2 .vp-welcome-kicker { margin-bottom: 5px; font-size: 8.5px; }
  .vp-dashboard-v2 .vp-welcome-title { margin-bottom: 5px; font-size: 1rem; }
  .vp-dashboard-v2 .vp-welcome-status { font-size: 10.5px; line-height: 1.35; }
  .vp-dashboard-v2 .vp-welcome-help { margin-top: 2px !important; font-size: 9.5px; }
  .vp-dashboard-v2 .vp-welcome-logo {
    width: 53px;
    height: 53px;
    flex-basis: 53px;
    padding: 7px;
    border-radius: 15px;
  }
  .vp-dashboard-v2 .vp-dashboard-stat .card-body { min-height: 76px; padding: 11px 12px !important; }
  .vp-dashboard-v2 .vp-dashboard-stat h5 { font-size: .92rem; }
  .vp-dashboard-v2 .vp-dashboard-stat small,
  .vp-dashboard-v2 .vp-dashboard-stat .small { font-size: 9.5px !important; }
  .vp-dashboard-v2 .vp-dashboard-quick .card-body { padding: 13px !important; }
  .vp-dashboard-v2 .vp-dashboard-quick .row { --bs-gutter-x: 7px; --bs-gutter-y: 7px; }
  .vp-dashboard-v2 .vp-dashboard-quick .btn-light { min-height: 45px; padding: 9px 10px !important; font-size: 10.5px; }
  .vp-dashboard-v2 .vp-dashboard-promo-toggle {
    width: 100%;
    border: 1px solid var(--vp4b-line);
    border-radius: 13px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #294559;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: var(--vp4b-shadow);
  }
  .vp-dashboard-v2 .vp-dashboard-promo-wrap { display: none; }
  .vp-dashboard-v2 .vp-dashboard-promo-wrap.is-open { display: block; }
  .vp-dashboard-v2 .carousel-item img { min-height: 120px !important; max-height: 145px; }
  .vp-dashboard-v2 .vp-dashboard-collapsible .card-header { padding: 12px 14px; }
  .vp-dashboard-v2 .vp-dashboard-collapsible .card-header h4 { font-size: .92rem; }
  .vp-dashboard-v2 .vp-dashboard-collapsible .card-body { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 380px) {
  .vp-dashboard-v2 .vp-welcome-logo { display: none; }
  .vp-dashboard-v2 .vp-welcome-card .card-body { min-height: 108px; }
}

body.vanpay-ui-v2[data-pc-theme="dark"] .pc-sidebar .vp-sidebar-quick,
body.vanpay-ui-v2[data-pc-theme="dark"] .pc-sidebar .vp-sidebar-quick-link,
body.vanpay-ui-v2[data-pc-theme="dark"] .pc-sidebar .vp-sidebar-caption-btn,
body.vanpay-ui-v2[data-pc-theme="dark"] .vp-dashboard-v2 .vp-welcome-card,
body.vanpay-ui-v2[data-pc-theme="dark"] .vp-dashboard-v2 .vp-welcome-logo {
  background: var(--vp-surface) !important;
  border-color: var(--vp-line) !important;
}
body.vanpay-ui-v2[data-pc-theme="dark"] .pc-sidebar .vp-sidebar-caption-btn,
body.vanpay-ui-v2[data-pc-theme="dark"] .pc-sidebar .vp-sidebar-quick-link,
body.vanpay-ui-v2[data-pc-theme="dark"] .vp-dashboard-v2 .vp-welcome-title { color: var(--vp-text) !important; }
