/*
  NAFAS KEWANGAN | FINAL BRAND 2026-11-11
  Satu logo yang sama pada Landing / Login / Checkout /
  Portal Pelanggan / Pentadbir / Rakan Niaga.
  Hanya paparan: tidak mengubah fungsi PHP, pangkalan data atau pembayaran.
*/
:root {
  --nafas-navy: #082b4b;
  --nafas-deep: #061c32;
  --nafas-gold: #d9b45b;
  --nafas-gold-light: #f8d886;
  --nafas-paper: #f5f8fc;
  --nafas-border: rgba(217,180,91,.46);
}

/* Transparent approved logo on same dark background, no badge, no box. */
body .header .brand-with-logo,
body .footer .footer-brand-image,
body.customer-portal .customer-brand,
body.has-portal:not(.customer-portal) .sidebar .brand,
body.nk-auth-page .nk-auth-header .nk-brand,
body .topbar .brand-top {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  isolation: isolate;
  text-decoration: none;
  overflow: hidden;
}
body .header .brand-with-logo::before,
body .header .brand-with-logo::after,
body .footer .footer-brand-image::before,
body .footer .footer-brand-image::after,
body.customer-portal .customer-brand::before,
body.has-portal:not(.customer-portal) .sidebar .brand::before,
body.nk-auth-page .nk-auth-header .nk-brand::before,
body .topbar .brand-top::before {
  content: none !important;
  display: none !important;
}

/* Existing img tags continue to supply their accessible alternative text. */
body .header .brand-with-logo img,
body .footer .footer-brand-image img,
body.customer-portal .customer-brand img,
body.has-portal:not(.customer-portal) .sidebar .brand img,
body.nk-auth-page .nk-auth-header .nk-brand img,
body .topbar .brand-top img {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 3 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

/* LANDING PAGE: dark header, upper-case links (BM / EN). */
body .header {border-bottom: 1px solid rgba(217,180,91,.36) !important;}
body .header .brand-with-logo {
  width: clamp(210px,20vw,290px) !important;
  height: auto !important;
  margin-right: auto !important;
  line-height: 1;
}
body .header .navlinks a,
body .header .nav-end > a.btn {
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: .012em;
}
body .header .navlinks a:hover,
body .header .navlinks a:focus-visible {color: var(--nafas-gold-light) !important;}
body .header .lang button.active,
body .header .lang button[aria-pressed="true"] {
  color: var(--nafas-deep) !important;
  background: var(--nafas-gold-light) !important;
}
body .btn-gold,
body .price .btn-gold {
  background: linear-gradient(125deg,#f9e6a8,#d9b45b) !important;
  color: #082b4b !important;
}

/* FOOTER */
body .footer .footer-brand-image {
  width: 240px !important;
  height: auto !important;
}

/* PELANGGAN: keep the premium sidebar and mobile drawer intact. */
body.customer-portal .sidebar.customer-sidebar {
  background: linear-gradient(175deg,#061c32,#082b4b 65%,#041625) !important;
  border-right-color: rgba(217,180,91,.25) !important;
}
body.customer-portal .customer-brand {
  width: min(235px,100%) !important;
  height: auto !important;
  max-width: 100% !important;
}
body.customer-portal .customer-portal-tag {
  border-color: var(--nafas-border) !important;
}
body.customer-portal .customer-portal-tag-title,
body.customer-portal .customer-nav-group-title {
  color: var(--nafas-gold-light) !important;
}
body.customer-portal .customer-nav-link.selected {
  border-color: var(--nafas-border) !important;
  background: linear-gradient(90deg,rgba(217,180,91,.20),rgba(8,43,75,.35)) !important;
  box-shadow: inset 3px 0 0 var(--nafas-gold-light) !important;
}
body.customer-portal .customer-welcome h2 em {color: var(--nafas-gold-light) !important;}

/* ADMIN DAN RAKAN NIAGA: fix unreadable dark sidebar link text. */
body.has-portal:not(.customer-portal) .sidebar {
  background: linear-gradient(180deg,#061c32,#082b4b) !important;
}
body.has-portal:not(.customer-portal) .sidebar .brand {
  width: min(250px,100%) !important;
  height: auto !important;
  margin-bottom: 14px !important;
}
body.has-portal:not(.customer-portal) .sidebar nav a {
  color: #eef4fa !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
}
body.has-portal:not(.customer-portal) .sidebar nav a:hover,
body.has-portal:not(.customer-portal) .sidebar nav a:focus-visible {
  color: var(--nafas-gold-light) !important;
  background: rgba(255,255,255,.08) !important;
}
body.has-portal:not(.customer-portal) .sidebar nav a.selected {
  color: white !important;
  border-left: 3px solid var(--nafas-gold-light) !important;
  background: rgba(217,180,91,.20) !important;
}
body.has-portal:not(.customer-portal) .portal-label {
  color: var(--nafas-gold-light) !important;
  font-weight: 850 !important;
  text-transform: uppercase;
}

/* LOGIN (checkout gets the same rules through auth.css, see below). */
body.nk-auth-page .nk-auth-header .nk-brand {
  width: 245px !important;
  height: auto !important;
}
body.nk-auth-page .nk-role-tabs a.active,
body.nk-auth-page .nk-lang a.active {
  background: var(--nafas-gold-light) !important;
  color: var(--nafas-deep) !important;
}
body.nk-auth-page .nk-primary,
body.has-portal .btn-primary {
  background: linear-gradient(125deg,#f7e4a9,#d9b45b) !important;
  border-color: var(--nafas-gold) !important;
  color: var(--nafas-navy) !important;
}

/* Other public pages served by private/view.php (FAQ, demo, etc.). */
body .topbar .brand-top {
  width: 210px !important;
  height: auto !important;
}

/* Keep keyboard navigation visible. */
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--nafas-gold-light) !important;
  outline-offset: 3px;
}

@media (max-width:1100px) {
  body .header .brand-with-logo {width: 220px !important;}
}
@media (max-width:700px) {
  body .header .brand-with-logo {
    width: clamp(132px,37vw,182px) !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  body .header .nav {gap: 8px;}
  body .footer .footer-brand-image {width: 190px !important;}
  body.customer-portal .customer-brand {width: min(205px,100%) !important;}
  body.has-portal:not(.customer-portal) .sidebar .brand {width: min(210px,100%) !important;}
  body.nk-auth-page .nk-auth-header .nk-brand {width: min(178px,45vw) !important;}
  body .topbar .brand-top {width: 160px !important;}
}
@media (max-width:390px) {
  body .header .brand-with-logo {width: 125px !important;}
  body.nk-auth-page .nk-auth-header .nk-brand {width: min(145px,43vw) !important;}
}
@media (prefers-reduced-motion:reduce) {
  body .header .brand-with-logo,
  body .header .brand-with-logo img {transition:none !important;}
}

/* Final precedence fix: earlier versions created a white rectangle. */
.header .brand-with-logo,
.footer-brand-image,
.nk-auth-header .nk-brand,
.customer-brand,
.has-portal .sidebar .brand,
.topbar .brand-top {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  padding: 0 !important;
}
.header .brand-with-logo > img,
.footer-brand-image > img,
.nk-auth-header .nk-brand > img,
.customer-brand > img,
.has-portal .sidebar .brand > img,
.topbar .brand-top > img {
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  object-fit:contain !important;
}
