/* D FUN DAY · Tema A Ceria Pastel. Warna bendera Buddhis: biru #0067B1, kuning #F7C100, merah #D7262E, putih, oranye #F08219 */
:root {
  --biru: #0067B1; --biru-tua: #0a4f8a; --kuning: #F7C100; --merah: #D7262E; --oranye: #F08219;
  --latar: #f7f5f0; --kartu: #fff; --teks: #22303c; --redup: #6b7782; --garis: #e6e2d9;
  --hijau: #1f8a4c; --rad: 18px; --bayang: 0 1px 3px rgba(20, 30, 40, .07), 0 4px 14px rgba(20, 30, 40, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Nunito, system-ui, -apple-system, sans-serif; color: var(--teks); background: var(--latar); }
h1, h2, h3 { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; text-transform: capitalize; line-height: 1.2; }
a { color: var(--biru); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.hal { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }
.isi { padding: 6px 16px 24px; }

/* pita bendera */
.pita { display: flex; height: 5px; margin: 0 16px 8px; border-radius: 3px; overflow: hidden; }
.pita i { flex: 1; }
.pita i:nth-child(1) { background: var(--biru); } .pita i:nth-child(2) { background: var(--kuning); } .pita i:nth-child(3) { background: var(--merah); }
.pita i:nth-child(4) { background: #fff; } .pita i:nth-child(5) { background: var(--oranye); }
.pita i:nth-child(6) { background: linear-gradient(to bottom, var(--biru) 20%, var(--kuning) 20% 40%, var(--merah) 40% 60%, #fff 60% 80%, var(--oranye) 80%); }
.pita.kecil { height: 4px; margin: 0 0 6px; border-radius: 0; }

/* kepala */
.kepala-beranda { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.logo-kecil { width: 58px; height: 58px; background: #fff; border-radius: 14px; padding: 4px; box-shadow: var(--bayang); }
.kepala-beranda .kanan { display: flex; gap: 10px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--biru); color: #fff; display: inline-grid; place-items: center; font: 600 18px Fredoka, sans-serif; text-decoration: none; flex: none; }
.avatar.besar { width: 56px; height: 56px; font-size: 24px; }
.ikon-tombol { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; display: inline-grid; place-items: center; color: var(--teks); box-shadow: var(--bayang); cursor: pointer; position: relative; text-decoration: none; }
.lonceng .titik { position: absolute; top: -2px; right: -2px; background: var(--merah); color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.kepala-hal { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; background: var(--latar); }
.kepala-hal h2 { margin: 0; font-size: 21px; flex: 1; }
.kembali { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--biru); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.sapa { font-size: 26px; margin: 4px 0 0; }
.sub { margin: 0 0 14px; color: var(--redup); }

/* kartu absen */
.kartu-absen { background: var(--biru); color: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 6px 20px rgba(0, 103, 177, .25); margin-bottom: 14px; }
.ka-atas { display: flex; gap: 14px; align-items: center; }
.ka-tgl { background: var(--kuning); color: #2b2100; border-radius: 14px; width: 60px; height: 64px; display: grid; place-items: center; align-content: center; box-shadow: 0 3px 0 #c99a00; flex: none; }
.ka-tgl small { font-weight: 800; font-size: 12px; } .ka-tgl b { font: 600 28px/1 Fredoka, sans-serif; }
.ka-atas small { opacity: .9; font-size: 12.5px; } .ka-judul { font: 600 22px/1.15 Fredoka, sans-serif; }
.ka-pilih { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.ka-opsi { border: 0; border-radius: 14px; padding: 11px 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 800; cursor: pointer; }
.ka-opsi.aktif { background: #fff; color: var(--biru); }
.ka-alasan { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; color: var(--teks); }
.ka-kirim { border: 0; border-radius: 999px; padding: 10px 22px; background: #d8e8f6; color: var(--biru-tua); font-weight: 800; cursor: pointer; }
.ka-kirim:not([disabled]) { background: var(--kuning); color: #2b2100; }
.ka-kirim[disabled] { opacity: .75; cursor: default; }
.ka-ket { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; opacity: .95; }

/* menu kotak 3 kolom */
.judul-menu { font-size: 17px; margin: 20px 0 10px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-kotak { aspect-ratio: 1; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--teks); position: relative; padding: 6px; text-align: center; }
.menu-ikon { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; }
.menu-label { font-weight: 800; font-size: 13.5px; line-height: 1.15; text-transform: capitalize; }
.menu-kotak .lencana { position: absolute; top: 8px; right: 8px; background: var(--merah); color: #fff; min-width: 20px; height: 20px; border-radius: 10px; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.w-hijau { background: #e3f2e6; color: #1b6b3a; } .w-oranye { background: #fdebd8; color: #a5520b; } .w-merah { background: #fbe3e3; color: #a32a2a; }
.w-pink { background: #fbe4f0; color: #9b2b6a; } .w-biru { background: #e1ecf8; color: #0a4f8a; } .w-kuning { background: #fdf3cf; color: #8a6400; }
.w-ungu { background: #ece5f8; color: #5b3a9b; } .w-abu { background: #ebedef; color: #46525c; }
.menu-kotak .menu-label { color: inherit; }

/* umum */
.kartu { background: var(--kartu); border-radius: var(--rad); padding: 14px 16px; margin: 10px 0; box-shadow: var(--bayang); display: block; }
.bagian { margin-top: 18px; } .bagian > h3, .bagian > summary { font-size: 17px; margin: 0 0 6px; font-family: Fredoka, sans-serif; font-weight: 600; cursor: pointer; }
.ket { color: var(--redup); font-size: 13.5px; } .tengah { text-align: center; } .pra { white-space: pre-wrap; margin: 6px 0; }
.kosong { color: var(--redup); text-align: center; padding: 18px 8px; }
.galat { color: var(--merah); font-weight: 700; font-size: 14px; } .fe { color: var(--merah); font-size: 12.5px; font-weight: 700; display: block; }
.baris-antara { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.baris-tombol { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.tombol { border: 0; border-radius: 999px; padding: 10px 18px; background: #e7edf3; color: var(--teks); font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.tombol svg { width: 18px; height: 18px; }
.tombol.utama { background: var(--biru); color: #fff; } .tombol.bahaya { background: #fbe3e3; color: #a32a2a; } .tombol.bahaya.yakin { background: var(--merah); color: #fff; }
.tombol.kecil { padding: 7px 14px; font-size: 13.5px; } .tombol.lebar { width: 100%; margin-top: 10px; } .tombol.wa { background: #dcf5e3; color: #146c33; }
.tombol[disabled] { opacity: .55; cursor: default; }
.tombol-teks { border: 0; background: none; color: var(--biru); font-weight: 700; cursor: pointer; padding: 4px 6px; } .tombol-teks.bahaya { color: var(--merah); }
.tautan { font-weight: 700; text-decoration: none; }
.form { display: grid; gap: 12px; }
.isian { display: grid; gap: 5px; } .isian .label { font-weight: 800; font-size: 13.5px; } .isian .ket { font-size: 12.5px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; border: 1.5px solid var(--garis); border-radius: 12px; padding: 10px 12px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--biru); outline-offset: 0; border-color: transparent; }
:focus-visible { outline: 3px solid var(--kuning); outline-offset: 2px; }
.dua { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cek { display: flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; } .cek input { width: 20px; height: 20px; }
.redup { opacity: .55; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chips.gulir { flex-wrap: nowrap; overflow-x: auto; padding: 4px 0 8px; margin: 4px 0; }
.chip { border: 1.5px solid var(--garis); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chip.aktif { background: var(--biru); color: #fff; border-color: var(--biru); }
.tabs { display: flex; background: #e9e6df; border-radius: 999px; padding: 4px; gap: 4px; margin: 4px 0 12px; }
.tabs > * { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px 6px; font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; color: var(--teks); font-size: 14px; }
.tabs > [aria-selected=true] { background: #fff; color: var(--biru); box-shadow: var(--bayang); }
.lencana-teks { background: #eef2f6; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; color: #39505f; white-space: nowrap; }
.lencana-teks.hijau { background: #dcf1e3; color: #17723f; } .lencana-teks.merah { background: #fbe3e3; color: #a32a2a; }
.status { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; }
.s-diajukan, .s-baru { background: #fdf3cf; color: #7a5800; } .s-diproses, .s-diteruskan { background: #e1ecf8; color: #0a4f8a; } .s-selesai { background: #dcf1e3; color: #17723f; } .s-ditolak { background: #fbe3e3; color: #a32a2a; }
.peringatan { display: block; background: #fff4d6; border-radius: 14px; padding: 10px 14px; margin: 10px 0; color: #6b4d00; font-weight: 700; text-decoration: none; }
.peringatan.biru { background: #e1ecf8; color: #0a4f8a; }
.kartu.datang { display: grid; gap: 6px; } .kartu.datang.ok { display: flex; gap: 12px; align-items: center; background: #e8f6ec; } .besar { font-size: 28px; }
.daftar-tugas { margin: 6px 0 0; padding-left: 20px; } .tugas-saya { margin-top: 6px; font-weight: 700; color: var(--biru-tua); }
.progres { height: 10px; background: #eef0f2; border-radius: 5px; overflow: hidden; margin: 8px 0 4px; } .progres i { display: block; height: 100%; background: var(--hijau); }
.baris-profil { display: flex; gap: 14px; align-items: center; }
.ringkas-angka { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.ringkas-angka > * { background: #fff; border-radius: 16px; padding: 10px; text-align: center; box-shadow: var(--bayang); border: 0; display: grid; }
.ringkas-angka b { font: 600 24px Fredoka, sans-serif; } .ringkas-angka small { color: var(--redup); font-weight: 700; }
.bisa-klik { cursor: pointer; outline: 2px solid #fdeab0; }
.tabel-wadah { overflow-x: auto; background: #fff; border-radius: var(--rad); box-shadow: var(--bayang); }
.tabel { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tabel th, .tabel td { padding: 8px 10px; border-bottom: 1px solid #f0ede6; text-align: left; white-space: nowrap; }
.tabel th { font-size: 12px; color: var(--redup); background: #faf9f6; }
.tabel.rekap td:not(.lengket), .tabel.rekap th:not(.lengket) { text-align: center; }
.lengket { position: sticky; left: 0; background: #fff; z-index: 1; } th.lengket { background: #faf9f6; }
.st-y { color: var(--hijau); font-weight: 800; } .st-n { color: var(--merah); font-weight: 800; } .st-i { color: #b07800; font-weight: 800; } .st-r { color: #9aa4ad; }
.cari { margin: 6px 0; }
.daftar-anak { display: grid; gap: 6px; }
.baris-anak { display: flex; align-items: center; gap: 12px; background: #fff; border: 0; border-radius: 14px; padding: 12px 14px; text-align: left; cursor: pointer; box-shadow: var(--bayang); }
.baris-anak .nama { flex: 1; } .baris-anak.hadir { background: #e8f6ec; }
.kotak-cek { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #c9d2da; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.baris-anak.hadir .kotak-cek { background: var(--hijau); border-color: var(--hijau); }
.baris-klik { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; cursor: pointer; }
.baris-klik .tumbuh, .baris-klik > div:first-child { flex: 1; } .panah { font-size: 22px; color: var(--redup); }
.daftar-pilih { max-height: 50vh; overflow-y: auto; display: grid; gap: 2px; padding: 4px 0; } .dua-kolom { grid-template-columns: 1fr 1fr; max-height: none; }
.blok-kelas { border-bottom: 1px solid var(--garis); padding: 8px 0; display: grid; gap: 4px; }
.ringkas-tugas { display: grid; gap: 4px; font-size: 14px; margin-top: 6px; } .ringkas-tugas .lencana-teks { margin-left: 6px; }
.titik-hadir { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; }
.titik-hadir span { font-size: 11.5px; font-weight: 800; border-radius: 8px; padding: 3px 6px; } .titik-hadir .y { background: #dcf1e3; color: #17723f; } .titik-hadir .n { background: #fbe3e3; color: #a32a2a; }
.catatan { border-left: 3px solid var(--kuning); padding: 4px 10px; margin: 8px 0; }
.galeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.galeri figure { margin: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--bayang); }
.galeri img, .tanpa-foto { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: #eef0f2; font-size: 12px; color: var(--redup); text-align: center; }
.galeri figcaption { font-size: 12px; font-weight: 700; padding: 4px 6px; }
.foto-baris { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .foto-baris img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.daftar-ppt, .daftar-barang { margin: 8px 0 0; padding-left: 18px; } .daftar-ppt li { margin: 4px 0; }
.upload-ppt { display: grid; grid-template-columns: auto auto 1fr auto; gap: 6px; align-items: center; margin-top: 10px; }
@media (max-width: 480px) { .upload-ppt { grid-template-columns: 1fr; } }
.baris-item { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--garis); }
.notif.baru { border-left: 4px solid var(--biru); } a.kartu { color: inherit; text-decoration: none; }
.kode { font: 700 26px monospace; letter-spacing: 2px; background: #fdf3cf; border-radius: 12px; padding: 8px 14px; text-align: center; }
details > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

/* gerbang */
.gerbang { max-width: 440px; margin: 0 auto; padding: 24px 16px 40px; }
.logo-besar { display: block; width: 150px; height: 150px; margin: 10px auto 8px; background: #fff; border-radius: 30px; padding: 8px; box-shadow: var(--bayang); }
.gerbang .pita { margin: 10px 0 14px; }

/* modal & toast */
.latar { position: fixed; inset: 0; background: rgba(20, 28, 36, .45); z-index: 50; display: grid; place-items: end center; }
@media (min-width: 600px) { .latar { place-items: center; } }
.modal { background: var(--latar); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; }
@media (min-width: 600px) { .modal { border-radius: 22px; } }
.modal-kepala { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; gap: 10px; } .modal-kepala h3 { margin: 0; font-size: 19px; }
.modal-isi { padding: 6px 16px 12px; overflow-y: auto; } .modal-kaki { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 16px 16px; border-top: 1px solid var(--garis); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #22303c; color: #fff; padding: 11px 18px; border-radius: 14px; z-index: 99; font-weight: 700; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .4s; }
.toast.galat { background: var(--merah); } .toast.pergi { opacity: 0; }
.muat { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.muat span { width: 10px; height: 10px; border-radius: 50%; background: var(--biru); animation: lompat 1s infinite ease-in-out; }
.muat span:nth-child(2) { background: var(--kuning); animation-delay: .15s; } .muat span:nth-child(3) { background: var(--merah); animation-delay: .3s; }
@keyframes lompat { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .muat span { animation: none; } }
