:root {
  --primary: #3f9a7d;
  --primary-dark: #2c7a61;
  --primary-soft: #e6f4ef;
  --accent: #FF9800;
  --accent-soft: #fff3e0;
  --gold: #D4AF37;
  --bg: #F4F7F6;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --info: #0284c7;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Container */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.main-content { padding: 20px 0 90px; min-height: calc(100vh - 140px); }

/* Navbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--primary-dark); text-decoration: none !important; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { font-weight: 600; font-size: 0.92rem; color: var(--text); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Mobile Bottom Nav */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--border);
  grid-template-columns: repeat(5, 1fr); padding: 6px 4px 8px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; color: var(--muted); gap: 2px; text-decoration: none;
}
.mobile-nav a .m-ico { font-size: 1.2rem; line-height: 1.1; }
.mobile-nav a.active { color: var(--primary); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .mobile-nav { display: grid; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #276e57 0%, #3f9a7d 60%, #4db392 100%);
  color: #fff; border-radius: 20px; padding: 34px 28px;
  position: relative; overflow: hidden; margin-bottom: 22px;
  box-shadow: 0 12px 28px rgba(63, 154, 125, 0.22);
}
.hero h1 { margin: 0 0 10px; font-size: clamp(1.55rem, 3.2vw, 2.3rem); line-height: 1.2; font-weight: 800; }
.hero p { margin: 0 0 18px; max-width: 660px; opacity: 0.95; font-size: 0.98rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hero-pill {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28);
  padding: 5px 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 600;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Quick Access Grid (Gojek-style) */
.quick-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px;
}
.quick-item {
  background: var(--surface); border-radius: var(--radius); padding: 14px 10px;
  text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease; text-decoration: none !important; color: var(--text);
}
.quick-item:hover { transform: translateY(-2px); border-color: var(--primary); }
.quick-ico {
  width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  background: var(--primary-soft); color: var(--primary-dark);
}
.quick-ico.orange { background: var(--accent-soft); color: #d97706; }
.quick-ico.gold { background: #fef9c3; color: #a16207; }
.quick-item span { display: block; font-size: 0.82rem; font-weight: 700; }
@media (max-width: 720px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* Cards & Grids */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 18px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 1.08rem; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Stat boxes */
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.45rem; font-weight: 800; margin-top: 4px; color: var(--text); }
.stat-sub { font-size: 0.78rem; color: var(--primary-dark); margin-top: 2px; font-weight: 600; }

/* Package Card */
.pkg-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s ease;
}
.pkg-card:hover { transform: translateY(-2px); }
.pkg-banner {
  background: linear-gradient(135deg, #2d7d63, #3f9a7d);
  color: #fff; padding: 18px; position: relative; min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.pkg-banner.alt { background: linear-gradient(135deg, #1f5c4a, #2c7a61); }
.pkg-body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.pkg-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.pkg-price { font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); }
.xp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff3e0; color: #c2410c; border: 1px solid #fed7aa;
  padding: 3px 10px; border-radius: 99px; font-size: 0.76rem; font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 0.88rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: all 0.15s ease;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 8px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #e68900; }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-muted { background: #f3f4f6; color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }

/* Badges */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 0.74rem; font-weight: 700; line-height: 1.3;
}
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gold { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.badge-muted { background: #f3f4f6; color: #4b5563; }

/* Forms */
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px;
  font-family: inherit; font-size: 0.92rem; background: #fff; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(63,154,125,0.16); }
textarea.form-control { min-height: 86px; resize: vertical; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.table th, table.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.table th { background: #f9fafb; font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 0.9rem; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.tab-btn {
  padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 0.86rem;
  color: var(--muted); background: transparent; border: none; cursor: pointer; white-space: nowrap;
}
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Gamification Progress & Checkpoint Timeline */
.xp-bar-wrap { background: #e5e7eb; height: 10px; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }

.checkpoint-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: #fafafa; margin-bottom: 10px; flex-wrap: wrap;
}
.checkpoint-item.verified { background: #f0fdf4; border-color: #86efac; }
.checkpoint-item.pending { background: #fffbeb; border-color: #fde68a; }

.pin-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.7rem; font-weight: 800; letter-spacing: 0.25em;
  background: #111827; color: #fbbf24; padding: 10px 18px; border-radius: 12px;
  display: inline-block; text-align: center;
}

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; gap: 10px; }
.section-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }

.footer {
  background: #fff; border-top: 1px solid var(--border); padding: 24px 0 80px;
  color: var(--muted); font-size: 0.85rem; margin-top: 30px;
}


/* === GELOMBANG 2 STYLES === */
.qr-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--primary); border-radius: 14px; padding: 12px;
}
.qr-modal {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(15, 23, 42, 0.88); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 16px;
}
.qr-modal.open { display: flex; }
.qr-modal-box {
  background: #fff; border-radius: 20px; padding: 26px 22px; max-width: 420px; width: 100%;
  text-align: center; box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}
#qr-reader-wrap {
  display: none; margin-top: 12px; background: #111827; border-radius: 14px;
  padding: 12px; color: #fff; text-align: center;
}
#qr-reader { width: 100%; max-width: 360px; margin: 0 auto; border-radius: 10px; overflow: hidden; }

/* Badges Collection Grid */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .badge-grid { grid-template-columns: repeat(2, 1fr); } }
.badge-tile {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 12px; text-align: center;
  background: #f9fafb; opacity: 0.62; transition: all 0.2s ease;
}
.badge-tile.unlocked {
  opacity: 1; background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border-color: #6ee7b7; box-shadow: 0 6px 16px rgba(63,154,125,0.12);
}
.badge-tile .b-ico { font-size: 2rem; line-height: 1.2; margin-bottom: 6px; }
.badge-tile h4 { margin: 0 0 4px; font-size: 0.9rem; }
.badge-tile p { margin: 0; font-size: 0.76rem; color: var(--muted); }

/* Trip Chat / Announcements */
.chat-feed {
  max-height: 310px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; background: #f8fafc; border-radius: 12px; border: 1px solid var(--border);
  margin-bottom: 12px;
}
.chat-msg {
  padding: 10px 12px; border-radius: 11px; background: #fff; border: 1px solid var(--border);
  font-size: 0.86rem;
}
.chat-msg.announcement {
  background: #fffbeb; border-color: #fcd34d; border-left: 4px solid var(--accent);
}
.chat-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }

/* Google Login Button */
.btn-google {
  background: #fff; color: #1f2937; border: 1px solid #d1d5db;
  width: 100%; font-weight: 700; gap: 10px;
}
.btn-google:hover { background: #f9fafb; border-color: #9ca3af; }
.divider-or {
  display: flex; align-items: center; gap: 10px; color: var(--muted);
  font-size: 0.8rem; margin: 14px 0;
}
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Certificate Print */
.cert-frame {
  background: #fff; border: 10px double #2c7a61; border-radius: 16px;
  padding: 36px 28px; text-align: center; position: relative;
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  background-image: radial-gradient(circle at top right, rgba(63,154,125,0.08), transparent 45%),
                    radial-gradient(circle at bottom left, rgba(212,175,55,0.10), transparent 45%);
}
@media print {
  .topbar, .footer, .mobile-nav, .no-print { display: none !important; }
  body { background: #fff !important; }
  .main-content { padding: 0 !important; }
  .cert-frame { box-shadow: none !important; border-width: 8px; }
}
