* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
	--primary: #f4511e;
	--primary-dark: #d84315;
	--ink: #1c2434;
	--muted: #6b7280;
	--bg: #f7f7fb;
	--card: #ffffff;
	--line: #e5e7eb;
	--ok: #16a34a;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--bg);
	color: var(--ink);
	line-height: 1.55;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.nav {
	background: var(--card);
	border-bottom: 1px solid var(--line);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	position: sticky;
	top: 0;
	z-index: 10;
	flex-wrap: wrap;
}
.logo { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; }
.logo .beta {
	font-size: 10px; font-weight: 700; text-transform: uppercase;
	background: #fff3e0; color: var(--primary-dark);
	border: 1px solid #ffcc9c; border-radius: 99px;
	padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.nav nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.inline { display: inline; }
.linklike {
	background: none; border: none; color: var(--muted);
	font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 0;
}

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
main.wide { max-width: 1080px; }

h1 { font-size: 24px; margin: 10px 0 6px; }
h2 { font-size: 17px; margin: 18px 0 10px; }
h3 { font-size: 15px; margin: 6px 0; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 13px; }

.btn {
	display: inline-block;
	background: var(--primary);
	color: #fff;
	border: 1px solid var(--primary);
	border-radius: 10px;
	padding: 11px 18px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	text-align: center;
}
.btn:active { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.wfull { width: 100%; }

.hero { text-align: center; padding: 34px 6px 8px; }
.hero h1 { font-size: 28px; line-height: 1.25; }
.hero em { color: var(--primary); font-style: normal; }
.hero p { margin: 12px auto; max-width: 420px; color: var(--muted); }
.cta { display: flex; gap: 10px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }

.notice {
	background: #fff8e1; border: 1px solid #ffe082; color: #7a5c00;
	padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin: 12px 0;
}
.alert {
	background: #fdecea; border: 1px solid #f5c6c0; color: #a13529;
	padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin: 10px 0;
}

.card {
	background: var(--card); border: 1px solid var(--line);
	border-radius: 14px; padding: 14px 16px; margin: 10px 0;
}
.cards3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.cards2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) {
	.cards3 { grid-template-columns: repeat(3, 1fr); }
	.cards2 { grid-template-columns: repeat(2, 1fr); }
	.hero h1 { font-size: 34px; }
}
.steps .num {
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--primary); color: #fff; font-weight: 800;
	display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.faq summary { font-weight: 700; cursor: pointer; }

.authbox { max-width: 380px; margin: 24px auto; }
.authwrap { max-width: 380px; margin: 14px auto; }
.authbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.atau { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: 13px; }
.atau::before, .atau::after { content: ""; flex: 1; height: 1px; background: var(--line); }
a.btn.btn-google { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); border-color: var(--line); }
a.btn.btn-sm.btn-google { display: inline-flex; }
.ok-text { color: var(--ok); }

/* Ringkasan saldo (Beranda & Pendapatan): satu kartu, bukan tiga. */
.saldo { padding: 16px; }
.saldo-total { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; margin: 2px 0; }
.saldo .muted { font-size: 12px; }
.saldo-rinci { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.saldo-rinci > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.saldo-rinci span { color: var(--muted); }

/* Daftar transaksi: satu kartu, baris rapat dipisah garis tipis. */
.judul-list { margin: 18px 0 8px; }
.list-trx { padding: 2px 14px; }
.trx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.trx:last-child { border-bottom: none; }
.trx-ikon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.trx-ikon img { width: 24px; height: 24px; object-fit: contain; }
.trx-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.trx-info strong { font-size: 14.5px; }
.trx-info .muted { font-size: 12.5px; }
.trx-tgl { font-size: 11.5px; color: var(--muted); }
.trx-kanan { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.trx-kanan strong { font-size: 15px; }
.trx-status { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.coret { text-decoration: line-through; color: var(--muted); }

/* Chat dukungan (member <-> admin) — bikinan sendiri, bukan widget pihak ketiga. */
.chat-box { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.chat-bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.chat-bubble p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.chat-waktu { display: block; font-size: 10.5px; margin-top: 4px; color: var(--muted); }
.chat-saya { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-saya .chat-waktu { color: rgba(255,255,255,.75); }
.chat-lawan { align-self: flex-start; background: #f1f5f9; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-kirim { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.chat-kirim textarea { flex: 1; margin: 0; resize: none; }
.chat-kirim .btn { flex: none; }
.chat-attach { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.chat-attach[hidden] { display: none; }
.chat-attach:hover { background: #f1f5f9; }
.chat-attach svg { width: 19px; height: 19px; }
.chat-pratinjau { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.chat-pratinjau[hidden] { display: none; }
.chat-pratinjau img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.chat-pratinjau-hapus { border: none; background: #f1f5f9; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 12px; line-height: 1; color: var(--ink); }
.chat-gambar { max-width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; cursor: pointer; }
.chat-terhapus { margin: 0; font-style: italic; opacity: .75; }
.chat-aksi { display: flex; gap: 12px; margin-top: 4px; }
.chat-aksi form { margin: 0; }
.chat-aksi-btn { background: none; border: none; padding: 0; font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; color: rgba(255,255,255,.85); }
.thread-dukungan { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.thread-dukungan:last-child { border-bottom: none; }
.thread-dukungan .avatar { flex: none; }
.thread-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.thread-info strong { font-size: 14.5px; }
.thread-preview { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-kanan { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.teks-bahaya { color: #c62828; }
.input-pct { display: flex; align-items: center; gap: 6px; }
.input-pct input { width: 110px; margin-top: 4px; }
.input-pct em { font-style: normal; color: var(--muted); font-weight: 700; }
.porsi-platform { padding: 10px 0; line-height: 1.8; }
.tabel-tingkat { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 18px; margin: 10px 0; }
.baris-tingkat { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; white-space: nowrap; }
.baris-tingkat .input-pct input { width: 80px; margin: 0; }
.contoh-komisi > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.contoh-komisi > div.garis { border-top: 1px solid var(--ink); margin-top: 4px; }
.rowbetween > div { min-width: 0; }
.rowbetween > .btn { flex: none; }
.kartu-penting { border-color: #ffcc9c; background: #fffaf5; }
a.notice-link { display: block; text-decoration: none; font-weight: 600; }

/* Profil: kepala, ringkasan, ajak teman, dan menu berbentuk daftar. */
.kode-member { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.kode-member b { color: var(--ink); letter-spacing: .4px; }
.salin-mini {
	border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer;
	font: inherit; font-size: 11.5px; font-weight: 700; padding: 1px 8px; color: var(--primary);
}
a.saldo-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; color: inherit; }
a.saldo-mini strong { display: block; font-size: 21px; line-height: 1.25; }
a.saldo-mini .lihat { color: var(--primary); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.ajak-kepala { display: flex; align-items: center; gap: 12px; }
.ajak-kepala strong { display: block; font-size: 15px; }
.ajak-link {
	margin: 12px 0 10px; background: #f1f5f9; border: 1px solid var(--line); border-radius: 8px;
	padding: 7px 10px; font-size: 12.5px; word-break: break-all; color: var(--muted);
}
.ajak-baris { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ajak-baris .ajak-link { flex: 1; min-width: 0; margin: 0; }
.ajak-baris .btn { flex: none; }
.ajak-bagikan { margin-top: 12px; }
.ajak-stat { display: flex; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ajak-stat > div { flex: 1; text-align: center; }
.ajak-stat strong { display: block; font-size: 18px; }
.ajak-stat .muted { font-size: 11.5px; }
.menu-list { padding: 0 14px; }
.card.menu-list > * + * { border-top: 1px solid var(--line); } /* lebih spesifik dari border:0 milik .menu-baris */
.menu-baris {
	display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0;
	border: 0; background: none; cursor: pointer; text-align: left; list-style: none;
	font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none;
}
.menu-baris::-webkit-details-marker { display: none; }
.menu-baris::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
details.menu-lipat[open] > .menu-baris::after { transform: rotate(90deg); }
details.menu-lipat form { padding: 0 0 14px; }
.menu-ikon {
	flex: none; width: 34px; height: 34px; border-radius: 10px; background: #eef1f7; color: var(--navy);
	display: flex; align-items: center; justify-content: center;
}
.menu-ikon svg { width: 18px; height: 18px; }
.menu-keluar { color: #c62828; }
.menu-keluar .menu-ikon { background: #fdecea; color: #c62828; }
.menu-keluar::after { content: none; }
.center { text-align: center; }
.btn-big { padding: 14px 34px; font-size: 17px; border-radius: 12px; }
.joinbtns { display: flex; gap: 8px; margin-top: 10px; }
.joinbtns.center2 { justify-content: center; }
.spaced { margin-top: 8px; }
a.wfull { display: block; }
form label { display: block; font-weight: 600; font-size: 13.5px; margin: 10px 0; }
form label[hidden] { display: none; }
input, textarea, select {
	width: 100%; padding: 10px 12px; margin-top: 4px;
	border: 1px solid var(--line); border-radius: 10px;
	font: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid #ffab91; border-color: var(--primary); }

.balances .card { text-align: center; padding: 10px 6px; }
.bal-label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.bal-val { display: block; font-size: 17px; font-weight: 800; margin-top: 2px; }
.bal-val.ok { color: var(--ok); }

.pastebox textarea { margin-bottom: 10px; }
.newlink { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.linkrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linkrow code, code.short {
	background: #f1f5f9; border: 1px solid var(--line); border-radius: 8px;
	padding: 6px 10px; font-size: 13px; word-break: break-all;
}

.list { display: flex; flex-direction: column; gap: 8px; }
.linkitem { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.linkmeta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.linkmeta .dest {
	color: var(--muted); font-size: 12px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px;
}
.convitem { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.convmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.pill { border-radius: 99px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.st-pending  { background: #fff8e1; color: #8a6d00; border: 1px solid #ffe082; }
.st-approved { background: #e3f2fd; color: #1258a8; border: 1px solid #a6d1fa; }
.st-paid     { background: #e8f5e9; color: #196c2e; border: 1px solid #a5d6a7; }
.st-rejected { background: #fdecea; color: #a13529; border: 1px solid #f5c6c0; }

.empty { text-align: center; padding: 26px 16px; }

footer {
	border-top: 1px solid var(--line);
	padding: 16px; text-align: center;
	color: var(--muted); font-size: 12px;
	max-width: 640px; margin: 0 auto;
}

/* ===== App shell (member area ala aplikasi) ===== */
:root { --navy: #16224d; --navy2: #1d2c63; --gold: #f5b301; }
body.appbody { background: #eef1f7; }
.appbar {
	background: #fff; border-bottom: 1px solid var(--line);
	display: flex; align-items: center; gap: 10px;
	padding: 14px 16px; position: sticky; top: 0; z-index: 10;
}
/* Di layar lebar, logo+judul dipusatkan supaya sejajar dengan konten di
   bawahnya (yang sudah terpusat lewat .appwrap) — bukan nempel di kiri
   dengan banyak ruang kosong di kanannya. Mobile tidak disentuh. */
@media (min-width: 481px) {
	.appbar { justify-content: center; }
}
.appbrand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.applogo { width: 40px; height: 40px; border-radius: 12px; }
.apptitle { display: flex; flex-direction: column; line-height: 1.25; }
.apptitle strong { font-size: 20px; letter-spacing: .3px; }
.apptitle span { font-size: 12px; color: var(--muted); }
.logoimg { width: 22px; height: 22px; border-radius: 6px; vertical-align: -4px; margin-right: 2px; }

.offline-banner {
	background: #fef3c7; color: #92400e; text-align: center;
	font-size: 12.5px; font-weight: 600; padding: 7px 12px;
}

.appwrap { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 14px 14px 84px; }
.appwrap h1 { font-size: 21px; margin: 8px 0 4px; }
.appwrap h2 { font-size: 15.5px; margin: 18px 0 8px; }

.apphero {
	background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 100%);
	border-radius: 20px; padding: 16px 14px 18px; color: #fff;
	box-shadow: 0 8px 24px rgba(22, 34, 77, .25);
}
.pasterow {
	display: flex; align-items: center; gap: 8px;
	background: #fff; border-radius: 99px; padding: 6px 12px; margin-bottom: 10px;
}
.pasterow input { border: none; padding: 8px 2px; margin: 0; flex: 1; min-width: 0; font-size: 14px; }
.pasterow input:focus { outline: none; }
.pasteicon { width: 20px; height: 20px; color: var(--navy); flex: none; }
.mp-mini { flex: none; font-size: 18px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #232323; }
.btn-gold:active { background: #dda000; }
.ayo { text-align: center; font-weight: 700; font-size: 13.5px; margin: 14px 0 10px; color: #fff; }
.steps4 { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px; text-align: center; }
.step span { font-size: 10.5px; line-height: 1.3; color: #dfe5f5; }
.stepicon {
	width: 46px; height: 46px; border-radius: 50%;
	background: #fff; color: var(--navy);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.stepicon svg { width: 22px; height: 22px; }
.stepicon img { width: 30px; height: 30px; border-radius: 50%; }
.stepline { flex: 1; height: 2px; background: rgba(255,255,255,.35); margin-top: 22px; min-width: 6px; }

.mpgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mpcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; text-align: center; }
.mpcard strong { font-size: 12.5px; }
.mpicon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.mpicon img { width: 32px; height: 32px; }
.mp-off { opacity: .55; }
.tag { font-size: 10px; font-weight: 700; border-radius: 99px; padding: 2px 8px; background: #eef1f7; color: var(--muted); }
.tag-on { background: #e8f5e9; color: #196c2e; }

.bottomnav {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
	background: #fff; border-top: 1px solid var(--line);
	display: flex; justify-content: space-around;
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
	max-width: 480px; margin: 0 auto;
	/* Promosikan ke layer GPU sendiri — beberapa Chrome/WebView Android
	   sempat "menghilangkan" elemen fixed di tengah scroll atau saat tab
	   kembali aktif setelah membuka tab baru (tombol Lanjutkan Belanja
	   pakai target=_blank) kalau elemennya tidak dikomposit terpisah. */
	transform: translateZ(0);
	will-change: transform;
}
.bottomnav a {
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600;
	padding: 4px 14px; border-radius: 12px; min-width: 72px;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.active { color: var(--navy); background: #eef1f7; }

.appfoot { border: none; padding: 10px 16px 90px; text-align: center; color: var(--muted); font-size: 11px; max-width: 480px; margin: 0 auto; }

.profilcard { display: flex; align-items: center; gap: 12px; }
.avatar {
	width: 52px; height: 52px; border-radius: 50%;
	background: var(--navy); color: #fff; font-weight: 800; font-size: 22px;
	display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
img.avatar { object-fit: cover; flex: none; }
.profilinfo { display: flex; flex-direction: column; }
.rowbetween { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bigcode { font-size: 20px; display: block; }

/* Admin — layout sidebar ala panel */
body.admin main { max-width: 1080px; }
.admwrap { display: flex; min-height: 100vh; width: 100%; }
.sidebar {
	width: 232px; flex: none;
	background: var(--navy); color: #fff;
	position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
	display: flex; flex-direction: column;
	transition: transform .18s ease;
}
.sb-brand {
	display: flex; align-items: center; gap: 10px;
	padding: 16px 14px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.sb-brand img { width: 38px; height: 38px; border-radius: 10px; }
.sb-brand div { display: flex; flex-direction: column; line-height: 1.25; }
.sb-brand strong { font-size: 15.5px; }
.sb-brand span { font-size: 11px; color: #aab6dd; }
.sb-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-nav a {
	display: flex; align-items: center; gap: 10px;
	color: #c7d0ec; text-decoration: none;
	padding: 11px 12px; border-radius: 10px;
	font-weight: 600; font-size: 14px;
}
.sb-nav a svg { width: 18px; height: 18px; flex: none; }
.sb-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.sb-out { padding: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.sb-out button {
	width: 100%; background: none; border: 1px solid rgba(255,255,255,.25);
	color: #c7d0ec; border-radius: 10px; padding: 9px; font: inherit;
	font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.sb-out button:hover { background: rgba(255,255,255,.08); color: #fff; }
.admmain { flex: 1; margin-left: 232px; display: flex; flex-direction: column; min-width: 0; transition: margin-left .18s ease; }
.admtop {
	display: flex; align-items: center; gap: 12px;
	background: var(--card); border-bottom: 1px solid var(--line);
	padding: 10px 14px; position: sticky; top: 0; z-index: 30;
}
.hamb {
	font-size: 19px; line-height: 1; background: none;
	border: 1px solid var(--line); border-radius: 8px;
	padding: 5px 11px; cursor: pointer; color: var(--ink);
}
.sb-overlay { display: none; }
@media (min-width: 901px) {
	/* Sidebar "ditutup" di layar lebar menyusut jadi rel ikon (bukan hilang
	   total) — supaya menu tetap bisa dipakai satu klik, cuma teksnya yang
	   disembunyikan. title="" di tiap link jadi tooltip pengganti teksnya. */
	body.sb-closed .sidebar { width: 64px; }
	body.sb-closed .admmain { margin-left: 64px; }
	body.sb-closed .sb-brand { justify-content: center; padding: 16px 8px; }
	body.sb-closed .sb-brand div { display: none; }
	body.sb-closed .sb-nav a { justify-content: center; gap: 0; padding: 11px 0; font-size: 0; }
	body.sb-closed .sb-grup-judul { justify-content: center; gap: 0; padding: 11px 0; }
	body.sb-closed .sb-grup-judul span, body.sb-closed .sb-panah { display: none; }
	body.sb-closed .sb-anak { display: none !important; }
	body.sb-closed .sb-out { display: none; }
}
@media (max-width: 900px) {
	.sidebar { transform: translateX(-105%); }
	body.sb-open .sidebar { transform: none; }
	.admmain { margin-left: 0; }
	.sb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
	body:not(.sb-open) .sb-overlay { display: none; }
	body.sb-open .sb-overlay { display: block; }
}
.stat { text-align: center; }
.logo-preview {
	display: flex; align-items: center; justify-content: center;
	background: #f1f5f9; border-radius: 12px; padding: 20px; margin-bottom: 14px;
}
.logo-preview img { width: 96px; height: 96px; object-fit: contain; }
.list-sesi { padding: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.baris-sesi { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 13px; }
.baris-sesi strong { font-size: 13.5px; }
.baris-sesi .muted { display: block; font-size: 12px; margin-top: 2px; }
.tablewrap {
	overflow-x: auto; padding: 6px;
	scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.tablewrap:hover, .tablewrap:focus-within { scrollbar-color: var(--line) transparent; }
.tablewrap::-webkit-scrollbar { height: 8px; }
.tablewrap::-webkit-scrollbar-track { background: transparent; }
.tablewrap::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
.tablewrap:hover::-webkit-scrollbar-thumb, .tablewrap:focus-within::-webkit-scrollbar-thumb { background: var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); white-space: nowrap; }
.statusform { display: flex; gap: 6px; align-items: center; }
.statusform select { width: auto; padding: 5px 8px; margin: 0; font-size: 13px; }
.ubah-upline summary {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; padding: 0; cursor: pointer; list-style: none;
}
.ubah-upline summary::-webkit-details-marker { display: none; }
.ubah-upline summary svg { width: 15px; height: 15px; }
.ubah-upline form { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.ubah-upline input { width: 150px; margin: 0; padding: 6px 8px; font-size: 13px; text-transform: uppercase; }
.ubah-upline input::placeholder { text-transform: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.grid2 button { grid-column: 1 / -1; margin-top: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* Pratinjau potensi cashback */
.cekcard { text-align: center; padding: 22px 16px; }
.cek-label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.cek-rate { font-size: 44px; font-weight: 800; color: var(--ok); line-height: 1.1; margin: 4px 0 2px; }
.cek-rate.small { font-size: 26px; color: var(--ink); }
.cek-shop { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.calc .hasil { margin-top: 10px; font-size: 17px; }
.btn.big { padding: 15px; font-size: 16.5px; margin: 12px 0 6px; }
.center { text-align: center; }
.syncbtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Kartu produk dari katalog feed */
.prodcard { display: flex; gap: 12px; align-items: flex-start; }
.prodimg { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; flex: none; background: #f1f5f9; }
.prodinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prodname { font-size: 14px; line-height: 1.35; }
.prodprice { font-size: 17px; font-weight: 800; color: var(--primary); }
.prodprice s { font-size: 13px; font-weight: 500; margin-left: 6px; }
.bigcb { text-align: center; background: #f0fdf4; border-color: #bbf7d0; }
.cb-amount { font-size: 30px; font-weight: 800; color: var(--ok); line-height: 1.2; margin: 2px 0; }

/* Katalog produk */
.carirow { display: flex; gap: 8px; margin: 10px 0 6px; }
.carirow input { margin-top: 0; }
.carirow button { flex: none; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
.pcard {
	background: var(--card); border: 1px solid var(--line);
	border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.pimg { position: relative; aspect-ratio: 1/1; background: #f1f5f9; }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcb {
	position: absolute; left: 6px; bottom: 6px;
	background: var(--ok); color: #fff; font-size: 11px; font-weight: 800;
	padding: 3px 8px; border-radius: 99px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.pbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pname {
	font-size: 12.5px; line-height: 1.35; height: 34px; overflow: hidden;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pprice { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pprice strong { font-size: 14.5px; color: var(--primary); }
.pprice s { font-size: 11.5px; }
.pshop { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.psrc { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.pbody form { margin-top: auto; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }

/* Kerangka kosong sebelum produk Beranda selesai dimuat (lihat app.html) */
.pskeleton-card { pointer-events: none; }
.pskeleton { background: #e2e8f0; border-radius: 6px; animation: pskeleton-pulsa 1.1s ease-in-out infinite; }
.pskeleton-card .pbody { gap: 8px; }
@keyframes pskeleton-pulsa { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }

/* Grup menu bisa dibuka-tutup di sidebar admin */
.sb-grup { display: flex; flex-direction: column; }
.sb-grup-judul {
	display: flex; align-items: center; gap: 10px;
	width: 100%; background: none; border: none; cursor: pointer;
	color: #c7d0ec; font: inherit; font-weight: 600; font-size: 14px;
	padding: 11px 12px; border-radius: 10px; text-align: left;
}
.sb-grup-judul:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-grup-judul svg { width: 18px; height: 18px; flex: none; }
.sb-grup-judul span { flex: 1; }
.sb-panah { transition: transform .15s ease; }
.sb-grup.buka .sb-panah { transform: rotate(180deg); }
.sb-anak { display: none; flex-direction: column; gap: 2px; padding: 2px 0 6px 0; }
.sb-grup.buka .sb-anak { display: flex; }
.sb-anak a {
	color: #aab6dd; text-decoration: none; font-size: 13.5px; font-weight: 600;
	padding: 9px 12px 9px 40px; border-radius: 10px;
}
.sb-anak a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-anak a.active { background: rgba(255,255,255,.16); color: #fff; }

/* Halaman pengaturan agregator */
.petunjuk {
	background: #eef4ff; border: 1px solid #c9dcff; color: #1e3a68;
	border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin: 10px 0;
}
.petunjuk ol, .petunjuk ul { margin: 6px 0 0 18px; }
.petunjuk li { margin: 3px 0; }
.petunjuk code { background: #dce9ff; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.lencana { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.lencana-on { background: #e8f5e9; color: #196c2e; border: 1px solid #a5d6a7; }
.lencana-off { background: #f1f5f9; color: var(--muted); border: 1px solid var(--line); }
.kolom-rahasia { font-family: ui-monospace, monospace; }
.judul-baris { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.tambah-baru { margin: 10px 0 14px; }
.tambah-baru summary { cursor: pointer; list-style: none; }
.tambah-baru summary::-webkit-details-marker { display: none; }
.tambah-baru[open] summary { margin-bottom: 14px; }
.tambah-baru .card { margin: 0; }
.urlkotak {
	background: #f1f5f9; border: 1px solid var(--line); border-radius: 8px;
	padding: 8px 10px; font-size: 12.5px; word-break: break-all; font-family: ui-monospace, monospace;
}

/* Kartu merchant */
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
@media (min-width: 480px) { .mgrid { grid-template-columns: repeat(4, 1fr); } }
.mcard {
	background: var(--card); border: 1px solid var(--line); border-radius: 14px;
	padding: 12px 6px; display: flex; flex-direction: column; align-items: center;
	gap: 6px; text-decoration: none; color: var(--ink); text-align: center;
}
.mcard:active { transform: scale(.97); }
.mcard strong { font-size: 12px; line-height: 1.25; }
.micon {
	width: 46px; height: 46px; border-radius: 14px; font-size: 22px;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.micon img { width: 100%; height: 100%; object-fit: contain; }
.mrate { font-size: 11px; font-weight: 800; color: var(--primary); }

/* Tempel otomatis */
.tempelbtn {
	flex: none; background: #eef1f7; border: none; border-radius: 50%;
	width: 32px; height: 32px; font-size: 15px; cursor: pointer; line-height: 1;
}
.tempelbtn:active { background: #dfe5f2; }
.tandatempel {
	background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
	color: #fff; border-radius: 10px; padding: 8px 10px;
	font-size: 12.5px; text-align: center; margin-top: 10px;
}

/* Popup "link terdeteksi" */
.modal-latar {
	position: fixed; inset: 0; z-index: 60;
	background: rgba(15, 22, 45, .55);
	display: flex; align-items: center; justify-content: center; padding: 20px;
	animation: munculLatar .15s ease;
}
.modal-latar[hidden] { display: none !important; }
.modal {
	background: var(--card); border-radius: 20px; padding: 22px 18px 18px;
	width: 100%; max-width: 360px; text-align: center;
	box-shadow: 0 16px 48px rgba(0,0,0,.3);
	animation: munculModal .2s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes munculLatar { from { opacity: 0 } to { opacity: 1 } }
@keyframes munculModal { from { opacity: 0; transform: translateY(14px) scale(.96) } to { opacity: 1; transform: none } }
.modal-ikon { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.mi-kiri, .mi-kanan {
	width: 54px; height: 54px; border-radius: 16px; font-size: 26px;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.mi-kiri img, .mi-kanan img { width: 100%; height: 100%; object-fit: cover; }
.mi-panah { color: var(--muted); font-size: 20px; font-weight: 700; }
.modal h3 { font-size: 18px; margin: 0 0 6px; }
.modal h3 span { color: var(--primary); }
.modal-url {
	background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px;
	padding: 8px 10px; margin: 12px 0 4px; font-size: 11.5px;
	color: var(--muted); word-break: break-all; font-family: ui-monospace, monospace;
}
.modal-aksi { display: flex; gap: 8px; margin-top: 14px; }
.modal-aksi .btn { flex: 1; padding: 12px 10px; font-size: 14px; }

/* Overlay "sedang diproses" — tampil sesaat form tempel-link dikirim, supaya
   member tidak mengira web-nya macet lalu refresh berkali-kali. */
.muat-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.muat-box p { color: #fff; font-weight: 600; margin: 0; }
.spinner {
	width: 38px; height: 38px; border-radius: 50%;
	border: 4px solid rgba(255,255,255,.3); border-top-color: #fff;
	animation: putarSpinner .7s linear infinite;
}
@keyframes putarSpinner { to { transform: rotate(360deg); } }

/* Identitas toko di halaman cek cashback */
.tokohead {
	display: flex; align-items: center; gap: 12px;
	background: var(--card); border: 1px solid var(--line);
	border-radius: 14px; padding: 12px 14px; margin: 4px 0 10px;
}
.tokologo {
	width: 44px; height: 44px; border-radius: 13px; font-size: 22px; flex: none;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tokologo img { width: 100%; height: 100%; object-fit: contain; }
.tokoinfo { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tokoinfo strong { font-size: 15.5px; }

/* Tutorial cara dapat cashback (dipakai di halaman cek & lanjutkan belanja) */
.tutorial-card { text-align: center; }
.tutorial-title { font-size: 14.5px; margin: 0 0 14px; }
.tutorial-steps { display: flex; align-items: flex-start; justify-content: center; gap: 2px; }
.tstep { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 88px; }
.tstep span { font-size: 11px; line-height: 1.3; color: var(--muted); font-weight: 600; }
.ticon {
	width: 42px; height: 42px; border-radius: 50%;
	background: #fff3ed; font-size: 19px;
	display: flex; align-items: center; justify-content: center;
}
.tarrow { color: var(--line); font-size: 16px; font-weight: 700; margin-top: 11px; }

/* Halaman publik domain utama (Tentang, Kontak, Syarat, Privasi) */
.halaman-teks { max-width: 720px; margin: 0 auto; padding: 8px 16px 32px; line-height: 1.65; }
.halaman-teks h1 { font-size: 24px; margin: 12px 0 8px; }
.halaman-teks h2 { font-size: 17px; margin: 24px 0 6px; }
.halaman-teks p, .halaman-teks li { font-size: 15px; }
.halaman-teks ul, .halaman-teks ol { padding-left: 22px; }
.halaman-teks li { margin: 4px 0; }
.foot-links { margin-top: 10px; }
.foot-links a { color: inherit; text-decoration: underline; }

/* Admin Riwayat Link: satu baris per link (awalan URL + tombol Detail),
   selengkapnya di popup <dialog> per baris. */
.urlring {
	display: block; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--muted);
}
.dlg-link {
	/* margin:auto WAJIB ditulis ulang — reset global "* { margin:0 }" di atas
	   menghapus bawaan browser yang menengahkan <dialog>, jadinya nempel di kiri. */
	margin: auto; border: none; border-radius: 16px; padding: 18px 18px 14px; width: calc(100% - 32px); max-width: 640px;
	max-height: calc(100vh - 32px); overflow: auto;
	box-shadow: 0 16px 48px rgba(0,0,0,.3); color: var(--ink); background: var(--card);
}
.dlg-link::backdrop { background: rgba(15, 22, 45, .55); }
.dlg-link h3 { margin: 0 0 4px; font-size: 16px; }
.dlg-link .urlkotak { margin: 4px 0 6px; max-height: 26vh; overflow: auto; }
.dlg-label { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.dlg-aksi { display: flex; justify-content: flex-end; margin-top: 14px; }

/* Admin API → Client: kotak API key yang hanya tampil sekali. */
.key-sekali { border-color: #ffcc9c; background: #fff8f1; }
.key-sekali .urlkotak { margin: 8px 0; font-size: 14px; background: #fff; }
