/* =====================================================================
   MMF 2026 — tampilan peserta (mobile-first)
   Mengikuti mockup doc/layout (Home_layout.png, Stamp-layout.png).
   Aset gambar: public/assets/img (hasil php spark mmf:assets).
   ===================================================================== */
:root {
  --mmf-primary: #003D79;   /* biru tua Mandiri */
  --mmf-accent:  #FFB700;   /* kuning emas */
  --mmf-blue-2:  #0060AF;
  --mmf-bg:      #EAF4FD;
  --mmf-success: #1E9E5A;

  --mmf-navy: #0B2A6F;
  --mmf-primary-dark: #002A55;
  --mmf-text: #1B2333;
  --mmf-muted: #5B6B82;
  --mmf-border: rgba(255, 255, 255, .9);
  --mmf-shell: 480px;

  --bs-primary: var(--mmf-primary);
  --bs-primary-rgb: 0, 61, 121;
  --bs-link-color: var(--mmf-blue-2);
  --bs-link-hover-color: var(--mmf-primary);
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: var(--mmf-text);
  --bs-body-bg: var(--mmf-bg);
}

body { background: #DCE9F6; -webkit-tap-highlight-color: transparent; }

/* ---------- Bingkai aplikasi ---------- */
.app-shell { max-width: var(--mmf-shell); min-height: 100vh; min-height: 100dvh; margin: 0 auto; position: relative; isolation: isolate; }
.app-bg {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); z-index: -1;
  width: 100%; max-width: var(--mmf-shell);
  background: var(--mmf-bg) url('../img/background.jpg') center top / cover no-repeat;
}
@media (min-width: 520px) { .app-shell, .app-bg { box-shadow: 0 0 40px rgba(0, 40, 90, .15); } }

/* ---------- Hero: header + logo ---------- */
.mmf-hero { position: relative; }
.hero-scene { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 826; }
.hero-logo {
  position: absolute; left: 50%; top: 6%; width: 66%; max-width: 330px; height: auto; aspect-ratio: 650 / 430; object-fit: contain; transform: translateX(-50%);
  filter: drop-shadow(0 6px 14px rgba(0, 40, 110, .25));
}
.hero-btn {
  position: absolute; top: 12px; width: 42px; height: 42px; border-radius: 50%; z-index: 2;
  display: grid; place-items: center; font-size: 1.25rem; text-decoration: none;
  background: rgba(255, 255, 255, .9); color: var(--mmf-primary);
  box-shadow: 0 4px 14px rgba(0, 45, 110, .2); border: 0;
}
.hero-btn:hover, .hero-btn:focus-visible { background: #fff; color: var(--mmf-primary-dark); }
.hero-back { left: 12px; }
.hero-profile { right: 12px; }
/* Halaman dalam memakai hero lebih ringkas agar konten cepat terlihat */
.mmf-hero.compact .hero-scene { aspect-ratio: 1080 / 620; object-fit: cover; object-position: center bottom; }
.mmf-hero.compact .hero-logo { width: 56%; top: 5%; }

/* ---------- Konten & panel ---------- */
.app-main { position: relative; margin-top: -34px; padding: 0 16px 36px; }
.mmf-panel {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1.5px solid var(--mmf-border); border-radius: 34px;
  box-shadow: 0 14px 34px rgba(0, 61, 121, .12);
  padding: 22px 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.panel-title { font-size: 1.15rem; font-weight: 800; color: var(--mmf-navy); margin: 0; }
.pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .3rem .75rem; font-size: .8rem; font-weight: 800; background: #fff; color: var(--mmf-primary); box-shadow: 0 2px 8px rgba(0, 61, 121, .1); }
.pill.done { background: var(--mmf-success); color: #fff; }

/* ---------- Home: 3 tombol gambar ---------- */
.menu-list { display: grid; gap: 10px; }
.menu-btn { display: block; border-radius: 30px; transition: transform .15s ease, filter .15s ease; }
.menu-btn img { display: block; width: 100%; height: auto; aspect-ratio: 805 / 240; }
.menu-btn:active { transform: scale(.97); }
.menu-btn:hover { filter: brightness(1.03); }
.home-greeting { text-align: center; color: var(--mmf-navy); font-weight: 700; margin: 2px 0 12px; }

/* ---------- Stamp ---------- */
.stamp-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 5%; padding: 6px 0 4px; }
.stamp-item {
  position: relative; width: 30%; padding: 0; border: 0; background: none; border-radius: 50%;
  transition: transform .15s ease; cursor: pointer;
}
.stamp-item:active { transform: scale(.94) rotate(-2deg); }
.stamp-item:focus-visible { outline: 3px solid var(--mmf-accent); outline-offset: 4px; }
.stamp-item img, .stamp-fallback { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.stamp-item.locked img, .stamp-item.locked .stamp-fallback { filter: grayscale(1); opacity: .42; }
.stamp-item.done img { filter: drop-shadow(0 4px 8px rgba(0, 45, 110, .18)); animation: stamp-in .5s ease-out both; }
.stamp-check {
  position: absolute; right: 2%; top: 2%; width: 26px; height: 26px; border-radius: 50%;
  background: var(--mmf-success); color: #fff; display: grid; place-items: center; font-size: .9rem;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.stamp-lock {
  position: absolute; right: 2%; top: 2%; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: #8A97AA; display: grid; place-items: center; font-size: .8rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.stamp-fallback {
  border-radius: 50%; border: 4px double var(--mmf-primary); color: var(--mmf-primary);
  display: grid; place-items: center; text-align: center; font-weight: 800; font-size: .7rem; padding: 12%;
  background: rgba(255, 255, 255, .6); text-transform: uppercase; line-height: 1.15;
}
@keyframes stamp-in { from { transform: scale(1.25) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.stamp-hint { text-align: center; font-size: .82rem; color: var(--mmf-muted); margin: 18px 0 0; }

/* ---------- Slider 1:1 (Info Event / Contact Us) ---------- */
.slider-square { border-radius: 26px; overflow: hidden; box-shadow: 0 10px 26px rgba(0, 45, 110, .16); background: #fff; }
.slider-square .carousel-item img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.slider-square .carousel-control-prev, .slider-square .carousel-control-next { width: 14%; }
.slider-square .carousel-control-prev-icon, .slider-square .carousel-control-next-icon {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background-color: rgba(0, 42, 85, .45); background-size: 50%;
}
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.slider-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(0, 61, 121, .25); transition: width .2s; }
.slider-dots button.active { width: 22px; background: var(--mmf-primary); }
.empty-state { text-align: center; padding: 48px 12px; color: var(--mmf-muted); }
.empty-state i { font-size: 2.6rem; color: var(--mmf-blue-2); display: block; margin-bottom: .5rem; }

/* ---------- Form, tombol ---------- */
.btn { border-radius: 14px; font-weight: 700; }
.btn-lg { border-radius: 16px; padding: .8rem 1.1rem; }
.btn-primary {
  --bs-btn-bg: var(--mmf-primary); --bs-btn-border-color: var(--mmf-primary);
  --bs-btn-hover-bg: var(--mmf-primary-dark); --bs-btn-hover-border-color: var(--mmf-primary-dark);
  --bs-btn-active-bg: var(--mmf-primary-dark); --bs-btn-active-border-color: var(--mmf-primary-dark);
  --bs-btn-disabled-bg: var(--mmf-primary); --bs-btn-disabled-border-color: var(--mmf-primary);
}
.btn-outline-primary {
  --bs-btn-color: var(--mmf-primary); --bs-btn-border-color: var(--mmf-primary);
  --bs-btn-hover-bg: var(--mmf-primary); --bs-btn-hover-border-color: var(--mmf-primary); --bs-btn-active-bg: var(--mmf-primary);
}
.btn-accent {
  --bs-btn-color: var(--mmf-primary-dark); --bs-btn-bg: var(--mmf-accent); --bs-btn-border-color: var(--mmf-accent);
  --bs-btn-hover-color: var(--mmf-primary-dark); --bs-btn-hover-bg: #F2A900; --bs-btn-hover-border-color: #F2A900;
  --bs-btn-active-bg: #E09D00;
}
.form-control, .form-select { border-radius: 14px; padding: .72rem .95rem; border-color: #D6E2EF; background-color: rgba(255, 255, 255, .92); }
.form-control:focus { border-color: var(--mmf-blue-2); box-shadow: 0 0 0 .2rem rgba(0, 96, 175, .15); }
.form-label { font-weight: 700; font-size: .88rem; color: var(--mmf-navy); }
.text-muted { color: var(--mmf-muted) !important; }
.password-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--mmf-muted); padding: .35rem; }
.auth-title { font-size: 1.35rem; font-weight: 800; color: var(--mmf-navy); margin-bottom: .2rem; }
.auth-foot { text-align: center; color: var(--mmf-muted); font-size: .8rem; margin-top: 18px; }

.notice { border-radius: 16px; padding: .8rem .95rem; font-size: .86rem; display: flex; gap: .65rem; align-items: flex-start; }
.notice i { font-size: 1.15rem; line-height: 1.2; }
.notice-warning { background: #FFF6DB; color: #7A5600; }
.notice-info { background: #E6F0FA; color: var(--mmf-primary); }
.notice-success { background: #E3F5EB; color: #126B3C; }
.notice-danger { background: #FDE8E8; color: #9B1C1C; }

/* ---------- Scanner & upload ---------- */
#qr-reader { border-radius: 18px; overflow: hidden; background: #000; min-height: 260px; }
#qr-reader video { object-fit: cover; }
.scan-hint { font-size: .85rem; color: var(--mmf-muted); }
.modal-content { border-radius: 24px; border: 0; }
.upload-preview { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; background: #EEF3F9; display: grid; place-items: center; color: var(--mmf-muted); overflow: hidden; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- QR Saya & profil ---------- */
.myqr-card { text-align: center; }
.myqr-card .qr-box { background: #fff; border-radius: 18px; padding: 1rem; display: inline-block; }
.myqr-card .qr-box img { width: min(66vw, 260px); height: auto; image-rendering: pixelated; }
.avatar-lg { width: 70px; height: 70px; border-radius: 50%; background: var(--mmf-primary); color: var(--mmf-accent); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; margin: 0 auto .75rem; }
.section-title { font-size: 1rem; font-weight: 800; margin: 1.4rem 0 .7rem; color: var(--mmf-navy); }
.terms-content { font-size: .88rem; }
.terms-content ol, .terms-content ul { padding-left: 1.2rem; }

/* ---------- SweetAlert2 ---------- */
.swal2-popup { border-radius: 24px !important; font-family: var(--bs-body-font-family); }
.swal2-confirm { background: var(--mmf-primary) !important; border-radius: 14px !important; }
.swal2-cancel { border-radius: 14px !important; }
.swal-stamp { width: 140px; height: 140px; object-fit: contain; display: block; margin: 0 auto 6px; animation: stamp-in .5s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .stamp-item.done img, .swal-stamp { animation: none; }
}
