/* ==========================================================================
   style.css - design system ringkas (tanpa Bootstrap, tanpa framework)
   ========================================================================== */
:root {
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-light: #eff4ff;
  --brand-line: #dbe4fd;
  --accent: #f59e0b;
  --ok: #059669;
  --ok-bg: #e7f8f1;
  --ok-line: #c6f0e0;
  --warn: #b45309;
  --warn-bg: #fff7e6;
  --warn-line: #fde3b3;
  --bad: #dc2626;
  --bad-bg: #fdecec;
  --bad-line: #f9cfcf;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e6eaf2;
  --bg: #f5f7fb;
  --r: 16px;
  --r-sm: 12px;
  --r-xs: 10px;
  --sh: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --sh-md: 0 10px 30px rgba(15, 23, 42, .08);
  --sh-lg: 0 24px 60px rgba(15, 23, 42, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.175rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
small { font-size: .8125rem; }
code { background: #eef2ff; color: var(--brand-dark); padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }

/* ---------------- Layout ---------------- */
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1rem; }
.wrap-kecil { max-width: 560px; }
.wrap-sedang { max-width: 840px; }
.py { padding: 1.5rem 0; }
.py-lg { padding: 3rem 0; }
.tengah { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.items-center { align-items: center; }
.wrapf { flex-wrap: wrap; }
.right { text-align: right; }
.antar { flex: 1 1 0; min-width: 0; }
.g1 { gap: .5rem; }
.g2 { gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.kecil { font-size: .8125rem; }
.tebal { font-weight: 700; }
.semibold { font-weight: 600; }
.hantu { color: var(--muted); cursor: pointer; }
.sembunyi { display: none !important; }

.grid { display: grid; gap: 1.25rem; }
/* min() membuat kolom boleh menyempit di bawah nilai minimum bila layar sangat kecil. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.baris { display: flex; flex-direction: column; gap: 1.25rem; }
.halaman { min-height: 58vh; }

/* ---------------- Navbar ---------------- */
.nav {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-in { display: flex; align-items: center; gap: 1rem; min-height: 64px; position: relative; }
.logo-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--brand), #6d28d9);
  box-shadow: 0 8px 18px rgba(29, 78, 216, .3);
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 1.02rem; }
.brand span { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.nav-menu { display: flex; gap: .15rem; margin-left: auto; }
.nav-menu a { color: #475569; font-weight: 600; font-size: .92rem; padding: .45rem .75rem; border-radius: var(--r-xs); }
.nav-menu a:hover, .nav-menu a.aktif { color: var(--brand); background: var(--brand-light); }
.nav-aksi { display: flex; align-items: center; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: .35rem .85rem; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.tombol-menu { display: none; }
.nav-aksi-mobile { display: none; }
.hanya-mobile { display: none; }

@media (max-width: 920px) {
  .nav-menu {
    display: none; position: absolute; left: -1rem; right: -1rem; top: 64px;
    flex-direction: column; background: #fff; padding: .5rem 1rem 1rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--sh-md); z-index: 60;
  }
  .nav-menu.buka { display: flex; }
  .tombol-menu { display: inline-flex; }
  .nav-aksi .sembunyi-mobile { display: none; }
  .nav-aksi-mobile {
    display: flex; flex-direction: column; gap: .5rem;
    padding-top: .75rem; margin-top: .5rem; border-top: 1px solid var(--line);
  }
  .hanya-mobile { display: inline-flex !important; }
  .nav-in { gap: .5rem; }
  .brand span { display: none; }
  .nav-aksi .btn { padding: .3rem .6rem; font-size: .78rem; }
  .nav-aksi .chip { padding: .3rem .55rem; font-size: .78rem; max-width: 140px; overflow: hidden; }
}
@media (max-width: 400px) {
  .brand { display: none; }
}
.user-menu {
  position: absolute; right: 1rem; top: 58px; min-width: 230px; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sh-md); padding: .4rem; overflow: hidden;
}
.user-menu-atas { padding: .5rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.user-menu a, .user-menu button {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  padding: .5rem .6rem; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--body); cursor: pointer;
}
.user-menu a:hover, .user-menu button:hover { background: var(--brand-light); color: var(--brand-dark); }
.user-menu-keluar { color: var(--bad) !important; }

/* ---------------- Tombol ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid transparent; border-radius: var(--r-xs);
  padding: .55rem 1.1rem; font: inherit; font-weight: 600; font-size: .92rem;
  cursor: pointer; background: #fff; color: var(--ink); line-height: 1.4;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  flex: 0 0 auto;   /* tombol tidak pernah diremas; barisnya yang membungkus */
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-brand { background: linear-gradient(135deg, var(--brand), #4f46e5); color: #fff; border-radius: 999px; box-shadow: 0 8px 20px rgba(29, 78, 216, .28); }
.btn-utama { background: var(--brand); color: #fff; }
.btn-utama:hover, .btn-brand:hover { color: #fff; }
.btn-soft { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand-line); }
.btn-soft:hover { background: #e2ebff; }
.btn-garis { border-color: var(--brand-line); color: var(--brand); }
.btn-garis:hover { background: var(--brand-light); }
.btn-hantu { border-color: var(--line); color: var(--muted); }
.btn-hantu:hover { background: #f1f5f9; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bahaya { background: var(--bad); color: #fff; }
.btn-ok:hover, .btn-bahaya:hover { color: #fff; }
.btn-garis-hijau { background: var(--ok-bg); color: #065f46; border-color: var(--ok-line); }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; border-radius: 14px; }
.btn-blok { width: 100%; }


/* ---------------- Badge ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; padding: .3rem .7rem;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.b-biru { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand-line); }
.b-hijau { background: var(--ok-bg); color: #065f46; border-color: var(--ok-line); }
.b-kuning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-merah { background: var(--bad-bg); color: #991b1b; border-color: var(--bad-line); }
.b-abu { background: #eef1f6; color: #475569; border-color: #dfe5ee; }
.b-gelap { background: #0f172a; color: #fff; }
.b-kaca { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .3); }
.b-kaca:hover { background: rgba(255, 255, 255, .28); color: #fff; }

/* ---------------- Kartu ---------------- */
.kartu {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); padding: 1.25rem;
}
.kartu-padat { padding: 0; overflow: hidden; }
.kartu-atas { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.kartu-badan { padding: 1.25rem; }
.kartu-kaki { padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: #fbfcfe; }
.kartu-hover { transition: transform .18s ease, box-shadow .18s ease; }
.kartu-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.kartu-ikon {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .75rem;
}
.donoat { background: #fff; border-block: 1px solid var(--line); }
.kosong { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.kosong i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #4f46e5 100%);
  color: #fff;
}
.hero-judul { font-size: clamp(1.75rem, 4vw, 2.75rem); margin: .75rem 0; }
.sorot { color: #fcd34d; }
.hero-desk { color: rgba(255, 255, 255, .85); max-width: 34rem; }
.angka { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.label { font-size: .78rem; color: rgba(255, 255, 255, .7); }
.putih { color: #fff; }
.kecil-glass { color: rgba(255, 255, 255, .75); }
.panel {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px; padding: 1.5rem; backdrop-filter: blur(6px);
}
.panel-daftar { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.panel-daftar li {
  font-size: .86rem; color: rgba(255, 255, 255, .8);
  padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.panel-daftar li:last-child { border-bottom: 0; }
.panel-daftar b { color: #fff; }
.tahap-ikon {
  width: 46px; height: 46px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.25rem; flex: 0 0 auto;
}
.tahap-level { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.harga { font-size: 1.15rem; font-weight: 800; color: var(--brand); }
.langkah {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-light);
  color: var(--brand-dark); font-weight: 800; display: flex;
  align-items: center; justify-content: center; margin-bottom: .75rem;
}
.video-poster { position: relative; display: block; border-radius: 12px; overflow: hidden; }
.video-poster img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-main {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: rgba(220, 0, 0, .92);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem;
}
.video-label { position: absolute; right: .5rem; bottom: .5rem; }


/* ---------------- Formulir ---------------- */
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .92rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: .6rem .8rem; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
textarea { min-height: 120px; resize: vertical; }
input[type="file"] { padding: .45rem; }
.grup { margin-bottom: 1rem; }
.grup-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grup-2 > * { margin-bottom: 0; }
.centang { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; font-size: .875rem; }
.centang input { width: auto; margin-top: .2rem; }
.bantuan { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.sandi { position: relative; }
.sandi .tampil {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--muted); cursor: pointer; padding: .3rem;
}

/* ---------------- Tabel ---------------- */
.bungkus-tabel { overflow-x: auto; }
table.tabel { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.tabel th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: .7rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tabel td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tabel tbody tr:hover { background: #fafbfe; }
table.tabel tbody tr:last-child td { border-bottom: 0; }

/* ---------------- Statistik, progres, tab ---------------- */
.statistik { display: flex; align-items: center; gap: .9rem; }
.statistik .angka { font-size: 1.7rem; }
.progres { height: 8px; background: #e8edf7; border-radius: 999px; overflow: hidden; }
.progres i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.tab-menu { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tab-menu button {
  border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem;
  padding: .6rem .9rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
}
.tab-menu button.aktif { color: var(--brand); border-bottom-color: var(--brand); }
.roti { display: flex; align-items: center; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.roti:last-child { border-bottom: 0; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  background: var(--brand-light); color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}


/* ---------------- Toast & Modal ---------------- */
.toast-box { position: fixed; top: 78px; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.toast-item {
  display: flex; align-items: flex-start; gap: .6rem; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--r-sm); box-shadow: var(--sh-md); padding: .75rem .9rem;
  font-size: .875rem; font-weight: 500; transition: opacity .3s, transform .3s;
}
.toast-item.hilang { opacity: 0; transform: translateX(20px); }
.toast-item.t-ok { border-left-color: var(--ok); }
.toast-item.t-bad { border-left-color: var(--bad); }
.toast-item.t-warn { border-left-color: var(--accent); }
.toast-item i { font-size: 1.05rem; }
.modal-tirai {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 150;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-tirai.buka { display: flex; }
.modal-kotak { background: #fff; border-radius: var(--r); width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; }
.modal-lebar .modal-kotak { max-width: 880px; }
.modal-atas { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-judul { margin: 0; font-size: 1.05rem; }
.modal-tutup { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-isi { padding: 1.25rem; overflow: auto; }

/* ---------------- Footer ---------------- */
.foot { background: #0b1220; color: #94a3b8; margin-top: 3rem; }
.foot-judul { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.foot-tautan { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.foot-tautan li { margin-bottom: .45rem; display: flex; gap: .5rem; align-items: center; }
.foot-tautan a { color: #cbd5e1; }
.foot-tautan a:hover { color: #fff; }
.foot-bawah { border-top: 1px solid rgba(255, 255, 255, .08); }

/* ---------------- Sertifikat ---------------- */
.sertifikat {
  background: #fff; border-radius: var(--r); padding: 2.5rem 2rem; text-align: center;
  box-shadow: var(--sh-md);
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, #dbe4fd, #fde3b3);
  background-origin: border-box; background-clip: padding-box, border-box; border: 6px solid transparent;
}
.sertifikat-judul { font-size: 1.5rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }
.sertifikat-nama { font-size: 1.9rem; color: var(--brand); border-bottom: 2px solid #dbe4fd; display: inline-block; padding: 0 1.5rem .25rem; }
.sertifikat .right img { margin-left: auto; }
.kartu-anggota {
  max-width: 420px; margin: 0 auto; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #4f46e5); color: #fff;
  box-shadow: var(--sh-lg); padding: 1.5rem;
}

/* ---------------- Utilitas cetak ---------------- */
@media print {
  .nav, .foot, .toast-box, .tanpa-cetak { display: none !important; }
  body { background: #fff; }
  .sertifikat { box-shadow: none; border: 4px solid #1d4ed8; }
}

/* ==========================================================================
   Seluler & tablet: perbaikan responsif
   ========================================================================== */

/* Video YouTube: tinggi mengikuti lebar (16:9) supaya tidak terpotong di ponsel. */
.video-embed {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto;
  border: 0; border-radius: 12px; background: #0b1220;
}

/* Profil: kolom ringkasan + form data, berubah jadi satu kolom di layar sempit. */
.grid-profil { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }

/* Anak grid/flex boleh menyusut; tanpa ini isi panjang (email, judul) melebar. */
.grid > *, .baris > *, .grup > *, .nav-in > * { min-width: 0; }

/* Teks panjang: email, kode sertifikat, dan tautan tidak mendorong halaman. */
body { overflow-wrap: break-word; }
table.tabel td, table.tabel th, .user-menu, .toast-item, .chip { overflow-wrap: anywhere; }

/* Tabel lebar digulir di dalam wadahnya, bukan menggulir seluruh halaman. */
.bungkus-tabel { -webkit-overflow-scrolling: touch; }

/* Ringkas modul: judul panjang tidak menyingkirkan lencana status. */
details.materi > summary { flex-wrap: wrap; }
details.materi > summary b { overflow-wrap: anywhere; min-width: 0; }

@media (max-width: 760px) {
  .grid-profil { grid-template-columns: 1fr; }
}

/* Zona aman iPhone (notch & garis bawah layar). */
@supports (padding: max(1px)) {
  .wrap { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .foot-bawah .wrap { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .toast-box { top: calc(70px + env(safe-area-inset-top)); }
}

@media (max-width: 640px) {
  .grup-2 { grid-template-columns: 1fr; }
  .sertifikat { padding: 1.5rem 1rem; }
  .sertifikat-nama { font-size: 1.4rem; }
  .toast-box { left: 1rem; right: 1rem; max-width: none; }

  /* Tipografi & jarak lebih rapat supaya isi tidak terpotong. */
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.08rem; }
  .hero-judul { font-size: 1.6rem; }
  .py { padding: 1.15rem 0; }
  .py-lg { padding: 2rem 0; }
  .kartu, .kartu-badan { padding: 1rem; }
  .kartu-atas, .kartu-kaki { padding: .8rem 1rem; }
  .foot { margin-top: 2rem; }

  /* Target sentuh nyaman untuk jari (minimal sekitar 40 px). */
  .btn, .btn-sm, .btn-lg { min-height: 40px; }
  .btn-sm { padding: .6rem .9rem; }
  .tombol-menu { min-width: 40px; min-height: 40px; }
  .nav-aksi .btn { min-height: 36px; }
  .nav-menu a { padding: .7rem .75rem; }
  .user-menu a, .user-menu button { padding: .7rem .6rem; }
  .tab-menu button { padding: .7rem .6rem; }
  .tab-menu { gap: .15rem; }

  /* Cegah zoom otomatis iOS saat mengisi formulir (butuh >= 16px). */
  input, select, textarea { font-size: 16px; }

  /* Tabel admin: lebih rapat, tetap bisa digulir mendatar. */
  table.tabel { font-size: .8rem; }
  table.tabel th, table.tabel td { padding: .55rem .5rem; }

  /* Sertifikat & kartu anggota tetap terbaca di layar kecil. */
  .sertifikat { padding: 1.25rem .75rem; }
  .sertifikat-judul { font-size: 1.1rem; }
  .sertifikat-nama { font-size: 1.25rem; padding: 0 .75rem .25rem; }
  .kartu-anggota { padding: 1.15rem; }
  .sertifikat .grid-2 { gap: .75rem; }
  .sertifikat .right { text-align: center; }
  .sertifikat .right img { margin: 0 auto; }

  /* Modal menjadi lembar bawah layar, memakai tinggi layar lebih banyak. */
  .modal-tirai { padding: .6rem; align-items: flex-end; }
  .modal-kotak { max-height: 92vh; border-radius: var(--r) var(--r) 8px 8px; }
  .modal-atas, .modal-isi { padding: .9rem 1rem; }
}

/* Layar sangat sempit: chip nama pengguna berubah menjadi tombol avatar bulat. */
@media (max-width: 480px) {
  .nav-aksi .chip .nama-user { display: none; }
  .nav-aksi .chip {
    width: 40px; height: 40px; max-width: none; padding: 0;
    border-radius: 50%; justify-content: center; overflow: visible;
  }
  .nav-aksi .chip .badge { display: none; }
}

@media (max-width: 360px) {
  .wrap { padding-left: .75rem; padding-right: .75rem; }
  .kartu, .kartu-badan { padding: .85rem; }
  .grid-2, .grid-3, .grid-4, .baris, .grid { gap: .85rem; }
  .sandi, .kartu-kaki .btn, .kartu-badan .btn { width: 100%; }
}

