/*
 * Premium Dark Fintech: lapisan desain di atas site.css (dimuat setelahnya). Hanya tampilan: tidak mengubah markup fungsi,
 * form, route, atau data. Seluruh warna tetap lewat variabel tema, jadi mode terang/gelap dan palet admin tetap bekerja.
 * Tanpa font eksternal dan tanpa gaya inline (sesuai CSP). Selector diawali "body" agar menang atas CSS halaman lain.
 */

/* ---------- Token warna (palet violet = identitas premium) ---------- */
:root, :root[data-palette="violet"] {
    --a1: #8057ff; --a2: #278bff; --a3: #35d8e8; --a1-deep: #5b3df5;
    --glow-rgb: 128, 87, 255;
    --grad: linear-gradient(135deg, #8057ff 0%, #278bff 58%, #35d8e8 100%);
    --grad-btn: linear-gradient(135deg, #7a4dff 0%, #278bff 100%);
    --bg-dark: #080a18; --bg2-dark: #101329; --bg-light: #ebe6ff; --bg2-light: #d8cfff;
}
:root {
    --bg: var(--bg-dark); --bg-2: var(--bg2-dark);
    --panel: rgba(23, 27, 50, .72); --panel-solid: #171b32;
    --line: rgba(255, 255, 255, .10);
    --text: #f4f5ff; --muted: #a5aac5; --link: #35d8e8;
    --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 28px 50px -30px rgba(0, 0, 0, .75);
    --glow: 0 0 0 1px rgba(var(--glow-rgb), .45), 0 10px 32px -8px rgba(var(--glow-rgb), .6);
    --radius: 20px;
    --header-bg: rgba(8, 10, 24, .72);
    --tabbar-bg: rgba(23, 27, 50, .86);
    --field-bg: rgba(255, 255, 255, .04);
    --font: "Inter", "Manrope", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="light"] {
    --header-bg: rgba(244, 245, 255, .8); --tabbar-bg: rgba(255, 255, 255, .9); --field-bg: rgba(40, 50, 110, .04);
    --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 20px 40px -28px rgba(30, 40, 100, .35);
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --header-bg: rgba(244, 245, 255, .8); --tabbar-bg: rgba(255, 255, 255, .9); --field-bg: rgba(40, 50, 110, .04);
        --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 20px 40px -28px rgba(30, 40, 100, .35);
    }
}

/* ---------- Dasar ---------- */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
body ::selection { background: rgba(var(--glow-rgb), .45); color: #fff; }
body h1, body h2, body h3 { letter-spacing: -.025em; font-weight: 800; }
body h2 { font-size: 1.1rem; }
body { scrollbar-color: rgba(127, 127, 170, .4) transparent; }
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-thumb { background: rgba(127, 127, 170, .35); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }

/* Latar: cahaya ambient lembut (ungu kiri atas, biru kanan bawah), bukan bola neon */
body .bg-orbs { background:
    radial-gradient(60% 50% at 8% -5%, rgba(var(--glow-rgb), .28), transparent 70%),
    radial-gradient(50% 45% at 100% 105%, rgba(39, 139, 255, .22), transparent 70%),
    radial-gradient(50% 45% at 100% 105%, color-mix(in srgb, var(--a2) 30%, transparent), transparent 70%),
    radial-gradient(120% 80% at 50% -10%, var(--bg-2), var(--bg) 62%); }
body .bg-orbs span { filter: blur(90px); opacity: calc(var(--orb-opacity) * .45); }

/* ---------- Header ---------- */
body .site-header { position: sticky; top: 0; z-index: 40; padding-block: .7rem; background: var(--header-bg); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
body .logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
body .logo::before { content: ""; width: 1.7rem; height: 1.7rem; border-radius: .55rem; flex: none; background: var(--grad); box-shadow: 0 6px 18px -4px rgba(var(--glow-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
body .nav-item { border-radius: 12px; }
body .nav-cta { box-shadow: var(--glow); }
body .chip { border-radius: 12px; padding: .38rem .75rem; background: var(--panel); }
body .theme-toggle { border-radius: 12px; }

/* ---------- Kartu ---------- */
body .card, body .stat, body .link-card, body .ach-card, body .podium-card, body .qa, body .lp-card, body .lp-hub, body .lp-step, body .lp-benefit, body .lp-stat {
    border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
body .card { padding: clamp(1.15rem, 4vw, 1.75rem); }
body .card:hover { border-color: rgba(var(--glow-rgb), .4); }
body .card h2 { display: flex; align-items: center; gap: .5rem; }
body .card-table { border-radius: var(--radius); }

body .stat { padding: 1.2rem 1.3rem; }
body .stat::before { height: 2px; opacity: .75; }
body .stat-label { font-size: .72rem; letter-spacing: .09em; }
body .stat-value { font-size: 1.9rem; letter-spacing: -.03em; }
body .stat:hover, body .link-card:hover, body .ach-card:hover, body .qa:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 18px 40px -20px rgba(var(--glow-rgb), .55); }

body .link-card { padding: 1.2rem 1.3rem; position: relative; }
body .link-card strong { font-size: 1.02rem; letter-spacing: -.01em; }
body .link-card::after { content: "\2192"; position: absolute; top: 1rem; right: 1.2rem; opacity: .4; transition: transform .25s ease, opacity .25s ease; }
body .link-card:hover::after { transform: translateX(3px); opacity: 1; }

/* ---------- Tombol ---------- */
body .btn { min-height: 2.9rem; padding: .7rem 1.4rem; border-radius: 12px; font-weight: 700; letter-spacing: -.005em; background: var(--panel); }
body .btn:hover { transform: translateY(-2px); border-color: rgba(var(--glow-rgb), .5); }
body .btn-primary { background: var(--grad-btn); border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 28px -10px rgba(var(--glow-rgb), .9); }
body .btn-primary:hover { filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 16px 38px -10px rgba(var(--glow-rgb), 1); }
body .btn-ghost { background: transparent; }
body .btn-ghost:hover { background: rgba(var(--glow-rgb), .1); }
body .btn-small { min-height: 0; padding: .35rem .85rem; border-radius: 10px; }
body .btn:focus-visible { outline: 3px solid rgba(53, 216, 232, .6); outline-offset: 2px; }
body .btn[disabled] { opacity: .5; box-shadow: none; filter: grayscale(.35); }

/* ---------- Formulir ---------- */
body input[type="text"], body input[type="email"], body input[type="password"], body input[type="number"], body input[type="url"], body input[type="search"], body select, body textarea {
    min-height: 2.9rem; border-radius: 12px; background: var(--field-bg); border-color: var(--line); }
body textarea { min-height: 8rem; }
body input:focus, body select:focus, body textarea:focus { border-color: var(--a1); background: var(--field-bg); box-shadow: 0 0 0 4px rgba(var(--glow-rgb), .22); }
body label { font-size: .86rem; color: var(--text); }
body .hint { font-size: .8rem; }
body .auth-card { position: relative; max-width: 29rem; overflow: hidden; padding-top: clamp(1.5rem, 5vw, 2.1rem); }
body .auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }

/* ---------- Pesan, badge, progres ---------- */
body .notice { border-radius: 14px; border-width: 1px; padding: .85rem 1.05rem; border-left-width: 4px; }
body .badge { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem; font-size: .75rem; letter-spacing: .01em; }
body .badge::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
body .progress { height: .6rem; background: rgba(127, 127, 170, .18); }
body .progress-fill { background: var(--grad); box-shadow: 0 0 14px rgba(var(--glow-rgb), .6); }

/* ---------- Tab (segmented) dan tabel ---------- */
body .tabs { padding: .3rem; border-radius: 14px; background: var(--field-bg); }
body .tab-link { border-radius: 10px; padding: .45rem 1.05rem; }
body .tab-link.is-active { box-shadow: 0 8px 22px -10px rgba(var(--glow-rgb), .9); }
body table { border-collapse: separate; border-spacing: 0; }
body thead th { background: rgba(127, 127, 170, .07); padding: .8rem 1rem; font-size: .7rem; letter-spacing: .08em; }
body th, body td { border-top: 1px solid var(--line); }
body thead th { border-top: 0; }
body tbody tr { transition: background-color .15s ease; }
body tbody tr:hover td { background: rgba(var(--glow-rgb), .06); }
body td { padding: .85rem 1rem; }
body .empty-state { padding: 2.5rem 1rem; }
@media (max-width: 560px) {
    body th, body td { padding: .6rem .65rem; font-size: .84rem; }
    body thead th { font-size: .66rem; }
}

/* ---------- Dashboard ---------- */
body .dash-hero { border-radius: 28px; background:
    radial-gradient(520px circle at var(--mx, 88%) var(--my, 0%), rgba(var(--glow-rgb), .32), transparent 62%),
    radial-gradient(420px circle at 0% 100%, rgba(39, 139, 255, .18), transparent 65%), var(--panel); }
body .dash-balance { letter-spacing: -.04em; }
body .chip-box { border-radius: 16px; background: rgba(255, 255, 255, .035); }
body .chip-value { font-size: 1.35rem; }
body .faucet-pill { border-radius: 12px; }
body .qa { padding: 1.1rem; }
body .qa-ico { width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 10px 22px -10px rgba(var(--glow-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
body .qa-title { font-size: 1rem; letter-spacing: -.01em; }
body .timeline li { padding-block: .8rem; }
body .tl-dot { box-shadow: 0 0 0 4px var(--ok-bg), 0 0 12px var(--ok); }

/* ---------- Halaman klaim, peringkat ---------- */
body .claim-card { border-radius: 28px; padding: clamp(1.4rem, 5vw, 2.2rem); }
body .ring-fg { stroke: var(--a2); }
body .claim-card.is-ready { border-color: rgba(53, 216, 232, .45); box-shadow: var(--shadow), 0 0 60px -20px rgba(53, 216, 232, .5); }
body .podium-card.rank-1 { background: linear-gradient(180deg, rgba(var(--glow-rgb), .2), var(--panel)); }
body .podium-rank { box-shadow: 0 6px 16px -6px rgba(var(--glow-rgb), .9); }
body .row-me td { background: rgba(var(--glow-rgb), .14); }

/* ---------- Halaman depan (landing) ---------- */
body .lp-hero { position: relative; }
body .lp-hero::before { content: ""; position: absolute; z-index: -1; inset: -10% -5% auto; height: 70%; background: radial-gradient(60% 60% at 50% 0%, rgba(var(--glow-rgb), .3), transparent 70%); pointer-events: none; }
body .lp-hero h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1.05; letter-spacing: -.04em; }
body .lp-card, body .lp-hub { padding: 1.3rem; }
body .lp-card:hover { transform: translateY(-4px); border-color: rgba(var(--glow-rgb), .55); }
body .lp-ico { border-radius: 14px; box-shadow: 0 10px 22px -10px rgba(var(--glow-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
body .lp-stat strong { letter-spacing: -.03em; }
body .lp-faq details { border-radius: 16px; }
body .lp-cta { border-radius: 28px; }

/* ---------- Footer ---------- */
body .site-footer { border-top: 1px solid var(--line); margin-top: 1rem; padding: 1.4rem 1rem 2rem; letter-spacing: .01em; }

/* ---------- Bilah navigasi bawah (HP): melayang, kaca ---------- */
body.has-tabbar { padding-bottom: 6rem; }
body .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-width: 34rem; margin: 0 auto; padding: .3rem; gap: .15rem;
    background: var(--tabbar-bg); border: 1px solid var(--line); border-radius: 22px;
    -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .75); }
body .tab { border-radius: 16px; padding: .5rem .2rem; transition: background-color .2s ease, color .2s ease; }
body .tab.is-active { background: rgba(var(--glow-rgb), .16); color: var(--text); }
body .tab.is-active svg { color: var(--a3); }

/* ---------- Sidebar desktop (layar lebar) ---------- */
body .sidebar { display: none; }
@media (min-width: 1100px) {
    body.has-sidebar { padding-left: 16.5rem; padding-bottom: 0; }
    body.has-sidebar .tabbar { display: none; }
    body.has-sidebar .site-header .logo { display: none; }
    body.has-sidebar .page { max-width: 74rem; }
    body.has-sidebar .site-footer { margin-top: 0; }
    body .sidebar { display: flex; flex-direction: column; gap: .35rem; position: fixed; z-index: 45; inset: 0 auto 0 0; width: 16.5rem; padding: 1.1rem .9rem 1rem; overflow-y: auto;
        background: linear-gradient(180deg, rgba(23, 27, 50, .92), rgba(16, 19, 41, .92)); border-right: 1px solid var(--line);
        -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
    :root[data-theme="light"] body .sidebar { background: rgba(255, 255, 255, .88); }
    body .sidebar .logo { padding: .35rem .5rem 1rem; }
    body .side-group { margin: .9rem .6rem .3rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    body .side-item { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 12px; color: var(--muted) !important; text-decoration: none; font-weight: 600; font-size: .92rem;
        transition: background-color .18s ease, color .18s ease; }
    body .side-item svg { flex: none; opacity: .85; }
    body .side-item:hover { background: rgba(255, 255, 255, .05); color: var(--text) !important; }
    body .side-item.is-active { background: linear-gradient(90deg, rgba(var(--glow-rgb), .26), rgba(var(--glow-rgb), .06)); color: var(--text) !important; box-shadow: inset 0 0 0 1px rgba(var(--glow-rgb), .35); }
    body .side-item.is-active svg { color: var(--a3); opacity: 1; }
    body .side-foot { margin-top: auto; padding-top: 1rem; }
    body .side-foot .btn { width: 100%; }
}

/* ---------- Skeleton loading (pakai class .skeleton pada elemen penampung) ---------- */
body .skeleton { position: relative; overflow: hidden; border-radius: 12px; background: rgba(127, 127, 170, .14); min-height: 1rem; }
body .skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent); animation: skeleton 1.4s ease-in-out infinite; }
@keyframes skeleton { to { transform: translateX(100%); } }

/* ---------- Gerak lebih tenang ---------- */
body .reveal { animation-duration: .5s; }
@media (prefers-reduced-motion: reduce) { body .skeleton::after { animation: none; } }

/* =====================================================================================================
 * TAHAP 2: perubahan yang terlihat jelas (kartu saldo, klaim, latar bertekstur, beranda).
 * ===================================================================================================== */

/* ---------- Latar bertekstur: grid halus yang memudar ke bawah ---------- */
:root { --grid-line: rgba(255, 255, 255, .04); }
:root[data-theme="light"] { --grid-line: rgba(40, 50, 110, .06); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --grid-line: rgba(40, 50, 110, .06); } }
body .bg-orbs::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 25%, transparent 78%); }

/* ---------- Judul halaman ---------- */
body .eyebrow { color: var(--text); border-color: rgba(var(--glow-rgb), .45); background: linear-gradient(135deg, rgba(var(--glow-rgb), .24), rgba(39, 139, 255, .12)); }
body .hero.compact h1 { font-size: clamp(1.9rem, 6.5vw, 2.7rem); letter-spacing: -.035em; }
body .hero.compact { padding: 1.8rem 0 1.2rem; }

/* ---------- Dashboard: kartu saldo bergaya dompet fintech ---------- */
body .dash-hero { --text: #fff; --muted: rgba(255, 255, 255, .78); --line: rgba(255, 255, 255, .24); --link: #fff; color: #fff;
    background:
        radial-gradient(360px circle at 92% -8%, rgba(255, 255, 255, .3), transparent 62%),
        radial-gradient(340px circle at -6% 112%, color-mix(in srgb, var(--a3) 55%, transparent), transparent 62%),
        linear-gradient(135deg, var(--a1-deep) 0%, var(--a1) 52%, var(--a2) 100%);
    border: 1px solid rgba(255, 255, 255, .26); -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 34px 60px -30px rgba(var(--glow-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
body .dash-hero::before { display: none; }
body .dash-hero::after { content: ""; position: absolute; right: -3rem; top: -3rem; width: 12rem; height: 12rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); pointer-events: none; box-shadow: 0 0 0 2.2rem rgba(255, 255, 255, .04), 0 0 0 4.4rem rgba(255, 255, 255, .03); }
body .dash-hero > * { position: relative; z-index: 1; }
body .dash-hero .grad { background: none; -webkit-text-fill-color: #fff; color: #fff; }
body .dash-hero .dash-label { color: rgba(255, 255, 255, .8); }
body .dash-hero .dash-balance { color: #fff; text-shadow: 0 6px 28px rgba(0, 0, 20, .3); }
body .dash-hero .dash-balance small { color: rgba(255, 255, 255, .8); }
body .dash-hero .faucet-pill { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .34); color: #fff;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body .dash-hero .faucet-pill svg, body .dash-hero .fp-label { color: #fff; }
body .dash-hero .faucet-pill.is-ready { border-color: rgba(150, 255, 200, .8); color: #eafff3; }
body .dash-hero .dash-spark { color: #c4f5ff; }
body .dash-hero .dash-spark-cap strong { color: #c9ffe2; }
body .dash-hero .chip-box { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .24); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body .dash-hero .chip-ring, body .dash-hero .chip-value { color: #fff; }

/* Kartu aksi cepat: ikon berwarna bervariasi dan tombol panah bulat */
body .qa { padding: 1.15rem; }
body .qa-ico { background: linear-gradient(135deg, var(--a1), var(--a2)); }
body .qa:nth-child(3n+2) .qa-ico { background: linear-gradient(135deg, var(--a2), var(--a3)); }
body .qa:nth-child(3n) .qa-ico { background: linear-gradient(135deg, var(--a3), var(--a1)); }
body .qa-go { top: 1rem; right: 1rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: rgba(127, 127, 170, .16); opacity: 1; }
body .qa-go svg { width: 15px; height: 15px; }
body .qa:hover .qa-go { background: rgba(var(--glow-rgb), .3); }
body .dash-activity h2 { font-size: 1rem; }

/* ---------- Halaman klaim: kartu bercahaya dengan cincin besar ---------- */
body .claim-card { position: relative; overflow: hidden; }
body .claim-card::before { content: ""; position: absolute; left: 50%; top: -14%; width: 120%; height: 62%; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(var(--glow-rgb), .38), transparent); pointer-events: none; }
body .claim-card > * { position: relative; }
body .ring-wrap { width: min(17.5rem, 76vw); }
body .ring circle { stroke-width: 8; }
body .ring-label { font-size: 2.4rem; letter-spacing: -.035em; }
body .ring-sub { font-weight: 600; }
body .claim-form .btn, body .btn-claim { min-height: 3.5rem; font-size: 1.05rem; border-radius: 14px; }
body .claim-card.is-ready .btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 16px 40px -10px rgba(var(--glow-rgb), 1); }

/* ---------- Beranda (landing) ---------- */
body .lp-hero { padding-top: clamp(2.2rem, 8vw, 5rem); }
body .lp-hero h1 { font-size: clamp(2.3rem, 9vw, 4rem); line-height: 1.04; letter-spacing: -.045em; }
body .lp-lead { font-size: 1.12rem; }
body .lp-hero .btn, body .lp-cta .btn { min-height: 3.2rem; padding-inline: 1.8rem; border-radius: 14px; }
body .lp-panel { border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 60%), var(--panel); box-shadow: var(--shadow); }
body .lp-stat strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
body .lp-section { padding-block: clamp(1.6rem, 6vw, 3.2rem); }
body .lp-head h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); letter-spacing: -.035em; }
body .lp-card, body .lp-benefit, body .lp-step { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 55%), var(--panel); }
body .lp-card:hover { box-shadow: var(--shadow), 0 22px 44px -22px rgba(var(--glow-rgb), .65); }
body .lp-cta { background: radial-gradient(420px circle at 85% -20%, rgba(255, 255, 255, .2), transparent 60%), linear-gradient(135deg, rgba(var(--glow-rgb), .5), rgba(39, 139, 255, .32)); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 30px 60px -34px rgba(var(--glow-rgb), .9); }

/* ---------- Logo gambar / favicon sebagai merek ---------- */
body .logo.has-img::before { display: none; }
body .logo .logo-img { display: block; height: 2.1rem; width: auto; max-width: 11rem; object-fit: contain; }
body .logo .logo-mark { border-radius: .55rem; object-fit: cover; }
body .logo.has-img span { font-weight: 800; letter-spacing: -.03em; }

/* =====================================================================================================
 * TAHAP 3: warna per halaman. Palet dipilih admin per halaman (Pengaturan > Tampilan). Permukaan kartu, header, dan
 * bilah tab ikut berwarna sesuai palet, jadi mode terang tidak lagi putih polos.
 * ===================================================================================================== */

/* Palet oranye (baru) */
:root[data-palette="ember"] {
    --a1: #ff8a1f; --a2: #ff5e3a; --a3: #ffc23d; --a1-deep: #d9560a;
    --glow-rgb: 255, 138, 31;
    --grad: linear-gradient(135deg, #ff8a1f 0%, #ff5e3a 55%, #ffc23d 100%);
    --grad-btn: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    --bg-dark: #160a04; --bg2-dark: #2b1608; --bg-light: #ffe6cc; --bg2-light: #ffcf9f;
}
/* Latar terang emerald dan ocean lebih berwarna */
:root[data-palette="emerald"] { --bg-light: #d6f3e5; --bg2-light: #b5e9cf; }
:root[data-palette="ocean"] { --bg-light: #d6e8ff; --bg2-light: #b4d3fb; }


/* violet: gelap */
:root[data-palette="violet"] { --panel: rgba(23, 27, 50, .72); --panel-solid: #171b32; --header-bg: rgba(8, 10, 24, .72); --tabbar-bg: rgba(23, 27, 50, .86); }
/* violet: terang */
:root[data-theme="light"][data-palette="violet"] { --panel: rgba(222, 213, 255, .88); --panel-solid: #ded5ff; --line: rgba(91, 61, 245, .24); --header-bg: rgba(228, 220, 255, .84); --tabbar-bg: rgba(222, 213, 255, .94); --field-bg: rgba(91, 61, 245, .08); }
@media (prefers-color-scheme: light) { :root[data-palette="violet"]:not([data-theme="dark"]) { --panel: rgba(222, 213, 255, .88); --panel-solid: #ded5ff; --line: rgba(91, 61, 245, .24); --header-bg: rgba(228, 220, 255, .84); --tabbar-bg: rgba(222, 213, 255, .94); --field-bg: rgba(91, 61, 245, .08); } }

/* emerald: gelap */
:root[data-palette="emerald"] { --panel: rgba(10, 46, 35, .72); --panel-solid: #0a2a20; --header-bg: rgba(4, 19, 15, .72); --tabbar-bg: rgba(10, 46, 35, .86); }
/* emerald: terang */
:root[data-theme="light"][data-palette="emerald"] { --panel: rgba(196, 238, 218, .9); --panel-solid: #c4eeda; --line: rgba(4, 120, 87, .26); --header-bg: rgba(208, 242, 226, .84); --tabbar-bg: rgba(196, 238, 218, .94); --field-bg: rgba(4, 120, 87, .08); }
@media (prefers-color-scheme: light) { :root[data-palette="emerald"]:not([data-theme="dark"]) { --panel: rgba(196, 238, 218, .9); --panel-solid: #c4eeda; --line: rgba(4, 120, 87, .26); --header-bg: rgba(208, 242, 226, .84); --tabbar-bg: rgba(196, 238, 218, .94); --field-bg: rgba(4, 120, 87, .08); } }

/* ocean: gelap */
:root[data-palette="ocean"] { --panel: rgba(12, 36, 70, .72); --panel-solid: #0c2347; --header-bg: rgba(5, 15, 31, .72); --tabbar-bg: rgba(12, 36, 70, .86); }
/* ocean: terang */
:root[data-theme="light"][data-palette="ocean"] { --panel: rgba(196, 220, 255, .9); --panel-solid: #c4dcff; --line: rgba(29, 78, 216, .26); --header-bg: rgba(208, 228, 255, .84); --tabbar-bg: rgba(196, 220, 255, .94); --field-bg: rgba(29, 78, 216, .08); }
@media (prefers-color-scheme: light) { :root[data-palette="ocean"]:not([data-theme="dark"]) { --panel: rgba(196, 220, 255, .9); --panel-solid: #c4dcff; --line: rgba(29, 78, 216, .26); --header-bg: rgba(208, 228, 255, .84); --tabbar-bg: rgba(196, 220, 255, .94); --field-bg: rgba(29, 78, 216, .08); } }

/* ember: gelap */
:root[data-palette="ember"] { --panel: rgba(52, 26, 10, .72); --panel-solid: #2a1608; --header-bg: rgba(22, 10, 4, .72); --tabbar-bg: rgba(52, 26, 10, .86); }
/* ember: terang */
:root[data-theme="light"][data-palette="ember"] { --panel: rgba(255, 218, 182, .92); --panel-solid: #ffdab6; --line: rgba(217, 86, 10, .28); --header-bg: rgba(255, 228, 200, .86); --tabbar-bg: rgba(255, 218, 182, .95); --field-bg: rgba(217, 86, 10, .08); }
@media (prefers-color-scheme: light) { :root[data-palette="ember"]:not([data-theme="dark"]) { --panel: rgba(255, 218, 182, .92); --panel-solid: #ffdab6; --line: rgba(217, 86, 10, .28); --header-bg: rgba(255, 228, 200, .86); --tabbar-bg: rgba(255, 218, 182, .95); --field-bg: rgba(217, 86, 10, .08); } }

/* Tombol, tab aktif, dan judul memakai warna palet halaman */
body .tab.is-active svg { color: var(--a2); }
body .eyebrow { border-color: rgba(var(--glow-rgb), .5); }


/* =====================================================================================================
 * TAHAP A: PTC, Shortlink, Offers, Wheel, Leaderboard, Achievements (warna ikut palet tiap halaman)
 * ===================================================================================================== */

/* Judul halaman: pita berwarna palet (mengurangi putih/abu polos) */
body .hero.compact { padding: 1.5rem 1.1rem 1.3rem; margin: .6rem 0 1.1rem; border-radius: 24px; border: 1px solid rgba(var(--glow-rgb), .3);
    background: radial-gradient(420px circle at 100% 0%, rgba(var(--glow-rgb), .3), transparent 65%), linear-gradient(135deg, rgba(var(--glow-rgb), .2), rgba(var(--glow-rgb), .05)); }

/* Daftar tugas (PTC, Shortlink, Offers, Surveys) */
body .task-title, body .earn-list h2 { margin: 1.1rem .2rem .7rem; font-size: 1.05rem; }
body .task-grid, body .earn-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
@media (min-width: 640px) { body .task-grid, body .earn-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { body .task-grid, body .earn-items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body .earn-list { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body .earn-items > .muted { grid-column: 1 / -1; }
body .task-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .75rem; margin: 0; padding: 1.15rem; }
body .task-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
body .task-top { display: flex; align-items: center; gap: .7rem; }
body .task-ico { width: 2.7rem; height: 2.7rem; flex: none; display: grid; place-items: center; border-radius: 14px; color: #fff; font-weight: 800; font-size: 1.1rem;
    background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 10px 22px -10px rgba(var(--glow-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
body .task-ico svg { width: 20px; height: 20px; }
body .task-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: auto; justify-content: flex-end; }
body .task-chip { padding: .22rem .68rem; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--text); background: rgba(var(--glow-rgb), .16); border: 1px solid rgba(var(--glow-rgb), .34); }
body .task-name { font-size: 1.02rem; line-height: 1.3; letter-spacing: -.01em; }
body .task-reward { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; padding: .65rem .85rem; border-radius: 12px; font-size: .84rem; color: var(--muted);
    background: rgba(var(--glow-rgb), .12); border: 1px dashed rgba(var(--glow-rgb), .4); }
body .task-reward b { color: var(--text); font-size: .95rem; text-align: right; }
body .task-card .btn { margin-top: auto; }
body .task-note { border-left: 4px solid var(--a2); background: linear-gradient(90deg, rgba(var(--glow-rgb), .16), transparent 70%), var(--panel); }

/* PTC: hitung mundur */
body #ptc-timer, body .claim-card { text-align: center; }
body #ptc-countdown { margin: .2rem 0; font-size: 3.6rem; font-weight: 800; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Wheel */
body .wheel-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
body .wheel-stats > div { display: flex; flex-direction: column; gap: .25rem; padding: .85rem .5rem; text-align: center; border-radius: 14px; font-size: .78rem;
    background: rgba(var(--glow-rgb), .14); border: 1px solid rgba(var(--glow-rgb), .32); }
body .wheel-stats strong { font-size: 1.2rem; letter-spacing: -.02em; }
body .wheel-stage { filter: drop-shadow(0 24px 40px rgba(var(--glow-rgb), .55)); }
body #wheel-btn { min-height: 3.6rem; font-size: 1.1rem; letter-spacing: .14em; }
body .wheel-result { font-weight: 700; }

/* Leaderboard: podium bermedali */
body .podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; align-items: end; margin: 1rem 0; }
body .podium-card { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1rem .5rem; text-align: center; border-radius: 20px; }
body .podium-card.rank-1 { order: 2; padding-block: 1.7rem; border-color: rgba(255, 200, 60, .6); background: linear-gradient(180deg, rgba(255, 200, 60, .34), var(--panel) 75%); box-shadow: var(--shadow), 0 20px 44px -22px rgba(255, 190, 40, .85); }
body .podium-card.rank-2 { order: 1; border-color: rgba(190, 200, 225, .6); background: linear-gradient(180deg, rgba(190, 200, 225, .3), var(--panel) 75%); }
body .podium-card.rank-3 { order: 3; border-color: rgba(220, 140, 90, .6); background: linear-gradient(180deg, rgba(220, 140, 90, .3), var(--panel) 75%); }
body .podium-rank { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem; border-radius: 999px; font-weight: 800; color: #2b1c00; background: linear-gradient(135deg, #ffe08a, #f5a623); }
body .podium-card.rank-2 .podium-rank { color: #1d2340; background: linear-gradient(135deg, #f0f3fb, #aab3cf); }
body .podium-card.rank-3 .podium-rank { color: #2e1604; background: linear-gradient(135deg, #f5c19a, #c9783f); }
body .podium-name { margin: .2rem 0 0; font-weight: 700; font-size: .9rem; word-break: break-all; }
body .podium-score { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
body .podium-prize { margin: .15rem 0 0; padding: .15rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgba(var(--glow-rgb), .22); }

/* Achievements */
body .ach-card { position: relative; overflow: hidden; padding: 1.15rem; }
body .ach-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
body .ach-head h2 { margin: 0; flex: 1; min-width: 0; font-size: 1rem; }
body .ach-ico { width: 2.5rem; height: 2.5rem; flex: none; display: grid; place-items: center; border-radius: 13px; color: var(--muted); background: rgba(127, 127, 170, .18); }
body .ach-ico svg { width: 19px; height: 19px; }
body .ach-card.is-unlocked { border-color: rgba(var(--glow-rgb), .55); background: linear-gradient(160deg, rgba(var(--glow-rgb), .24), transparent 70%), var(--panel); }
body .ach-card.is-unlocked .ach-ico { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 10px 22px -10px rgba(var(--glow-rgb), .95); }
body .ach-card.is-locked { opacity: .88; }
body .reward-line strong { padding: .12rem .55rem; border-radius: 999px; background: rgba(var(--glow-rgb), .2); }

/* =====================================================================================================
 * TAHAP 2: History, Withdraw, Deposit, Referral, Support, Beranda (warna ikut palet halaman; bawaan hijau)
 * ===================================================================================================== */

/* Ikon kecil di judul kartu */
body .page-ico { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-right: .6rem; vertical-align: middle; border-radius: 11px; color: #fff;
    background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 8px 18px -8px rgba(var(--glow-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
body .page-ico svg { width: 17px; height: 17px; }
body .page-ico-lg { width: 3.2rem; height: 3.2rem; margin: 0 0 .8rem; border-radius: 16px; }
body .page-ico-lg svg { width: 24px; height: 24px; }

/* Withdraw: kartu saldo bergaya dompet */
body .wallet-card { position: relative; overflow: hidden; margin: .2rem 0 1rem; padding: 1.5rem 1.3rem 1.2rem; border-radius: 26px; color: #fff; border: 1px solid rgba(255, 255, 255, .28);
    background: radial-gradient(360px circle at 95% -10%, rgba(255, 255, 255, .3), transparent 62%), radial-gradient(320px circle at -5% 115%, color-mix(in srgb, var(--a3) 55%, transparent), transparent 62%), linear-gradient(135deg, var(--a1-deep), var(--a1) 55%, var(--a2));
    box-shadow: 0 30px 56px -30px rgba(var(--glow-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
body .wallet-card::after { content: ""; position: absolute; right: -3rem; top: -3rem; width: 11rem; height: 11rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); pointer-events: none; box-shadow: 0 0 0 2rem rgba(255, 255, 255, .04), 0 0 0 4rem rgba(255, 255, 255, .03); }
body .wallet-card > * { position: relative; z-index: 1; }
body .wallet-label { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
body .wallet-value { margin: .35rem 0 0; font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; text-shadow: 0 6px 26px rgba(0, 30, 20, .3); }
body .wallet-unit { font-size: 1rem; font-weight: 700; opacity: .88; }
body .wallet-sub { margin: .3rem 0 0; font-size: .92rem; color: rgba(255, 255, 255, .88); }
body .wallet-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: 1.1rem; }
body .wallet-limits > div { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .75rem; border-radius: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body .wallet-limits span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .82); }
body .wallet-limits b { font-size: .98rem; }
body .wallet-note { margin: .7rem 0 0; font-size: .72rem; color: rgba(255, 255, 255, .75); }
body .address-box { margin: .4rem 0 .6rem; padding: .85rem 1rem; border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; word-break: break-all; background: rgba(var(--glow-rgb), .14); border: 1px dashed rgba(var(--glow-rgb), .45); }
body details > summary { cursor: pointer; padding: .45rem 0; font-weight: 700; color: var(--link); }

/* History dan tabel keuangan */
body .plus { color: var(--ok); font-weight: 700; }
body .minus { color: var(--err); font-weight: 700; }
body td.num, body th.num { text-align: right; font-variant-numeric: tabular-nums; }
body .pager { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1rem 0; }

/* Referral */
body .invite-card { border-color: rgba(var(--glow-rgb), .55);
    background: radial-gradient(360px circle at 100% 0%, rgba(var(--glow-rgb), .34), transparent 62%), linear-gradient(135deg, rgba(var(--glow-rgb), .24), rgba(var(--glow-rgb), .06)), var(--panel); }
body .copy-field { display: flex; gap: .6rem; }
body .copy-field input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
body .steps-list { list-style: none; counter-reset: step-no; margin: .8rem 0 0; padding: 0; display: grid; gap: .6rem; }
body .steps-list li { counter-increment: step-no; display: flex; align-items: flex-start; gap: .8rem; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--glow-rgb), .08); color: var(--muted); font-size: .92rem; line-height: 1.5; }
body .steps-list li::before { content: counter(step-no); flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); }
body .steps-list strong { color: var(--text); }

/* Support */
body .support-card { text-align: left; }
body .support-card h1 { font-size: 1.5rem; }

/* Beranda (landing) */
body .lp-stats { gap: .8rem; }
body .lp-stat { background: linear-gradient(160deg, rgba(var(--glow-rgb), .22), transparent 70%), var(--panel); border-color: rgba(var(--glow-rgb), .4); }
body #earn, body #how, body #faq { padding: clamp(1.2rem, 4vw, 2.2rem); border-radius: 28px; border: 1px solid rgba(var(--glow-rgb), .28);
    background: linear-gradient(135deg, rgba(var(--glow-rgb), .17), rgba(var(--glow-rgb), .04)); }
body .lp-live-section .lp-panel { background: linear-gradient(180deg, rgba(var(--glow-rgb), .14), transparent 70%), var(--panel); border-color: rgba(var(--glow-rgb), .34); }
body .lp-step-no { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 10px 22px -10px rgba(var(--glow-rgb), .95); }
body .lp-chip, body .lp-badge { background: rgba(var(--glow-rgb), .2); border: 1px solid rgba(var(--glow-rgb), .4); color: var(--text); }
body .lp-badge-live { background: rgba(var(--glow-rgb), .26); }
body .lp-hub, body .lp-benefit { border-color: rgba(var(--glow-rgb), .34); background: linear-gradient(160deg, rgba(var(--glow-rgb), .16), transparent 70%), var(--panel); }
body .lp-faq details { border: 1px solid rgba(var(--glow-rgb), .3); background: rgba(var(--glow-rgb), .1); }
body .lp-faq summary { font-weight: 700; }
body .lp-cta { color: #fff; }
body .lp-cta h2 { color: #fff; }
