/* Electrum app demo with the embedded Proteksi Baterai offer.
   BRAND TOKENS: every color, the typeface and the corner style live in this
   first block. They are close placeholders for Electrum's look (deep navy,
   tosca accent) until Electrum's brand kit arrives; swap the values here. */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --navy: #0b1e3f;
  --navy-2: #13305e;
  --tosca: #14b8a6;
  --tosca-ink: #0b7d72;      /* tosca for text and buttons on white: 4.8:1 */
  --tosca-soft: #e3f6f3;
  --sky-soft: #e8f1fb;
  --sun: #f5b93d;            /* warm highlight; never used for warnings alone */
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #0b1e3f;
  --ink-2: #4a5873;          /* secondary text: 7.1:1 on white */
  --line: #dfe5ee;
  --on-accent: #ffffff;
  --focus: #1d6fe0;
  --danger-ink: #a33a1f;     /* errors only, always with an icon and words */
  --teduh: #2e5aac;
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --shadow: 0 1px 2px rgba(11, 30, 63, .06), 0 8px 24px rgba(11, 30, 63, .08);
  --stage: #e7ecf3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tosca-ink: #5eead4; --tosca-soft: #0f3a3a; --sky-soft: #132a47;
    --bg: #07111f; --surface: #0f1c31; --surface-2: #142540; --ink: #eef3fa; --ink-2: #b3c0d6; --line: #233654;
    --on-accent: #04231f; --focus: #7cb4ff; --danger-ink: #ffb4a0; --teduh: #9db9f0; --stage: #040b16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --tosca-ink: #5eead4; --tosca-soft: #0f3a3a; --sky-soft: #132a47;
  --bg: #07111f; --surface: #0f1c31; --surface-2: #142540; --ink: #eef3fa; --ink-2: #b3c0d6; --line: #233654;
  --on-accent: #04231f; --focus: #7cb4ff; --danger-ink: #ffb4a0; --teduh: #9db9f0; --stage: #040b16;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--stage); line-height: 1.45; font-size: 1rem; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--tosca-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }

/* ---------- stage: desktop shows the phone beside a short explanation ---------- */
.stage { min-height: 100vh; display: flex; justify-content: center; }
.side { display: none; }
.app { position: relative; width: 100%; max-width: 480px; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.app-body { flex: 1; padding: 0 16px 112px; }

@media (min-width: 1024px) {
  .stage { align-items: center; gap: 64px; padding: 32px; }
  .side { display: block; width: 380px; color: var(--ink); }
  .app { width: 390px; height: min(844px, calc(100vh - 64px)); min-height: 0; border-radius: 44px; overflow: hidden; box-shadow: 0 0 0 10px #0b1220, 0 30px 80px rgba(4, 11, 22, .35); }
  .app-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 24px; }
  .app-tabs { position: absolute !important; }
}

.side-eyebrow { font-size: .8125rem; font-weight: 700; color: var(--tosca-ink); text-transform: uppercase; letter-spacing: .06em; }
.side h1 { font-size: 2rem; margin: 10px 0 14px; }
.side p { color: var(--ink-2); }
.side ul { padding: 0; margin: 20px 0; list-style: none; display: grid; gap: 10px; }
.side li { display: flex; gap: 10px; align-items: flex-start; }
.side li svg { color: var(--tosca-ink); margin-top: 2px; }
.side h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 24px 0 8px; }
.side ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: s; }
.side ol a { display: flex; gap: 10px; padding: 6px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-size: .9375rem; }
.side ol a::before { counter-increment: s; content: counter(s); width: 22px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.side ol a:hover { background: var(--surface); }
.side ol a[aria-current="page"] { background: var(--surface); font-weight: 700; box-shadow: var(--shadow); }
.side-reset { margin-top: 16px; }

/* ---------- app header ---------- */
.app-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg); }
.wordmark { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.wordmark i { width: 10px; height: 18px; border-radius: 3px; background: var(--tosca); display: inline-block; position: relative; }
.wordmark i::after { content: ""; position: absolute; left: 3px; top: -3px; width: 4px; height: 3px; border-radius: 1px 1px 0 0; background: var(--tosca); }
.pill-demo { font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid var(--ink-2); color: var(--ink-2); border-radius: 999px; padding: 2px 8px; }
.head-end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 10px; min-height: 32px; border-radius: 999px; font-size: .8125rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--tosca-ink); color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--tosca-ink); color: var(--on-accent); } }
.icon-btn { border: 1px solid var(--line); background: var(--surface); width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }

.offline { display: none; margin: 0 16px 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--sky-soft); font-size: .875rem; gap: 8px; align-items: center; }
.is-offline .offline { display: flex; }

/* ---------- bottom tab bar ---------- */
.app-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .app-tabs { left: 0; transform: none; width: 100%; } }
.app-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 52px; text-decoration: none; color: var(--ink-2); font-size: .75rem; font-weight: 600; border-radius: var(--radius-s); }
.app-tabs a[aria-current="page"] { color: var(--tosca-ink); font-weight: 800; }
.app-tabs a[aria-current="page"] svg { stroke-width: 2.5; }
.app.no-tabs .app-tabs { display: none; }
.app.no-tabs .app-body { padding-bottom: 32px; }

/* ---------- building blocks ---------- */
.screen { display: grid; gap: 16px; padding-top: 4px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.bar { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.bar h1 { font-size: 1.25rem; }
.back { border: 0; background: none; width: 44px; height: 44px; margin-left: -10px; display: grid; place-items: center; border-radius: 999px; cursor: pointer; color: var(--ink); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card h2 { font-size: 1rem; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .8125rem; }
.row { display: flex; align-items: center; gap: 12px; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
dl { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; width: 100%; }
.btn-primary { background: var(--tosca-ink); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost { background: none; color: var(--tosca-ink); min-height: 44px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .875rem; width: auto; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.cta-dock { position: sticky; bottom: 76px; padding-top: 8px; background: linear-gradient(to bottom, transparent, var(--bg) 30%); display: grid; gap: 8px; }
.app.no-tabs .cta-dock { bottom: 0; padding-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 14px; min-height: 44px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-checked="true"] { border-color: var(--tosca-ink); background: var(--tosca-soft); color: var(--ink); font-weight: 800; }
.chip[aria-checked="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tosca-ink); }
.q { display: grid; gap: 10px; }
.q > legend, .q-label { font-weight: 800; font-size: 1rem; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--tosca-soft); color: var(--tosca-ink); }
.badge-status { background: var(--tosca-soft); color: var(--ink); }
.badge-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tosca); }

.price-big { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-big small { font-size: .9375rem; font-weight: 700; color: var(--ink-2); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { position: relative; text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 14px 12px; cursor: pointer; display: grid; gap: 6px; align-content: start; }
.plan[aria-checked="true"] { border-color: var(--tosca-ink); box-shadow: 0 0 0 3px var(--tosca-soft); }
.plan h3 { font-size: 1rem; }
.plan .price-big { font-size: 1.5rem; }
.plan-line { font-size: .8125rem; color: var(--ink-2); }
.plan-tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.plan[aria-checked="true"] .plan-tick { background: var(--tosca-ink); border-color: var(--tosca-ink); color: var(--on-accent); }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); background: var(--sky-soft); font-size: .9375rem; }
.notice-error { background: var(--surface); border: 1.5px solid var(--danger-ink); color: var(--ink); }
.notice-error svg { color: var(--danger-ink); }
.notice-ok { background: var(--tosca-soft); }

/* fields */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .9375rem; }
.field input, .field select { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); font-size: 1rem; }
.field input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--danger-ink); }
.field .hint { font-size: .8125rem; color: var(--ink-2); }
.field .err { font-size: .8125rem; color: var(--danger-ink); font-weight: 700; display: flex; gap: 4px; align-items: center; }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; }
.tick input { width: 24px; height: 24px; margin: 0; accent-color: var(--tosca-ink); flex: none; }
.tick a { font-weight: 700; }

/* home */
.ep { background: var(--navy); color: #fff; border-radius: var(--radius-l); padding: 18px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.ep .muted { color: #c7d3e6; }
.ep-amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ep .btn { background: var(--tosca); color: #04231f; }
.bike { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; width: 0; background: var(--tosca); border-radius: inherit; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.stations { display: grid; gap: 0; }
.station { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.station:first-child { border-top: 0; }
.dot-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--tosca-soft); color: var(--tosca-ink); display: grid; place-items: center; flex: none; }
.offer { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.offer-art { width: 52px; height: 52px; flex: none; }
.rain { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--sky-soft); text-decoration: none; color: var(--ink); }

/* sheets and toasts */
.scrim { position: absolute; inset: 0; background: rgba(4, 11, 22, .45); z-index: 40; display: flex; align-items: flex-end; animation: fade .2s ease-out; }
@media (max-width: 1023px) { .scrim { position: fixed; } }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-l) var(--radius-l) 0 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; animation: up .28s cubic-bezier(.2, .8, .2, 1); max-height: 90%; overflow-y: auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 4px; }
.toast { position: absolute; left: 16px; right: 16px; bottom: 92px; z-index: 50; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--radius-s); box-shadow: var(--shadow); animation: up .25s ease-out; font-weight: 600; display: flex; gap: 8px; align-items: center; }
@media (max-width: 1023px) { .toast { position: fixed; max-width: 448px; margin: 0 auto; } }

/* compare */
.cmp { display: grid; grid-template-columns: 1fr 76px 64px; align-items: stretch; }
.cmp > * { padding: 12px 0; border-top: 1px solid var(--line); }
.cmp .h { border-top: 0; font-weight: 800; text-align: center; padding-top: 0; }
.cmp .c { text-align: center; display: grid; justify-items: center; align-content: center; gap: 2px; font-weight: 800; font-size: .875rem; }
.cmp .c .yes { color: var(--tosca-ink); }
.cmp .c .no { color: var(--ink-2); }
.cmp .t b { display: block; }
.cmp .t span { font-size: .8125rem; color: var(--ink-2); }
.not-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.not-list li { display: flex; gap: 10px; align-items: flex-start; }
.not-list svg { color: var(--ink-2); margin-top: 2px; }

/* consent */
.consent-sec { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.consent-sec:first-child { border-top: 0; }
.consent-sec h3 { font-size: 1rem; margin-bottom: 2px; }

/* policy card */
.wallet { border-radius: var(--radius-l); padding: 20px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, var(--navy-2), var(--navy) 60%); box-shadow: var(--shadow); display: grid; gap: 16px; position: relative; overflow: hidden; }
.wallet .muted { color: #c7d3e6; }
.wallet-num { font-size: 1.375rem; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.wallet .badge-status { background: rgba(20, 184, 166, .2); color: #fff; }
.wallet-art { position: absolute; right: -10px; bottom: -14px; width: 120px; opacity: .25; }

/* done */
.done-art { width: 120px; height: 120px; margin: 8px auto 0; }
.done-art .ring { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw .8s .1s ease-out forwards; }
.done-art .check { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .4s .7s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(700px) rotate(540deg); opacity: 0; } }
.center { text-align: center; }

/* footer */
.ins-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; font-size: .8125rem; color: var(--ink-2); padding: 8px 0 4px; }
.teduh { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.teduh svg { color: var(--teduh); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .done-art .ring, .done-art .check { stroke-dashoffset: 0; }
  .confetti { display: none; }
}
