/* FIX: supaya dropdown filter tidak ketutup map/frame Leaflet */
.p-nav { position: relative; z-index: 9000; }
.p-topbar { position: relative; z-index: 8000; overflow: visible; isolation: isolate; }
.p-ms { position: relative; z-index: 8100; }
.p-ms.open { z-index: 10000; }
.p-ms-panel { z-index: 10001 !important; }
.p-body { position: relative; z-index: 1; }
.p-map-wrap { position: relative; z-index: 1; }
#prossi-leaflet { position: relative; z-index: 1; }
#prossi-leaflet .leaflet-pane,
#prossi-leaflet .leaflet-control-container {
  z-index: 1 !important;
}

/* Netlify static package generated for Prossi Map login version. */


/* ==================================================
   CABANG PERTAMA / CABANG TRANSAKSI UPDATE
================================================== */
.branch-dashboard-topbar { align-items: flex-end; }
.p-filter { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; max-width: 250px; }
.p-filter-branch { min-width: 190px; }
.p-filter label { font-size: 10.5px; color: #cbbf9e; letter-spacing: .06em; text-transform: uppercase; }
.p-select, .p-input {
  width: 100%; height: 38px; border-radius: 7px; border: 1px solid #4a453a;
  background: #34302a; color: #f6f3ec; font-size: 13px; font-family: 'Jost', sans-serif;
  padding: 0 10px; outline: none;
}
.p-select:focus, .p-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(166,134,79,.18); }
.p-select option { background: #fff; color: #24211c; }
.tx-only, .tx-only-side { display: none; }
#screen-map.tx-mode .tx-only { display: flex; }
#screen-map.tx-mode .tx-only-side { display: flex; }
.p-coverage-badge { display:inline-block; padding:2px 7px; border-radius:12px; background:var(--gold-tint); color:var(--gold-deep); font-size:10.5px; margin-left:6px; white-space:nowrap; }
@media (max-width: 900px) {
  .p-filter { max-width: none; min-width: 140px; }
  .p-map-wrap { min-height: 430px; }
}


/* ==================================================
   MULTI FILTER UPDATE
   Empty selection = Semua data. Hold Cmd/Ctrl to select more.
================================================== */
.p-multi-select {
  height: 74px;
  padding: 6px 8px;
  overflow-y: auto;
}
.p-multi-select option {
  padding: 4px 6px;
  border-radius: 4px;
}
.p-multi-select.has-multi-value {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(166,134,79,.14);
}
.p-selected-hint {
  min-height: 13px;
  font-size: 10.5px;
  color: #a99a76;
  line-height: 1.2;
}
.p-filter label::after {
  content: "";
}
.branch-dashboard-topbar::after {
  content: "Tips: kosongkan pilihan untuk menampilkan semua. Gunakan Cmd/Ctrl + klik untuk memilih beberapa filter sekaligus.";
  flex-basis: 100%;
  color: #a99a76;
  font-size: 10.5px;
  margin-top: -2px;
}

/* ==================================================
   HOME MENU CABANG UPDATE
================================================== */
.p-card .tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 500;
}
.p-card:not(:disabled) { cursor: pointer; }
.p-card:not(:disabled):hover { transform: translateY(-2px); }
.p-card:not(:disabled):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ==================================================
   CUSTOM DROPDOWN MULTI SELECT REVISION
   Native multiple select disembunyikan, UI diganti dropdown compact.
================================================== */
.p-native-multi-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}
.p-mdd {
  position: relative;
  width: 100%;
}
.p-mdd-btn {
  width: 100%;
  height: 38px;
  border-radius: 7px;
  border: 1px solid #4a453a;
  background: #34302a;
  color: #f6f3ec;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  padding: 0 30px 0 10px;
  outline: none;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
.p-mdd-btn::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 11px;
}
.p-mdd.open .p-mdd-btn::after { content: "▴"; }
.p-mdd-btn:hover,
.p-mdd-btn:focus,
.p-mdd-btn.has-sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(166,134,79,.14);
}
.p-mdd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, 88vw);
  max-height: 300px;
  overflow: hidden;
  z-index: 10050;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(0,0,0,.20);
  padding: 8px;
}
.p-mdd.open .p-mdd-panel { display: block; }
.p-mdd-search {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  font-size: 12.5px;
  font-family: 'Jost', sans-serif;
  outline: none;
}
.p-mdd-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(166,134,79,.14);
}
.p-mdd-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 2px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.p-mdd-actions button {
  border: none;
  background: transparent;
  color: var(--gold-deep);
  font-size: 11.5px;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  padding: 0;
}
.p-mdd-list {
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}
.p-mdd-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.25;
}
.p-mdd-opt:hover { background: var(--gold-tint); }
.p-mdd-opt input {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}
.p-mdd-opt span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-mdd-empty {
  padding: 10px 7px;
  font-size: 12px;
  color: var(--ink-soft);
}
.p-filter .p-selected-hint {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.branch-dashboard-topbar::after {
  content: "Kosongkan pilihan untuk menampilkan semua. Klik dropdown untuk memilih lebih dari satu filter.";
}
@media (max-width: 700px) {
  .p-mdd-panel { width: min(300px, 92vw); }
}

/* ==================================================
   POPUP CABANG + PELUANG CABANG BARU
================================================== */
.p-popup { min-width: 190px; font-family: 'Jost', sans-serif; color: var(--ink); }
.p-popup-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.p-popup-total { font-family: 'Marcellus', serif; font-size: 17px; color: var(--gold-deep); margin-bottom: 8px; }
.p-popup-sub { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.p-popup-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 4px 0; font-size: 12.5px; }
.p-popup-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-popup-row b { color: var(--gold-deep); font-weight: 500; }
.p-popup-more, .p-popup-empty { font-size: 11.5px; color: var(--ink-soft); padding-top: 5px; }
.p-beta { font-size: 9.5px; padding: 2px 7px; border-radius: 999px; background: var(--gold-tint); color: var(--gold-deep); margin-left: 4px; vertical-align: middle; }
#tbl-opportunity .p-gap-row { margin-bottom: 7px; line-height: 1.45; }

/* ==================================================
   UI CLEANUP + 3 MENU REVISION
================================================== */
.p-home-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.p-mdd-opt, .p-mdd-opt span, .p-mdd-empty { color: #24211c !important; }
.p-mdd-actions button { color: #24211c !important; font-weight: 500; }
.p-mdd-opt span { font-weight: 400; letter-spacing: 0; text-transform: none; }
.branch-dashboard-topbar {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(160px, 1fr)) auto;
  gap: 10px 12px;
  align-items: end;
}
.branch-dashboard-topbar .p-filter { min-width: 0; max-width: none; width: 100%; flex: none; }
.branch-dashboard-topbar .p-reset { justify-self: end; min-width: 118px; }
.branch-dashboard-topbar .p-hint,
.branch-dashboard-topbar .p-mode-readout { grid-column: 1 / -1; }
.p-mode-readout {
  color: #f6f3ec;
  background: rgba(166,134,79,.14);
  border: 1px solid rgba(166,134,79,.30);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.45;
}
.p-mode-readout b { color: #f3ecdd; font-weight: 500; }
.coverage-only-filter, .coverage-only-side { display: none; }
#screen-map.coverage-radius-mode .coverage-only-filter { display: flex; }
#screen-map.coverage-radius-mode .coverage-only-side { display: block; }
#screen-map.coverage-radius-mode .tx-only,
#screen-map.coverage-radius-mode .tx-only-side { display: none !important; }
#screen-map.coverage-radius-mode .p-gap-row.monitor { background: #fff7ef; }
#screen-map.coverage-radius-mode #tbl-opportunity-suggestion,
#screen-map.coverage-radius-mode #tbl-opportunity-monitor,
#screen-map.coverage-radius-mode .p-opp-controls,
#screen-map.coverage-radius-mode #opportunity-note,
#screen-map.coverage-radius-mode .p-mini-title,
#screen-map.coverage-radius-mode h4:has(.p-beta) { display: none; }
@media (max-width: 1180px) {
  .branch-dashboard-topbar { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .branch-dashboard-topbar .p-reset { justify-self: start; }
}
@media (max-width: 760px) {
  .p-home-grid { grid-template-columns: 1fr; }
  .branch-dashboard-topbar { grid-template-columns: 1fr; }
}

/* ==================================================
   SMART INSIGHT + TRANSACTION LENS
================================================== */
.p-smart-card {
  margin: 4px 0 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}
.p-smart-card h4 { margin-top: 0; }
.p-smart-row {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.45;
}
.p-smart-row:last-child { border-bottom: none; padding-bottom: 2px; }
.p-smart-row b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.p-smart-row span { color: var(--ink-soft); }
.p-tx-lens {
  display: none;
  flex-direction: column !important;
  gap: 8px;
  margin: 2px 0 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf0;
}
#screen-map.tx-mode .p-tx-lens { display: flex !important; }
.p-tx-lens h4 { margin: 0 0 2px; }
.p-lens-box {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.p-lens-box b { color: var(--ink); font-weight: 600; }
.p-lens-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.p-lens-grid div {
  border: 1px solid #efe5d2;
  border-radius: 9px;
  padding: 7px 8px;
  background: #fff;
}
.p-lens-grid span {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-lens-grid small {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
#screen-map.coverage-radius-mode .p-smart-card { display: block; }

/* ==================================================
   FINAL HOME / FILTER / FAQ / FOOTER CLEANUP
================================================== */
.p-home-single {
  grid-template-columns: minmax(280px, 760px) !important;
  justify-content: center;
  padding-bottom: 20px !important;
}
.p-main-card {
  min-height: 150px;
  padding: 28px 30px !important;
}
.p-main-card h3 { font-size: 20px !important; }
.p-main-card p { font-size: 13.5px !important; max-width: 640px; }
.p-home-faq {
  width: min(980px, calc(100% - 56px));
  margin: 0 auto 36px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.p-faq-head { margin-bottom: 12px; }
.p-faq-kicker {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.p-faq-head h3 {
  font-family: 'Marcellus', serif;
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--ink);
}
.p-faq-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}
.p-home-faq details {
  border-top: 1px dashed var(--line);
  padding: 12px 0;
}
.p-home-faq details:last-child { padding-bottom: 0; }
.p-home-faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.p-home-faq summary::-webkit-details-marker { display: none; }
.p-home-faq summary::after {
  content: "▾";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--gold-deep);
}
.p-home-faq details[open] summary::after { content: "▴"; }
.p-home-faq p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.branch-dashboard-topbar {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  gap: 12px 14px !important;
  align-items: start !important;
  padding: 18px 22px !important;
}
.branch-dashboard-topbar .p-filter {
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  display: flex !important;
  min-height: 72px;
}
.branch-dashboard-topbar .p-filter label {
  min-height: 14px;
  line-height: 14px;
  margin: 0;
}
.branch-dashboard-topbar .p-select,
.branch-dashboard-topbar .p-input,
.branch-dashboard-topbar .p-mdd-btn {
  height: 40px;
}
.branch-dashboard-topbar .p-selected-hint {
  min-height: 14px;
  margin-top: 2px;
}
.branch-dashboard-topbar .p-reset {
  grid-column: 1 / 2;
  grid-row: auto;
  justify-self: start !important;
  align-self: start !important;
  min-width: 130px;
  margin-top: 2px;
}
.branch-dashboard-topbar .p-hint,
.branch-dashboard-topbar .p-mode-readout {
  grid-column: 1 / -1 !important;
}
.branch-dashboard-topbar .p-hint { margin-top: 2px; }
#screen-map.tx-mode .branch-dashboard-topbar {
  grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
}
#screen-map.coverage-radius-mode .branch-dashboard-topbar {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
}
.p-footer {
  background: #17191a;
  color: rgba(255,255,255,.55);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.p-footer-mark { display: flex; flex-direction: column; gap: 2px; }
.p-footer-logo { color: #d7bd72; letter-spacing: .16em; font-size: 18px; }
.p-footer-sub { color: rgba(255,255,255,.52); letter-spacing: .24em; font-size: 9px; }
.p-footer-copy { font-size: 13px; letter-spacing: .02em; }
@media (max-width: 1180px) {
  .branch-dashboard-topbar,
  #screen-map.tx-mode .branch-dashboard-topbar,
  #screen-map.coverage-radius-mode .branch-dashboard-topbar {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .p-home-faq { width: calc(100% - 32px); padding: 18px; }
  .branch-dashboard-topbar,
  #screen-map.tx-mode .branch-dashboard-topbar,
  #screen-map.coverage-radius-mode .branch-dashboard-topbar {
    grid-template-columns: 1fr !important;
  }
  .p-footer { flex-direction: column; align-items: flex-start; }
}

/* ==================================================
   MODE-SPECIFIC FILTER VISIBILITY FIX
   Jangan override filter mode dengan display:flex global.
   Cabang Pertama: hanya Cabang + Wilayah.
   Cabang Transaksi: Cabang + Tanggal + Behavior + Wilayah.
   Coverage Cabang: Cabang + Range Jarak + Wilayah.
================================================== */
#screen-map:not(.tx-mode) .tx-only,
#screen-map.coverage-radius-mode .tx-only,
#screen-map:not(.tx-mode) .tx-only-side,
#screen-map.coverage-radius-mode .tx-only-side {
  display: none !important;
}

#screen-map:not(.coverage-radius-mode) .coverage-only-filter,
#screen-map:not(.coverage-radius-mode) .coverage-only-side {
  display: none !important;
}

#screen-map.tx-mode:not(.coverage-radius-mode) .tx-only {
  display: flex !important;
}

#screen-map.tx-mode:not(.coverage-radius-mode) .tx-only-side {
  display: flex !important;
}

#screen-map.coverage-radius-mode .coverage-only-filter {
  display: flex !important;
}

#screen-map.coverage-radius-mode .coverage-only-side {
  display: block !important;
}

#screen-map:not(.tx-mode):not(.coverage-radius-mode) .branch-dashboard-topbar {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) auto !important;
}

#screen-map.tx-mode .branch-dashboard-topbar {
  grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
}

#screen-map.coverage-radius-mode .branch-dashboard-topbar {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) auto !important;
}

@media (max-width: 1180px) {
  #screen-map:not(.tx-mode):not(.coverage-radius-mode) .branch-dashboard-topbar,
  #screen-map.tx-mode .branch-dashboard-topbar,
  #screen-map.coverage-radius-mode .branch-dashboard-topbar {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #screen-map:not(.tx-mode):not(.coverage-radius-mode) .branch-dashboard-topbar,
  #screen-map.tx-mode .branch-dashboard-topbar,
  #screen-map.coverage-radius-mode .branch-dashboard-topbar {
    grid-template-columns: 1fr !important;
  }
}


/* ==================================================
   FAQ PAGE + HOME MENU ANIMATION
================================================== */
.p-home-single .p-card,
.p-faq-open-btn,
.p-faq-start {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.p-home-single .p-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
  box-shadow: 0 18px 42px rgba(122,98,56,.14) !important;
  border-color: var(--gold) !important;
}
.p-home-single .p-card:hover .ic {
  background: var(--gold-tint);
  transform: rotate(-4deg) scale(1.06);
}
.p-home-actions {
  width: min(700px, calc(100% - 56px));
  margin: -12px auto 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.p-faq-open-btn,
.p-faq-start {
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--gold-deep);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
}
.p-faq-open-btn:hover,
.p-faq-start:hover {
  background: var(--ink);
  color: #f3ecdd;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(36,33,28,.12);
}
.p-faq-start { margin-left: auto; }
.p-faq-page {
  width: min(1050px, calc(100% - 56px));
  margin: 32px auto 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 42px rgba(122,98,56,.06);
}
.p-faq-page-head { margin-bottom: 18px; }
.p-faq-page-head h2 {
  font-family: 'Marcellus', serif;
  font-weight: 400;
  color: var(--ink);
  font-size: 28px;
  margin: 4px 0 10px;
}
.p-faq-page-head p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
  max-width: 900px;
}
.p-faq-grid details {
  border-top: 1px dashed var(--line);
  padding: 15px 0;
}
.p-faq-grid details:last-child { border-bottom: 1px dashed var(--line); }
.p-faq-grid summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 28px;
  font-size: 16px;
  transition: color .18s ease, transform .18s ease;
}
.p-faq-grid summary::-webkit-details-marker { display: none; }
.p-faq-grid summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  color: var(--gold-deep);
  transition: transform .18s ease;
}
.p-faq-grid details[open] summary::after { transform: rotate(180deg); }
.p-faq-grid summary:hover {
  color: var(--gold-deep);
  transform: translateX(3px);
}
.p-faq-grid p {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 9px 0 0;
}
.p-faq-grid b { color: var(--ink); }
.p-privacy-note {
  margin: 0 0 12px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .p-home-actions, .p-faq-page { width: calc(100% - 32px); }
  .p-faq-page { padding: 20px; }
  .p-faq-page-head h2 { font-size: 23px; }
  .p-faq-start { margin-left: 0; }
}

.p-home-faq { display: none !important; }

/* === vNext polish: FAQ page, data quality, export, ranking controls === */
.p-faq-start,
.p-faq-open-btn,
.p-main-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.p-faq-start:hover,
.p-faq-open-btn:hover,
.p-main-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(122, 98, 56, .14);
  border-color: var(--gold);
}
.p-side-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.p-side-tools label {
  grid-column: 1 / -1;
  font-size: 10.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.p-side-tools select,
.p-side-tools button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  padding: 6px 8px;
}
.p-side-tools button {
  cursor: pointer;
  color: var(--gold-deep);
}
.p-side-tools button:hover {
  border-color: var(--gold);
  background: var(--gold-tint);
}
.p-data-quality-card {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
}
.p-data-quality-card h4 {
  margin-top: 0 !important;
}
.p-dq-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.p-dq-row span { color: var(--ink-soft); }
.p-dq-row b { color: var(--gold-deep); font-weight: 500; text-align: right; }
.p-faq-grid details {
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.p-faq-grid details:hover {
  background: #fffdf9;
  transform: translateX(3px);
}
@media (max-width: 720px) {
  .p-side-tools { grid-template-columns: 1fr; }
}

/* Meaningful mode refinements */
.p-filter-nodata { min-width: 220px; }
.p-network-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #fffdf8;
  display: block;
}
.p-network-card h4 { margin-top: 0; }
.p-network-card .p-lens-box { margin-bottom: 8px; }
.p-empty { font-size: 12px; color: var(--ink-soft); padding: 6px 0; }
#tbl-network-overlap .p-row span { max-width: 78%; }

/* Overlap panel readability fix */
.p-network-card {
  overflow: hidden;
}
.p-network-card .p-lens-box {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
#tbl-network-overlap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.p-network-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.p-network-row .pair {
  min-width: 0;
  color: var(--ink);
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
}
.p-network-row .pair em {
  font-style: normal;
  color: var(--gold-deep);
  margin: 0 3px;
}
.p-network-row b {
  color: var(--gold-deep);
  font-weight: 600;
  white-space: nowrap;
}
.p-network-card .p-note {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

/* ==================================================
   OVERLAP PANEL COMPACT FIX
   Panel Pola Lintas Cabang harus full-width one-column di sidebar.
   Menghindari conflict dari .tx-only-side { display:flex } global.
================================================== */
#screen-map.tx-mode:not(.coverage-radius-mode) .p-network-card.tx-only-side {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}
.p-network-card,
.p-network-card * {
  min-width: 0;
}
.p-network-card {
  clear: both;
  overflow: visible !important;
}
.p-network-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px !important;
}
.p-network-card .p-lens-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  margin: 0 0 10px !important;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}
.p-network-summary-line {
  display: block;
  margin-bottom: 8px;
}
.p-network-summary-line:last-child { margin-bottom: 0; }
.p-network-summary-line b {
  color: var(--ink);
  font-weight: 600;
}
#tbl-network-overlap {
  display: block !important;
  width: 100% !important;
  margin-top: 8px !important;
}
.p-network-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.p-network-row .pair {
  display: block;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-height: 1.35;
}
.p-network-row b {
  justify-self: end;
  text-align: right;
  font-size: 13px;
  color: var(--gold-deep);
}
.p-network-card .p-note {
  display: block !important;
  width: 100%;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ==================================================
   COVERAGE MODE CLEANUP - radius filter moved to sidebar
   Radius range is no longer a top filter. Monitoring radius lives in
   the Area Potensial untuk Monitoring sidebar card.
================================================== */
#screen-map.coverage-radius-mode .coverage-only-filter {
  display: none !important;
}
#screen-map.coverage-radius-mode .branch-dashboard-topbar {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) auto !important;
}
#screen-map.coverage-radius-mode .p-opportunity-block {
  display: block !important;
  order: -1;
  margin: 12px 0 !important;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}
#screen-map.coverage-radius-mode .p-opportunity-block h4,
#screen-map.coverage-radius-mode .p-opportunity-block h4:has(.p-beta),
#screen-map.coverage-radius-mode .p-opportunity-block .p-opp-controls,
#screen-map.coverage-radius-mode .p-opportunity-block #tbl-opportunity-suggestion,
#screen-map.coverage-radius-mode .p-opportunity-block #tbl-opportunity-monitor,
#screen-map.coverage-radius-mode .p-opportunity-block #opportunity-note,
#screen-map.coverage-radius-mode .p-opportunity-block .p-mini-title {
  display: block !important;
}
#screen-map.coverage-radius-mode .p-opportunity-block h4 {
  margin-top: 0 !important;
}
#screen-map.coverage-radius-mode .p-opportunity-block .p-opp-controls {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 10px;
}
#screen-map.coverage-radius-mode .p-opportunity-block .p-mini-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin: 10px 0 6px;
}
#screen-map.coverage-radius-mode .p-opportunity-block .p-gap-row {
  margin-bottom: 7px;
  line-height: 1.45;
}
#screen-map.coverage-radius-mode .p-opportunity-block #opportunity-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 10.8px;
  line-height: 1.45;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  #screen-map.coverage-radius-mode .p-opportunity-block .p-opp-controls {
    grid-template-columns: 1fr;
  }
}


/* ==================================================
   HOME PAGE PREMIUM MOTION + SCROLL REVEAL
================================================== */
.p-hero-photos {
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}
.p-hero-photos img {
  transition: transform .8s cubic-bezier(.2,.8,.2,1), filter .8s ease, opacity .8s ease;
  will-change: transform;
}
.p-hero-photos:hover img {
  transform: scale(1.035);
  filter: saturate(1.05) contrast(1.02);
}
.p-kicker,
.p-intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-deep);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.p-kicker::before,
.p-intro-eyebrow::before { content: '✦'; font-size: 10px; }
.p-hero .p-kicker { margin: 0 auto 16px; }
.p-home-intro {
  width: min(940px, calc(100% - 56px));
  margin: 18px auto 12px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 10%, rgba(166,134,79,.18), transparent 28%),
    linear-gradient(135deg, #fff 0%, #fffdf9 58%, #f5eddf 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  box-shadow: 0 18px 50px rgba(122,98,56,.08);
}
.p-home-intro h2 {
  font-family: 'Marcellus', serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
  margin: 12px 0 10px;
  color: var(--ink);
}
.p-home-intro p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  max-width: 610px;
}
.p-home-primary {
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #8a642d, #4a321d);
  color: #fffaf0;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(74,50,29,.18);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.p-home-primary span { display: inline-block; margin-left: 8px; transition: transform .22s ease; }
.p-home-primary:hover { transform: translateY(-3px); filter: brightness(1.04); box-shadow: 0 18px 38px rgba(74,50,29,.24); }
.p-home-primary:hover span { transform: translateX(4px); }
.p-home-feature-strip {
  width: min(1280px, calc(100% - 56px));
  margin: 6px auto 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.p-home-feature-card {
  position: relative;
  min-height: 205px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px 22px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(166,134,79,.28), rgba(230,224,210,.45)) border-box;
  color: var(--ink);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(122,98,56,.07);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, border-color .28s ease, background .28s ease;
}
.p-home-feature-card::after {
  content: '';
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 120px;
  background: radial-gradient(circle, rgba(166,134,79,.16), transparent 65%);
  transform: translateY(24px);
  transition: transform .28s ease, opacity .28s ease;
  opacity: .65;
}
.p-home-feature-card:hover {
  transform: translateY(-9px) scale(1.015);
  border-color: rgba(166,134,79,.75);
  box-shadow: 0 24px 56px rgba(122,98,56,.16);
}
.p-home-feature-card:hover::after { transform: translateY(0); opacity: 1; }
.p-home-feature-no {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 600;
}
.p-home-feature-ic {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: #f5efe4;
  border: 1px solid rgba(166,134,79,.18);
  font-size: 22px;
  transition: transform .28s ease, background .28s ease;
}
.p-home-feature-card:hover .p-home-feature-ic { transform: rotate(-6deg) scale(1.08); background: #fff4d3; }
.p-home-feature-card h3 {
  font-family: 'Marcellus', serif;
  font-size: 21px;
  font-weight: 400;
  margin: 0 0 10px;
}
.p-home-feature-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.p-home-metric-strip {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1.15fr .7fr .7fr .7fr 1.35fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(122,98,56,.06);
}
.p-home-map-mini {
  position: relative;
  min-height: 110px;
  background:
    radial-gradient(circle at 24% 42%, rgba(166,134,79,.22) 0 4px, transparent 5px),
    radial-gradient(circle at 58% 28%, rgba(166,134,79,.22) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 66%, rgba(166,134,79,.22) 0 4px, transparent 5px),
    linear-gradient(135deg, #f7f1e8, #fff);
}
.p-home-map-mini span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  background: #a6864f;
  transform: rotate(-45deg);
  box-shadow: 0 8px 14px rgba(122,98,56,.22);
  animation: pPinFloat 3.8s ease-in-out infinite;
}
.p-home-map-mini span:nth-child(1){ left: 24%; top: 32%; }
.p-home-map-mini span:nth-child(2){ left: 54%; top: 20%; animation-delay: .35s; }
.p-home-map-mini span:nth-child(3){ left: 68%; top: 58%; animation-delay: .7s; }
.p-home-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px;
  border-left: 1px solid var(--line);
}
.p-home-metric b {
  font-family: 'Marcellus', serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--gold-deep);
  line-height: 1;
}
.p-home-metric span {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: lowercase;
}
.p-home-metric-strip p {
  margin: 0;
  padding: 20px 24px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
  display: flex;
  align-items: center;
}
.p-home-actions { margin-top: 0; }
.p-home-actions span { display: none !important; }
.p-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease var(--reveal-delay, 0ms), transform .7s cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms);
}
.p-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes pPinFloat {
  0%, 100% { transform: rotate(-45deg) translate(0, 0); }
  50% { transform: rotate(-45deg) translate(4px, -5px); }
}
@media (max-width: 980px) {
  .p-home-intro { flex-direction: column; align-items: flex-start; }
  .p-home-feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-home-metric-strip { grid-template-columns: 1fr 1fr; }
  .p-home-map-mini, .p-home-metric-strip p { grid-column: 1 / -1; }
  .p-home-metric:nth-of-type(1), .p-home-metric:nth-of-type(3) { border-left: 0; }
}
@media (max-width: 620px) {
  .p-home-intro,
  .p-home-feature-strip,
  .p-home-metric-strip { width: calc(100% - 32px); }
  .p-home-feature-strip { grid-template-columns: 1fr; }
  .p-home-metric-strip { grid-template-columns: 1fr; }
  .p-home-metric, .p-home-metric-strip p { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .p-reveal, .p-hero-photos img, .p-home-feature-card, .p-home-primary, .p-home-map-mini span {
    transition: none !important;
    animation: none !important;
  }
  .p-reveal { opacity: 1; transform: none; }
}

/* ==================================================
   HOME REFINEMENT - premium landing, no analytic summary strip
   ================================================== */
#screen-home {
  background:
    radial-gradient(circle at 12% 4%, rgba(166,134,79,.08), transparent 24%),
    radial-gradient(circle at 92% 18%, rgba(166,134,79,.10), transparent 28%),
    #fbfaf7;
}
.p-hero-photos {
  width: min(1320px, calc(100% - 64px));
  margin: 18px auto 0;
  height: clamp(280px, 34vw, 430px);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 70px rgba(122,98,56,.14);
}
.p-hero-photos::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.75) 30%, rgba(255,255,255,.18) 68%, rgba(255,255,255,.02) 100%),
    radial-gradient(circle at 42% 100%, rgba(255,255,255,.85), transparent 44%);
  pointer-events: none;
}
.p-hero-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  animation: pHeroBreath 14s ease-in-out infinite alternate;
}
.p-hero {
  margin-top: -378px;
  width: min(1320px, calc(100% - 64px));
  min-height: clamp(260px, 31vw, 400px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: min(72px, 6vw);
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.p-hero .p-kicker {
  margin: 0 0 18px;
}
.p-hero .p-word {
  font-family: 'Marcellus', serif;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: .98;
  max-width: 560px;
  text-align: left;
  letter-spacing: .01em;
  color: var(--ink);
}
.p-hero .p-word::before { content: 'Customer & Branch'; display: block; }
.p-hero .p-word { font-size: 0; }
.p-hero .p-word::before,
.p-hero .p-word::after { font-size: clamp(38px, 4.6vw, 66px); }
.p-hero .p-word::after { content: 'Intelligence'; display: block; }
.p-hero .p-word-sub,
.p-hero .p-rule,
.p-hero .p-hero-tag { display: none; }
.p-home-intro {
  margin-top: -76px;
  position: relative;
  z-index: 3;
  width: min(1040px, calc(100% - 64px));
  padding: 18px 22px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.82);
}
.p-home-intro h2 { display: none; }
.p-home-intro p { max-width: 660px; }
.p-home-section-head {
  width: min(760px, calc(100% - 56px));
  margin: 44px auto 22px;
  text-align: center;
}
.p-home-section-head h2 {
  margin: 8px 0 8px;
  font-family: 'Marcellus', serif;
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 38px);
  color: var(--ink);
}
.p-home-section-head p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}
.p-home-section-head::after {
  content: '';
  display: block;
  width: 54px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--gold);
  opacity: .55;
}
.p-home-feature-strip {
  margin-bottom: 22px;
}
.p-home-feature-card {
  min-height: 245px;
  padding: 28px 22px 22px;
  background:
    radial-gradient(circle at 86% 4%, rgba(166,134,79,.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,253,249,.96));
}
.p-home-feature-card:hover {
  transform: translateY(-10px) scale(1.012);
}
.p-feature-cta {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(166,134,79,.45);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,.72);
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.p-feature-cta b {
  font-weight: 500;
  transition: transform .25s ease;
}
.p-home-feature-card:hover .p-feature-cta {
  background: #fff7e7;
  border-color: rgba(166,134,79,.85);
}
.p-home-feature-card:hover .p-feature-cta b {
  transform: translateX(4px);
}
.p-home-map-motion {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(250,246,238,.92));
  box-shadow: 0 18px 46px rgba(122,98,56,.08);
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(260px, 1.35fr);
  overflow: hidden;
}
.p-motion-map {
  position: relative;
  min-height: 150px;
  background:
    radial-gradient(circle at 20% 35%, rgba(166,134,79,.10), transparent 22%),
    radial-gradient(circle at 70% 70%, rgba(166,134,79,.08), transparent 24%),
    #f6f0e7;
}
.p-motion-map svg {
  position: absolute;
  inset: 10px 20px;
  width: calc(100% - 40px);
  height: calc(100% - 20px);
}
.p-motion-island {
  fill: none;
  stroke: rgba(166,134,79,.22);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.p-motion-route {
  fill: none;
  stroke: rgba(122,98,56,.52);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 7 9;
  animation: pRouteMove 3.8s linear infinite;
}
.p-motion-route.route-b {
  stroke: rgba(166,134,79,.36);
  animation-duration: 4.8s;
  animation-direction: reverse;
}
.p-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: #a6864f;
  transform: rotate(-45deg);
  box-shadow: 0 10px 18px rgba(122,98,56,.25);
  animation: pPinBounce 2.8s ease-in-out infinite;
}
.p-pin::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff9ec;
  left: 5.5px;
  top: 5.5px;
}
.pin-a { left: 18%; top: 42%; }
.pin-b { left: 46%; top: 27%; animation-delay: .35s; }
.pin-c { left: 67%; top: 58%; animation-delay: .7s; }
.pin-d { left: 84%; top: 38%; animation-delay: 1.05s; }
.p-pulse {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(166,134,79,.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pPulse 2.9s ease-out infinite;
}
.pulse-a { left: 46%; top: 32%; }
.pulse-b { left: 67%; top: 64%; animation-delay: .8s; }
.p-motion-copy {
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.p-motion-copy h3 {
  font-family: 'Marcellus', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 8px;
}
.p-motion-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.p-home-actions {
  margin-bottom: 34px;
}
@keyframes pHeroBreath {
  0% { transform: scale(1.01) translateX(0); }
  100% { transform: scale(1.055) translateX(10px); }
}
@keyframes pRouteMove {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -64; }
}
@keyframes pPinBounce {
  0%, 100% { transform: rotate(-45deg) translate(0, 0); }
  50% { transform: rotate(-45deg) translate(5px, -7px); }
}
@keyframes pPulse {
  0% { opacity: .75; transform: translate(-50%, -50%) scale(.45); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45); }
}
@media (max-width: 980px) {
  .p-hero { margin-top: -330px; min-height: 320px; }
  .p-home-map-motion { grid-template-columns: 1fr; }
  .p-motion-map { min-height: 130px; }
}
@media (max-width: 620px) {
  .p-hero-photos { width: calc(100% - 28px); height: 360px; margin-top: 14px; }
  .p-hero { width: calc(100% - 28px); margin-top: -350px; padding-left: 24px; min-height: 330px; }
  .p-home-intro { width: calc(100% - 32px); margin-top: -38px; }
  .p-home-map-motion { width: calc(100% - 32px); }
  .p-motion-copy { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-hero-photos img,
  .p-motion-route,
  .p-pin,
  .p-pulse { animation: none !important; }
}


/* ==================================================
   HOME FINAL CLEANUP - premium carousel + tidy cards
   ================================================== */
#screen-home {
  background:
    radial-gradient(circle at 12% 3%, rgba(166,134,79,.08), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(166,134,79,.10), transparent 28%),
    #fbfaf7 !important;
  padding-bottom: 30px;
}
.p-home-topnav {
  width: min(1320px, calc(100% - 64px));
  margin: 18px auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 6;
}
.p-home-logo span {
  display: block;
  font-family: 'Marcellus', serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: .22em;
  color: var(--gold-deep);
}
.p-home-logo small {
  display: block;
  margin-top: 5px;
  padding-left: 2px;
  font-size: 10px;
  letter-spacing: .42em;
  color: var(--ink-soft);
}
.p-home-nav-btn {
  border: 1px solid rgba(166,134,79,.45);
  background: rgba(255,255,255,.72);
  color: var(--gold-deep);
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(122,98,56,.08);
  transition: transform .24s ease, box-shadow .24s ease, background .24s ease;
}
.p-home-nav-btn span { display: inline-block; margin-left: 8px; transition: transform .24s ease; }
.p-home-nav-btn:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 18px 34px rgba(122,98,56,.14); }
.p-home-nav-btn:hover span { transform: translateX(4px); }
#screen-home .p-home-hero { position: relative; width: 100%; }
#screen-home .p-hero-photos {
  width: min(1320px, calc(100% - 64px)) !important;
  height: clamp(300px, 36vw, 470px) !important;
  margin: 0 auto !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  position: relative !important;
  display: block !important;
  border: 1px solid rgba(230,224,210,.92);
  box-shadow: 0 26px 80px rgba(122,98,56,.14);
  background: #f6efe5;
}
#screen-home .p-hero-photos::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.83) 31%, rgba(255,255,255,.25) 68%, rgba(255,255,255,.05) 100%),
    radial-gradient(circle at 42% 100%, rgba(255,255,255,.88), transparent 46%);
  pointer-events: none;
}
.p-hero-slider,
.p-hero-slide { position: absolute; inset: 0; }
.p-hero-slide {
  opacity: 0;
  transform: translateX(24px) scale(1.03);
  transition: opacity .95s ease, transform 1.15s cubic-bezier(.2,.8,.2,1);
  z-index: 1;
}
.p-hero-slide.active { opacity: 1; transform: translateX(0) scale(1.01); z-index: 2; }
#screen-home .p-hero-slide img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: 0 !important;
  animation: pHeroBreath 13s ease-in-out infinite alternate;
}
.p-hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.p-hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 0 1px rgba(122,98,56,.18);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.p-hero-dots button.active { width: 22px; background: var(--gold-deep); }
#screen-home .p-hero {
  width: min(1320px, calc(100% - 64px)) !important;
  margin: calc(-1 * clamp(300px, 36vw, 470px)) auto 0 !important;
  min-height: clamp(300px, 36vw, 470px) !important;
  padding: min(82px, 6vw) 0 110px min(76px, 6vw) !important;
  align-items: flex-start !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 4 !important;
  pointer-events: none;
}
#screen-home .p-hero .p-kicker { margin: 0 0 16px !important; }
#screen-home .p-hero .p-word {
  font-size: 0 !important;
  letter-spacing: 0 !important;
  color: var(--ink) !important;
  text-align: left !important;
}
#screen-home .p-hero .p-word::before,
#screen-home .p-hero .p-word::after {
  display: block;
  font-family: 'Marcellus', serif;
  font-size: clamp(45px, 5vw, 76px) !important;
  line-height: .97;
  color: var(--ink);
  letter-spacing: -.015em;
}
#screen-home .p-hero .p-word::before { content: 'Customer &'; }
#screen-home .p-hero .p-word::after { content: 'Branch Intelligence'; max-width: 610px; }
#screen-home .p-hero .p-word-sub,
#screen-home .p-hero .p-rule,
#screen-home .p-hero .p-hero-tag { display: none !important; }
#screen-home .p-home-intro {
  width: min(980px, calc(100% - 96px)) !important;
  margin: -82px auto 50px !important;
  position: relative !important;
  z-index: 5 !important;
  padding: 18px 22px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.86) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 55px rgba(122,98,56,.14);
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
}
#screen-home .p-home-intro h2 { display: none !important; }
#screen-home .p-home-intro p { max-width: 720px !important; font-size: 13.5px !important; line-height: 1.65 !important; }
#screen-home .p-home-section-head {
  margin: 0 auto 30px !important;
  text-align: center !important;
  width: min(760px, calc(100% - 56px));
}
#screen-home .p-home-section-head h2 { font-size: clamp(32px, 3.6vw, 50px) !important; line-height: 1.06 !important; margin: 10px 0 10px !important; }
#screen-home .p-home-feature-strip {
  width: min(1320px, calc(100% - 64px)) !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px !important;
  margin: 0 auto 28px !important;
}
#screen-home .p-home-feature-card {
  min-height: 260px !important;
  padding: 30px 24px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  overflow: hidden !important;
}
#screen-home .p-home-feature-card h3 { font-size: 24px !important; margin: 8px 0 12px !important; line-height: 1.12 !important; }
#screen-home .p-home-feature-card p { font-size: 13.5px !important; line-height: 1.6 !important; margin-bottom: 20px !important; padding-right: 8px; }
#screen-home .p-feature-cta {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin-top: auto !important;
  width: 100% !important;
  min-height: 42px !important;
  flex: 0 0 auto !important;
}
#screen-home .p-home-map-motion { width: min(1320px, calc(100% - 64px)) !important; margin: 0 auto 26px !important; }
#screen-home .p-home-actions { margin: 6px auto 34px !important; text-align: center; }
@media (max-width: 1080px) { #screen-home .p-home-feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) {
  .p-home-topnav,
  #screen-home .p-hero-photos,
  #screen-home .p-hero,
  #screen-home .p-home-feature-strip,
  #screen-home .p-home-map-motion { width: calc(100% - 28px) !important; }
  #screen-home .p-hero-photos { height: 390px !important; }
  #screen-home .p-hero { margin-top: -390px !important; min-height: 390px !important; padding: 42px 22px 120px !important; }
  #screen-home .p-hero .p-word::before,
  #screen-home .p-hero .p-word::after { font-size: 43px !important; }
  #screen-home .p-home-intro { width: calc(100% - 40px) !important; grid-template-columns: 1fr !important; margin-top: -70px !important; }
  #screen-home .p-home-primary { width: 100%; justify-content: center; }
  #screen-home .p-home-feature-strip { grid-template-columns: 1fr !important; }
  .p-home-logo span { font-size: 23px; }
  .p-home-nav-btn { padding: 10px 14px; font-size: 12px; }
}

/* =====================================================
   SAFE POLISH PATCH - HOME + FAQ + POPUP + TAB HOVER
   Base: working map code. This patch only changes CSS/UI.
   ===================================================== */

/* Hero image: keep signage visible and reduce blurry/washed look */
#screen-home .p-hero-photos {
  background: #f8f3eb;
  overflow: hidden;
}
#screen-home .p-hero-slide img {
  object-position: 72% center !important;
  filter: saturate(1.05) contrast(1.06) brightness(1.02) !important;
  image-rendering: auto;
  transform: scale(1.015);
}
#screen-home .p-hero-slide.active img {
  animation: prossiHeroSharpZoom 5s ease-in-out both;
}
@keyframes prossiHeroSharpZoom {
  0% { transform: scale(1.01); }
  100% { transform: scale(1.045); }
}
#screen-home .p-hero-photos::before {
  opacity: .82 !important;
  background:
    linear-gradient(90deg, rgba(255,252,247,.94) 0%, rgba(255,252,247,.78) 34%, rgba(255,252,247,.22) 62%, rgba(255,252,247,.08) 100%) !important;
}

/* Feature cards: prevent button covering text */
#screen-home .p-home-feature-card {
  min-height: 252px !important;
  padding: 34px 28px 30px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0 !important;
}
#screen-home .p-home-feature-card p {
  margin-bottom: 24px !important;
  line-height: 1.6 !important;
  min-height: 58px;
}
#screen-home .p-home-feature-card .p-home-feature-link {
  position: static !important;
  margin-top: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#screen-home .p-home-feature-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 28px 64px rgba(74,50,29,.14) !important;
  border-color: rgba(151,107,46,.36) !important;
}

/* Dashboard tab hover feedback */
.p-tab button,
.p-tabs button,
.p-mode-tabs button,
#gran-first,
#gran-transaction,
#gran-coverage,
#gran-simulation {
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease !important;
}
.p-tab button:hover,
.p-tabs button:hover,
.p-mode-tabs button:hover,
#gran-first:hover,
#gran-transaction:hover,
#gran-coverage:hover,
#gran-simulation:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(74,50,29,.10);
  color: #6f4d25 !important;
}
.p-tab button.active:hover,
.p-tabs button.active:hover,
.p-mode-tabs button.active:hover,
#gran-first.active:hover,
#gran-transaction.active:hover,
#gran-coverage.active:hover,
#gran-simulation.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(20,18,15,.18);
}

/* Premium Leaflet popup style without changing map logic */
.leaflet-popup-content-wrapper {
  border-radius: 18px !important;
  box-shadow: 0 18px 50px rgba(35,28,20,.24) !important;
  border: 1px solid rgba(126,96,53,.18) !important;
  background: rgba(255,253,249,.98) !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  min-width: 230px;
}
.leaflet-popup-tip {
  background: rgba(255,253,249,.98) !important;
  box-shadow: 0 12px 22px rgba(35,28,20,.16) !important;
}
.leaflet-container a.leaflet-popup-close-button {
  top: 10px !important;
  right: 12px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 27px !important;
  border-radius: 999px !important;
  color: #7b7165 !important;
  background: rgba(246,240,231,.84) !important;
  transition: transform .18s ease, background .18s ease;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  transform: rotate(90deg);
  background: #efe3d1 !important;
}
.p-popup {
  padding: 22px 26px 22px !important;
  font-family: inherit;
}
.p-popup-title {
  font-size: 19px !important;
  line-height: 1.25 !important;
  color: #24211d !important;
  padding-right: 30px !important;
  font-weight: 700 !important;
}
.p-popup-total {
  font-family: Marcellus, Georgia, serif !important;
  color: #7b5528 !important;
  font-size: 30px !important;
  line-height: 1.12 !important;
  margin: 8px 0 16px !important;
}
.p-popup-sub {
  color: #7c7469 !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  margin: 0 0 10px !important;
}
.p-popup-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 9px 0 !important;
  border-bottom: 1px dashed rgba(126,96,53,.24) !important;
  color: #2c2925 !important;
}
.p-popup-row b {
  font-size: 18px !important;
  color: #7b5528 !important;
}
.p-popup-more,
.p-popup-empty {
  margin-top: 10px !important;
  color: #7c7469 !important;
  font-size: 12.5px !important;
}
