:root {
  --primary: #2563eb; --accent: #0ea5e9;
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f4f7; --text: #101828; --muted: #667085; --border: #e4e7ec; --border-strong: #d0d5dd;
  --ok: #067647; --warn: #b54708; --bad: #b42318; --info: #175cd3;
  --radius: 10px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04);
  --grad: var(--primary);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0f14; --surface: #141920; --surface-2: #1b212b; --text: #e7eaf0; --muted: #8b95a5; --border: #252c38; --border-strong: #323b4a;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #60a5fa;
  --shadow: none; color-scheme: dark;
}
:root[data-corner="sharp"] { --radius: 3px; --radius-sm: 2px; }
:root[data-corner="pill"] { --radius: 18px; --radius-sm: 12px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.02rem; } h3 { font-size: .98rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.right { text-align: right; } .center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }

/* kartu */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card > h2:first-child { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.card.flat { box-shadow: none; }
.stat .label { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.card.stat > .label { padding: 0; border: 0; }

/* tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .12s, border-color .12s; text-decoration: none !important; white-space: nowrap; line-height: 1.4; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { filter: brightness(.93); background: var(--primary); }
.btn.danger { color: var(--bad); } .btn.ok { color: var(--ok); }
.btn.sm { padding: 5px 10px; font-size: .82rem; } .btn.block { width: 100%; } .btn.lg { padding: 11px 20px; font-size: .98rem; }
.btn.ghost { border-color: transparent; background: transparent; }

/* form */
label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; }
.field + .field { margin-top: 14px; }
.hint { color: var(--muted); font-size: .78rem; margin-top: 5px; font-weight: 400; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
input[type=color] { padding: 3px; height: 40px; }
input[type=range] { padding: 0; accent-color: var(--primary); }
textarea { resize: vertical; min-height: 84px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; margin: 0; }
.input-group { display: flex; } .input-group > span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .88rem; }
.input-group > input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group.suffix > input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group.suffix > span { border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.copy-box { display: flex; gap: 8px; } .copy-box input { font-family: ui-monospace, monospace; font-size: .8rem; }

/* badge */
.badge { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.badge.warn { background: color-mix(in srgb, var(--warn) 11%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.badge.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.badge.info { background: color-mix(in srgb, var(--info) 10%, transparent); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); display: inline-block; } .dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }

/* tabel */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; font-weight: 600; background: var(--surface-2); }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* progress */
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* nav */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .container { display: flex; align-items: center; gap: 14px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; color: var(--text) !important; text-decoration: none !important; letter-spacing: -.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: .9rem; font-weight: 700; overflow: hidden; }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; color: var(--text); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }

/* layout dashboard */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 58px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; cursor: pointer; border: 0; background: none; width: 100%; font-size: .9rem; text-align: left; text-decoration: none !important; margin-bottom: 2px; font-family: inherit; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.nav-item.active svg { color: var(--primary); }
.nav-item .ic { display: grid; place-items: center; }
.nav-item .badge { margin-left: auto; }
.nav-group { font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; padding: 16px 12px 6px; font-weight: 700; }
.main { padding: 26px 28px 48px; min-width: 0; max-width: 1100px; width: 100%; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title h1 { font-size: 1.35rem; margin: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; gap: 4px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .nav-item { width: auto; white-space: nowrap; margin: 0; } .nav-item.active { box-shadow: inset 0 -2px 0 var(--primary); border-radius: var(--radius-sm); } .nav-group { display: none; }
  .main { padding: 18px 14px 40px; }
}

/* toast */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #101828; color: #fff; padding: 11px 15px; border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 500; max-width: 340px; animation: tin .2s ease; font-size: .9rem; }
.toast.err { background: var(--bad); color: #fff; } .toast.ok { background: #067647; color: #fff; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(16,24,40,.55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); border: 1px solid var(--border); }

/* tabs & pills */
.pills { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.pills button { flex: 1; border: 0; background: none; padding: 7px 12px; border-radius: 6px; font: inherit; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; }
.pills button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.1); }

/* leaderboard */
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.lb li:last-child { border: 0; }
.lb .rank { width: 24px; text-align: center; font-weight: 700; font-size: .85rem; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.lb li:nth-child(1) .rank { color: #b7791f; } .lb li:nth-child(2) .rank { color: #667085; } .lb li:nth-child(3) .rank { color: #a8602b; }
.lb .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .amt { font-weight: 650; font-variant-numeric: tabular-nums; }

/* landing */
.announce { background: #101828; color: #fff; text-align: center; padding: 8px 16px; font-weight: 500; font-size: .86rem; }
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--border); background: var(--surface); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 44px 0; } }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 700; }
.hero p.lead { color: var(--muted); font-size: 1.06rem; max-width: 520px; margin: 0 0 26px; line-height: 1.6; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.gradient-text { color: var(--text); }
.facts { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); }
.facts b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; } .facts span { color: var(--muted); font-size: .82rem; }
.mock { background: #0b0f17; border-radius: 14px; padding: 18px; border: 1px solid var(--border-strong); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; } .mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3342; }
.mock-alert { background: #111827; border: 1px solid rgba(255,255,255,.12); border-left: 5px solid var(--primary); border-radius: 10px; padding: 14px 16px; color: #fff; }
.mock-alert small { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 700; }
.mock-alert .t { font-weight: 700; font-size: 1.08rem; margin: 4px 0; } .mock-alert .t b { color: #7aa7ff; }
.mock-alert .m { color: rgba(255,255,255,.8); font-size: .9rem; }
.mock-goal { margin-top: 12px; background: #111827; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 12px 14px; color: #fff; }
.mock-goal .h { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.mock-goal .b { height: 8px; border-radius: 9px; background: rgba(255,255,255,.14); overflow: hidden; } .mock-goal .b i { display: block; width: 68%; height: 100%; background: var(--primary); }
.mock-goal .f { display: flex; justify-content: space-between; font-size: .75rem; color: rgba(255,255,255,.65); margin-top: 6px; }
.section { padding: 64px 0; } .section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2.sec { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 8px; } .section p.sec-sub { color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feat > div { padding: 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feat > div:nth-child(3n) { border-right: 0; } .feat > div:nth-last-child(-n+3) { border-bottom: 0; }
.feat svg.i { width: 22px; height: 22px; color: var(--primary); margin-bottom: 12px; display: block; }
.feat h3 { margin-bottom: 6px; } .feat p { color: var(--muted); margin: 0; font-size: .9rem; }
@media (max-width: 860px) { .feat { grid-template-columns: 1fr 1fr; } .feat > div { border-right: 1px solid var(--border) !important; border-bottom: 1px solid var(--border) !important; } .feat > div:nth-child(2n) { border-right: 0 !important; } }
@media (max-width: 560px) { .feat { grid-template-columns: 1fr; } .feat > div { border-right: 0 !important; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps > div { counter-increment: s; } .steps > div::before { content: counter(s, decimal-leading-zero); font-weight: 700; color: var(--primary); font-size: .85rem; letter-spacing: .06em; display: block; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); margin: 0; font-size: .92rem; }
.cta { background: #101828; color: #fff; border-radius: 14px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta h2 { font-size: 1.4rem; margin: 0 0 4px; } .cta p { margin: 0; color: rgba(255,255,255,.7); }

/* halaman donasi */
.donate-wrap { display: grid; grid-template-columns: 1fr 390px; gap: 20px; align-items: start; padding: 28px 0 60px; }
@media (max-width: 900px) { .donate-wrap { grid-template-columns: 1fr; } .donate-wrap #side { position: static !important; order: -1; } }
.profile { text-align: center; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: 2rem; font-weight: 700; margin: 0 auto 12px; overflow: hidden; border: 1px solid var(--border); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.amount-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 4px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; font-size: .84rem; color: var(--text); font-family: inherit; }
.chip:hover { background: var(--surface-2); } .chip.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.qr-box { background: #fff; padding: 12px; border-radius: var(--radius); display: inline-block; border: 1px solid var(--border-strong); }
.qr-box img { width: 232px; height: 232px; display: block; }
.yt-preview { aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: #000; position: relative; border: 1px solid var(--border); }
.yt-preview img { width: 100%; height: 100%; object-fit: cover; } .yt-preview::after { content: ''; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: rgba(0,0,0,.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7l9 5-9 5z'/%3E%3C/svg%3E") center/60% no-repeat; }
.platform-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 6px; font-size: .78rem; font-weight: 700; color: #fff; text-decoration: none !important; }
.platform-tag.youtube { background: #cc0000; } .platform-tag.tiktok { background: #101010; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.btn.primary .spinner { border-color: rgba(255,255,255,.4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); display: grid; place-items: center; margin: 0 auto; } .success-mark svg { width: 28px; height: 28px; stroke-width: 2.4; }
.footer { padding: 28px 0; color: var(--muted); font-size: .84rem; text-align: center; border-top: 1px solid var(--border); }
