/* ==========================================================================
   JagoBayar — design system
   ========================================================================== */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --canvas: #F3F3EF;
  --surface: #FFFFFF;
  --surface-2: #F8F8F5;
  --ink: #0F1412;
  --ink-2: #39413D;
  --soft: #636B67;
  --line: #E3E3DD;
  --line-2: #EDEDE8;
  --accent: #0D7A57;
  --accent-h: #0A684A;
  --accent-soft: #E3F1EA;
  --accent-ink: #FFFFFF;
  --warn: #9A5A06; --warn-bg: #FBF1DC;
  --bad: #B3261E;  --bad-bg: #FBEAE8;
  --info: #24527A; --info-bg: #E8F0F7;
  --d-canvas: #0D1210; --d-surface: #151B18; --d-line: #26302B;
  --d-ink: #ECEEE9; --d-soft: #9AA49F; --d-accent: #45D69B;

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 26px;
  --e1: 0 1px 2px rgba(15, 26, 20, .06);
  --e2: 0 1px 2px rgba(15, 26, 20, .04), 0 8px 24px -8px rgba(15, 26, 20, .14);
  --e3: 0 2px 6px rgba(15, 26, 20, .06), 0 24px 60px -16px rgba(15, 26, 20, .28);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--canvas);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.022em; font-weight: 650; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.soft { color: var(--soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 20px; }
.ic { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- Buttons ---------------- */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: 10px; height: 40px; padding: 0 16px;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--accent-h); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--e1); }
.btn.secondary:hover { background: var(--surface-2); border-color: #D5D5CE; }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: rgba(15, 20, 18, .05); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #EBC9C5; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.solid-danger { background: var(--bad); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }

/* ---------------- Forms ---------------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, textarea, select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 42px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9AA19D; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 122, 87, .15); }
input:disabled { background: var(--surface-2); color: var(--soft); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.input-row { display: flex; gap: 8px; }
.input-row > input, .input-row > select { flex: 1; min-width: 0; }
.error { color: var(--bad); font-size: 13px; min-height: 0; }
.error:empty { display: none; }
.mono-input { font-family: var(--mono); font-size: 13px; }

/* ---------------- Surfaces ---------------- */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--e1); }
.card.pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.card-head h2, .card.pad > h2 { font-size: 16px; letter-spacing: -.01em; }
.card.pad > h2 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--line-2); border: 0; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid, .pill.ok, .pill.valid { background: var(--accent-soft); color: var(--accent); }
.pill.pending, .pill.warn, .pill.none { background: var(--warn-bg); color: var(--warn); }
.pill.expired, .pill.muted { background: var(--line-2); color: var(--soft); }
.pill.cancelled, .pill.bad, .pill.invalid, .pill.error { background: var(--bad-bg); color: var(--bad); }
.pill.test { background: #EEEAF7; color: #5B4B8A; }
.pill.plain::before { display: none; }

.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; }
.banner .ic { width: 18px; height: 18px; }
.banner.info { background: var(--info-bg); color: var(--info); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.banner.ok { background: var(--accent-soft); color: var(--accent); }
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }

.secret { display: flex; gap: 8px; align-items: center; background: var(--d-canvas); color: var(--d-ink); border-radius: 10px; padding: 10px 10px 10px 14px; font-family: var(--mono); font-size: 12.5px; }
.secret span { flex: 1; word-break: break-all; }
.secret .btn { background: var(--d-surface); color: var(--d-ink); border-color: var(--d-line); }

.empty { text-align: center; color: var(--soft); padding: 40px 16px; font-size: 14px; }

/* ---------------- Toast & sheet ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px);
  background: var(--ink); color: var(--canvas); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  z-index: 200; opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); box-shadow: var(--e3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet-bg { position: fixed; inset: 0; background: rgba(13, 18, 16, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .18s var(--ease); }
.sheet { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--e3); padding: 24px; animation: rise .24s var(--ease); }
.sheet h3 { font-size: 18px; margin-bottom: 16px; }
.sheet .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.sheet .grab { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------------- Brand ---------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--canvas); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }

/* ==========================================================================
   Landing
   ========================================================================== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.nav.solid { background: rgba(243, 243, 239, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.link { color: var(--ink-2); font-weight: 550; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.nav-links a.link:hover { background: rgba(15, 20, 18, .05); text-decoration: none; }
.nav-toggle { display: none; }
.mnav { position: fixed; inset: 0; z-index: 60; background: var(--canvas); padding: 20px var(--gutter); display: flex; flex-direction: column; gap: 6px; animation: fade .18s var(--ease); }
.mnav .row.between { height: 48px; margin-bottom: 20px; }
.mnav a.big { font-size: 28px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); padding: 8px 0; }
.mnav .btns { margin-top: auto; display: grid; gap: 10px; padding-bottom: env(safe-area-inset-bottom); }

.hero { padding: 132px 0 72px; position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -.035em; max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); margin-top: 20px; max-width: 34ch; }
.hero .cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.hero-art { position: relative; height: 560px; }
.hero-grid-bg { position: absolute; inset: -40px -20vw -40px -10%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(closest-side, #000 30%, transparent); -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); opacity: .7; }

/* Phone */
.phone { position: absolute; width: 290px; height: 590px; border-radius: 46px; background: #121614; padding: 11px; box-shadow: var(--e3), inset 0 0 0 1.5px #2E3632; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--surface); }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 88px; height: 24px; border-radius: 20px; background: #121614; z-index: 3; }
.hero .phone { right: 8%; top: 0; transform: translateY(calc(var(--py, 0) * -40px)) rotate(-2deg); }
.ps { position: absolute; inset: 0; padding: 54px 20px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.ps-merchant { font-weight: 700; font-size: 15px; }
.ps-desc { color: var(--soft); font-size: 12px; margin-top: 2px; }
.ps-qr { margin-top: 18px; width: 196px; height: 196px; border: 1px solid var(--line); border-radius: 18px; padding: 10px; position: relative; overflow: hidden; background: #fff; }
.ps-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.ps-scan { position: absolute; left: 0; right: 0; height: 36px; top: -36px; background: linear-gradient(transparent, rgba(13, 122, 87, .35)); border-bottom: 2px solid var(--accent); opacity: 0; }
.ps-total { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 16px; }
.ps-status { margin-top: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--soft); }
.ps-paid { position: absolute; inset: 54px 20px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transform: scale(.95); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.ps-check { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.ps-check svg { width: 38px; height: 38px; stroke: var(--accent-ink); stroke-width: 2.4; fill: none; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .5s .15s var(--ease); }
.ps-chat { position: absolute; left: 16px; right: 16px; bottom: 22px; background: #E7F6EE; border-radius: 16px 16px 16px 4px; padding: 10px 12px; text-align: left; font-size: 12.5px; opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.ps-chat b { display: block; font-size: 11px; color: var(--accent); margin-bottom: 2px; }
.phone[data-state="scan"] .ps-scan { opacity: 1; animation: scan 1.6s var(--ease) infinite; }
@keyframes scan { 0% { top: -36px; } 100% { top: 100%; } }
.phone[data-state="paid"] .ps, .phone[data-state="hook"] .ps { opacity: 0; transform: scale(.96); }
.phone[data-state="paid"] .ps-paid, .phone[data-state="hook"] .ps-paid { opacity: 1; transform: none; }
.phone[data-state="paid"] .ps-check svg, .phone[data-state="hook"] .ps-check svg { stroke-dashoffset: 0; }
.phone[data-state="hook"] .ps-chat { opacity: 1; transform: none; }
.phone[data-state="hook"] .ps-paid { transform: translateY(-46px); }

.float-card { position: absolute; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--e2); padding: 14px 16px; font-size: 13px; }
.float-card .k { color: var(--soft); font-size: 12px; }
.float-card .v { font-weight: 700; font-size: 15px; }
.hero .fc-1 { left: 0; top: 96px; transform: translateY(calc(var(--py, 0) * -90px)); }
.hero .fc-2 { left: 6%; bottom: 70px; transform: translateY(calc(var(--py, 0) * -20px)); display: flex; gap: 10px; align-items: center; }
.fc-2 .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -.03em; }
.section-head p { color: var(--ink-2); font-size: 17px; margin-top: 14px; }

/* How it works (pinned) */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.how-steps { display: grid; }
.how-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .4s var(--ease); }
.how-step.on { opacity: 1; }
.how-step .tag { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 14px; }
.how-step h3 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.028em; }
.how-step p { color: var(--ink-2); font-size: 17px; margin-top: 12px; max-width: 38ch; }
.how-step pre { margin-top: 18px; }
.how-stage { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; }
.how-stage .phone { position: relative; transform: none; }

/* Why */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.why h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.034em; position: sticky; top: 110px; }
.why-list { display: grid; }
.why-item { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 26px 0; border-top: 1px solid var(--line); }
.why-item:last-child { border-bottom: 1px solid var(--line); }
.why-item .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--e1); display: grid; place-items: center; color: var(--accent); }
.why-item h3 { font-size: 19px; letter-spacing: -.015em; }
.why-item p { color: var(--ink-2); margin-top: 6px; }

/* Developer (dark) */
.dark { background: var(--d-canvas); color: var(--d-ink); }
.dark .section-head p, .dark p { color: var(--d-soft); }
.dev { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.dev h2 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.03em; }
.dev ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.dev li { display: flex; gap: 12px; align-items: center; color: var(--d-ink); }
.dev li code { color: var(--d-accent); }
.dev .btn.secondary { background: transparent; color: var(--d-ink); border-color: var(--d-line); box-shadow: none; }
.dev .btn.secondary:hover { background: var(--d-surface); }
.code { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.code-tabs { display: flex; gap: 2px; padding: 10px 10px 0; border-bottom: 1px solid var(--d-line); overflow-x: auto; }
.code-tabs button { border: 0; background: none; color: var(--d-soft); font: inherit; font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 8px 8px 0 0; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.code-tabs button.on { color: var(--d-ink); border-bottom-color: var(--d-accent); }
pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; }
.code pre { padding: 20px 22px; color: #CFD6D2; min-height: 300px; }
pre .k { color: #7FD9B0; } pre .s { color: #E8C98A; } pre .c { color: #6F7A75; }
.how-step pre { background: var(--d-canvas); color: #CFD6D2; padding: 14px 16px; border-radius: 12px; font-size: 12.5px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--e1); display: flex; flex-direction: column; }
.plan h3 { font-size: 17px; }
.plan .price { font-size: 40px; font-weight: 700; letter-spacing: -.035em; margin-top: 18px; }
.plan .per { color: var(--soft); font-size: 14px; }
.plan .btn { margin-top: 28px; }
.plan.featured { background: var(--d-canvas); color: var(--d-ink); border-color: var(--d-canvas); box-shadow: var(--e3); }
.plan.featured .per { color: var(--d-soft); }
.plan.featured .btn { background: var(--d-accent); color: var(--d-canvas); }
.plan-feats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 10px; color: var(--ink-2); font-size: 14px; }
.plan-feats li { display: flex; gap: 10px; align-items: center; }
.plan-feats .ic { color: var(--accent); width: 16px; height: 16px; }

/* Close */
.close { text-align: center; padding: clamp(80px, 12vw, 150px) 0; }
.close h2 { font-size: clamp(36px, 5.4vw, 64px); letter-spacing: -.035em; max-width: 14ch; margin: 0 auto; }
.close .btn { margin-top: 36px; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--soft); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); }

/* Reveal */
[data-in] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
[data-in].in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero { padding-top: 108px; }
  .hero-grid, .why, .dev { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { height: 480px; }
  .hero .phone { right: auto; left: 50%; margin-left: -145px; transform: scale(.82) rotate(-2deg); transform-origin: top center; }
  .hero .fc-1 { left: 0; top: 40px; } .hero .fc-2 { left: auto; right: 0; bottom: 30px; }
  .why h2 { position: static; }
  .how { grid-template-columns: 1fr; gap: 0; }
  .how-stage { order: -1; top: 68px; height: auto; padding: 8px 0 12px; background: linear-gradient(var(--canvas) 85%, transparent); z-index: 2; }
  .how-stage .phone { width: 190px; height: 386px; border-radius: 32px; padding: 7px; }
  .how-stage .phone-screen { border-radius: 26px; }
  .how-stage .ps, .how-stage .ps-paid { padding-top: 40px; transform-origin: top center; }
  .how-stage .ps-qr { width: 128px; height: 128px; margin-top: 10px; }
  .how-stage .ps-total { font-size: 20px; margin-top: 8px; }
  .how-stage .ps-check { width: 52px; height: 52px; }
  .how-stage .ps-chat { font-size: 11px; }
  .how-step { min-height: 56vh; }
  .plans { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .plans::-webkit-scrollbar { display: none; }
  .plan { scroll-snap-align: center; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero h1 { font-size: 42px; }
  .hero-art { height: 430px; }
  .float-card { font-size: 12px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-in] { transform: none; transition: opacity .4s linear; }
  .hero .phone, .hero .fc-1, .hero .fc-2 { transform: none !important; }
  .phone[data-state="scan"] .ps-scan { animation: none; top: 40%; }
}

/* ==========================================================================
   Auth
   ========================================================================== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--d-canvas); color: var(--d-ink); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .brand { color: var(--d-ink); }
.auth-side .brand-mark { background: var(--d-accent); color: #06130D; }
.auth-side h2 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.032em; max-width: 13ch; }
.auth-side .glow { position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; border: 1px solid var(--d-line); box-shadow: 0 0 0 60px rgba(69, 214, 155, .03), 0 0 0 130px rgba(69, 214, 155, .02); }
.auth-main { display: grid; place-items: center; padding: 32px var(--gutter); }
.auth-form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.auth-form h1 { font-size: 30px; letter-spacing: -.03em; margin-bottom: 4px; }
.auth-form .alt { text-align: center; font-size: 14px; color: var(--soft); }
.auth-form .mobile-brand { display: none; margin-bottom: 20px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { place-items: start center; padding-top: 56px; }
  .auth-form .mobile-brand { display: inline-flex; }
}

/* ==========================================================================
   App (dashboard)
   ========================================================================== */
.app { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--surface-2); padding: 22px 18px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.side .brand { padding: 4px 10px 24px; font-size: 18px; }
.nav-item { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 14px; border-radius: 11px; color: var(--ink-2); font-weight: 550; font-size: 14.5px; }
.nav-item:hover { background: rgba(15, 20, 18, .05); text-decoration: none; }
.nav-item.on { background: var(--surface); color: var(--ink); box-shadow: var(--e1); border: 1px solid var(--line-2); }
.nav-item.on .ic { color: var(--accent); }
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--soft); }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px; background: rgba(243, 243, 239, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 19px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { padding: 28px; max-width: 1180px; display: grid; gap: 20px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; height: 30px; padding: 0 12px; border-radius: 8px; color: var(--soft); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--e1); }
.seg button.on.test { color: #5B4B8A; }
.tabbar { display: none; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 20px; }
.stat .k { font-size: 13px; color: var(--soft); font-weight: 550; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.accent { background: var(--d-canvas); border-color: var(--d-canvas); }
.stat.accent .k { color: var(--d-soft); } .stat.accent .v { color: var(--d-ink); }
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.split.eq { grid-template-columns: 1fr 1fr; }

.chart { height: 200px; display: flex; align-items: flex-end; gap: 6px; padding: 0 22px 18px; }
.chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.chart .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart .bar { width: 40%; max-width: 14px; border-radius: 4px 4px 2px 2px; min-height: 3px; background: var(--line); }
.chart .bar.p { background: var(--accent); }
.chart .lbl { font-size: 11px; color: var(--soft); font-variant-numeric: tabular-nums; height: 14px; }

.checks { padding: 0 22px 10px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.check-item:hover { text-decoration: none; }
.check-item .dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex-shrink: 0; color: var(--accent-ink); }
.check-item.done .dot { background: var(--accent); border-color: var(--accent); }
.check-item.done .t { color: var(--soft); }
.check-item .t { flex: 1; font-weight: 550; font-size: 14px; }
.check-item .ic.go { color: var(--soft); }
.status-row { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--line-2); font-size: 14px; }
.status-row .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); }
.status-row .t { flex: 1; font-weight: 600; }

/* list (responsive table) */
.list { display: grid; }
.list-head, .li { display: grid; grid-template-columns: minmax(0, 1fr) 140px 130px 120px; gap: 16px; align-items: center; padding: 0 22px; }
.list-head { height: 40px; font-size: 12px; font-weight: 600; color: var(--soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.li { min-height: 64px; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background-color .12s var(--ease); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li .main-t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .main-s { font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.li .time { color: var(--soft); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.list-head .r { text-align: right; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; min-width: 160px; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; color: var(--soft); height: 48px; padding: 0 10px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button span { margin-left: 6px; font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--soft); }

/* project */
.proj-rows { display: grid; }
.proj-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 12px 16px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line-2); font-size: 14px; }
.proj-row > span:first-child { color: var(--soft); font-weight: 550; }
.proj-row code { background: var(--surface-2); border: 1px solid var(--line-2); padding: 5px 9px; border-radius: 8px; font-size: 12.5px; }
.proj-row .input-row { grid-column: 2 / 4; }

.plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan-card { padding: 22px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 4px; }
.plan-card .price { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 10px; }
.plan-card .btn { margin-top: 18px; }

.form-grid { display: grid; gap: 16px; }
.plans-edit { display: grid; gap: 10px; }
.plans-edit .pe { display: grid; grid-template-columns: 1fr 1.4fr 1fr .7fr auto; gap: 8px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } .split, .split.eq { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 0 16px; height: 58px; }
  .top h1 { font-size: 18px; }
  .page { padding: 16px 14px calc(92px + env(safe-area-inset-bottom)); gap: 14px; }
  .card.pad { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 21px; }
  .stats { gap: 10px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 600; color: var(--soft); background: none; border: 0; padding: 6px 0; border-radius: 10px; cursor: pointer; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar .on { color: var(--accent); }
  .list-head { display: none; }
  .li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m a" "s t"; gap: 4px 12px; padding: 12px 16px; }
  .li > :nth-child(1) { grid-area: m; } .li > :nth-child(2) { grid-area: a; } .li > :nth-child(3) { grid-area: s; } .li > :nth-child(4) { grid-area: t; }
  .li .main-s { display: none; }
  .toolbar { padding: 12px 14px; }
  .toolbar input[type=search] { max-width: none; flex: 1 1 100%; }
  .toolbar select { flex: 1; }
  .pager { padding: 12px 16px; }
  .proj-row { grid-template-columns: 1fr auto; padding: 12px 18px; }
  .proj-row > span:first-child { grid-column: 1 / -1; font-size: 13px; }
  .proj-row .input-row { grid-column: 1 / -1; }
  .chart { padding: 0 14px 14px; gap: 3px; }
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-radius: 22px 22px 0 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); animation: up .28s var(--ease); }
  .sheet .grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 16px; }
  .sheet .actions { flex-direction: column-reverse; }
  .sheet .actions .btn { width: 100%; height: 46px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; font-size: 13px; }
  .plans-edit .pe { grid-template-columns: 1fr 1fr; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@keyframes up { from { transform: translateY(100%); } }

/* ==========================================================================
   Checkout
   ========================================================================== */
.pay { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); }
.pay-card { width: 100%; max-width: 400px; padding: 28px 24px; text-align: center; border-radius: var(--r-xl); box-shadow: var(--e2); }
.pay-top { width: 100%; max-width: 400px; display: flex; justify-content: center; margin-bottom: 18px; }
.pay-card h1 { font-size: 20px; letter-spacing: -.02em; }
.pay-card .desc { color: var(--soft); font-size: 14px; margin-top: 4px; }
.pay-qr { margin: 22px auto 0; width: 248px; height: 248px; border: 1px solid var(--line); border-radius: 20px; padding: 12px; background: #fff; }
.pay-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.pay-total { font-size: 34px; font-weight: 700; letter-spacing: -.035em; margin-top: 20px; font-variant-numeric: tabular-nums; }
.pay-exact { margin-top: 14px; }
.pay-meta { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--soft); }
.pay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.big-check { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 4px auto 18px; }
.big-check .ic { width: 36px; height: 36px; stroke-width: 2.4; }
.big-x { background: var(--line-2); color: var(--soft); }

/* ==========================================================================
   Docs
   ========================================================================== */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; padding: 110px 0 80px; }
.docs aside { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; }
.docs aside a { color: var(--soft); font-size: 14px; font-weight: 550; padding: 6px 10px; border-radius: 8px; }
.docs aside a:hover { background: rgba(15, 20, 18, .05); color: var(--ink); text-decoration: none; }
.docs article { max-width: 760px; }
.docs article h1 { font-size: 38px; letter-spacing: -.03em; }
.docs article h2 { font-size: 24px; margin: 52px 0 12px; scroll-margin-top: 90px; }
.docs article p, .docs article li { color: var(--ink-2); }
.docs article p + p, .docs article p + pre, .docs article pre + p, .docs .ep + pre, .docs table + pre { margin-top: 14px; }
.docs ul, .docs ol { padding-left: 20px; display: grid; gap: 6px; }
.docs pre { background: var(--d-canvas); color: #CFD6D2; padding: 18px 20px; border-radius: 14px; font-size: 12.5px; }
.docs :not(pre) > code { background: var(--surface); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 6px; }
.docs table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--e1); }
.docs th, .docs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.docs th { font-size: 12px; color: var(--soft); background: var(--surface-2); }
.ep { display: inline-flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 14px; background: var(--surface); border: 1px solid var(--line-2); padding: 8px 12px; border-radius: 10px; margin-bottom: 4px; }
.ep b { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.ep b.post { background: var(--d-canvas); color: var(--d-accent); }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; padding-top: 90px; gap: 20px; }
  .docs aside { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; scrollbar-width: none; }
  .docs aside a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line-2); }
  .docs article h1 { font-size: 30px; }
}

/* 404 */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.nf h1 { font-size: 34px; margin: 18px 0 20px; }
.mt-dev { margin-top: 16px; font-size: 17px; }
.cta-dev { margin-top: 32px; }
.dev ul .ic { color: var(--d-accent); }
.plan.featured .plan-feats { color: var(--d-soft); }
.plan.featured .plan-feats .ic { color: var(--d-accent); }
.mt-ret { margin-top: 22px; }
.card-body { padding: 0 22px 22px; }
.plan-now { font-size: 22px; margin-top: 2px; }
button.nav-item { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.sheet .stack .nav-item { height: 48px; font-size: 15px; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--soft); }
details[open] summary::after { content: "−"; }
details ol { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 860px) { .card-body { padding: 0 18px 18px; } }
@media (hover: hover) and (pointer: fine) { .plan { transition: transform .2s var(--ease), box-shadow .2s var(--ease); } .plan:hover { transform: translateY(-3px); box-shadow: var(--e2); } }
/* Cegah konten lebar (tab, kode, tabel) melebarkan halaman di HP */
.page > *, .stack > *, .stack-lg > *, .split > *, .hero-grid > *, .how > *, .why > *, .dev > *, .docs > * { min-width: 0; }
html, body { overflow-x: clip; }
.float-card { z-index: 2; }
@media (max-width: 720px) {
  .hero .fc-1 { left: auto; right: 0; top: 24px; }
  .hero .fc-2 { left: 0; right: auto; bottom: 40px; }
}
@media (min-width: 861px) { .app { background: linear-gradient(to right, var(--surface-2) 248px, var(--canvas) 248px); } }
.small { font-size: 13px; }

/* ==========================================================================
   Tema gelap
   ========================================================================== */
[data-theme="dark"] {
  --canvas: #0D1210; --surface: #151B18; --surface-2: #1A221E;
  --ink: #ECEEE9; --ink-2: #C4CBC6; --soft: #8B938E;
  --line: #28322C; --line-2: #222B26;
  --accent: #45D69B; --accent-h: #5CE0AA; --accent-soft: #15352A; --accent-ink: #06130D;
  --warn: #E3B266; --warn-bg: #2A2212; --bad: #F2887F; --bad-bg: #2C1917; --info: #8FB7DD; --info-bg: #132130;
  --e1: 0 1px 2px rgba(0,0,0,.4);
  --e2: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.6);
  --e3: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px -16px rgba(0,0,0,.72);
}
[data-theme="dark"] .nav.solid { background: rgba(13,18,16,.85); box-shadow: 0 1px 0 var(--line); }
[data-theme="dark"] .top { background: rgba(13,18,16,.9); }
[data-theme="dark"] .mnav { background: var(--canvas); }
[data-theme="dark"] .hero-grid-bg { opacity: .22; }
[data-theme="dark"] .stat.accent { background: var(--accent-soft); border-color: var(--accent-soft); }
[data-theme="dark"] .stat.accent .v { color: var(--accent); }
[data-theme="dark"] .stat.accent .k { color: var(--ink-2); }
[data-theme="dark"] .plan.featured { border-color: var(--accent); }
[data-theme="dark"] .pay-qr, [data-theme="dark"] .ps-qr { background: #fff; }
[data-theme="dark"] img.inv-none { }

/* ==========================================================================
   Sidebar: kategori + auto-hide
   ========================================================================== */
.side .nav-scroll { display: flex; flex-direction: column; gap: 7px; overflow-y: auto; }
.side .grp { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); padding: 20px 12px 8px; }
.side .nav-scroll > .grp:first-child { padding-top: 2px; }
.side-peek { display: none; }
@media (min-width: 861px) {
  .app { transition: grid-template-columns .25s var(--ease); }
  .app .side { transition: transform .25s var(--ease); }
  .app.side-auto-hidden { grid-template-columns: 0 1fr; }
  .app.side-auto-hidden .side { transform: translateX(-100%); }
  .side-peek { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 16px; z-index: 30; }
  .app.side-auto-hidden ~ .side-peek, body:has(.app.side-auto-hidden) .side-peek { background: linear-gradient(90deg, rgba(13,122,87,.14), transparent); }
}

/* ==========================================================================
   Project accordion
   ========================================================================== */
.proj-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; padding: 16px 22px; color: var(--ink); text-align: left; }
.proj-toggle h2 { font-size: 16px; }
.proj-toggle .meta { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 13px; }
.proj-toggle .chev { transition: transform .2s var(--ease); color: var(--soft); }
.proj-card.open .proj-toggle .chev { transform: rotate(90deg); }
.proj-body { display: none; border-top: 1px solid var(--line-2); }
.proj-card.open .proj-body { display: block; }
@media (max-width: 860px) { .proj-toggle { padding: 14px 18px; } }

/* QRIS status menetap */
.qris-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.qris-status.ok { background: var(--accent-soft); color: var(--accent); }
.qris-status.busy { background: var(--surface-2); color: var(--soft); }
.qris-status.bad { background: var(--bad-bg); color: var(--bad); }
.qris-drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--soft); font-size: 13px; transition: border-color .15s, background-color .15s; }
.qris-drop.hot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Trial countdown */
.countdown { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.cd-box { background: var(--ink); color: var(--surface); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
[data-theme="dark"] .cd-box { background: var(--accent-soft); color: var(--accent); }

/* FAQ landing */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.faq-q { width: 100%; background: none; border: 0; font: inherit; font-weight: 600; font-size: 16px; color: var(--ink); text-align: left; padding: 18px 20px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-q .ic { color: var(--soft); transition: transform .2s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s var(--ease); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 20px 18px; color: var(--ink-2); }

/* FAQ chat (dashboard) */
.chat-faq { display: grid; gap: 14px; max-width: 620px; }
.bubble { max-width: 85%; padding: 12px 15px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.bubble.q { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bubble.a { justify-self: start; background: var(--surface); border: 1px solid var(--line-2); border-bottom-left-radius: 5px; }
.chat-qs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chat-qs button { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink); cursor: pointer; }
.chat-qs button:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn .ic { width: 18px; height: 18px; }
.proj-head { display: flex; align-items: center; gap: 8px; padding-right: 14px; }
.proj-head .proj-toggle { flex: 1; }
.proj-menu { flex-shrink: 0; }
@media (max-width: 860px) { .proj-head { flex-wrap: wrap; } .proj-menu { padding: 0 18px 12px; } }
.mt8 { margin-top: 8px; }
.nav-mobile-right { display: none; }
@media (max-width: 720px) { .nav-mobile-right { display: flex; gap: 8px; } }
#theme-slot .theme-btn { margin: 0 4px; }

/* Batch 2: nominal, promo, harga coret */
.form-grid.two { grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid.two { grid-template-columns: 1fr; } }
.plans-edit .pe { grid-template-columns: .8fr 1.2fr 1fr 1fr .8fr auto; }
@media (max-width: 860px) { .plans-edit .pe { grid-template-columns: 1fr 1fr; } }
.price-wrap { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.price-strike { color: var(--soft); text-decoration: line-through; font-size: 16px; }
.price-wrap .price { margin-top: 0; }
.ok-text { color: var(--accent); } .bad-text { color: var(--bad); }
.pill.ok.plain { align-self: flex-start; margin-top: 4px; }

/* Batch 3: legal / rich text / tutorial / avatar */
.legal { padding: 108px 0 80px; max-width: 760px; }
.rich { color: var(--ink-2); line-height: 1.7; }
.rich h3 { font-size: 24px; color: var(--ink); margin: 24px 0 10px; }
.rich h4 { font-size: 18px; color: var(--ink); margin: 20px 0 8px; }
.rich p { margin: 0 0 12px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-left: 22px; }
.rich a { color: var(--accent); }
.rich blockquote { border-left: 3px solid var(--line); margin: 0 0 12px; padding: 4px 0 4px 14px; color: var(--soft); }

/* Batch 3: rich editor, avatar, tutorial */
.rt { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rt-bar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); flex-wrap: wrap; }
.rt-bar .btn { width: 36px; height: 30px; padding: 0; }
.rt-u { font-weight: 700; text-decoration: underline; }
.rt-area { min-height: 120px; padding: 12px 14px; outline: none; background: var(--surface); white-space: pre-wrap; word-break: break-word; }
.rt-area:focus { box-shadow: inset 0 0 0 2px rgba(13,122,87,.15); }
.rt-area:empty::before { content: attr(data-ph); color: var(--soft); pointer-events: none; }
.rt-area > :first-child { margin-top: 0; }
.rt-area > :last-child { margin-bottom: 0; }

.avatar-img { object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; font-size: 30px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex-shrink: 0; }
img.avatar-lg { object-fit: cover; }
.avatar-row { gap: 20px; align-items: center; flex-wrap: nowrap; }
.avatar-edit { flex-shrink: 0; }

.mod-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 14px; font-weight: 550; color: var(--ink); cursor: pointer; }
.mod-item:hover { border-color: var(--accent); }
.mod-item > .ic:last-child { color: var(--soft); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.vid-card { position: relative; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.vid-thumb { width: 100%; aspect-ratio: 16/9; min-height: 120px; object-fit: cover; display: block; background: var(--surface-2); border-radius: 12px; }
.vid-play { position: absolute; top: calc(50% - 14px); left: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(13,18,16,.72); display: grid; place-items: center; }
.vid-play .ic { color: #fff; fill: #fff; width: 22px; height: 22px; }
.vid-title { display: block; padding: 8px 2px 0; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; }
.vid-embed { aspect-ratio: 16/9; width: 100%; }
.vid-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.tut-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; flex-wrap: wrap; }
.tut-row > .ic { flex-shrink: 0; }
.tut-row .grow { min-width: 120px; font-weight: 550; }
.tut-row code { font-size: 12px; }
.tut-row .row { margin-left: auto; }
.grp-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); margin-top: 12px; }
.sheet .vid-embed { margin: 0; }
.legal .rich a, .rich a { color: var(--accent); }

/* ====================== Batch 4: branding, bahasa, OAuth ====================== */
.brand-mark.brand-mark-img { background: none !important; box-shadow: none; }
.brand-mark.brand-mark-img img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }

.head-tools { display: inline-flex; align-items: center; gap: 8px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1;
}
.lang-btn:hover { background: var(--surface-2); }
.lang-btn svg { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); display: block; }

.auth-head-tools { position: absolute; top: 20px; right: 20px; z-index: 3; }
.auth-main { position: relative; }

#oauth:empty { display: none; }
.oauth-row { display: flex; gap: 10px; }
.oauth-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.oauth-btn:hover { background: var(--surface-2); }
.oauth-ic { display: inline-flex; }
.oauth-sep { position: relative; text-align: center; margin: 16px 0 4px; }
.oauth-sep::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.oauth-sep span { position: relative; background: var(--canvas); padding: 0 12px; color: var(--muted); font-size: 12px; }

/* Preview logo/favicon di admin */
.brand-preview { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.brand-preview .box { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.brand-preview .box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.integ-card { display: grid; gap: 12px; }
.integ-card .muted-sm { font-size: 12px; color: var(--muted); }

/* ====================== Scrollbar sesuai tema ====================== */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--soft); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
.side { scrollbar-color: var(--line-2) transparent; }
.side::-webkit-scrollbar { width: 9px; }

/* ====================== Preloader ====================== */
#preloader {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: var(--canvas); transition: opacity .42s ease, visibility .42s ease;
}
#preloader.pl-done { opacity: 0; visibility: hidden; pointer-events: none; }
.pl-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pl-mark { position: relative; width: 60px; height: 60px; display: grid; place-items: center;
  color: var(--accent-ink); background: var(--accent); border-radius: 17px; box-shadow: 0 10px 30px -8px rgba(13,122,87,.5);
  animation: pl-pop .6s cubic-bezier(.2,.9,.3,1.3) both, pl-breathe 2.4s ease-in-out .6s infinite; }
.pl-mark svg { width: 32px; height: 32px; }
.pl-mark .pl-ring { position: absolute; inset: -9px; border-radius: 22px; border: 2px solid transparent;
  border-top-color: var(--accent); border-right-color: var(--accent); opacity: .5; animation: pl-spin 1s linear infinite; }
.pl-dots { display: flex; gap: 7px; }
.pl-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); opacity: .4; animation: pl-dot 1.2s ease-in-out infinite; }
.pl-dots i:nth-child(2) { animation-delay: .18s; }
.pl-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pl-breathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.04); } }
@keyframes pl-dot { 0%,100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .pl-mark, .pl-ring, .pl-dots i { animation: none !important; } }

/* ====================== Cara ambil token (tab) ====================== */
.tokhelp > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.ttabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.ttab { padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ttab:hover { background: var(--surface-2); }
.ttab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tbody { font-size: 14px; }
.thelp { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 7px; color: var(--ink-2); }
.thelp code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.bm-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; cursor: grab;
  box-shadow: 0 6px 18px -6px rgba(13,122,87,.5); text-decoration: none; user-select: none; white-space: nowrap;
}
.bookmarklet:hover { filter: brightness(1.05); text-decoration: none; }
.bookmarklet:active { cursor: grabbing; }
.bookmarklet .ic { color: currentColor; }

/* ==========================================================================
   Perbaikan kontras tema gelap
   ========================================================================== */
[data-theme="dark"] .toast { background: #222D28; color: var(--ink); border: 1px solid #34413A; }
[data-theme="dark"] .brand-mark { background: var(--accent); color: var(--accent-ink); }
[data-theme="dark"] .btn.secondary:hover { border-color: #3A4740; }
[data-theme="dark"] .btn.quiet:hover,
[data-theme="dark"] .nav-links a.link:hover,
[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .docs aside a:hover { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .btn.danger { border-color: rgba(242, 136, 127, .35); }
[data-theme="dark"] .btn.solid-danger { color: #1A0B09; }
[data-theme="dark"] .pill.test { background: #241F36; color: #B9A8F0; }
[data-theme="dark"] .ps-chat { background: var(--accent-soft); color: var(--ink); }
[data-theme="dark"] .tabbar { background: rgba(21, 27, 24, .94); }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #6E7772; }
[data-theme="dark"] input:focus, [data-theme="dark"] textarea:focus, [data-theme="dark"] select:focus { box-shadow: 0 0 0 3px rgba(69, 214, 155, .18); }
[data-theme="dark"] .pl-mark { box-shadow: 0 10px 30px -8px rgba(69, 214, 155, .35); }
[data-theme="dark"] .bookmarklet { box-shadow: 0 6px 18px -6px rgba(69, 214, 155, .35); }
[data-theme="dark"] select option { background: var(--surface); color: var(--ink); }
[data-theme="dark"] { color-scheme: dark; }

/* ==========================================================================
   Field password / secret: tombol mata
   ========================================================================== */
.pw-wrap { position: relative; display: block; width: 100%; min-width: 0; }
.pw-wrap > input { padding-right: 44px; }
.input-row > .pw-wrap { flex: 1; }
.pw-eye {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.pw-eye .ic { width: 18px; height: 18px; }
input::-ms-reveal, input::-ms-clear { display: none; }
