/* Bayaran Awam — Bestari-aligned public guest surface */
:root {
  --ba-navy: #1f2937;
  --ba-ink: #111827;
  --ba-muted: #6b7280;
  --ba-line: #e5e7eb;
  --ba-surface: #ffffff;
  --ba-gold: #f9cf63;
  --ba-gold-2: #ffc32a;
  --ba-gold-deep: #d4af37;
  --ba-teal: #1f6f78;
  --ba-focus: rgba(249, 207, 99, 0.35);
  --ba-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --ba-shadow-hover: 0 16px 36px rgba(17, 24, 39, 0.14);
  --ba-font: "Source Sans 3", "Segoe UI", sans-serif;
  --ba-radius: 1rem;
}

.ba-body {
  margin: 0;
  font-family: var(--ba-font);
  color: var(--ba-ink);
  background-color: #faf8f3;
  background-image: url("/assets/media/logos/bg.webp");
  background-repeat: repeat;
  background-size: 296px 170px;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header (Bestari frosted nav) ── */
.ba-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  color: var(--ba-ink);
}
.ba-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
}
.ba-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.ba-logo-img {
  display: block;
  height: 40px;
  width: auto;
}
.ba-logo-img img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: left center;
}
.ba-logo strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ba-ink);
}
.ba-logo small {
  display: none;
}
.ba-nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
}
.ba-nav a {
  color: var(--ba-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.ba-nav a.on,
.ba-nav a:hover {
  color: var(--ba-ink);
  border-bottom-color: var(--ba-gold);
}
.ba-auth {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ba-auth a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
}
.ba-auth .ghost {
  background: #fff;
  color: var(--ba-ink);
  border: 1px solid var(--ba-line);
}
.ba-auth .ghost:hover {
  border-color: #cfcfcf;
  background: #fafafa;
}
.ba-auth .solid {
  background: var(--ba-gold);
  color: #111;
  border: 1px solid transparent;
}
.ba-auth .solid:hover {
  background: var(--ba-gold-2);
}

@media (max-width: 640px) {
  .ba-nav { display: none; }
  .ba-logo strong { font-size: 13px; }
  .ba-auth a { padding: 7px 12px; font-size: 12px; }
}

/* ── Page
   Catalog sweet spot: ~1320px content (fills laptop/desktop without ultrawide stretch).
   Forms stay ~900px for readable field width (Bestari pattern).
── */
.ba-page {
  --ba-content: 1320px;
  --ba-form: 900px;
  max-width: var(--ba-content);
  margin: 0 auto;
  padding: 20px 24px 36px;
  width: 100%;
  flex: 1;
  box-sizing: border-box;
}

.ba-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .ba-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .ba-layout {
    grid-template-columns: 1fr;
  }
}

.ba-panel {
  background: var(--ba-surface);
  border-radius: var(--ba-radius);
  box-shadow: var(--ba-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ba-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ba-line);
  padding: 0 10px;
  overflow-x: auto;
  background: #fff;
}
.ba-tabs button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ba-muted);
  padding: 14px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ba-tabs button:hover { color: var(--ba-ink); }
.ba-tabs button.on {
  color: var(--ba-ink);
  border-bottom-color: var(--ba-gold);
}

.ba-search { padding: 14px 16px 0; }
.ba-search input {
  width: 100%;
  border: 1px solid var(--ba-line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}
.ba-search input:focus {
  outline: none;
  border-color: var(--ba-gold-deep);
  box-shadow: 0 0 0 3px var(--ba-focus);
}

/* ── Service tiles ── */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 20px;
  align-content: start;
}
@media (max-width: 1024px) {
  .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ba-grid { grid-template-columns: 1fr; }
}

.ba-tile {
  --tile-accent: var(--ba-teal);
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px 14px;
  min-height: 158px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1.5px solid var(--ba-line);
  border-radius: 14px;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
  animation: ba-tile-in 0.45s ease both;
}
.ba-tile:nth-child(1) { animation-delay: 0.02s; }
.ba-tile:nth-child(2) { animation-delay: 0.06s; }
.ba-tile:nth-child(3) { animation-delay: 0.10s; }
.ba-tile:nth-child(4) { animation-delay: 0.14s; }
.ba-tile:nth-child(5) { animation-delay: 0.18s; }
.ba-tile:nth-child(6) { animation-delay: 0.22s; }
.ba-tile:nth-child(7) { animation-delay: 0.26s; }
.ba-tile:nth-child(8) { animation-delay: 0.30s; }

@keyframes ba-tile-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ba-tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  width: auto;
  background: var(--tile-accent);
  opacity: 0.75;
  transition: opacity 0.2s ease, height 0.2s ease, background 0.2s ease;
}
.ba-tile[data-cat="bayaran"] { --tile-accent: #1f6f78; }
.ba-tile[data-cat="penyerahan"] { --tile-accent: #2563eb; }
.ba-tile[data-cat="sumbangan"] { --tile-accent: #b45309; }

.ba-tile:hover,
.ba-tile:focus-visible {
  outline: none;
  text-decoration: none;
  color: inherit;
  border-color: var(--ba-gold);
  background: #fffef8;
  box-shadow: var(--ba-shadow-hover);
  transform: translateY(-3px);
}
.ba-tile:hover::before,
.ba-tile:focus-visible::before {
  opacity: 1;
  height: 5px;
  background: var(--ba-gold-deep);
}
.ba-tile:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.1);
}

.ba-tile-ico {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  line-height: 1;
  color: #ffa800;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease;
}
.ba-tile-ico i {
  font-size: inherit;
  line-height: 1;
  color: inherit;
}
.ba-tile:hover .ba-tile-ico {
  transform: scale(1.06);
  color: #e69800;
  filter: none;
  background: transparent;
}

.ba-tile-body {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.ba-tile-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tile-accent);
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px 9px;
}
.ba-tile[data-cat="bayaran"] .ba-tile-badge { background: #e8f3f4; }
.ba-tile[data-cat="penyerahan"] .ba-tile-badge { background: #eff6ff; }
.ba-tile[data-cat="sumbangan"] .ba-tile-badge { background: #fff7ed; }
.ba-tile-body strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ba-ink);
}
.ba-tile-desc {
  font-size: 12.5px;
  color: var(--ba-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ba-tile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--ba-line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ba-ink);
  white-space: nowrap;
  box-sizing: border-box;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ba-tile-cta i { font-size: 14px; transition: transform 0.2s ease; }
.ba-tile:hover .ba-tile-cta {
  color: #111;
  background: var(--ba-gold);
  border-color: var(--ba-gold);
  transform: none;
}
.ba-tile:hover .ba-tile-cta i {
  transform: translateX(3px);
}

.ba-empty {
  grid-column: 1 / -1;
  color: var(--ba-muted);
  margin: 0;
  padding: 28px 8px;
  text-align: center;
}

/* ── Side brand + tools ── */
.ba-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 80px;
  align-self: start;
}
@media (max-width: 900px) {
  .ba-side { position: static; }
}

.ba-brand {
  background: #fff;
  border-radius: var(--ba-radius);
  box-shadow: var(--ba-shadow);
  padding: 18px 14px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url("/assets/media/logos/bg.webp");
  background-repeat: repeat;
  background-size: 160px auto;
}
.ba-brand::before,
.ba-brand::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--ba-gold-deep);
  opacity: 0.85;
  margin: 0 auto 12px;
  max-width: 88%;
}
.ba-brand::after {
  margin: 12px auto 0;
}
.ba-brand img {
  display: block;
  width: min(100%, 180px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.ba-brand p {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ba-muted);
  line-height: 1.4;
}

.ba-tool {
  background: var(--ba-surface);
  border-radius: var(--ba-radius);
  box-shadow: var(--ba-shadow);
  padding: 16px;
}
.ba-tool h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ba-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ba-tool h2 .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ba-gold-deep);
}
.ba-calc-list { display: flex; flex-direction: column; gap: 8px; }
.ba-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid var(--ba-line);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ba-calc-row:hover {
  border-color: var(--ba-gold);
  background: #fffef8;
}
.ba-calc-row strong { font-size: 13px; }
.ba-calc-row a {
  border: 0;
  background: var(--ba-gold);
  color: #111;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ba-calc-row a:hover {
  background: var(--ba-gold-2);
  color: #111;
  transform: translateY(-1px);
}

/* ── Journey shell ── */
.ba-journey {
  max-width: var(--ba-form, 900px);
  width: 100%;
  margin: 0 auto;
  background: var(--ba-surface);
  border-radius: var(--ba-radius);
  box-shadow: var(--ba-shadow);
  padding: 1.5rem 1.75rem 1.75rem;
  box-sizing: border-box;
}
.ba-journey-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ba-ink);
}
.ba-journey .card {
  box-shadow: none !important;
  border: 1px solid var(--ba-line) !important;
  border-radius: 12px !important;
}

/* ── Footer ── */
.ba-footer {
  background: var(--ba-navy);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  padding: 18px 24px;
  margin-top: auto;
}
.ba-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}
.ba-footer strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ba-tile,
  .ba-tile-ico,
  .ba-tile-cta,
  .ba-tile-cta i,
  .ba-calc-row a {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Journey form card (Bestari MaklumatPembayar) ── */
.ba-slip-head {
  margin: -0.25rem -0.25rem 1.25rem;
}
.ba-slip-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88px;
  object-fit: contain;
  object-position: center;
}
.ba-form-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.ba-number-circle {
  background-color: #ffd700;
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 14px;
}
.ba-section-text h1 {
  margin: 0;
  color: #000;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.ba-section-text p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #666;
}
.ba-divider {
  border: 0;
  border-top: 1px solid var(--ba-line);
  margin: 0 0 1.25rem;
}

.ba-journey .card.card-custom,
.ba-journey .card {
  border: 1.5px solid #f0f0f0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  background: #fff !important;
  margin-bottom: 1rem !important;
  overflow: hidden;
}
.ba-journey .card-header {
  background: #fffef8 !important;
  border-bottom: 1px solid #f3e8c0 !important;
  min-height: 0 !important;
  padding: 0.9rem 1.15rem !important;
}
.ba-journey .card-title {
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.ba-journey .card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffd700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0 !important;
}
.ba-journey .card-icon i {
  color: #111 !important;
  font-size: 15px !important;
}
.ba-journey .card-label {
  margin: 0 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #111 !important;
}
.ba-journey .card-body {
  padding: 1.15rem 1.15rem 1.25rem !important;
}

.ba-journey .form-group label,
.ba-journey label.text-muted,
.ba-journey .form-label {
  font-weight: 500 !important;
  color: #374151 !important;
  font-size: 0.9rem !important;
  margin-bottom: 0.4rem !important;
}
.ba-journey .form-control,
.ba-journey .custom-select,
.ba-journey select.form-control {
  border: 1px solid #dee2e6 !important;
  border-radius: 0.5rem !important;
  padding: 0.7rem 0.9rem !important;
  background: #fff !important;
  height: auto !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
}
.ba-journey .form-control-sm {
  padding: 0.65rem 0.85rem !important;
  height: auto !important;
}
.ba-journey .form-control:focus,
.ba-journey .custom-select:focus,
.ba-journey select.form-control:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 3px rgba(249, 207, 99, 0.35) !important;
}
.ba-journey .form-control:disabled,
.ba-journey .form-control[readonly] {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
}

.ba-journey .alert {
  border-radius: 0.65rem !important;
}
.ba-journey .alert-light-info,
.ba-journey .alert-custom.alert-light-info {
  border: 2px solid rgb(209, 233, 255) !important;
  background: rgb(240, 247, 255) !important;
}
.ba-journey .alert-light-warning,
.ba-journey .alert-custom.alert-light-warning {
  border: 2px solid rgb(254, 246, 179) !important;
  background: rgb(255, 254, 245) !important;
}

/* Primary / submit CTAs → Bestari gold */
.ba-journey .btn-primary,
.ba-journey .btn.btn-primary,
.ba-body .ba-journey button.btn-primary,
.ba-journey #btn-submit,
.ba-journey #btn-bayar,
.ba-journey .btn-success {
  background: rgb(249, 207, 99) !important;
  border-color: rgb(249, 207, 99) !important;
  color: #111 !important;
  font-weight: 700 !important;
  border-radius: 0.5rem !important;
  box-shadow: none !important;
}
.ba-journey .btn-primary:hover,
.ba-journey .btn.btn-primary:hover,
.ba-journey #btn-submit:hover,
.ba-journey #btn-bayar:hover,
.ba-journey .btn-success:hover {
  background: rgb(255, 195, 42) !important;
  border-color: rgb(255, 195, 42) !important;
  color: #111 !important;
}
.ba-journey .btn-light,
.ba-journey .btn-secondary {
  border-radius: 0.5rem !important;
  border: 1px solid var(--ba-line) !important;
  background: #fff !important;
  color: #374151 !important;
  font-weight: 600 !important;
}

/* Review / summary polish */
.ba-journey .separator {
  border-bottom-color: #eee !important;
}

/* ── Trust strip (catalog) ── */
.ba-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 18px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ba-muted);
}
.ba-trust i {
  margin-right: 4px;
  color: #c9a227;
  font-size: 14px;
  vertical-align: -1px;
}
.ba-trust-sep { opacity: 0.45; }

/* ── Journey steps ── */
.ba-steps {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.ba-steps > li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ba-muted);
}
.ba-steps-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid #e5e7eb;
}
.ba-steps > li.on {
  color: var(--ba-ink);
}
.ba-steps > li.on .ba-steps-num {
  background: #ffd700;
  border-color: #ffd700;
  color: #111;
}
.ba-steps > li.done {
  color: var(--ba-ink);
}
.ba-steps > li.done .ba-steps-num {
  background: #ecfdf5;
  border-color: #34d399;
  color: #047857;
}
.ba-steps-line {
  width: 36px;
  height: 2px;
  margin: 0 10px;
  background: #e5e7eb;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .ba-steps-label { display: none; }
  .ba-steps-line { width: 22px; margin: 0 6px; }
}

/* ── Sticky action bar ── */
.ba-journey {
  padding-bottom: 5.5rem;
}
.ba-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-left: -1.75rem !important;
  margin-right: -1.75rem !important;
  margin-bottom: -1.75rem !important;
  padding: 14px 1.75rem !important;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--ba-line);
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.06);
  gap: 12px;
  flex-wrap: wrap;
}
.ba-actions .btn {
  min-height: 42px;
}
@media (max-width: 520px) {
  .ba-actions {
    margin-left: -1.25rem !important;
    margin-right: -1.25rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .ba-actions .btn {
    flex: 1 1 auto;
  }
}

/* Tile filter fade */
.ba-tile[hidden] {
  display: none !important;
}
