:root {
  --hijau: #1f3b34; --hijau2: #2d5a4f; --emas: #b8925a; --krem: #f7f1ea; --kartu: #fff; --teks: #22231f;
  --redup: #6d6a64; --garis: #e6ddd2; --merah: #b3261e; --biru: #1d4ed8; --ok: #18794e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--krem); color: var(--teks); font-size: 16px; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
h1 { font-size: 1.5rem; margin: .3rem 0; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
small { font-weight: normal; }
.redup { color: var(--redup); font-size: .9rem; }
input, select, button, .tombol { font: inherit; border-radius: 10px; }
input, select { width: 100%; padding: .65rem .75rem; border: 1px solid var(--garis); background: #fff; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--emas); border-color: transparent; }
label { display: block; font-size: .88rem; color: var(--redup); margin: .55rem 0; }
label input, label select { margin-top: .25rem; color: var(--teks); }
button, .tombol { border: 1px solid var(--garis); background: #fff; padding: .6rem 1rem; min-height: 44px; cursor: pointer; color: var(--teks); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; white-space: nowrap; }
button.utama { background: var(--hijau); color: #fff; border-color: var(--hijau); font-weight: 600; }
button.emas { background: var(--emas); color: #fff; border-color: var(--emas); font-weight: 600; }
button.bahaya { color: var(--merah); border-color: #e9b8b4; }
button.besar { width: 100%; padding: .85rem; font-size: 1.05rem; margin-top: .6rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { white-space: normal; text-align: left; background: none; border: none; color: var(--redup); text-decoration: underline; min-height: 36px; padding: .3rem .5rem; }
.galat { color: var(--merah); min-height: 1.2em; margin: .4rem 0 0; font-size: .92rem; }

header { position: sticky; top: 0; z-index: 5; background: var(--hijau); color: #fff; box-shadow: 0 2px 8px #0002; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .8rem; max-width: 1100px; margin: auto; }
.judul { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.judul img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; }
.judul b { display: block; font-size: 1rem; }
.judul small { display: block; color: #e8dcc8; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilih-klinik { display: flex; background: #ffffff22; border-radius: 999px; padding: 3px; flex-shrink: 0; }
.pilih-klinik button { background: none; border: 0; color: #fff; border-radius: 999px; min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.pilih-klinik button.on { background: var(--emas); font-weight: 600; }
nav { display: flex; gap: .2rem; overflow-x: auto; padding: 0 .5rem; max-width: 1100px; margin: auto; scrollbar-width: none; }
nav a, nav .link { color: #e8dcc8; text-decoration: none; padding: .55rem .75rem; border-bottom: 3px solid transparent; white-space: nowrap; font-size: .95rem; min-height: 40px; }
nav a.on { color: #fff; border-bottom-color: var(--emas); font-weight: 600; }
nav .link { margin-left: auto; color: #e8dcc8; }
body:not(.admin) .admin { display: none !important; }

main { max-width: 1100px; margin: auto; padding: .8rem; padding-bottom: 4rem; }
.v { display: none; }
.v.on { display: block; }
.kartu { background: var(--kartu); border: 1px solid var(--garis); border-radius: 14px; padding: 1rem; margin-bottom: .8rem; }
.grid2 { display: grid; gap: 0 .8rem; }
.grid2 > * { min-width: 0; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1.1fr 1fr; } #kartu-keranjang { position: sticky; top: 110px; } }
.baris { display: flex; gap: .5rem; align-items: center; }
.baris > input, .baris > select { flex: 1; min-width: 0; }
.filter { margin: .6rem 0; flex-wrap: wrap; }
.filter > input, .filter > select { flex: 1 1 150px; }
.tombol-baris { display: flex; flex-wrap: wrap; gap: .5rem; }

.masuk { max-width: 360px; margin: 6vh auto; text-align: center; background: #fff; padding: 1.5rem; border-radius: 18px; border: 1px solid var(--garis); }
.masuk input { text-align: center; font-size: 1.4rem; letter-spacing: .4em; }
.logo-dua { display: flex; justify-content: center; gap: .8rem; }
.logo-dua img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--garis); }

.lencana { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eee; color: #333; vertical-align: middle; }
.l-KINGDOM { background: #f3e6cf; color: #7a5520; }
.l-UMUM { background: #dcebe5; color: var(--hijau2); }
.l-facial { background: #fde7ef; color: #9d174d; }
.l-gratis { background: var(--ok); color: #fff; }
.l-batal { background: #fde2e1; color: var(--merah); }
.l-CA { background: #f6ede4; color: #8a5a3a; }
.l-FA { background: #dfe9e5; color: var(--hijau); }

.member-box { margin-top: .7rem; padding: .8rem; border-radius: 12px; background: #faf7f2; border: 1px solid var(--garis); }
.member-box .nama { font-weight: 700; font-size: 1.1rem; }
.member-box.galat-box { background: #fdecea; border-color: #f3c1bd; color: var(--merah); }
.aturan { font-size: .88rem; color: var(--redup); margin-top: .35rem; }
.stempel { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: .6rem 0 .3rem; max-width: 420px; }
.stempel span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #cdbca6; display: grid; place-items: center; font-size: .7rem; color: #b5a48e; }
.stempel span.isi { background: var(--emas); border: 2px solid var(--emas); color: #fff; font-weight: 700; }
.stempel span.baru { background: var(--hijau2); border-color: var(--hijau2); color: #fff; }
.tawar { margin-top: .6rem; padding: .7rem; background: #e7f5ee; border: 1px solid #a7d8bf; border-radius: 10px; color: #0f5132; font-weight: 600; }

.daftar-pilih { margin-top: .5rem; }
details { border-bottom: 1px solid var(--garis); }
details summary { cursor: pointer; padding: .65rem .2rem; font-weight: 600; font-size: .95rem; list-style-position: inside; }
details[open] summary { color: var(--hijau2); }
#bar-total { position: fixed; left: .6rem; right: .6rem; bottom: .6rem; z-index: 6; background: var(--hijau); color: #fff; border: 0; border-radius: 14px; justify-content: space-between; padding: .8rem 1rem; box-shadow: 0 4px 16px #0004; }
@media (min-width: 860px) { #bar-total { display: none !important; } }
.kat { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--redup); margin: .7rem 0 .2rem; }
.pilih { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; margin: .25rem 0; white-space: normal; gap: .5rem; }
.pilih .h { color: var(--hijau2); font-weight: 600; white-space: nowrap; }
.item { display: grid; grid-template-columns: 1fr auto; gap: .3rem .5rem; padding: .6rem 0; border-bottom: 1px dashed var(--garis); }
.item .nm { font-weight: 600; }
.item input.harga { width: 130px; min-height: 38px; padding: .35rem .5rem; text-align: right; }
.item .ket { grid-column: 1 / -1; font-size: .85rem; color: var(--redup); display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.item .hapus { min-height: 32px; padding: .1rem .6rem; }
.cek-gratis { display: inline-flex; align-items: center; gap: .35rem; color: var(--ok); font-weight: 600; margin: 0; }
.cek-gratis input { width: 22px; min-height: 22px; margin: 0; }
.ringkas { margin-top: .6rem; }
.ringkas div { display: flex; justify-content: space-between; padding: .25rem 0; }
.ringkas .total { font-size: 1.35rem; font-weight: 800; border-top: 2px solid var(--teks); margin-top: .3rem; padding-top: .45rem; }
.ringkas .min { color: var(--ok); }
.kosong { color: var(--redup); text-align: center; padding: 1rem 0; }

.baris-data { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem .2rem; border-bottom: 1px solid var(--garis); cursor: pointer; text-decoration: none; color: inherit; }
.baris-data:hover { background: #faf7f2; }
.baris-data .kanan { text-align: right; flex-shrink: 0; }
.baris-data b { display: block; }
.baris-data > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.kode-besar { overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .03em; }
.kode-besar { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; font-weight: 800; letter-spacing: .08em; text-align: center; padding: .8rem; background: #faf7f2; border: 2px dashed var(--emas); border-radius: 12px; margin: .6rem 0; }

.angka { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: .6rem 0; }
@media (min-width: 700px) { .angka { grid-template-columns: repeat(4, 1fr); } }
.angka div { background: #faf7f2; border: 1px solid var(--garis); border-radius: 12px; padding: .7rem; }
.angka small { display: block; color: var(--redup); font-size: .8rem; }
.angka b { font-size: 1.15rem; }
.kalimat { line-height: 1.55; background: #f1f6f3; border-radius: 12px; padding: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
@media (max-width: 600px) { table { font-size: .8rem; } td.r, th.r { white-space: nowrap; } }
th, td { padding: .45rem .35rem; border-bottom: 1px solid var(--garis); text-align: left; }
td.r, th.r { text-align: right; }
.tabel-gulir { overflow-x: auto; }

.harga-baris { display: grid; grid-template-columns: 1fr 120px; gap: .35rem .5rem; padding: .6rem 0; border-bottom: 1px solid var(--garis); align-items: center; }
.harga-baris .opsi { grid-column: 1 / -1; display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.harga-baris .opsi label { display: inline-flex; gap: .3rem; align-items: center; margin: 0; color: var(--teks); }
.harga-baris .opsi input[type=checkbox] { width: 20px; min-height: 20px; margin: 0; }
.harga-baris input { min-height: 38px; padding: .35rem .5rem; }
.harga-baris .opsi button { min-height: 34px; padding: .2rem .8rem; margin-left: auto; }
@media (min-width: 860px) { .harga-baris { grid-template-columns: 180px 1fr 140px auto; } .harga-baris .opsi { grid-column: auto; } }

dialog { border: 0; border-radius: 16px; padding: 1.2rem; width: min(520px, 94vw); max-height: 90vh; }
dialog::backdrop { background: #0006; }
#toast { position: fixed; left: 50%; bottom: 5rem; transform: translateX(-50%); background: #222; color: #fff; padding: .6rem 1rem; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; max-width: 90vw; }
#toast.on { opacity: 1; }
@media (max-width: 420px) {
  nav { padding: 0 .2rem; gap: 0; }
  nav a, nav .link { padding: .55rem .5rem; font-size: .88rem; }
  .pilih-klinik button { padding: .3rem .6rem; }
}
