:root {
  --bg: #0b1220;
  --bg2: #0e1628;
  --card: #131f36;
  --card2: #182742;
  --line: #22334f;
  --text: #e8eef7;
  --muted: #93a5bf;
  --accent: #38bdf8;
  --accent2: #2dd4bf;
  --grad: linear-gradient(120deg, #0ea5e9, #2dd4bf);
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 84px;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 14px 0 6px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(11,18,32,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text); }
.brand .dot { color: var(--accent2); }
.brand small { display: block; font-weight: 600; font-size: .62rem; letter-spacing: .14em; color: var(--muted); }
.brand-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--card2); display: grid; place-items: center; font-size: 1.15rem; }

.view { max-width: 560px; margin: 0 auto; padding: 18px 16px 30px; }
.view.wide { max-width: 860px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #04222b; font-weight: 700; border: none;
  border-radius: 999px; padding: 12px 22px; font-size: .95rem;
}
.btn.secondary { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #451a1a; color: #fecaca; border: 1px solid #7f1d1d; }
.btn.small { padding: 8px 16px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* hero + cards */
.hero {
  background: radial-gradient(120% 160% at 85% -10%, rgba(56,189,248,.35), transparent 55%),
              radial-gradient(100% 140% at 0% 110%, rgba(45,212,191,.22), transparent 55%),
              var(--card);
  border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px; margin-bottom: 18px;
}
.hero h1 { font-size: 1.9rem; line-height: 1.15; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 12px 0 18px; line-height: 1.55; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600;
  background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.35); color: #bae6fd;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h3 { font-size: 1rem; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.section-title { font-size: 1.15rem; font-weight: 800; margin: 22px 0 12px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { font-size: .85rem; font-weight: 600; }

/* service grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: left; color: var(--text); display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.logo-box {
  width: 46px; height: 46px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.logo-box img { width: 28px; height: 28px; }
.logo-box .mono { font-weight: 800; font-size: 1.05rem; }
.tile .tname { font-weight: 700; }
.tile .tsub { font-size: .78rem; color: var(--muted); }

/* rows */
.row-item {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px;
}
.row-item .grow { flex: 1; min-width: 0; }
.price { font-weight: 800; color: var(--accent2); white-space: nowrap; }
.chip {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.ok { color: var(--ok); border-color: rgba(52,211,153,.4); }
.chip.warn { color: var(--warn); border-color: rgba(251,191,36,.4); }
.chip.bad { color: var(--danger); border-color: rgba(248,113,113,.4); }

/* wallet + stats */
.wallet-pill {
  display: flex; align-items: center; gap: 10px; background: #0a0f1c; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 16px; font-weight: 800;
}
.wallet-pill .plus {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--grad);
  color: #04222b; font-size: 1.2rem; font-weight: 800; line-height: 1;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.stat .num { font-size: 1.25rem; font-weight: 800; }
.stat .lbl { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 6px; }
.quick button {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
  padding: 10px 2px; font-size: .68rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.quick button span { font-size: 1.15rem; }

/* bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(10,15,28,.97); border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: .66rem; font-weight: 600; padding: 6px 0; position: relative;
}
.bottomnav a .ico { font-size: 1.2rem; }
.bottomnav a.active { color: var(--accent); }
.bottomnav .badge {
  position: absolute; top: 0; right: calc(50% - 20px); background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 800; border-radius: 999px; padding: 1px 6px;
}

/* auth */
.auth-card { max-width: 420px; margin: 26px auto; }
.tabs { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; padding: 9px; border-radius: 999px; }
.tabs button.active { background: var(--grad); color: #04222b; }
.error-box {
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.4); color: #fecaca;
  border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px;
}
.ok-box {
  background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.4); color: #a7f3d0;
  border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px;
}

/* OTP code digits */
.digits { display: flex; gap: 7px; margin: 10px 0; }
.digits span {
  width: 42px; height: 52px; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800;
  background: var(--bg2); border: 1px solid var(--accent); border-radius: 12px; color: var(--accent2);
}
.phone-big { font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; }
.progress { height: 7px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress i { display: block; height: 100%; background: var(--grad); transition: width 1s linear; }

/* referral */
.ref-card {
  background: linear-gradient(140deg, #12233f, #0d2b2b); border: 1px solid var(--line);
  border-radius: 22px; padding: 24px 20px; text-align: center; margin-bottom: 14px;
}
.ref-code { font-size: 2.1rem; font-weight: 800; letter-spacing: .22em; margin: 8px 0 12px; }
.ref-highlight {
  background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.45); color: #99f6e4;
  border-radius: 14px; padding: 12px 14px; font-size: .9rem; line-height: 1.5;
}
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-row .btn { flex: 1; }

/* modal + toast */
.modal-back {
  position: fixed; inset: 0; background: rgba(3,6,12,.72); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px 22px 0 0;
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 22px 18px 26px;
}
@media (min-width: 640px) { .modal-back { align-items: center; padding: 18px; } .modal { border-radius: 22px; } }
.toast-root { position: fixed; bottom: 96px; left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); max-width: 92vw; text-align: center;
}
.toast.err { border-color: rgba(248,113,113,.55); color: #fecaca; }

.qris-img { width: 100%; max-width: 320px; border-radius: 14px; border: 1px solid var(--line); display: block; margin: 10px auto; background: #fff; }
.paycode { font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; text-align: center; padding: 12px; background: var(--bg2); border: 1px dashed var(--accent); border-radius: 14px; margin: 10px 0; word-break: break-all; }
table.admin { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.admin th, table.admin td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: middle; }
table.admin input { padding: 7px 9px; border-radius: 9px; }
.proof-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); line-height: 1.55; margin-top: 8px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(56,189,248,.3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #04222b;
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex: none;
}
.menu-list a {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; color: var(--text);
  border-bottom: 1px solid var(--line); font-weight: 600;
}
.menu-list a:last-child { border-bottom: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
