:root {
  --biru: #1D6FA5; --biru-tua: #155680; --latar: #F1F4F7; --kartu: #fff; --teks: #1b2733; --redup: #5d6b79;
  --garis: #d8dfe6; --ok: #1a7f4b; --bahaya: #b3261e; --draf: #946200;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--latar); color: var(--teks); }
h1, h2, h3 { line-height: 1.2; margin: .2em 0 .5em; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
a { color: var(--biru); }
code { font-size: .9em; background: #eef2f6; padding: 0 .25em; border-radius: 4px; }
.redup { color: var(--redup); } .kecil { font-size: .85rem; }
.memuat { color: var(--redup); padding: 1rem 0; }
[hidden] { display: none !important; }

.bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .5rem 1rem; padding-top: calc(.5rem + env(safe-area-inset-top)); background: var(--biru); color: #fff; }
.bar a { color: #fff; text-decoration: none; }
.merek { font-weight: 700; font-size: 1.05rem; }
.menu { display: flex; gap: .25rem; flex: 1 1 auto; flex-wrap: wrap; }
.menu a { padding: .4rem .7rem; border-radius: 8px; }
.menu a.aktif { background: rgba(255,255,255,.2); }
.akun { display: flex; align-items: center; gap: .5rem; }
.isi { max-width: 960px; margin: 0 auto; padding: 1rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }

.kartu { background: var(--kartu); border: 1px solid var(--garis); border-radius: 12px; padding: 1rem; margin: 0 0 1rem; }
.pesan { padding: .7rem .9rem; border-radius: 8px; margin: .5rem 0 1rem; }
.pesan.galat { background: #fdeceb; color: var(--bahaya); border: 1px solid #f3c1be; }
.pesan.info { background: #e8f2fa; color: var(--biru-tua); border: 1px solid #bcd7ea; }

.tombol { display: inline-block; font: inherit; padding: .6rem 1rem; min-height: 44px; border-radius: 10px; border: 1px solid var(--biru); background: #fff; color: var(--biru); text-decoration: none; cursor: pointer; }
.tombol.utama { background: var(--biru); color: #fff; }
.tombol.kecil { min-height: 36px; padding: .3rem .7rem; font-size: .85rem; border-color: rgba(255,255,255,.7); background: transparent; color: #fff; }
.tombol.lebar { width: 100%; }
.tombol:disabled { opacity: .55; cursor: default; }
.aksi { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.kembali { display: inline-block; margin-bottom: .5rem; text-decoration: none; }

label { display: block; margin: .6rem 0; font-weight: 600; }
label.baris-cek { font-weight: 400; display: flex; gap: .5rem; align-items: center; min-height: 36px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select { display: block; width: 100%; font: inherit; padding: .6rem .7rem; min-height: 44px; border: 1px solid var(--garis); border-radius: 8px; background: #fff; margin-top: .25rem; }
input[type=checkbox] { width: 20px; height: 20px; }
fieldset.wilayah { border: 1px solid var(--garis); border-radius: 8px; margin: .6rem 0 0; }

.halaman-masuk { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.form-masuk { width: 100%; max-width: 380px; }

.judul-grup { margin-top: 1.2rem; color: var(--redup); font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.baris-toko { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; margin: 0 0 .4rem; background: var(--kartu); border: 1px solid var(--garis); border-radius: 10px; text-decoration: none; color: inherit; min-height: 52px; }
.baris-toko .nama { font-weight: 600; color: var(--biru-tua); }
.baris-toko.nonaktif { opacity: .6; }
.lencana { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: #e6ebf0; color: var(--redup); vertical-align: middle; }
.lencana.ok { background: #dff3e7; color: var(--ok); } .lencana.bahaya { background: #fdeceb; color: var(--bahaya); } .lencana.draf { background: #fff2cf; color: var(--draf); }
.daftar-polos { list-style: none; padding: 0; margin: .5rem 0; } .daftar-polos li { padding: .3rem 0; border-bottom: 1px solid #edf0f3; }
details { margin: .4rem 0; } summary { cursor: pointer; padding: .3rem 0; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0 0 .8rem; } .dl dt { color: var(--redup); } .dl dd { margin: 0; }

.tabs { display: flex; gap: .4rem; margin-bottom: .8rem; }
.tab { font: inherit; padding: .5rem 1rem; min-height: 44px; border: 1px solid var(--garis); border-radius: 10px; background: #fff; cursor: pointer; }
.tab.aktif { background: var(--biru); color: #fff; border-color: var(--biru); }
.gulir-x { overflow-x: auto; background: var(--kartu); border: 1px solid var(--garis); border-radius: 10px; }
.tabel { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tabel th, .tabel td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid #edf0f3; white-space: nowrap; }
.tabel th { background: #f6f8fa; position: sticky; top: 0; }
pre.kode { overflow-x: auto; background: #f6f8fa; padding: .6rem; border-radius: 8px; font-size: .8rem; }

@media (min-width: 700px) { .isi { padding: 1.5rem; } }

/* Pemberitahuan versi baru (service worker) & kotak info fitur beranda */
.pembaruan { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; background: var(--biru-tua); color: #fff; padding: .6rem .9rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.info-fitur { position: relative; padding-right: 2.5rem; }
.info-fitur .tutup { position: absolute; top: .4rem; right: .4rem; }
