/* GRID */
.grid {
  display: grid;
  gap: 14px;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4,1fr); }
}
@media (min-width: 1025px) {
  .grid { grid-template-columns: repeat(6,1fr); }
}

/* CARD */
.card {
  background: #2771cc;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}

.card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.card span {
  display: block;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
}

/* =========================
   BANNER
   ========================= */
.banner-wrapper {
  padding: 16px;
}

/* 🔥 16:9 FIX */
.banner-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;          /* ✅ GANTI DARI 19/8 */
  border-radius: 18px;
  overflow: hidden;
  background: #0b2c52;
  box-shadow: 0 14px 35px rgba(0,0,0,.4);
}

/* TRACK */
.banner-track {
  display: flex;
  height: 100%;
  transition: transform .5s ease; /* 🔥 lebih smooth */
}

/* ITEM */
.banner-item {
  min-width: 100%;
  height: 100%;
}

/* IMAGE */
.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* 🔥 penuh & rapi */
  pointer-events: none;
}

/* ARROW */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  font-size: 26px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
}

.banner-arrow.left { left: 10px; }
.banner-arrow.right { right: 10px; }

/* TOUCH FRIENDLY */
.banner-arrow:active {
  transform: translateY(-50%) scale(0.92);
}
/* =========================
   CATEGORY TABS (HOME)
   ========================= */

.category-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin: 14px 0 22px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: #082a52;
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 8px 20px rgba(0,0,0,.35);
}

.category-tabs .tab {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;

  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;

  background: transparent;
  color: #cbd5f5;
  transition: all .25s ease;
}

.category-tabs .tab:hover {
  color: #fff;
}

.category-tabs .tab.active {
  background: linear-gradient(135deg,#2563eb,#38bdf8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(56,189,248,.45);
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 10000; /* 🔥 DI ATAS MODAL */
  height: 56px;
  background: linear-gradient(135deg,#2563eb,#1e40af);
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.btn-close-page {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

/* ===== TAB SWITCH ===== */
.tab-switch {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,.12);
  padding: 6px;
  border-radius: 999px;
  width: fit-content;
  margin: 0 auto;
}

.tab-btn {
  position: relative;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}

/* AKTIF */
.tab-btn.active {
  background: #38bdf8;
  color: #083344;
}

/* DISABLED TOP UP */
.tab-btn.disabled {
  color: rgba(255,255,255,.55);
  cursor: not-allowed;
}

/* BADGE SOON (RAPI & SOFT) */
.tab-btn.disabled .badge-soon {
  position: absolute;
  top: -6px;
  right: -6px;

  background: rgba(255,255,255,.85);
  color: #0f172a;

  font-size: 10px;
  font-weight: 800;

  padding: 2px 6px;
  border-radius: 999px;
}
/* CS Floating Button */
#cs-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  font-size: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  z-index: 10001; /* lebih tinggi dari menu */
}

/* CS Menu */
#cs-menu {
  position: fixed;
  right: 18px;
  bottom: 90px;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;

  z-index: 10000; /* PENTING */
}


#cs-menu a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

#cs-menu a:hover {
  background: #eaeaea;
}
#cs-label {
  position: fixed;
  right: 90px;
  bottom: 28px;
  background: #ffffff;
  color: #333;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 9999;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg,#0d6efd,#0b5ed7);
  color: #fff;
}

/* brand kiri */
.brand {
  font-weight: 700;
  font-size: 16px;
}

/* user kanan */
.user-box {
  display: flex;
  align-items: center;
}

.user-btn {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-logo {
  width: 32px;
  height: 32px;
}
.auth-input {
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
}

.btn-login {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
}

.btn-login:active {
  transform: scale(0.98);
}

.auth-switch {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  opacity: 0.85;
}

.auth-switch b {
  color: #60a5fa;
}

.btn-cancel {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background: #1e3a8a;
  border: 1px solid #3b82f6;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 16px;
  border-radius: 999px;

  background: #ffffff;
  color: #3c4043;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;

  border: 1px solid #dadce0;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3);

  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.google-login-btn:hover {
  background: #f7f8f8;
  box-shadow: 0 2px 6px rgba(60,64,67,0.4);
  transform: translateY(-1px);
}

.google-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(60,64,67,0.3);
}

.google-login-btn .google-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-login-btn .google-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.google-login-btn .google-text {
  white-space: nowrap;
}

/* Biar agak rapih di pojok kanan */
.nav-right .google-login-btn {
  margin-right: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* AREA PROFIL */
.profile-menu {
  position: relative;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.profile-avatar,
.profile-avatar-lg {
  border-radius: 999px;
  background: #1f2937;
  flex-shrink: 0;
}

.profile-avatar {
  width: 30px;
  height: 30px;
  object-fit: cover;
}

.profile-avatar-lg {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.profile-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}

/* DROPDOWN */
.profile-dropdown {
  position: absolute;
  right: 0;
  top: 115%;
  min-width: 230px;
  background: #0f172a;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border: 1px solid rgba(148,163,184,0.4);
  padding: 8px 0;
  display: none;
  z-index: 999;
}

.profile-dropdown.open {
  display: block;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(148,163,184,0.4);
}

.profile-header-text {
  overflow: hidden;
}

.profile-header-name {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 14px;
}

.profile-header-email {
  font-size: 11px;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-item {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: #e5e7eb;
  text-decoration: none;
}

.profile-item:hover {
  background: rgba(148,163,184,0.15);
}

.profile-item--danger {
  color: #fecaca;
}
/* ===== BASE POSISI & AVATAR ===== */
#cs-pill,
#cs-bubble {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 9999;
  cursor: pointer;
  color: #022c22;
  font-family: inherit;
}

/* avatar chat (dipakai di pill & bubble) */
#cs-pill .cs-avatar,
#cs-bubble .cs-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f172a;
  color: #a7f3d0;
}

/* ===================================================== */
/* ===================== PILL ========================== */
/* ===================================================== */

#cs-pill {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);

  width: 240px;
  max-width: 240px;

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

#cs-pill .cs-avatar {
  width: 28px;
  height: 28px;
  font-size: 16px;
  flex-shrink: 0;
}

#cs-pill .cs-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

#cs-pill .cs-title {
  font-weight: 700;
  font-size: 13px;
}

#cs-pill .cs-sub {
  font-size: 11px;
  opacity: 0.9;
}

/* pill muncul */
#cs-pill.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* pill hilang */
#cs-pill.hide {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* ===================================================== */
/* ==================== BUBBLE ========================= */
/* ===================================================== */

#cs-bubble {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: scale(0.8) translateY(8px);
  pointer-events: none;

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

/* bubble avatar */
#cs-bubble .cs-avatar {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

/* bubble muncul */
#cs-bubble.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}