/* ============================================================
   RAFSHARE TUNNEL - gaya portal
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #06b6d4;
    --navy: #0b1530;
    --navy-2: #13224a;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700;
    cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .3); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(37, 99, 235, .4); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-light { background: #fff; color: var(--primary); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Landing ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 21, 48, .85); backdrop-filter: blur(10px); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .5px; }
.brand-logo {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: #fff; padding: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo { display: block; text-align: center; }
.auth-logo img { width: 190px; max-width: 70%; height: auto; }
.brand small { display: block; font-weight: 600; font-size: .68rem; opacity: .7; letter-spacing: 1.5px; }
.nav-actions { display: flex; gap: 10px; }

.hero {
    background: radial-gradient(1200px 500px at 80% -10%, rgba(6, 182, 212, .35), transparent 60%),
                radial-gradient(900px 500px at -10% 30%, rgba(37, 99, 235, .45), transparent 60%),
                linear-gradient(180deg, var(--navy), var(--navy-2));
    color: #fff; padding: 80px 0 110px; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: .8rem; font-weight: 600;
}
.pill i { color: #34d399; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.12; margin: 20px 0 16px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 span { background: linear-gradient(90deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.08rem; opacity: .85; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 1.4rem; }
.hero-stats span { font-size: .82rem; opacity: .7; }

.terminal {
    background: rgba(2, 6, 23, .75); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35); overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.terminal-bar { display: flex; gap: 7px; padding: 12px 16px; background: rgba(255, 255, 255, .05); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal-body { padding: 20px; font-size: .82rem; line-height: 1.8; color: #cbd5e1; overflow-x: auto; }
.terminal-body .c1 { color: #22d3ee; }
.terminal-body .c2 { color: #34d399; }
.terminal-body .c3 { color: #94a3b8; }

.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--primary); font-weight: 700; font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 8px 0 10px; letter-spacing: -.3px; }
.section-head p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ic {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
    background: #eff6ff; color: var(--primary); margin-bottom: 16px;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .92rem; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: relative; }
.price-card.hot { border: 2px solid var(--primary); box-shadow: 0 20px 40px rgba(37, 99, 235, .15); }
.price-card .tag { position: absolute; top: -12px; right: 20px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.price-card h3 { font-size: 1.1rem; }
.price-card .amount { font-size: 2rem; font-weight: 800; margin: 12px 0 4px; }
.price-card .amount small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; margin: 18px 0 24px; }
.price-card li { display: flex; gap: 8px; padding: 6px 0; color: #334155; font-size: .92rem; }
.price-card li i { color: var(--success); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { text-align: center; padding: 10px 16px; }
.step .num {
    width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.step h3 { font-size: 1.02rem; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: .9rem; }

.cta-band {
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-radius: 24px;
    padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.6rem; }
.footer { background: var(--navy); color: #94a3b8; padding: 30px 0; font-size: .88rem; }
.footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
    .hero-grid, .features, .steps { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 80px; }
    .terminal { display: none; }
    .section { padding: 56px 0; }
    .cta-band { padding: 30px; }
}
@media (max-width: 480px) {
    .nav-actions .btn-ghost { display: none; }
}

/* ---------- Halaman auth (login / daftar) ---------- */
.auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: radial-gradient(900px 500px at 100% 0, rgba(6, 182, 212, .3), transparent 60%),
                radial-gradient(800px 500px at 0 100%, rgba(37, 99, 235, .4), transparent 60%),
                linear-gradient(180deg, var(--navy), var(--navy-2));
}
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 32px 26px; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.auth-card .brand { color: var(--ink); justify-content: center; margin-bottom: 6px; }
.auth-card h1 { font-size: 1.35rem; text-align: center; margin-top: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: #334155; }
.input-wrap { position: relative; }
.input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 19px; }
.input {
    width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px 13px 42px;
    font: inherit; font-size: .98rem; background: #f8fafc; transition: border .15s, background .15s;
}
.input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }

.alert { border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert i { font-size: 20px; flex-shrink: 0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.akun-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 14px 16px; margin: 14px 0 18px; }
.akun-box div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .92rem; }
.akun-box span { color: var(--muted); }
.akun-box b { word-break: break-all; text-align: right; }

/* ---------- Aplikasi (mobile) ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 100px; position: relative; }
.app-top {
    background: linear-gradient(135deg, var(--navy), var(--primary)); color: #fff;
    padding: 20px 20px 70px; border-radius: 0 0 28px 28px;
}
.app-top .row { display: flex; align-items: center; justify-content: space-between; }
.app-top .hello small { opacity: .75; font-size: .8rem; }
.app-top .hello b { display: block; font-size: 1.08rem; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
    background: rgba(255, 255, 255, .14); color: #fff;
}
.app-body { padding: 0 16px; margin-top: -52px; }
.page-title { font-size: 1.2rem; font-weight: 800; margin-top: 18px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card-title { font-weight: 800; font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .lbl { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 1.12rem; font-weight: 800; margin-top: 4px; word-break: break-word; }
.stat .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.stat.saldo .ic { background: #dbeafe; color: var(--primary); }
.stat.keluar .ic { background: #fee2e2; color: var(--danger); }

.paket { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.paket .ic { width: 44px; height: 44px; border-radius: 12px; background: #eff6ff; color: var(--primary); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.paket .info { flex: 1; min-width: 0; }
.paket .info b { display: block; font-size: .95rem; }
.paket .info small { color: var(--muted); font-size: .78rem; }
.paket .harga { font-weight: 800; color: var(--primary); font-size: .95rem; white-space: nowrap; }

.tunnel-item { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.tunnel-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.tunnel-head .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tunnel-head .info { flex: 1; min-width: 0; }
.tunnel-head .info b { display: block; font-size: .92rem; }
.tunnel-head .info small { color: var(--muted); font-size: .78rem; }
.tunnel-detail { display: none; padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.tunnel-item.open .tunnel-detail { display: block; }
.tunnel-item.open .chev { transform: rotate(180deg); }
.chev { transition: transform .2s; color: var(--muted); font-size: 20px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: .86rem; border-bottom: 1px solid #f1f5f9; }
.kv span { color: var(--muted); }
.kv b { text-align: right; word-break: break-all; }
.code {
    background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px; font-family: ui-monospace, Menlo, monospace;
    font-size: .74rem; line-height: 1.6; word-break: break-all; margin: 10px 0 8px;
}

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: #e2e8f0; color: #475569; }
.badge-info { background: #dbeafe; color: #1d4ed8; }

.saldo-hero { text-align: center; color: #fff; padding: 6px 0 4px; }
.saldo-hero small { opacity: .75; }
.saldo-hero .big { font-size: 2rem; font-weight: 800; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.chip { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 6px; text-align: center; font-weight: 700; font-size: .88rem; cursor: pointer; background: #fff; }
.chip.active { border-color: var(--primary); background: #eff6ff; color: var(--primary); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.list-item:last-child { border-bottom: 0; }
.list-item .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info b { display: block; font-size: .9rem; }
.list-item .info small { color: var(--muted); font-size: .76rem; }
.list-item .amt { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.in { color: var(--success); }
.out { color: var(--danger); }
.ic-in { background: #d1fae5; color: #047857; }
.ic-out { background: #fee2e2; color: #b91c1c; }
.ic-wait { background: #fef3c7; color: #b45309; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; font-size: .9rem; }
.empty i { font-size: 38px; display: block; margin-bottom: 6px; opacity: .5; }

/* Bottom navigation */
.bottom-nav {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
    display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
}
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #94a3b8; font-size: .72rem; font-weight: 700; padding: 6px 0; }
.bn-item i { font-size: 23px; }
.bn-item.active { color: var(--primary); }
.bn-saldo { position: relative; top: -22px; }
.bn-saldo .circle {
    width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 22px rgba(37, 99, 235, .45); border: 5px solid #fff;
}
.bn-saldo span { margin-top: 4px; }
.bn-saldo.active span { color: var(--primary); }

/* Bottom sheet (konfirmasi order) */
.sheet-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 80; display: none; align-items: flex-end; justify-content: center; }
.sheet-bg.show { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: naik .22s ease-out; }
.sheet .grip { width: 44px; height: 5px; border-radius: 9px; background: #cbd5e1; margin: -8px auto 16px; }
@keyframes naik { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: .88rem; display: flex; gap: 10px; box-shadow: var(--shadow); }
.toast i { font-size: 20px; }
.toast-sukses { background: #ecfdf5; color: #047857; }
.toast-gagal { background: #fef2f2; color: #b91c1c; }
