/* Tampilan "aplikasi" untuk halaman yang dibuka pelanggan dari ponsel: login hotspot (di router dan di portal),
   toko voucher, portal pelanggan, cek tagihan, dan halaman isolir. Berkas ini berdiri sendiri (tanpa Bootstrap dan
   tanpa huruf ikon), karena juga disalin ke router MikroTik dan disisipkan ke halaman isolir.
   Warna merek: --accent / --accent-dark / --accent-rgb pada <body> (tema aurora, pearl, midnight, atau warna sendiri).
   Mode gelap: atribut data-bs-theme="dark" pada <html>. */
body.app-shell {
  --a-accent: var(--accent, #2563eb); --a-accent-2: var(--accent-dark, #1d4ed8); --a-rgb: var(--accent-rgb, 37, 99, 235); --a-on: var(--on-accent, #fff);
  --a-bg: #eef2f8; --a-surface: #fff; --a-surface-2: #f6f8fc; --a-text: #0f172a; --a-body: #334155; --a-muted: #64748b; --a-line: #e2e8f0;
  --a-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .06);
  --a-warn: #b45309; --a-warn-bg: #fef3c7; --a-ok: #0369a1; --a-ok-bg: #e0f2fe; --a-bad: #b91c1c; --a-bad-bg: #fee2e2;
}
body.pearl, body.theme-pearl { --accent: #6d28d9; --accent-dark: #4c1d95; --accent-rgb: 109, 40, 217; }
body.midnight, body.theme-midnight { --accent: #3b82f6; --accent-dark: #1d4ed8; --accent-rgb: 59, 130, 246; --on-accent: #fff; }
[data-bs-theme="dark"] body.app-shell {
  --a-bg: #0a101d; --a-surface: #121b2e; --a-surface-2: #18233a; --a-text: #f1f5f9; --a-body: #cbd5e1; --a-muted: #94a3b8; --a-line: #25324a;
  --a-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .28);
  --a-warn: #fcd34d; --a-warn-bg: #3a2a06; --a-ok: #7dd3fc; --a-ok-bg: #0c2a3f; --a-bad: #fca5a5; --a-bad-bg: #3f1212;
}

.app-shell, .app-shell * { box-sizing: border-box; }
body.app-shell { margin: 0; background: var(--a-bg); color: var(--a-body); min-height: 100vh; display: block;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 92px; position: relative; }
.app.wide { max-width: 720px; }
.app a, .a-nav a { color: var(--a-accent); text-decoration: none; }
.app h1, .app h2, .app h3 { color: var(--a-text); margin: 0; letter-spacing: -.02em; }
.app svg.ic, .a-nav svg.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.22em; }
.a-nav svg.ic { width: 22px; height: 22px; }

/* bilah atas */
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; }
.a-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; color: var(--a-text) !important; min-width: 0; }
.a-brand img { max-height: 34px; max-width: 150px; object-fit: contain; }
.a-brand span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--a-accent); color: var(--a-on); display: grid; place-items: center; flex: none; }
.a-top-actions { display: flex; align-items: center; gap: 8px; }
.a-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--a-line); background: var(--a-surface); color: var(--a-body); display: grid; place-items: center; cursor: pointer; padding: 0; font-size: 1rem; }
.a-icon-btn:hover { border-color: var(--a-accent); color: var(--a-accent); }
.a-icon-btn .on-dark { display: none; }
[data-bs-theme="dark"] .a-icon-btn .on-dark { display: inline; }
[data-bs-theme="dark"] .a-icon-btn .on-light { display: none; }

/* spanduk */
.a-banner { margin: 4px 16px 0; padding: 20px 20px 22px; border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--a-accent), var(--a-accent-2)); box-shadow: 0 10px 24px rgba(var(--a-rgb), .28); }
.a-banner::before, .a-banner::after { content: ""; position: absolute; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .09); pointer-events: none; }
.a-banner::before { width: 190px; height: 190px; right: -70px; top: -80px; }
.a-banner::after { width: 120px; height: 120px; right: 40px; bottom: -84px; }
.a-banner > * { position: relative; z-index: 1; }
.a-banner.has-lift { padding-bottom: 58px; }
.a-banner.warn { background: linear-gradient(135deg, #d97706, #b45309); box-shadow: 0 10px 24px rgba(180, 83, 9, .28); }
.a-banner .kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .82; margin-bottom: 4px; }
.a-banner h1 { color: #fff; font-size: 1.32rem; line-height: 1.25; font-weight: 700; }
.a-banner p { margin: 6px 0 0; color: rgba(255, 255, 255, .86); font-size: .92rem; }
.a-banner .row2 { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .86rem; }
.a-banner .row2 b { display: block; font-size: 1.02rem; color: #fff; }
.a-banner .row2 span { color: rgba(255, 255, 255, .8); }
.a-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: rgba(255, 255, 255, .18); color: #fff; }

/* kartu dan bagian */
.a-card { margin: 14px 16px 0; padding: 16px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 18px; box-shadow: var(--a-shadow); }
.a-card.lift { margin-top: -40px; position: relative; z-index: 2; }
.a-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.a-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 20px 0; scroll-margin-top: 12px; }
.a-title h2 { font-size: 1.02rem; font-weight: 700; }
.a-title a, .a-title span { font-size: .82rem; }
.a-note { margin: 6px 20px 0; font-size: .84rem; color: var(--a-muted); }
.a-pad { margin: 14px 16px 0; }

/* formulir */
.a-field { margin-bottom: 12px; }
.a-field label { display: block; font-size: .8rem; font-weight: 600; color: var(--a-muted); margin-bottom: 5px; }
.a-input, .a-select { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--a-line); background: var(--a-surface-2); color: var(--a-text); font: inherit; font-size: 1rem; outline: none; }
.a-input:focus, .a-select:focus { border-color: var(--a-accent); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .18); background: var(--a-surface); }
.a-input::placeholder { color: var(--a-muted); opacity: .75; }
.a-hint { font-size: .78rem; color: var(--a-muted); margin-top: 5px; }
.a-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--a-accent);
  background: var(--a-accent); color: var(--a-on) !important; font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.a-btn:hover { background: var(--a-accent-2); border-color: var(--a-accent-2); }
.a-btn:disabled { opacity: .55; cursor: not-allowed; }
.a-btn.ghost { background: transparent; color: var(--a-accent) !important; border-color: var(--a-line); }
.a-btn.ghost:hover { border-color: var(--a-accent); background: transparent; }
.a-btn.soft { background: rgba(var(--a-rgb), .12); color: var(--a-accent) !important; border-color: transparent; }
.a-btn.sm { width: auto; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: .84rem; }
.a-btn + .a-btn, .a-btn + form, form + .a-btn { margin-top: 10px; }
.a-btn.sm + .a-btn.sm { margin-top: 0; }

/* pintasan */
.a-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 16px 0; }
.a-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 2px; text-align: center; font-size: .74rem; font-weight: 600; color: var(--a-body) !important; background: none; border: 0; cursor: pointer; font-family: inherit; }
.a-tile .box { width: 52px; height: 52px; border-radius: 16px; background: var(--a-surface); border: 1px solid var(--a-line); color: var(--a-accent); display: grid; place-items: center; font-size: 1.3rem; box-shadow: var(--a-shadow); }
.a-tile:hover .box { border-color: var(--a-accent); }

/* slide gambar */
.a-slider { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 16px 0 0; padding: 0 16px 4px; scrollbar-width: none; }
.a-slider::-webkit-scrollbar { display: none; }
.a-slider img { flex: 0 0 88%; width: 88%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 16px; scroll-snap-align: center; background: var(--a-surface-2); border: 1px solid var(--a-line); }
.a-slider img:only-child { flex-basis: 100%; width: 100%; }

/* paket voucher */
.a-plans { display: grid; gap: 10px; margin: 12px 16px 0; }
.a-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 16px; box-shadow: var(--a-shadow); position: relative; }
.a-plan.selected { border-color: var(--a-accent); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .18); }
.a-plan .dur { flex: none; width: 54px; height: 54px; border-radius: 14px; background: rgba(var(--a-rgb), .12); color: var(--a-accent); display: grid; place-items: center; text-align: center; font-weight: 800; font-size: .95rem; line-height: 1.05; }
.a-plan .dur small { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.a-plan .info { flex: 1; min-width: 0; }
.a-plan .info b { display: block; color: var(--a-text); font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-plan .info span { display: block; font-size: .78rem; color: var(--a-muted); }
.a-plan .buy { flex: none; text-align: right; }
.a-plan .price { font-weight: 800; color: var(--a-text); font-size: 1rem; white-space: nowrap; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.a-plan form { margin: 0; }

/* daftar nilai, lencana, peringatan */
.a-list { margin: 0; padding: 0; list-style: none; }
.a-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--a-line); font-size: .92rem; }
.a-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.a-list li:first-child { padding-top: 0; }
.a-list li > span:first-child { color: var(--a-muted); }
.a-list li > *:last-child { color: var(--a-text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.a-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--a-ok-bg); color: var(--a-ok); white-space: nowrap; }
.a-badge.warn { background: var(--a-warn-bg); color: var(--a-warn); }
.a-badge.bad { background: var(--a-bad-bg); color: var(--a-bad); }
.a-badge.mute { background: var(--a-surface-2); color: var(--a-muted); }
.a-alert { margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; font-size: .9rem; background: var(--a-ok-bg); color: var(--a-ok); border: 1px solid rgba(var(--a-rgb), .18); }
.a-alert.warn { background: var(--a-warn-bg); color: var(--a-warn); border-color: transparent; }
.a-alert.bad { background: var(--a-bad-bg); color: var(--a-bad); border-color: transparent; }
.a-card .a-alert { margin: 0 0 12px; }
.a-steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.a-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; }
.a-steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--a-rgb), .12); color: var(--a-accent); font-weight: 800; font-size: .84rem; display: grid; place-items: center; }
.a-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; color: var(--a-text); background: rgba(var(--a-rgb), .1); border: 1px dashed rgba(var(--a-rgb), .45); border-radius: 12px; padding: 10px 14px; word-break: break-all; user-select: all; }

/* tagihan */
.a-bill { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--a-line); }
.a-bill:last-child { border-bottom: 0; padding-bottom: 0; }
.a-bill:first-child { padding-top: 0; }
.a-bill .info { flex: 1; min-width: 0; }
.a-bill .info b { display: block; color: var(--a-text); font-size: .93rem; }
.a-bill .info span { font-size: .78rem; color: var(--a-muted); }
.a-bill .amt { text-align: right; flex: none; }
.a-bill .amt b { display: block; color: var(--a-text); font-variant-numeric: tabular-nums; }
.a-bill-extra { padding: 0 0 12px; border-bottom: 1px solid var(--a-line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.a-bill-extra form { margin: 0; display: flex; gap: 6px; }
.a-bill-extra .a-input { height: 36px; width: 130px; border-radius: 999px; font-size: .84rem; }

/* tanya jawab dan kontak */
.a-faq { border-bottom: 1px solid var(--a-line); }
.a-faq:last-child { border-bottom: 0; }
.a-faq summary { list-style: none; cursor: pointer; padding: 12px 26px 12px 0; position: relative; font-weight: 600; color: var(--a-text); font-size: .93rem; }
.a-faq summary::-webkit-details-marker { display: none; }
.a-faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--a-muted); border-bottom: 2px solid var(--a-muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.a-faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.a-faq p { margin: 0 0 12px; font-size: .9rem; color: var(--a-body); }
.a-faq:first-child summary { padding-top: 0; }
.a-contact { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--a-line); color: var(--a-body) !important; }
.a-contact:last-child { border-bottom: 0; padding-bottom: 0; }
.a-contact:first-of-type { padding-top: 0; }
.a-contact .box { width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--a-rgb), .12); color: var(--a-accent); display: grid; place-items: center; flex: none; font-size: 1.05rem; }
.a-contact b { display: block; color: var(--a-text); font-size: .93rem; }
.a-contact span { font-size: .8rem; color: var(--a-muted); }
.a-foot { text-align: center; font-size: .76rem; color: var(--a-muted); margin: 22px 16px 0; }

/* menu bawah */
.a-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 520px); z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--a-surface); border-top: 1px solid var(--a-line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06); }
.app.wide ~ .a-nav, .a-nav.wide { width: min(100%, 720px); }
@media (min-width: 560px) { .a-nav { border: 1px solid var(--a-line); border-bottom: 0; border-radius: 18px 18px 0 0; } }
.a-nav a, .a-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; border-radius: 12px; font-size: .68rem; font-weight: 600; color: var(--a-muted) !important; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative; }
.a-nav a .ic, .a-nav a i, .a-nav button i { font-size: 1.25rem; line-height: 1; }
.a-nav a.active, .a-nav a:hover { color: var(--a-accent) !important; }
.a-nav a.active { background: rgba(var(--a-rgb), .1); }

/* komponen Bootstrap di dalam cangkang (kartu modem, grafik, tabel) */
.app-shell .a-pad > .card, .app-shell .a-pad .card.raised { border-radius: 18px; border-color: var(--a-line); box-shadow: var(--a-shadow); overflow: hidden; }
.app-shell .btn-primary { --bs-btn-bg: var(--a-accent); --bs-btn-border-color: var(--a-accent); --bs-btn-hover-bg: var(--a-accent-2); --bs-btn-hover-border-color: var(--a-accent-2); --bs-btn-active-bg: var(--a-accent-2); --bs-btn-active-border-color: var(--a-accent-2); --bs-btn-color: var(--a-on); --bs-btn-hover-color: var(--a-on); }
.app-shell .btn-outline-primary { --bs-btn-color: var(--a-accent); --bs-btn-border-color: var(--a-accent); --bs-btn-hover-bg: var(--a-accent); --bs-btn-hover-border-color: var(--a-accent); --bs-btn-active-bg: var(--a-accent); }
@media print { .a-nav, .a-top-actions, .no-print { display: none !important; } .app { padding-bottom: 0; } }
