/* CEK.IN — design system mobile-first, vanilla CSS */
:root {
  --brand: #6c5ce7;
  --brand-dark: #5a4bd4;
  --brand-light: #eef0ff;
  --ink: #1e2233;
  --muted: #6b7280;
  --bg: #f7f7fb;
  --card: #ffffff;
  --line: #e7e8f0;
  --success: #00b894;
  --danger: #e17055;
  --warn: #fdcb6e;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(30, 34, 51, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* Layout */
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 18px 96px; }
.page { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Top bar */
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 247, 251, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .brand { font-weight: 800; font-size: 20px; letter-spacing: .4px; color: var(--ink); }
.topbar .brand b { color: var(--brand); }
.topbar .pill {
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-light); border-radius: 999px; padding: 6px 12px;
  border: 1px solid #d8d6ff;
}

/* Bottom nav */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; text-align: center; font-size: 11px; font-weight: 600;
  color: var(--muted); padding: 6px 2px; border-radius: 12px;
}
.bottomnav a .ico { font-size: 20px; display: block; margin-bottom: 2px; }
.bottomnav a.on { color: var(--brand); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #8b7cf7 60%, #a29bfe 100%);
  border-radius: 24px; color: #fff; padding: 28px 22px; margin-bottom: 22px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.12); top: -80px; right: -60px;
}
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: .3px; }
.hero p { margin-top: 8px; font-size: 14.5px; opacity: .92; max-width: 90%; }
.hero .cta {
  margin-top: 18px; background: #fff; color: var(--brand); border: none;
  font-weight: 800; font-size: 15px; border-radius: 999px; padding: 13px 22px;
  position: relative; z-index: 1;
}

/* Section */
.sec-title { font-size: 16px; font-weight: 800; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title small { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Grid cek */
.cek-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cek-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  color: var(--ink);
}
.cek-card .emoji { font-size: 34px; line-height: 1; }
.cek-card h3 { font-size: 14.5px; font-weight: 800; }
.cek-card .meta { font-size: 11.5px; color: var(--muted); }
.cek-card .bar { height: 6px; border-radius: 99px; background: #f0f0f6; overflow: hidden; }
.cek-card .bar i { display: block; height: 100%; border-radius: 99px; }

/* Card generik */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  margin-bottom: 14px;
}
.card h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.card p { font-size: 13.5px; color: var(--muted); }

/* Quiz */
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.quiz-progress .track { flex: 1; height: 8px; background: #ececf4; border-radius: 99px; overflow: hidden; }
.quiz-progress .track i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.quiz-progress .n { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.quiz-q { font-size: 21px; font-weight: 800; line-height: 1.35; margin-bottom: 22px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 15px 16px; margin-bottom: 10px; font-size: 14.5px; font-weight: 600;
  color: var(--ink); text-align: left; transition: border-color .15s, transform .1s;
}
.opt:active { transform: scale(.985); }
.opt.sel { border-color: var(--brand); background: var(--brand-light); }
.opt .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd2e0; flex-shrink: 0;
}
.opt.sel .dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 5px #fff; }

.input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 13px 14px; font-size: 15px; font-family: inherit; background: var(--card);
}
.input:focus { outline: none; border-color: var(--brand); }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 800; font-size: 15px;
  padding: 14px 22px; width: 100%; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-ghost { background: var(--brand-light); color: var(--brand); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

/* Result */
.result-hero {
  border-radius: 24px; color: #fff; padding: 26px 22px; text-align: center; margin-bottom: 16px;
}
.result-hero .emoji { font-size: 52px; margin-bottom: 6px; }
.result-hero h1 { font-size: 21px; font-weight: 800; letter-spacing: .2px; }
.result-hero .score {
  margin: 14px auto 0; width: 110px; height: 110px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.6); display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.result-hero .score b { font-size: 30px; }
.result-hero .score span { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: 1px; }

.tag { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 11px; margin: 3px 3px 3px 0; }

/* Lock premium */
.lock {
  text-align: center; padding: 24px 18px;
  background: linear-gradient(135deg, #fff 0%, var(--brand-light) 100%);
  border: 1.5px dashed #c9c3f5; border-radius: var(--radius);
}
.lock .ico { font-size: 38px; }
.lock h3 { font-size: 16px; margin: 8px 0 4px; }
.lock p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* Price list */
.price-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: none; }
.price-row .info { flex: 1; }
.price-row .info b { font-size: 14.5px; }
.price-row .info small { display: block; color: var(--muted); font-size: 12px; }
.price-row .harga { font-weight: 800; color: var(--brand); white-space: nowrap; }

/* Topup */
.nominal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nominal { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px 6px; font-weight: 800; font-size: 14px; color: var(--ink); }
.nominal.sel { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.qr-box { text-align: center; padding: 20px; }
.qr-box .num {
  font-size: 44px; font-weight: 900; letter-spacing: 4px; color: var(--brand); font-variant-numeric: tabular-nums;
}
.qr-box .total { font-size: 18px; font-weight: 800; margin-top: 8px; }
.countdown { font-size: 13px; font-weight: 700; color: var(--danger); }
.qr-box .qr-img { width: min(240px, 78%); border-radius: 16px; border: 1px solid var(--line); background: #fff; margin-top: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }

/* Admin */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; }
.stat b { font-size: 20px; display: block; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.stat small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.recon-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.recon-btn { width: auto; padding: 8px 12px; font-size: 12px; }
.recon-btn.sel { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }

/* Ledger */
.ledger-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: none; }
.ledger-row .ico { font-size: 22px; }
.ledger-row .info { flex: 1; }
.ledger-row .info b { font-size: 13.5px; }
.ledger-row .info small { color: var(--muted); font-size: 11.5px; display: block; }
.ledger-row .amt { font-weight: 800; }
.amt.plus { color: var(--success); }
.amt.minus { color: var(--danger); }

/* Toast */
#toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; z-index: 100; opacity: 0; pointer-events: none;
  transition: all .25s; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { background: linear-gradient(90deg, #eeeef5 25%, #f7f7fb 50%, #eeeef5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
