:root {
    --ground: 247 248 250;
    --surface: 255 255 255;
    --raised: 241 243 245;
    --line: 228 230 234;
    --line-strong: 206 210 216;
    --ink: 16 18 23;
    --ink-muted: 72 79 90;
    --ink-subtle: 108 115 126;
    --on-brand: 255 255 255;
    --scrim: 10 11 14;
    --brand-500: 14 146 99;
    --brand-600: 4 122 84;
    --brand-700: 5 101 71;
    --brand-wash: 235 250 243;
    --settled-fg: 4 110 76;
    --settled-bg: 232 248 240;
    --settled-line: 184 230 207;
    --pending-fg: 146 84 6;
    --pending-bg: 255 246 228;
    --pending-line: 245 218 160;
    --failed-fg: 180 35 42;
    --failed-bg: 254 238 238;
    --failed-line: 246 200 200;
    --info-fg: 30 78 170;
    --info-bg: 236 243 255;
    --info-line: 196 214 245;
    --shadow-color: 15 23 42;
    --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --sidebar-width: 256px;
    color-scheme: light;
}

.dark {
    --ground: 10 11 14;
    --surface: 17 19 23;
    --raised: 26 29 34;
    --line: 36 39 46;
    --line-strong: 52 56 65;
    --ink: 236 238 242;
    --ink-muted: 170 176 186;
    --ink-subtle: 132 139 150;
    --brand-500: 34 170 118;
    --brand-600: 14 146 99;
    --brand-700: 4 122 84;
    --brand-wash: 12 34 26;
    --settled-fg: 94 212 158;
    --settled-bg: 12 40 29;
    --settled-line: 22 74 53;
    --pending-fg: 240 184 92;
    --pending-bg: 44 31 10;
    --pending-line: 84 60 18;
    --failed-fg: 248 128 128;
    --failed-bg: 48 16 18;
    --failed-line: 92 32 36;
    --info-fg: 138 176 250;
    --info-bg: 16 28 52;
    --info-line: 34 56 102;
    --shadow-color: 0 0 0;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: rgb(var(--ground));
    color: rgb(var(--ink));
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 15px;
    font-weight: 600;
}

code {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

:not(pre) > code {
    padding: 2px 6px;
    border: 1px solid rgb(var(--line));
    border-radius: 6px;
    background: rgb(var(--raised));
    overflow-wrap: anywhere;
}

.lead {
    margin-top: 8px;
    max-width: 52ch;
    color: rgb(var(--ink-muted));
}

.muted {
    color: rgb(var(--ink-muted));
}

.subtle {
    color: rgb(var(--ink-subtle));
    font-size: 12px;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.stack {
    display: grid;
    gap: 16px;
}

/* ---------- Topbar (halaman publik) ---------- */

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: 56px;
    border-bottom: 1px solid rgb(var(--line));
    background: rgb(var(--ground) / 0.9);
    backdrop-filter: blur(4px);
}

.shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.topbar .shell {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: rgb(var(--ink));
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgb(var(--brand-600));
    color: rgb(var(--on-brand));
}

.brand-logo {
    gap: 5px;
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 19px;
    line-height: 1;
}

.brand-logo .brand-auto {
    color: #2f9ee0;
}

.brand-logo .brand-div {
    width: 2px;
    height: 17px;
    background: #94a3b8;
    transform: skewX(-12deg);
    border-radius: 1px;
}

.brand-logo .brand-pay {
    background: #f4d11e;
    color: #0f2740;
    padding: 2px 7px;
    border-radius: 4px;
    transform: skewX(-7deg);
}
.pay-card-brand {
    margin-bottom: 14px;
    font-size: 22px;
}

.topbar-nav {
    display: none;
    align-items: center;
    gap: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.link-btn {
    padding: 6px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgb(var(--ink-muted));
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover,
.link-btn:hover {
    background: rgb(var(--raised));
    color: rgb(var(--ink));
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgb(var(--ink-muted));
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.icon-btn:hover {
    background: rgb(var(--raised));
    color: rgb(var(--ink));
}

.icon-btn .icon-sun,
.dark .icon-btn .icon-moon {
    display: none;
}

.dark .icon-btn .icon-sun {
    display: block;
}

.avatar-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgb(var(--line));
    border-radius: 50%;
    background: rgb(var(--raised));
}

@media (min-width: 768px) {
    .topbar-nav {
        display: flex;
    }
}

/* ---------- Form & tombol ---------- */

.field {
    display: grid;
    gap: 6px;
}

.label {
    font-size: 13px;
    font-weight: 500;
}

.input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgb(var(--line));
    border-radius: 8px;
    background: rgb(var(--surface));
    color: rgb(var(--ink));
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder {
    color: rgb(var(--ink-subtle));
}

.input:hover {
    border-color: rgb(var(--line-strong));
}

.input:focus {
    outline: 0;
    border-color: rgb(var(--brand-500));
    box-shadow: 0 0 0 3px rgb(var(--brand-500) / 0.18);
}

.input-code {
    font-family: var(--font-mono);
    font-size: 18px;
    letter-spacing: 0.3em;
}

.input-mono {
    font-family: var(--font-mono);
    font-size: 13px;
}

.textarea {
    height: auto;
    min-height: 104px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
    word-break: break-all;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .input {
    flex: 1;
    min-width: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.link-btn:focus-visible,
.nav-link:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible {
    outline: 2px solid rgb(var(--brand-500));
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: rgb(var(--brand-600));
    color: rgb(var(--on-brand));
}

.btn-primary:hover:not(:disabled) {
    background: rgb(var(--brand-700));
}

.btn-secondary {
    border-color: rgb(var(--line));
    background: rgb(var(--surface));
    color: rgb(var(--ink));
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgb(var(--line-strong));
    background: rgb(var(--raised));
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    flex-shrink: 0;
    width: 44px;
    padding: 0;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgb(var(--on-brand) / 0.35);
    border-top-color: rgb(var(--on-brand));
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Komponen umum ---------- */

.card {
    padding: 24px;
    border: 1px solid rgb(var(--line));
    border-radius: 12px;
    background: rgb(var(--surface));
    box-shadow: 0 1px 2px rgb(var(--shadow-color) / 0.04);
}

.alert {
    padding: 10px 12px;
    border: 1px solid rgb(var(--failed-line));
    border-radius: 8px;
    background: rgb(var(--failed-bg));
    color: rgb(var(--failed-fg));
    font-size: 13px;
    overflow-wrap: anywhere;
}

.alert-success {
    border-color: rgb(var(--settled-line));
    background: rgb(var(--settled-bg));
    color: rgb(var(--settled-fg));
}

.note {
    padding: 10px 12px;
    border: 1px solid rgb(var(--line));
    border-radius: 8px;
    background: rgb(var(--raised));
    color: rgb(var(--ink-muted));
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 4px 10px;
    border: 1px solid rgb(var(--line));
    border-radius: 999px;
    background: rgb(var(--raised));
    color: rgb(var(--ink-muted));
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-settled {
    border-color: rgb(var(--settled-line));
    background: rgb(var(--settled-bg));
    color: rgb(var(--settled-fg));
}

.badge-pending {
    border-color: rgb(var(--pending-line));
    background: rgb(var(--pending-bg));
    color: rgb(var(--pending-fg));
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    border: 1px solid rgb(var(--line));
    border-radius: 10px;
    list-style: none;
    overflow: hidden;
}

.step {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-left: 1px solid rgb(var(--line));
    color: rgb(var(--ink-subtle));
}

.step:first-child {
    border-left: 0;
}

.step-no {
    font-family: var(--font-mono);
    font-size: 12px;
}

.step-title {
    font-size: 13px;
    font-weight: 500;
}

.step.is-active {
    background: rgb(var(--brand-wash));
    color: rgb(var(--ink));
}

.step.is-active .step-no,
.step.is-done .step-no {
    color: rgb(var(--brand-600));
}

.step.is-done {
    color: rgb(var(--ink-muted));
}

/* ---------- Login ---------- */

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 88px 20px 40px;
}

.auth {
    width: 100%;
    max-width: 400px;
}

.auth .card {
    margin-top: 24px;
}

/* ---------- Halaman depan ---------- */

.hero {
    padding: 128px 0 80px;
    border-bottom: 1px solid rgb(var(--line));
}

.hero-grid {
    display: grid;
    align-items: center;
    gap: 48px;
}

.display {
    font-size: clamp(38px, 6.2vw, 72px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.accent {
    color: rgb(var(--brand-600));
}

.hero-sub {
    margin-top: 24px;
    max-width: 46ch;
    color: rgb(var(--ink-muted));
    font-size: 18px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-note {
    margin-top: 20px;
    color: rgb(var(--ink-subtle));
    font-size: 12px;
}

.hero-art {
    display: none;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 440px;
    height: auto;
}

.pay-card {
    display: grid;
    gap: 16px;
    width: 300px;
    padding: 20px;
    border: 1px solid rgb(var(--line));
    border-radius: 20px;
    background: rgb(var(--surface));
    box-shadow: 0 32px 56px -28px rgb(var(--shadow-color) / 0.35);
}

.pay-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgb(var(--ink-subtle));
    font-size: 12px;
}

.pay-qr {
    padding: 14px;
    border: 1px solid rgb(var(--line));
    border-radius: 12px;
    background: #fff;
    color: #101217;
}

.pay-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.pay-amount {
    color: rgb(var(--ink));
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.stats {
    display: grid;
    border-bottom: 1px solid rgb(var(--line));
    background: rgb(var(--surface));
}

.stats .shell {
    display: grid;
}

.stat {
    padding: 28px 0;
    border-top: 1px solid rgb(var(--line));
}

.stat:first-child {
    border-top: 0;
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 28px;
    letter-spacing: -0.02em;
}

.stat-label {
    margin-top: 2px;
    color: rgb(var(--ink-muted));
}

.section {
    padding: 72px 0;
    border-bottom: 1px solid rgb(var(--line));
    scroll-margin-top: 56px;
}

.section-alt {
    background: rgb(var(--surface));
}

.section-head {
    max-width: 60ch;
    margin-bottom: 32px;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-head p {
    margin-top: 10px;
    color: rgb(var(--ink-muted));
    font-size: 16px;
}

.grid-2,
.grid-3 {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ep-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.ep-card p,
.feature p {
    color: rgb(var(--ink-muted));
}

.feature {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid rgb(var(--line-strong));
}

.feature .step-no {
    color: rgb(var(--brand-600));
}

.split {
    display: grid;
    align-items: start;
    gap: 32px;
}

.faq {
    border-top: 1px solid rgb(var(--line));
}

.faq details {
    border-bottom: 1px solid rgb(var(--line));
}

.faq summary {
    padding: 18px 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.faq details p {
    max-width: 70ch;
    padding-bottom: 18px;
    color: rgb(var(--ink-muted));
}

.cta {
    text-align: center;
}

.cta .section-head {
    margin-inline: auto;
}

.cta .hero-cta {
    justify-content: center;
    margin-top: 0;
}

.footer {
    padding: 32px 0 40px;
    color: rgb(var(--ink-subtle));
    font-size: 13px;
}

.footer .shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer p {
    max-width: 62ch;
}

@media (min-width: 640px) {
    .grid-even {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats .shell {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat {
        padding: 32px 24px;
        border-top: 0;
        border-left: 1px solid rgb(var(--line));
    }

    .stat:first-child {
        padding-left: 0;
        border-left: 0;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .hero-art {
        display: flex;
    }

    .split {
        grid-template-columns: 0.8fr 1.2fr;
        gap: 56px;
    }
}

/* ---------- App shell (setelah login) ---------- */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    border-right: 1px solid rgb(var(--line));
    background: rgb(var(--surface));
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.sidebar-open .sidebar {
    transform: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgb(var(--scrim) / 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 56px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid rgb(var(--line));
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-foot {
    padding: 12px;
    border-top: 1px solid rgb(var(--line));
}

.nav-label {
    margin: 18px 12px 6px;
    color: rgb(var(--ink-subtle));
    font-size: 12px;
}

.nav-label:first-child {
    margin-top: 4px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgb(var(--ink-muted));
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nav-item:hover,
.nav-item.is-active {
    background: rgb(var(--raised));
    color: rgb(var(--ink));
}

.nav-item.is-active::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: rgb(var(--brand-600));
}

.nav-item.is-active svg {
    color: rgb(var(--brand-600));
}

.nav-sub {
    margin: 2px 0 2px 20px;
    padding-left: 10px;
    border-left: 1px solid rgb(var(--line));
}

.app-main {
    min-height: 100dvh;
}

.app-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid rgb(var(--line));
    background: rgb(var(--ground) / 0.9);
    backdrop-filter: blur(4px);
}

.app-bar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 500;
}

.app-content {
    display: grid;
    align-content: start;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}

.page-title {
    margin-bottom: 8px;
}

.page-title p {
    margin-top: 4px;
}

@media (min-width: 1024px) {
    .sidebar {
        transform: none;
    }

    .sidebar-overlay,
    .sidebar-close,
    .menu-btn {
        display: none;
    }

    .app-main {
        margin-left: var(--sidebar-width);
    }

    .app-bar {
        padding: 0 32px;
    }

    .app-content {
        padding: 32px 32px 72px;
    }
}

/* ---------- Dashboard ---------- */

.empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 56px 24px;
    text-align: center;
}

.empty p {
    max-width: 40ch;
}

.empty .btn {
    margin-top: 14px;
}

.icon-box {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid rgb(var(--line));
    border-radius: 10px;
    background: rgb(var(--raised));
    color: rgb(var(--ink-muted));
}

.empty .icon-box {
    margin-bottom: 10px;
}

.icon-box-brand {
    border-color: rgb(var(--settled-line));
    background: rgb(var(--brand-wash));
    color: rgb(var(--brand-600));
}

.tile {
    display: grid;
    align-content: start;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s;
}

a.tile:hover {
    border-color: rgb(var(--line-strong));
}

.tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.provider-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.provider-info {
    flex: 1;
    min-width: 0;
}

.provider-info p {
    margin-top: 2px;
}

.provider-body {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgb(var(--line));
}

.file-btn {
    position: relative;
    overflow: hidden;
}

.file-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.table-wrap {
    border: 1px solid rgb(var(--line));
    border-radius: 12px;
    background: rgb(var(--surface));
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    padding: 10px 14px;
    border-bottom: 1px solid rgb(var(--line));
    background: rgb(var(--raised) / 0.6);
    color: rgb(var(--ink-subtle));
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgb(var(--line));
    vertical-align: top;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.kv {
    display: grid;
    gap: 16px;
    margin: 0;
}

.kv dt {
    margin-bottom: 6px;
    color: rgb(var(--ink-subtle));
    font-size: 12px;
}

.kv dd {
    margin: 0;
}

/* ---------- Ringkasan dashboard ---------- */

.sum-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sum-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sum-hero-label {
    font-size: 15px;
    font-weight: 600;
}

.sum-hero-sub {
    margin-top: 2px;
    color: rgb(var(--ink-muted));
    font-size: 13px;
}

.sum-hero-right {
    text-align: right;
    flex-shrink: 0;
}

.sum-hero-num {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
}

.sum-hero-unit {
    margin-top: 4px;
    color: rgb(var(--ink-muted));
    font-size: 12px;
}

.sum-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.sum-tile {
    padding: 18px 20px;
}

.sum-tile-label {
    color: rgb(var(--ink-muted));
    font-size: 13px;
}

.sum-tile-value {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.prov-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.prov-card {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 150px;
}

.prov-card.is-soon {
    background: rgb(var(--raised) / 0.5);
}

.prov-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.prov-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgb(var(--ink-subtle));
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prov-amount {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.prov-caption {
    color: rgb(var(--ink-muted));
    font-size: 13px;
}

.prov-link {
    margin-top: auto;
    padding-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgb(var(--brand-600));
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.prov-link:hover {
    text-decoration: underline;
}

.prov-soon {
    margin-top: auto;
    padding-top: 10px;
    color: rgb(var(--ink-subtle));
    font-size: 13px;
}

/* ---------- Dokumentasi ---------- */

.doc {
    display: grid;
    gap: 32px;
}

.doc section {
    display: grid;
    gap: 12px;
    min-width: 0;
    scroll-margin-top: 72px;
}

.doc h2 {
    font-size: 18px;
}

.doc h3 {
    margin-top: 6px;
    color: rgb(var(--ink-muted));
    font-size: 13px;
}

.doc p,
.doc li {
    max-width: 72ch;
    color: rgb(var(--ink-muted));
}

.doc ol {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
}

.doc a,
.auth a {
    color: rgb(var(--brand-600));
}

.endpoint {
    padding-top: 32px;
    border-top: 1px solid rgb(var(--line));
}

.endpoint-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.endpoint-head code {
    padding: 0;
    border: 0;
    background: none;
    font-size: 16px;
    font-weight: 500;
}

.method {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgb(var(--info-line));
    border-radius: 6px;
    background: rgb(var(--info-bg));
    color: rgb(var(--info-fg));
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
}

.method-post {
    border-color: rgb(var(--settled-line));
    background: rgb(var(--settled-bg));
    color: rgb(var(--settled-fg));
}

.code-wrap {
    position: relative;
    min-width: 0;
}

.code {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgb(var(--line));
    border-radius: 10px;
    background: rgb(var(--raised));
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
    overflow-x: auto;
}

.code code {
    font-size: inherit;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border: 1px solid rgb(var(--line));
    border-radius: 6px;
    background: rgb(var(--surface));
    color: rgb(var(--ink-muted));
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.copy-btn:hover {
    color: rgb(var(--ink));
}

.tab-list {
    display: flex;
    gap: 2px;
    width: fit-content;
    margin-bottom: 8px;
    padding: 2px;
    border: 1px solid rgb(var(--line));
    border-radius: 8px;
    background: rgb(var(--raised));
}

.tab {
    padding: 4px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgb(var(--ink-muted));
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.tab.is-active {
    background: rgb(var(--surface));
    color: rgb(var(--ink));
    box-shadow: 0 1px 2px rgb(var(--shadow-color) / 0.1);
}

.doc-public {
    max-width: 920px;
    margin: 0 auto;
    padding: 96px 20px 72px;
}

/* ---------- Docs layout (TOC + konten) ---------- */

.docs-page {
    display: grid;
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 88px 20px 72px;
}

.docs-toc {
    align-self: start;
}

.docs-toc nav {
    display: grid;
    gap: 1px;
}

.docs-toc .nav-label {
    margin: 16px 10px 6px;
}

.docs-toc .nav-label:first-child {
    margin-top: 0;
}

.docs-toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    color: rgb(var(--ink-muted));
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.docs-toc a:hover {
    background: rgb(var(--raised));
    color: rgb(var(--ink));
}

.docs-toc a.is-active {
    background: rgb(var(--brand-wash));
    color: rgb(var(--brand-600));
    font-weight: 500;
}

.docs-body {
    min-width: 0;
}

@media (min-width: 1024px) {
    .docs-page {
        grid-template-columns: 236px minmax(0, 1fr);
        gap: 48px;
    }

    .docs-toc {
        position: sticky;
        top: 76px;
        max-height: calc(100dvh - 92px);
        overflow-y: auto;
    }
}

@media (max-width: 520px) {
    .provider-head {
        flex-wrap: wrap;
    }

    .step {
        padding: 10px;
    }

    .hero {
        padding-top: 104px;
    }
}

/* Langganan / paket */
.plan-wrap {
    gap: 18px;
}
.plan-head {
    text-align: center;
}
.plan-head h2 {
    margin: 0 0 4px;
}
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.plan-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    padding: 20px;
    border: 1px solid rgb(var(--line));
    border-radius: 12px;
    background: rgb(var(--surface));
    color: rgb(var(--ink));
    cursor: pointer;
    font: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan-card:hover {
    border-color: rgb(var(--ink));
    box-shadow: 0 6px 20px rgb(0 0 0 / 0.06);
    transform: translateY(-2px);
}
.plan-card {
    position: relative;
}
.plan-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.plan-card:has(.plan-radio:checked) {
    border-color: rgb(var(--brand-600));
    box-shadow: 0 0 0 2px rgb(var(--brand-600) / 0.35);
}
.plan-card.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
.plan-confirm {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.sub-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sub-active-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sub-active-title {
    font-weight: 700;
    font-size: 17px;
}
.sub-active-right {
    text-align: right;
}
.sub-active-num {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: rgb(var(--settled-fg));
}
.billing-extend {
    display: flex;
    justify-content: flex-end;
}
.plan-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(var(--ink-muted));
}
.plan-price {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: rgb(var(--ink));
}
.plan-price.plan-free {
    color: rgb(var(--brand-600));
}
.plan-desc {
    font-size: 14px;
    color: rgb(var(--ink-subtle));
}
.plan-features {
    border-top: 1px solid rgb(var(--line));
    padding-top: 16px;
}
.plan-features h3 {
    margin: 0 0 10px;
}
.plan-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgb(var(--ink-muted));
}
.plan-features li svg {
    color: rgb(var(--brand-600));
    flex-shrink: 0;
}

.btn-danger {
    border-color: transparent;
    background: #dc2626;
    color: #fff;
}
.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}
.input-sm {
    height: 36px;
    width: 78px;
    padding: 0 10px;
}
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.admin-grant {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pay-qrbox {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    margin-inline: auto;
    width: max-content;
}
.pay-qrbox img,
.pay-qrbox canvas {
    display: block;
}

.field label {
    font-size: 13px;
    font-weight: 500;
}
.field-error {
    color: #dc2626;
    font-size: 13px;
    margin: 0;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.plan-edit {
    border: 1px solid rgb(var(--line));
    border-radius: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
}
.plan-edit legend {
    font-weight: 700;
    padding: 0 6px;
}
.plan-edit-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 560px) {
    .plan-edit-grid {
        grid-template-columns: 1fr;
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}
.card-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--ink-muted));
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(var(--line));
}
.input:disabled {
    background: rgb(var(--raised));
    color: rgb(var(--ink-subtle));
    cursor: not-allowed;
}

.cb-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cb-detail summary {
    cursor: pointer;
    color: rgb(var(--brand-600));
    font-weight: 500;
    list-style: none;
}
.cb-detail summary::-webkit-details-marker {
    display: none;
}
.cb-block {
    margin-top: 8px;
}
.cb-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(var(--ink-subtle));
    margin-top: 8px;
}
.cb-pre {
    margin: 4px 0 0;
    padding: 10px;
    max-width: 460px;
    max-height: 200px;
    overflow: auto;
    background: rgb(var(--raised));
    border: 1px solid rgb(var(--line));
    border-radius: 8px;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.cb-resend {
    color: #dc2626;
    font-weight: 600;
}

.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.chart-wrap {
    position: relative;
    height: 240px;
}
.chart-wrap canvas {
    width: 100% !important;
}

/* ============ modern polish ============ */
.page-title h1 {
    letter-spacing: -0.025em;
}
.app-content {
    padding-block: 28px;
}

.card {
    border-radius: 14px;
}

/* stat tiles: accent rail, tracked label, tabular number, hover lift */
.sum-tiles {
    gap: 14px;
}
.sum-tile {
    position: relative;
    padding: 18px 18px 18px 22px;
    overflow: hidden;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.sum-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 3px;
    background: rgb(var(--brand-600));
}
.sum-tile:hover {
    border-color: rgb(var(--line-strong));
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgb(var(--shadow-color) / 0.07);
}
.sum-tile-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    font-weight: 600;
    color: rgb(var(--ink-subtle));
}
.sum-tile-value {
    margin-top: 8px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* masa aktif hero: brand-tinted icon, accent number, pill on the right */
.sum-hero {
    padding: 22px 26px;
}
.sum-hero .icon-box {
    border-color: rgb(var(--settled-line));
    background: rgb(var(--brand-wash));
    color: rgb(var(--brand-600));
}
.sum-hero-label {
    font-size: 16px;
}
.sum-hero-right {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 12px 22px;
    border: 1px solid rgb(var(--line));
    border-radius: 14px;
    background: rgb(var(--raised));
}
.sum-hero-num {
    font-size: 34px;
    font-weight: 600;
    color: rgb(var(--brand-600));
}

/* section headings inside cards */
.card > h2,
.chart-head h2,
.plan-head h2 {
    letter-spacing: -0.015em;
}

/* provider + chart cards: gentle hover */
.prov-card {
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.prov-card:hover {
    border-color: rgb(var(--line-strong));
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgb(var(--shadow-color) / 0.07);
}

/* tables: lighter header, roomier rows */
.table thead th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    font-weight: 600;
    color: rgb(var(--ink-subtle));
}
.table td,
.table th {
    padding-block: 13px;
}
