:root{
  --pt-bg1: #f8fafc; /* slate-50 */
  --pt-bg2: #ffffff;
  --pt-card: #ffffff;
  --pt-text: #222;
  --pt-muted: #555;
  --pt-border: rgba(0,0,0,.06);
  --pt-shadow-sm: 0 6px 16px rgba(0,0,0,.08);
  --pt-shadow-md: 0 12px 28px rgba(0,0,0,.12);

  /* Sticky aside offset (laras ikut tinggi navbar kalau fixed) */
  --pt-sticky-top: 88px;
}

*{
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans';
}

.bg-app{
  background: linear-gradient(180deg, var(--pt-bg1), var(--pt-bg2));
  min-height: 100vh;
  color: var(--pt-text);
}

/* ===== NAVBAR ====================================================== */
.navbar-glass{
  backdrop-filter: saturate(150%) blur(10px);
  background: rgba(255,255,255,.9) !important;
  border-bottom: 1px solid var(--pt-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* ===== ALERTS ====================================================== */
.soft-alert{
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  border-radius: 14px;
}

/* ===== CARDS + AD COVER =========================================== */
.card-hover{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border: 1px solid var(--pt-border);
  border-radius: 16px;
  box-shadow: var(--pt-shadow-sm);
  background-color: var(--pt-card);
}
.card-hover:hover{
  transform: translateY(-3px);
  box-shadow: var(--pt-shadow-md);
}

.ad-cover{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
@media (min-width: 576px){ .ad-cover{ aspect-ratio: 16/9; } }
.summary{ color: var(--pt-muted); }

/* Overlay chips atas cover */
.media-wrap{ position: relative; }
.media-chip{
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border: 1px solid var(--pt-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px; color:#111;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  display: inline-flex; align-items: center; gap: 6px;
}
.media-chip.right{ left: auto; right: 10px; }
.media-chip i{ margin-right: 2px; }

/* ===== BUTTONS ===================================================== */
.btn-gradient{
  background: linear-gradient(90deg, #0d6efd, #6f42c1);
  color:#fff !important;
  border: none;
  box-shadow: 0 6px 16px rgba(13,110,253,.25);
  padding:.45rem .9rem;                 
  border-radius:10px;
  font-weight:600;
}
.btn-gradient:hover{ filter: brightness(.97); color:#fff !important; }

/* Counter badge kecil */
.badge-counter{
  position: absolute; top: -6px; right: -6px;
  display: grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: #0d6efd; color: #fff; font-size: 12px; line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}
.badge-counter-danger{ background: #dc3545; }

/* FAB tapis (mobile sahaja) */
.filter-fab{
  position: fixed; right: 16px; bottom: 16px;
  z-index: 1040;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 999px;
}
@media (min-width: 992px){
  .filter-fab{ display: none; }
}

/* ===== HERO ======================================================== */
.hero{
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid var(--pt-border);
  border-radius: 20px;
  padding: clamp(1rem, 3vw, 2rem);
  color: var(--pt-text);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.hero h1{ font-weight: 700; letter-spacing: -0.02em; }
.hero p{ color: #444; }

.hero .hero-inner{
  display: flex; flex-direction: column; gap: 12px;
}
.hero .hero-actions{ display:flex; gap:10px; flex-wrap: wrap; }
@media (min-width: 992px){
  .hero .hero-inner{ flex-direction: row; align-items: center; }
  .hero .hero-copy{ flex: 1; }
}

/* ===== PAGINATION ================================================== */
.pagination .page-link{
  border: 1px solid var(--pt-border);
  color: #333;
}
.pagination .page-item.active .page-link{
  background: #0d6efd; border-color: #0d6efd; color:#fff;
}

/* ===== FORMS & MODAL ============================================== */
.form-control, .form-select{
  border-radius: 12px;
  border: 1px solid var(--pt-border);
}
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
  border-color: #0d6efd;
}
.modal-content{
  border-radius: 16px;
  box-shadow: var(--pt-shadow-sm);
  border: 1px solid var(--pt-border);
}

/* ===== STATUS BADGES ============================================== */
.badge-verified{
  background: #e7f6ec; color: #1f7a3e; border: 1px solid rgba(31,122,62,.15);
}
.badge-pending{
  background: #fff6e5; color: #9a6b00; border: 1px solid rgba(154,107,0,.15);
}
.badge-rejected{
  background: #ffe8e8; color: #a23a3a; border: 1px solid rgba(162,58,58,.15);
}

/* ===== FOOTER ====================================================== */
footer{
  background: #f8fafc;
  border-top: 1px solid var(--pt-border);
}
footer .link-muted{ color: var(--pt-muted); }
footer .link-muted:hover{ color:#0d6efd; }

/* ===== ACCESSIBILITY ============================================== */
:focus-visible{
  outline: 3px solid rgba(13,110,253,.3);
  outline-offset: 2px;
}

/* Rating input */
.rating-input i{
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform .1s ease;
  margin-right: .125rem;
}
.rating-input i:hover{ transform: scale(1.1); }

/* Honeypot */
.honeypot{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px; height:1px;
  overflow:hidden;
}

/* ===== LINKS ======================================================= */
a, a:hover, a:focus, a:active { text-decoration: none; }

/* ===== NAVBAR LINKS ================================================= */
.navbar .nav-link{
  padding: .5rem .9rem;
  font-weight: 500;
  color: #333;
  display: flex; align-items: center; gap: 6px;
  border-radius: 8px;
  line-height: 1.2;
}
.navbar .nav-link i{
  font-size: 1rem;
  opacity:.9;
  margin-top:-1px;
}
.navbar .nav-link:hover{
  background: rgba(13,110,253,.06);
  color: #0d6efd;
}

/* ACTIVE DEFAULT (MOBILE): pill gradient */
.navbar .nav-link.active{
  background: linear-gradient(90deg,#0d6efd,#6f42c1);
  color:#fff;
  box-shadow: 0 4px 12px rgba(13,110,253,.25);
}

/* DESKTOP TWEAKS =================================================== */
@media (min-width: 992px){
  .navbar .navbar-nav.gap-lg-2{ gap:.5rem !important; }

  .navbar .nav-link:hover{
    background: rgba(0,0,0,.04);
    color: #0d6efd;
  }

  /* ACTIVE jadi underline sahaja */
  .navbar .nav-link.active{
    background: transparent !important;
    box-shadow: none !important;
    color: #0d6efd;
    position: relative;
  }
  .navbar .nav-link.active::after{
    content:"";
    position: absolute;
    left: 0; right: 0;
    bottom: -6px;
    height: 3px; border-radius: 3px;
    background: linear-gradient(90deg,#0d6efd,#6f42c1);
    box-shadow: 0 2px 6px rgba(13,110,253,.25);
  }

  .navbar .btn-gradient{
    padding:.45rem .9rem;
    border-radius:10px;
    box-shadow: 0 6px 16px rgba(13,110,253,.18);
  }

  .navbar hr.d-lg-none{ display:none !important; }
}

/* ===== NAVBAR – MOBILE COLLAPSE =================================== */
@media (max-width: 991.98px){
  .navbar .navbar-collapse{ padding:.25rem 0; }
  .navbar .nav-link{ padding:.625rem .75rem; }
  .navbar .dropdown-menu{ border-radius:14px; }
}

.content img { max-width: 100%; height: auto; }
.content pre { background:#f8f9fa; padding:1rem; border-radius:.5rem; overflow:auto; }
.content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.content .embed-responsive { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; }
.content .embed-responsive > iframe.embed-responsive-item { position:absolute; top:0; left:0; width:100%; height:100%; border:0; }

/* ===== FIX LINK UNDERLINE MOBILE ================================== */
html body a,
.navbar .nav-link,
.content a {
  text-decoration: none !important;
}
.navbar .nav-link:focus,
.navbar .nav-link:hover,
.navbar .nav-link:active {
  text-decoration: none !important;
}
a[href^="tel:"],
a[href^="mailto:"],
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
}

/* ===== ASIDE STICKY (desktop) ===================================== */
@media (min-width: 992px){
  .aside-sticky{
    position: sticky;
    top: var(--pt-sticky-top);
    max-height: calc(100vh - var(--pt-sticky-top) - 16px);
    overflow: auto;
    padding-bottom: 8px;
  }
  /* Scrollbar kemas (optional) */
  .aside-sticky::-webkit-scrollbar{ width: 8px; }
  .aside-sticky::-webkit-scrollbar-thumb{
    background: rgba(0,0,0,.12);
    border-radius: 8px;
  }
}
