/* Nomor Virtual OTP v2 — tema dark navy ala Nokosindo:
   latar navy sangat gelap, kartu navy terang berbingkai halus,
   aksen biru → cyan, navigasi bawah 5 tab dengan tombol tengah menonjol. */
:root {
  --bg: #050c1d;
  --bg2: #0a1730;
  --card: #0c1a36;
  --card2: #12244a;
  --line: #1d3260;
  --text: #eaf1fd;
  --muted: #8fa5c8;
  --accent: #38bdf8;
  --accent2: #22d3ee;
  --blue: #2f7bff;
  --grad: linear-gradient(92deg, #2f7bff, #1fb6ff 55%, #22d3ee);
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 18px;
}
* { 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:
    radial-gradient(90% 40% at 85% -5%, rgba(47,123,255,.20), transparent 60%),
    radial-gradient(70% 34% at 0% 30%, rgba(34,211,238,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 96px;
}
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: 13px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input:disabled { opacity: .65; }
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;
  gap: 10px; padding: 12px 16px; background: rgba(5,12,29,.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.02rem; color: var(--text); min-width: 0; }
.brand .dot { color: var(--accent2); }
.brand-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--card2); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.brand-ico.big { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 13px; }

.view { max-width: 560px; margin: 0 auto; padding: 18px 16px 30px; }
.view.wide { max-width: 860px; }
.page-title { font-size: 1.45rem; font-weight: 800; margin: 2px 0 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; border: none;
  border-radius: 14px; padding: 12px 22px; font-size: .95rem;
  box-shadow: 0 6px 18px rgba(31,182,255,.25);
}
.btn.secondary { background: var(--card2); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: #451a1a; color: #fecaca; border: 1px solid #7f1d1d; box-shadow: none; }
.btn.small { padding: 8px 16px; font-size: .85rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* hero + cards */
.hero {
  background: radial-gradient(120% 160% at 85% -10%, rgba(47,123,255,.35), transparent 55%),
              radial-gradient(100% 140% at 0% 110%, rgba(34,211,238,.20), 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; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin-bottom: 0; }
.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: 13px; background: #fff;
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.logo-box img { width: 28px; height: 28px; object-fit: contain; }
.logo-box .mono { font-weight: 800; font-size: 1.05rem; color: #0f1c2e; }
.tile .tname { font-weight: 700; }
.tile .tsub { font-size: .78rem; color: var(--muted); }

/* grid aplikasi di halaman Beli: 3 kolom ala referensi */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.svc-tile { align-items: center; text-align: center; padding: 14px 8px; gap: 6px; }
.svc-tile .tname { font-size: .85rem; }
.svc-tile.sel { border-color: var(--accent); background: var(--card2); box-shadow: 0 0 0 1px var(--accent) inset; }

/* 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; }
.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 chip di topbar */
.wallet-chip {
  display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px;
}
.wallet-chip .wc-ico {
  width: 30px; height: 30px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-size: .95rem;
}
.wallet-chip .wc-txt { display: flex; flex-direction: column; line-height: 1.05; }
.wallet-chip .wc-txt b { color: var(--text); font-size: .92rem; }
.wallet-chip .wc-txt small { color: var(--accent2); font-size: .58rem; font-weight: 800; letter-spacing: .1em; }

/* statistik lama (landing) */
.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; }

/* beranda v2: sapaan + kartu statistik 2x2 */
.greet-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.greet-name { font-size: 1.35rem; font-weight: 800; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex: none;
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; }
.sc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sc-ico { font-size: 1rem; }
.sc-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .13em; color: var(--muted); }
.sc-num { font-size: 1.45rem; font-weight: 800; }
.sc-sub { font-size: .76rem; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; display: inline-block; flex: none; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: none; }
.tg-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* kartu pintu masuk Premium / Sosmed */
.entry-cards { display: grid; gap: 10px; margin-bottom: 14px; }
.entry-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; color: var(--text);
}
.entry-card:hover { border-color: var(--accent); }
.ec-ico {
  width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--card2);
  display: grid; place-items: center; font-size: 1.3rem;
}
.chev { color: var(--muted); font-size: 1.1rem; width: 14px; text-align: center; }

/* navigasi bawah 5 tab + tombol tengah menonjol */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(6,13,30,.97); border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: .64rem; font-weight: 600; padding: 6px 0 2px; position: relative;
}
.bottomnav a .ico { font-size: 1.25rem; line-height: 1; }
.bottomnav a.active { color: var(--accent); }
.bottomnav a.active .nlabel { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.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;
}
.bottomnav a.center { gap: 4px; }
.center-btn {
  width: 56px; height: 56px; border-radius: 50%; margin-top: -30px;
  background: var(--grad); display: grid; place-items: center; font-size: 1.45rem;
  border: 4px solid var(--bg); box-shadow: 0 8px 22px rgba(31,182,255,.45);
}
.bottomnav a.center.active { color: var(--accent); }

/* auth ala referensi: kartu besar, tab garis bawah */
.auth-wrap {
  max-width: 430px; margin: 14px auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 26px 22px 28px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; margin-bottom: 20px; }
.auth-brand .dot { color: var(--accent2); }
.auth-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.auth-tabs button {
  border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 1rem;
  padding: 10px 2px; margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.auth-tabs button.active { color: var(--accent2); border-bottom-color: var(--accent2); }
.auth-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.g-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f2937; font-weight: 700; border-radius: 12px;
  padding: 12px; text-decoration: none; border: 1px solid var(--line);
}
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-q {
  flex: 1.2; display: grid; place-items: center; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em;
}
.captcha-row input { flex: 1; }
.captcha-refresh {
  width: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2);
  color: var(--text); font-size: 1.15rem; cursor: pointer;
}

/* tabs pil (segmen) ala referensi */
.tabs { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 10px 0 16px; }
.tabs button { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; padding: 9px; border-radius: 999px; position: relative; }
.tabs button.active { background: var(--grad); color: #fff; }
.tab-badge { position: absolute; top: -9px; right: 14px; background: #fbbf24; color: #291a02; font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.seg-tabs { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg-tabs button { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; padding: 10px; border-radius: 999px; }
.seg-tabs button.active { background: linear-gradient(92deg, #2563eb, #1d7cff); color: #fff; }

.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;
}
.notice {
  background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.4); color: #bae6fd;
  border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px;
}

/* beli nomor: pill server + daftar harga bernomor */
.server-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 10px; }
.srv-pill {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 14px;
  padding: 11px 8px; display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.srv-pill span { font-size: .72rem; color: var(--muted); }
.srv-pill.active { background: linear-gradient(92deg, #2563eb, #1d7cff); border-color: transparent; color: #fff; }
.srv-pill.active span { color: #dbeafe; }
.price-list { display: grid; gap: 8px; }
.price-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; color: var(--text);
}
.price-row:hover:not(:disabled) { border-color: var(--accent); }
.price-row:disabled { opacity: .5; cursor: not-allowed; }
.pr-num {
  width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--card2);
  display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--accent);
}
.pr-badge {
  font-size: .64rem; font-weight: 800; letter-spacing: .03em; color: #67e8f9;
  background: rgba(34,211,238,.14); border: 1px solid rgba(34,211,238,.4);
  padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
}
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.sum-row .neg { color: var(--danger); }

/* top up: kartu saldo + grid nominal */
.saldo-card { background: linear-gradient(150deg, #0e2150, var(--card) 65%); }
.saldo-num { font-size: 2rem; font-weight: 800; margin: 6px 0 4px; }
.saldo-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.saldo-meta > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.nominal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.nom-btn {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 13px;
  padding: 14px 8px; font-weight: 700; cursor: pointer; width: 100%;
}
.nom-btn.active { background: linear-gradient(92deg, #2563eb, #1d7cff); border-color: transparent; color: #fff; }

/* riwayat: keadaan kosong */
.hist-empty { text-align: center; padding: 34px 18px; }
.hist-empty .he-ico { font-size: 2.2rem; margin-bottom: 10px; }
.hist-empty p { margin-bottom: 16px; }
.hist-empty .btn { margin: 0 auto; }

/* profil ala referensi */
.profile-head { text-align: center; padding: 10px 6px 18px; }
.avatar-big {
  width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.3rem; font-weight: 800; color: #fff;
  background: var(--grad); box-shadow: 0 0 34px rgba(56,189,248,.4);
}
.profile-name { font-size: 1.5rem; margin: 4px 0 2px; }
.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; }
.menu-list a.logout-link { color: var(--danger); }

/* 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, #122a52, #0a2e3a); 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(34,211,238,.12); border: 1px solid rgba(34,211,238,.45); color: #a5f3fc;
  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(2,5,12,.74); 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: 108px; 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; }
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); } }

/* kartu negara/paket (premium & sosmed) */
.country-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.country-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: var(--text); padding: 14px 16px; cursor: pointer; font: inherit; }
.country-head .price { font-size: 1.05rem; }

.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  z-index: 60;
  transition: transform .15s ease;
}
.wa-float:active { transform: scale(.93); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
