:root {
    --red: #e11d2e;
    --red-dark: #b91322;
    --red-soft: #fdecee;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --page: #f5f6f8;
    --card: #ffffff;
    --ok: #15803d;
    --ok-soft: #dcfce7;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --err: #b91c1c;
    --err-soft: #fee2e2;
    --navy: #0b1220;
    --radius: 12px;
    --bs-primary-rgb: 225, 29, 46;
    --bs-link-color-rgb: 185, 19, 34;
}

body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: #fff; font-size: .9rem; }
.mono, code, pre { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
a { color: var(--red-dark); }
.btn-primary { --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red); --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark); --bs-btn-active-bg: var(--red-dark); --bs-btn-active-border-color: var(--red-dark); --bs-btn-disabled-bg: var(--red); --bs-btn-disabled-border-color: var(--red); font-weight: 600; }
.btn-outline-primary { --bs-btn-color: var(--red); --bs-btn-border-color: var(--red); --bs-btn-hover-bg: var(--red); --bs-btn-hover-border-color: var(--red); --bs-btn-active-bg: var(--red-dark); font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: #f19aa3; box-shadow: 0 0 0 .2rem rgba(225, 29, 46, .15); }
.form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.form-label { font-weight: 600; font-size: .82rem; margin-bottom: .3rem; }
.text-muted-2 { color: var(--muted) !important; }

/* ===================== Publik ===================== */
.nav-pub { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-pub .navbar-brand img { height: 30px; }
.nav-pub .nav-link { font-weight: 500; color: var(--ink-2); }
.nav-pub .nav-link:hover { color: var(--red); }
.brand-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; background: var(--red); color: #fff; padding: 2px 7px; border-radius: 5px; margin-left: 6px; vertical-align: middle; }

.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, rgba(225, 29, 46, .16), transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(225, 29, 46, .08), transparent 60%), #fff; padding: 88px 0 72px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
.hero h1 .hl { color: var(--red); }
.hero .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 560px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--red-soft); color: var(--red-dark); font-weight: 600; font-size: .8rem; padding: 6px 12px; border-radius: 999px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats b { display: block; font-size: 1.4rem; font-weight: 800; }
.hero-stats span { color: var(--muted); font-size: .8rem; }

.code-card { background: var(--navy); color: #e2e8f0; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); overflow: hidden; }
.code-card .bar { display: flex; gap: 6px; padding: 12px 14px; background: #111a2e; }
.code-card .bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; display: inline-block; }
.code-card .bar i:nth-child(1) { background: #f87171; } .code-card .bar i:nth-child(2) { background: #fbbf24; } .code-card .bar i:nth-child(3) { background: #34d399; }
.code-card pre { margin: 0; padding: 18px 20px; font-size: .78rem; line-height: 1.6; white-space: pre; overflow-x: auto; color: #e2e8f0; }
.c-key { color: #93c5fd; } .c-str { color: #86efac; } .c-num { color: #fca5a5; } .c-cmt { color: #64748b; } .c-kw { color: #f0abfc; }

.section { padding: 80px 0; }
.section-alt { background: var(--page); }
.section h2 { font-weight: 800; letter-spacing: -.015em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.eyebrow { color: var(--red); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.feat:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -18px rgba(15, 23, 42, .25); }
.feat .ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 1.15rem; margin-bottom: 14px; }
.feat h5 { font-weight: 700; font-size: 1rem; }
.feat p { color: var(--muted); margin: 0; font-size: .86rem; }
.step { position: relative; padding-left: 58px; margin-bottom: 26px; }
.step .no { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; }
.step h6 { font-weight: 700; margin-bottom: 4px; }
.step p { color: var(--muted); margin: 0; }
.prod { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; height: 100%; }
.prod h5 { font-weight: 700; }
.prod ul { padding-left: 18px; color: var(--ink-2); margin: 0; }
.cta { background: linear-gradient(120deg, var(--red-dark), var(--red)); color: #fff; border-radius: 20px; padding: 48px; }
.cta p { color: rgba(255, 255, 255, .85); }
.footer { background: var(--navy); color: #94a3b8; padding: 40px 0 28px; font-size: .84rem; }
.footer a { color: #cbd5e1; text-decoration: none; }
.footer img { height: 28px; }

.auth-wrap { min-height: calc(100vh - 64px); background: var(--page); padding: 48px 0; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: 0 20px 40px -28px rgba(15, 23, 42, .3); }
.auth-card h3 { font-weight: 800; }
.form-sec { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red-dark); margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* ===================== Portal ===================== */
.portal { display: flex; min-height: 100vh; background: var(--page); }
.side { width: 248px; flex-shrink: 0; background: var(--navy); color: #cbd5e1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 40; }
.side .brand { padding: 20px 20px 16px; display: flex; align-items: center; }
.side .brand img { height: 28px; }
.side .comp { margin: 0 14px 12px; padding: 12px; background: rgba(255, 255, 255, .05); border-radius: 10px; }
.side .comp b { color: #fff; display: block; font-size: .86rem; line-height: 1.3; }
.side .comp span { font-size: .72rem; color: #94a3b8; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.side .lbl { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #64748b; padding: 14px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: .86rem; margin-bottom: 2px; }
.side nav a i { width: 18px; text-align: center; color: #94a3b8; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.on { background: var(--red); color: #fff; }
.side nav a.on i { color: #fff; }
.side .out { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side .out a { color: #94a3b8; text-decoration: none; font-size: .84rem; }
.main { flex: 1; min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 24px; gap: 14px; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.saldo-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; background: var(--red-soft); border-radius: 999px; padding: 6px 8px 6px 14px; }
.saldo-chip span { font-size: .72rem; color: var(--red-dark); font-weight: 600; }
.saldo-chip b { font-size: .95rem; }
.saldo-chip a { background: var(--red); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .76rem; font-weight: 600; text-decoration: none; }
.burger { display: none; border: 0; background: none; font-size: 1.2rem; }
.content { padding: 24px; max-width: 1400px; }
.card-x { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-x > .hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-weight: 700; }
.card-x > .hd .act { margin-left: auto; font-weight: 500; }
.card-x > .bd { padding: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; height: 100%; }
.stat .k { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 1.55rem; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }
.stat .s { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.stat.red { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; border: 0; }
.stat.red .k, .stat.red .s { color: rgba(255, 255, 255, .85); }
.tbl { font-size: .82rem; margin: 0; }
.tbl th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: #f8fafc; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { vertical-align: middle; border-color: #f1f5f9; }
.badge-st { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-err { background: var(--err-soft); color: var(--err); }
.st-wait { background: var(--warn-soft); color: var(--warn); }
.st-mute { background: #f1f5f9; color: var(--muted); }
.alert-x { border-radius: 10px; padding: 12px 14px; font-size: .85rem; display: flex; gap: 10px; align-items: flex-start; }
.alert-x.warn { background: var(--warn-soft); color: #7c2d12; }
.alert-x.info { background: #e0f2fe; color: #075985; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b .batang { width: 100%; max-width: 34px; background: var(--red); border-radius: 6px 6px 0 0; min-height: 2px; position: relative; }
.bars .b .batang:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: .7rem; padding: 3px 7px; border-radius: 5px; white-space: nowrap; margin-bottom: 4px; }
.bars .b small { font-size: .64rem; color: var(--muted); white-space: nowrap; }
.secret { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px 14px; font-size: .82rem; word-break: break-all; display: flex; gap: 10px; align-items: center; }
.secret code { color: #86efac; flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.pager .page-link { color: var(--red-dark); }
.pager .active .page-link { background: var(--red); border-color: var(--red); color: #fff; }

/* Dokumentasi */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
.docs-nav { position: sticky; top: 84px; align-self: start; font-size: .84rem; }
.docs-nav a { display: block; padding: 5px 10px; color: var(--ink-2); text-decoration: none; border-left: 2px solid var(--line); }
.docs-nav a:hover { color: var(--red); border-left-color: var(--red); }
.docs-nav .g { font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.docs h2 { font-size: 1.35rem; font-weight: 800; margin-top: 38px; padding-top: 10px; scroll-margin-top: 80px; }
.docs h3 { font-size: 1.02rem; font-weight: 700; margin-top: 24px; scroll-margin-top: 80px; }
.docs pre { background: var(--navy); color: #e2e8f0; padding: 14px 16px; border-radius: 10px; font-size: .78rem; overflow-x: auto; }
.docs code:not(pre code) { background: #f1f5f9; color: var(--red-dark); padding: 1px 5px; border-radius: 4px; font-size: .8rem; }
.ep { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .86rem; }
.ep .m { font-weight: 800; font-size: .72rem; padding: 3px 8px; border-radius: 5px; color: #fff; }
.ep .m.get { background: #0e7490; } .ep .m.post { background: var(--ok); }
.docs table { font-size: .82rem; }

@media (max-width: 991px) {
    .side { position: fixed; left: -260px; transition: left .2s ease; }
    .side.open { left: 0; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .4); }
    .burger { display: inline-block; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .saldo-chip span { display: none; }
    .docs { grid-template-columns: 1fr; }
    .docs-nav { display: none; }
    .cta { padding: 28px; }
}

.prod-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 1.15rem; margin-bottom: 14px; }
.hero-stats { gap: 22px; }
.hero-stats > div { flex: 1 1 0; min-width: 140px; }
.hero-stats b { font-size: 1.15rem; }
