  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  /* Smooth light/dark crossfade: applies to anything that doesn't already
     declare its own (faster) transition for hover/focus feedback — those
     win on specificity and stay snappy. */
  *, *::before, *::after {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, fill 0.4s ease, stroke 0.4s ease, opacity 0.4s ease;
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }

  :root {
    /* Palette follows the WIKUY logo (public/images/wikuylogo.png): cyan/
       turquoise primary, magenta accent, warm yellow — replacing the old
       "Vision" blue theme on the public voucher pages only. Admin dashboard
       (admin.css) intentionally keeps its own blue theme. */
    --bg-deep:   #170b2e;
    --bg-card:   #ffffff;
    --bg-muted:  #f4f7fe;
    --bg-input:  #f4f7fe;

    --blue-100:  rgba(18,196,214,0.10);
    --blue-400:  #5be1ec;
    --blue-600:  #12c4d6;
    --blue-800:  #0b93a3;

    --green-100: rgba(1,181,116,0.12);
    --green-600: #01b574;

    --amber-700: #ffc53d;
    --red-600:   #e31a1a;

    --text-primary:   #1b254b;
    --text-secondary: #707eae;
    --text-muted:     #8f9bba;
    --border:         #e0e5f2;
    --border-focus:   #12c4d6;

    --primary:  var(--blue-600);
    --card-bg:  var(--bg-card);
    --text-main: var(--text-primary);

    /* "Chrome" = everything that sits directly on the page background
       (clock, top controls, network badge, header text, footer, logo
       wrapper). These are intentionally NOT overridden in dark mode below —
       only .card reacts to the theme toggle. Set to the dark palette since
       the backdrop itself stays dark by default; light mode overrides them
       below so chrome text stays readable on its brighter backdrop. */
    --chrome-text:       #ffffff;
    --chrome-text-soft:  #a0aec0;
    --chrome-text-faint: #718096;
    --chrome-bg:         rgba(255,255,255,0.06);
    --chrome-bg-strong:  rgba(18,196,214,0.22);
    --chrome-border:     rgba(255,255,255,0.14);

    /* Readable text color to pair with each accent's translucent tint
       background (warning boxes, rule icons, badges); flips per theme so
       it stays legible against both the white card and the dark one.
       purple-on-tint uses the logo's magenta/pink instead of purple. */
    --blue-on-tint:   #0a8c9c;
    --green-on-tint:  #018757;
    --amber-on-tint:  #8a5a00;
    --red-on-tint:    #c22525;
    --purple-on-tint: #d6127f;

    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-card: 0 18px 40px rgba(112,144,176,0.14);

    /* Router-mascot decoration (antennas/arms/legs around .card, see the
       MASCOT section below) — its own palette, independent of the text/UI
       tokens above, so it can be recolored without touching real UI. */
    --mascot-body:      #d7dbe6;
    --mascot-body-dark: #aeb4c4;
    --mascot-glove:     #eef0f5;
    --mascot-outline:   #2b2450;
    --mascot-shoe:      #d6127f;
    --mascot-shoe-dark: #a10e63;
    --mascot-highlight: rgba(255,255,255,0.55);

    color-scheme: dark;
  }

  /* ── Dark mode — mirrors the admin dashboard's default theme ──
     Only .card is allowed to react to this: --bg-deep and --chrome-* have
     no override here on purpose, so the page background/header text/clock/
     top controls/footer/logo wrapper stay fixed regardless of the toggle. */
  :root[data-theme="dark"] {
    --bg-card:   #171233;
    --bg-muted:  rgba(255,255,255,0.05);
    --bg-input:  rgba(255,255,255,0.06);

    --blue-100:  rgba(18,196,214,0.16);

    --green-100: rgba(1,181,116,0.16);

    --text-primary:   #ffffff;
    --text-secondary: #a0aec0;
    --text-muted:     #718096;
    --border:         rgba(255,255,255,0.10);
    --border-focus:   #12c4d6;

    --blue-on-tint:   #7fe6ef;
    --green-on-tint:  #34d39b;
    --amber-on-tint:  #ffcf8a;
    --red-on-tint:    #ff7b7b;
    --purple-on-tint: #ff7fd1;

    --shadow-card: 0 20px 60px rgba(2,6,23,0.65), 0 6px 18px rgba(2,6,23,0.45);

    --mascot-body:      #4a4f68;
    --mascot-body-dark: #34384a;
    --mascot-glove:     #5b6178;
    --mascot-outline:   #12c4d6;
    --mascot-shoe:      #ff7fd1;
    --mascot-shoe-dark: #d6127f;
    --mascot-highlight: rgba(255,255,255,0.18);
  }

  /* Light mode gets a brighter backdrop than the (permanently dark) default
     set above. Chrome text/surfaces are overridden here too, since the
     base --chrome-* values above assume a dark backdrop and would be
     unreadable against this light one. */
  :root[data-theme="light"] {
    --bg-deep: #f2f4fb;

    --chrome-text:       #1b254b;
    --chrome-text-soft:  #4a5578;
    --chrome-text-faint: #707eae;
    --chrome-bg:         rgba(27,37,75,0.06);
    --chrome-bg-strong:  rgba(18,196,214,0.14);
    --chrome-border:     rgba(27,37,75,0.12);

    /* The dark-mode block above darkens these from the :root defaults to
       stay readable against a dark card; light mode needs its own darkening
       for the same reason — the :root defaults (#707eae / #8f9bba) read at
       ~4.0:1 / ~2.8:1 against the white card, both under the 4.5:1 AA floor
       for this text size. */
    --text-secondary: #5c6b93;
    --text-muted:     #647199;
  }

  html, body {
    min-height: 100vh;
    /* The mascot's arms intentionally reach past .card's edges (see MASCOT
       section below); this is the backstop against a horizontal scrollbar
       on phones narrower than the arm span accounts for. */
    overflow-x: hidden;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 15px;
    color: var(--chrome-text);
    background: var(--bg-deep) fixed;
    transition: background-color 0.4s ease, color 0.4s ease;
  }

  /* ── Location clock ── */
  .location-clock {
    position: fixed; top: 16px; left: 16px; z-index: 50;
    background: var(--chrome-bg);
    border: 1px solid var(--chrome-border);
    border-radius: 12px; padding: 7px 13px;
    backdrop-filter: blur(8px);
    color: var(--chrome-text); line-height: 1;
    /* backdrop-filter is expensive to recompute every scroll frame; without
       its own compositor layer it can visibly lag a frame behind the
       scroll on slower/emulated renderers (e.g. DevTools mobile view),
       even though the computed position never actually moves. */
    will-change: transform;
    transform: translateZ(0);
  }
  .clock-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
  }
  .clock-date {
    font-family: 'Outfit', sans-serif;
    font-size: 10px; opacity: 0.65; margin-top: 4px; letter-spacing: 0;
  }

  /* ── Top-right controls (language + theme) ── */
  .top-controls {
    position: fixed; top: 16px; right: 16px; z-index: 50;
    display: flex; align-items: center; gap: 8px;
    will-change: transform;
    transform: translateZ(0);
  }

  /* ── Language switcher ── */
  .lang-switch {
    display: flex; align-items: center;
    background: var(--chrome-bg);
    border: 1px solid var(--chrome-border);
    border-radius: 999px; padding: 3px; gap: 2px;
    backdrop-filter: blur(8px);
  }
  .lang-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 15px; border-radius: 999px; border: none;
    background: none; color: var(--chrome-text-soft);
    font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
    cursor: pointer; transition: background 0.15s, color 0.15s;
    font-family: 'Outfit', sans-serif;
  }
  .lang-btn.active  { background: var(--chrome-bg-strong); color: var(--chrome-text); }
  .lang-btn:hover:not(.active) { color: var(--chrome-text); }

  /* ── Theme toggle ── */
  .theme-toggle {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex-shrink: 0;
    background: var(--chrome-bg);
    border: 1px solid var(--chrome-border);
    border-radius: 50%;
    color: var(--chrome-text); cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.15s, transform 0.1s, color 0.4s ease, border-color 0.4s ease;
  }
  .theme-toggle:hover  { background: var(--chrome-bg-strong); }
  .theme-toggle:active { transform: scale(0.92); }
  .theme-toggle svg {
    position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; flex-shrink: 0;
    transform: translate(-50%,-50%) rotate(0deg) scale(1);
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  }
  .theme-toggle .theme-icon-moon {
    opacity: 0;
    transform: translate(-50%,-50%) rotate(-90deg) scale(0.4);
  }
  :root[data-theme="dark"] .theme-toggle .theme-icon-sun {
    opacity: 0;
    transform: translate(-50%,-50%) rotate(90deg) scale(0.4);
  }
  :root[data-theme="dark"] .theme-toggle .theme-icon-moon {
    opacity: 1;
    transform: translate(-50%,-50%) rotate(0deg) scale(1);
  }

  .page {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1.5rem;
  }

  /* Mobile: sit closer to the top instead of vertical-centering, so there's
     room below the card for the ads banner. */
  @media (max-width: 640px) {
    .page {
      justify-content: flex-start;
      padding-top: 4.5rem;
      gap: 1rem;
    }
  }

  /* Brand */
  .brand { text-align: center; }
  .brand-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: auto; height: 220px;
    margin-bottom: 14px;
  }
  .brand-logo-img { height: 200px; width: auto; display: block; }
  .brand h1 { font-size: 22px; font-weight: 600; color: var(--chrome-text); letter-spacing: -0.3px; }
  .brand p  { font-size: 13px; font-weight: 600; color: var(--chrome-text-soft); margin-top: 4px; }

  /* Slogan replaces the plain wordmark text: each word picks up one of the
     three WIKUY brand colors (cyan / neutral / magenta) instead of a single
     flat heading color. */
  .brand-slogan { font-size: 24px; font-weight: 800; letter-spacing: -0.2px; }
  .slogan-word {
    display: inline-block;
    animation: sloganPulse 2.4s ease-in-out infinite;
  }
  .slogan-comma { color: var(--chrome-text-soft); margin-right: 0.15em; }
  .slogan-scan  { color: var(--blue-600); animation-delay: 0s; }
  .slogan-konek { color: var(--chrome-text); animation-delay: 0.8s; }
  .slogan-kuy   { color: var(--mascot-shoe); animation-delay: 1.6s; }
  .slogan-bang { display: inline-block; color: var(--amber-700); }

  @keyframes sloganPulse {
    0%, 16%, 100% { transform: scale(1); }
    8%            { transform: scale(1.18); }
  }

  @media (prefers-reduced-motion: reduce) {
    .slogan-word { animation: none; }
  }

  /* Network badge */
  .network-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--chrome-bg);
    border: 1px solid var(--chrome-border);
    border-radius: 999px; padding: 6px 14px;
    font-size: 12px; color: var(--chrome-text-soft);
  }
  .network-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green-600); flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(1,181,116,0.20);
  }
  .network-name { color: var(--chrome-text); font-weight: 500; }

  /* Offline variant — no router-bound hotspot session yet (see
     VoucherController::index $sessionBound). Same badge, just flipped to the
     disconnected wording/color instead of a separate alert box. */
  .network-badge--offline {
    background: rgba(227,26,26,0.10);
    border-color: rgba(227,26,26,0.30);
    color: var(--red-on-tint);
  }
  .network-badge--offline .dot {
    background: var(--red-600);
    box-shadow: 0 0 0 3px rgba(227,26,26,0.20);
  }
  .network-badge--offline .network-name { color: var(--red-on-tint); }

  /* Card */
  .card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative; z-index: 1;
  }

  /* ── MASCOT ──
     Turns .card into the body of a router mascot: antennas/arms/legs are
     absolutely-positioned siblings of the untouched .card, inside a wrapper
     that has no size of its own (see the blade comment on .mascot-card-wrap).
     Because every part is `position:absolute`, none of them contribute to
     the wrapper's height — so `top`/`bottom` offsets here always measure
     from .card's actual (dynamic, panel-dependent) edges, not a fixed value.
     Parts default to z-index 0, under .card's z-index 1, so the end tucked
     against the card (antenna base, shoulder, hip) hides behind its rounded
     corner instead of needing to match that corner's geometry exactly. */
  .mascot-card-wrap { position: relative; width: 100%; max-width: 400px; }
  .mascot-antenna, .mascot-leg {
    position: absolute; z-index: 0; pointer-events: none;
  }

  .mascot-antenna { top: -82px; width: 32px; height: 112px; overflow: visible; }
  .mascot-antenna-left  { left: 9%;  transform: rotate(-18deg); transform-origin: bottom center; }
  .mascot-antenna-right { right: 9%; transform: rotate(18deg);  transform-origin: bottom center; }

  .mascot-leg { bottom: -34px; width: 46px; height: 69px; }
  .mascot-leg-left  { left: 22%; }
  .mascot-leg-right { right: 22%; transform: scaleX(-1); }

  @media (max-width: 480px) {
    .mascot-antenna { top: -64px; width: 24px; height: 84px; }
    .mascot-leg { bottom: -26px; width: 36px; height: 54px; }
  }

  /* Wifi signal radiating from each antenna tip: three arcs fade in/out
     outward in sequence so it reads as a broadcast pulse. */
  .wifi-arc {
    fill: none; stroke: var(--green-600); stroke-width: 2.5;
    stroke-linecap: round; opacity: 0;
    transform-box: fill-box; transform-origin: 50% 100%;
    animation: wifiPulse 1.8s ease-out infinite;
  }
  .wifi-arc-1 { animation-delay: 0s; }
  .wifi-arc-2 { animation-delay: 0.2s; }
  .wifi-arc-3 { animation-delay: 0.4s; }
  .wifi-arc-4 { animation-delay: 0.6s; }
  .wifi-arc-5 { animation-delay: 0.8s; }

  @keyframes wifiPulse {
    0%   { opacity: 0;   transform: scale(0.55); }
    20%  { opacity: 1;   transform: scale(0.8); }
    70%  { opacity: 0;   transform: scale(1.15); }
    100% { opacity: 0;   transform: scale(1.15); }
  }

  @media (prefers-reduced-motion: reduce) {
    .wifi-arc { animation: none; opacity: 0.6; }
  }

  /* Tabs */
  .tabs {
    display: flex; align-items: flex-end;
    border-bottom: 1px solid var(--border);
    padding: 0 4px;
  }
  .tab-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 11px 14px; font-size: 13px; font-weight: 500;
    color: var(--text-muted); background: none; border: none; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    font-family: 'Outfit', sans-serif; white-space: nowrap;
  }
  .tab-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
  .tab-btn:hover { color: var(--text-secondary); }
  .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
  .vc-tab-hint {
    font-size: 13px; color: var(--text-muted);
    margin: 0 0 18px; line-height: 1.5;
  }

  .card-body {
    padding: 1.5rem;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Site picker — shown instead of the tabs/panels when there is no
     router-bound session (see voucher/index.blade.php $connected). */
  .site-picker { text-align: center; }
  .site-picker-icon {
    display: flex; justify-content: center; margin-bottom: 10px;
    color: var(--blue-600);
  }
  .site-picker-icon svg { width: 34px; height: 34px; }
  .site-picker-title {
    font-size: 17px; font-weight: 600; color: var(--text-primary);
    margin: 0 0 8px;
  }
  .site-picker .vc-tab-hint { text-align: left; }
  .site-picker-form { display: flex; flex-direction: column; gap: 12px; }
  .site-select {
    width: 100%; background: var(--bg-input);
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 13px 14px; font-size: 15px; font-family: 'Outfit', sans-serif;
    color: var(--text-primary); outline: none;
    transition: border-color 0.15s, background 0.15s;
  }
  .site-select:focus { border-color: var(--border-focus); background: var(--bg-card); }
  .site-picker-error { font-size: 12px; color: var(--red-600); margin: -4px 0 0; text-align: left; }

  /* Panels */
  .panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .panel.active { display: block; opacity: 1; transform: translateY(0); }

  /* Fields */
  .field { margin-bottom: 1.1rem; }
  .field label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 6px;
  }
  /* font-size must stay >= 16px: iOS Safari auto-zooms the viewport on
     focus for any input below that, which was happening here (name/phone
     fields on the main conversion path). */
  .field input {
    width: 100%; background: var(--bg-input);
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 11px 14px; font-size: 16px;
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.08em;
    color: var(--text-primary); outline: none;
    transition: border-color 0.15s, background 0.15s;
  }
  .field input:focus { border-color: var(--border-focus); background: var(--bg-card); }
  .field input.input-error { border-color: var(--red-600); background: rgba(227,26,26,0.06); animation: shake 0.3s ease; }
  @keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
  .field input::placeholder { color: var(--text-muted); font-family: 'Outfit', sans-serif; letter-spacing: 0; }
  .field-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

  /* Phone input group */
  .wa-icon { width: 15px; height: 15px; vertical-align: middle; margin-right: 5px; flex-shrink: 0; }
  .field label { display: flex; align-items: center; }
  .phone-input-group {
    display: flex;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  }
  .phone-input-group:focus-within {
    border-color: var(--border-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(18,196,214,0.10);
  }
  .phone-input-group:has(input.input-error) { border-color: var(--red-600); background: rgba(227,26,26,0.06); }
  .phone-input-group input {
    flex: 1; min-width: 0;
    border: none; border-radius: 0;
    background: transparent; padding: 11px 14px;
  }
  .phone-input-group input:focus,
  .phone-input-group input.input-error { background: transparent; border-color: transparent; }

  /* Country picker */
  .cp { position: relative; flex-shrink: 0; }
  .cp-trigger {
    display: flex; align-items: center; gap: 5px;
    width: 100px; height: 100%; padding: 0 8px 0 12px;
    border: none; border-right: 1.5px solid var(--border);
    border-radius: calc(var(--radius-md) - 1.5px) 0 0 calc(var(--radius-md) - 1.5px);
    background: transparent; cursor: pointer;
    font-size: 13.5px; font-weight: 500; color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    transition: background 0.15s;
  }
  .cp-trigger:hover { background: rgba(18,196,214,0.06); }
  .cp-trigger:focus { outline: none; }
  .cp-trigger:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
  .cp-chevron { width: 10px; height: 6px; margin-left: auto; color: #aab; transition: transform 0.2s; flex-shrink: 0; }
  .cp.open .cp-chevron { transform: rotate(180deg); }

  /* Dropdown panel */
  .cp-drop {
    position: absolute; top: calc(100% + 6px); left: -1.5px;
    width: 270px;
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.13);
    z-index: 300; overflow: hidden;
    display: none;
    animation: cpIn 0.15s cubic-bezier(.22,.68,0,1.2);
  }
  .cp.open .cp-drop { display: block; }
  @keyframes cpIn { from { opacity:0; transform:translateY(-6px) scale(0.98); } to { opacity:1; transform:translateY(0) scale(1); } }

  /* Search bar */
  .cp-search-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
  }
  .cp-search-wrap svg { width: 16px; height: 16px; flex-shrink: 0; }
  .cp-search {
    flex: 1; border: none; outline: none;
    font-size: 16px; font-family: 'Outfit', sans-serif;
    color: var(--text-primary); background: transparent;
  }
  .cp-search::placeholder { color: var(--text-muted); }

  /* Country list */
  .cp-list {
    list-style: none; max-height: 230px; overflow-y: auto;
    padding: 4px 0; margin: 0;
    scrollbar-width: thin; scrollbar-color: #dde transparent;
  }
  .cp-list::-webkit-scrollbar { width: 4px; }
  .cp-list::-webkit-scrollbar-thumb { background: #dde; border-radius: 4px; }
  .cp-item {
    display: flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 8px 14px; cursor: pointer;
    font-size: 13px; font-family: 'Outfit', sans-serif;
    color: var(--text-primary); transition: background 0.1s;
  }
  .cp-item:hover { background: rgba(18,196,214,0.08); }
  .cp-item:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; background: rgba(18,196,214,0.08); }
  .cp-item.cp-on { background: rgba(18,196,214,0.10); color: var(--primary); font-weight: 600; }
  .cp-item.cp-hide { display: none; }
  .cpi-name { flex: 1; }
  .cpi-code { color: var(--text-muted); font-size: 12px; font-weight: 500; }
  .cp-sep { height: 1px; background: var(--border); margin: 4px 0; }
  .field-error { font-size: 12px; color: var(--red-600); margin-top: 6px; display: none; align-items: center; gap: 4px; }
  .field-error.show { display: flex; }

  /* ── Intro screen ── */
  .intro-screen { display: none; }
  .intro-screen.active { display: block; }

  .intro-header { text-align: center; margin-bottom: 1.4rem; }
  .intro-wifi-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(18,196,214,0.12); border: 1px solid rgba(18,196,214,0.22);
    margin-bottom: 12px;
  }
  .intro-wifi-icon svg { width: 26px; height: 26px; }
  .intro-title { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
  .intro-sub   { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
  .intro-sub strong { color: var(--text-primary); }

  .intro-rules { display: flex; flex-direction: column; gap: 0; margin-bottom: 1.25rem;
                 border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
  .rule-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 11px 14px; font-size: 13px; background: var(--bg-card);
    border-bottom: 1px solid var(--border);
  }
  .rule-item:last-child { border-bottom: none; }
  .rule-text { color: var(--text-secondary); line-height: 1.55; }
  .rule-text strong { color: var(--text-primary); font-weight: 500; }

  .rule-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
  }
  .rule-icon svg { width: 14px; height: 14px; }
  .rule-icon--blue   { background: rgba(18,196,214,0.10);  color: var(--blue-on-tint); }
  .rule-icon--orange { background: rgba(255,197,61,0.18); color: var(--amber-on-tint); }
  .rule-icon--green  { background: rgba(1,181,116,0.12);  color: var(--green-on-tint); }
  .rule-icon--purple { background: rgba(214,18,148,0.12);  color: var(--purple-on-tint); }
  .rule-icon--red    { background: rgba(227,26,26,0.10);  color: var(--red-on-tint); }

  /* Intro countdown */
  .intro-countdown {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,197,61,0.14); border: 1px solid rgba(255,197,61,0.45); border-radius: var(--radius-md);
    padding: 9px 13px; margin-bottom: 1rem;
    font-size: 13px; color: var(--amber-on-tint);
  }
  .intro-countdown.done {
    background: var(--green-100); border-color: rgba(1,181,116,0.45); color: var(--green-on-tint);
  }
  .intro-countdown svg { flex-shrink: 0; }
  .intro-countdown strong { font-variant-numeric: tabular-nums; }

  /* Custom checkbox */
  .agree-label {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; margin-bottom: 1.25rem; user-select: none;
  }
  .agree-label input[type="checkbox"] { display: none; }
  .agree-box {
    width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; margin-top: 1px;
    border: 2px solid var(--border); background: var(--bg-card);
    transition: background 0.15s, border-color 0.15s;
    display: flex; align-items: center; justify-content: center;
  }
  .agree-label input:checked + .agree-box {
    background: var(--blue-600); border-color: var(--blue-600);
  }
  .agree-label input:checked + .agree-box::after {
    content: '';
    display: block; width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
  }
  .agree-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
  .agree-text strong { color: var(--text-primary); font-weight: 500; }

  /* Disabled intro button */
  #btnIntroNext:disabled {
    background: var(--border); color: var(--text-muted); cursor: not-allowed;
  }
  #btnIntroNext:disabled:hover { background: var(--border); }

  /* Plan grid */
  .plan-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 1.25rem; }
  .plan-card {
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 14px 10px; text-align: center; cursor: pointer;
    transition: border-color 0.15s, background 0.15s; position: relative;
  }
  .plan-card[hidden] { display: none; }
  .plan-card:hover { border-color: var(--blue-400); background: var(--blue-100); }
  .plan-card.active { border-color: var(--blue-600); background: var(--blue-100); }
  .plan-card.popular::before {
    content: 'Populer';
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--blue-600); color: #fff; font-size: 10px; font-weight: 600;
    letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  }
  .plan-tier   { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 2px; }
  .plan-speed  { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
  .plan-bw     { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 1px; }
  .plan-badge  { display: inline-block; margin: 5px 0 6px; padding: 2px 10px;
                 font-size: 10px; font-weight: 500; color: var(--text-muted);
                 background: var(--bg-muted); border-radius: 999px; }
  .plan-price  { font-size: 14px; font-weight: 600; color: var(--blue-600); }

  /* Sec label sub */
  .sec-label-sub { text-transform: none; font-weight: 400; letter-spacing: 0; color: var(--text-muted); font-size: 11px; }

  /* QRIS only badge */
  .qris-only-badge {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 10px 14px;
    font-size: 13px; color: var(--text-secondary);
    margin-bottom: 1.25rem;
  }
  .qris-only-badge svg { color: var(--blue-600); flex-shrink: 0; }
  .qris-only-badge strong { color: var(--text-primary); }

  /* Summary */
  .summary { background: var(--bg-muted); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 1.25rem; }
  .summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; }
  .summary-row .s-label { color: var(--text-secondary); }
  .summary-row .s-val { font-weight: 500; color: var(--text-primary); }
  .summary-row .s-val.highlight { color: var(--blue-600); font-size: 15px; }

  /* Divider */
  .divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

  /* Section label */
  .sec-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

  /* ── PAYMENT METHOD SELECTOR ── */
  .pay-section { margin-bottom: 1.25rem; }
  .pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pay-method {
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 10px 12px; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-card);
  }
  .pay-method:hover { border-color: var(--blue-400); background: var(--bg-muted); }
  .pay-method.active { border-color: var(--blue-600); background: var(--blue-100); }
  .pay-method-logo {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: -0.3px;
  }
  .pay-method-info .pm-name  { font-size: 13px; font-weight: 500; color: var(--text-primary); }
  .pay-method-info .pm-type  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

  /* Logo brand colors */
  .logo-qris   { background: #e8f4ff; color: #c53030; font-size: 11px; }
  .logo-gopay  { background: #e8f5f0; color: #00aa5b; }
  .logo-ovo    { background: #f0ebff; color: #4c2f7b; }
  .logo-dana   { background: #e8f2ff; color: #1565c0; }
  .logo-bca    { background: #003d99; color: #fff; }
  .logo-mandiri{ background: #003068; color: #f5a623; }

  /* ── PAYMENT SCREEN ── */
  .pay-screen { display: none; }
  .pay-screen.visible { display: block; }

  .pay-screen-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem;
  }
  .back-btn {
    background: none; border: 1.5px solid var(--border); border-radius: 8px;
    width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); flex-shrink: 0;
    transition: background 0.12s;
  }
  .back-btn:hover { background: var(--bg-muted); }
  .pay-screen-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
  .pay-screen-sub   { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

  /* QR code block */
  .qr-wrap {
    background: var(--bg-muted); border-radius: var(--radius-lg);
    padding: 1.25rem; text-align: center; margin-bottom: 1.1rem;
  }
  .qr-amount { font-size: 22px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
  .qr-for    { font-size: 12px; color: var(--text-muted); margin-bottom: 1rem; }
  .qr-canvas-wrap {
    /* fit-content + auto side margins centers the white QR box within #viewQr,
       which is not itself text-aligned. */
    display: block; width: fit-content; text-align: center;
    margin: 0 auto 1rem; padding: 12px; background: #fff;
    border-radius: var(--radius-md); border: 1px solid var(--border);
  }
  /* Explicit size so the box holds its shape even before the server-rendered
     data-URI image (set by renderQrCode() in voucher.js) has loaded — an
     unsized <img> with no src collapses to the browser's small broken-image
     glyph instead of the full QR footprint. */
  .qr-image { display: block; width: 220px; height: 220px; }
  .qr-merchant { font-size: 12px; color: var(--text-secondary); }
  .qr-merchant strong { color: var(--text-primary); }

  /* Countdown */
  .pay-countdown {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,197,61,0.14); border: 1px solid rgba(255,197,61,0.45); border-radius: var(--radius-md);
    padding: 10px 14px; margin-bottom: 1.1rem; font-size: 13px;
  }
  .pay-countdown .cd-label { color: var(--amber-on-tint); }
  .pay-countdown .cd-time  { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 600; color: var(--amber-on-tint); }

  /* Expired QRIS — replaces the code itself, so nothing scannable is left on
     screen once it can no longer be paid. */
  .qr-expired {
    text-align: center; padding: 2rem 1.25rem 1.5rem;
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-md); margin-bottom: 1.1rem;
  }
  /* Flex-centered so the icon sits in the middle even when a global reset
     (Tailwind preflight) forces svg to display:block, which text-align can't
     centre. */
  .qr-expired-icon { display: flex; justify-content: center; color: var(--red-600); margin-bottom: 12px; }
  .qr-expired-icon svg { width: 44px; height: 44px; }
  .qr-expired-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
  .qr-expired-sub { font-size: 13px; line-height: 1.55; color: var(--text-secondary); }

  /* Transfer info */
  .transfer-info { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); margin-bottom: 1.1rem; }
  .ti-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border);
    background: var(--bg-card);
  }
  .ti-row:last-child { border-bottom: none; }
  .ti-label { color: var(--text-secondary); }
  .ti-val   { font-weight: 500; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
  .copy-btn {
    background: var(--bg-muted); border: 1px solid var(--border); border-radius: 6px;
    padding: 2px 8px; font-size: 11px; color: var(--text-secondary); cursor: pointer;
    font-family: 'Outfit', sans-serif; transition: background 0.12s;
  }
  .copy-btn:hover { background: var(--blue-100); color: var(--blue-600); border-color: var(--blue-400); }
  .copy-btn.copied { background: var(--green-100); color: var(--green-600); border-color: var(--green-600); }

  /* Ewallet steps */
  .ewallet-steps { margin-bottom: 1.1rem; }
  .step-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid var(--border);
  }
  .step-item:last-child { border-bottom: none; }
  .step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--blue-100); color: var(--blue-600);
    font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
  }
  .step-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
  .step-text strong { color: var(--text-primary); font-weight: 500; }

  /* Buttons */
  .btn-primary {
    width: 100%; background: var(--blue-600); color: #fff; border: none;
    border-radius: var(--radius-md); padding: 13px; font-size: 15px; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.15s, transform 0.1s; font-family: 'Outfit', sans-serif;
  }
  .btn-primary:hover { background: var(--blue-800); }
  .btn-primary:active { transform: scale(0.98); }
  .btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }
  .btn-primary.green { background: var(--green-600); }
  .btn-primary.green:hover { background: #018757; }
  .btn-ghost {
    background: none; border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 9px 20px; font-size: 13px; color: var(--text-secondary); cursor: pointer;
    font-family: 'Outfit', sans-serif; transition: background 0.15s, border-color 0.15s;
  }
  .btn-ghost:hover { background: var(--bg-muted); border-color: var(--text-muted); }
  .btn-ghost.danger { color: var(--red-600); border-color: rgba(227,26,26,0.30); }
  .btn-ghost.danger:hover { background: rgba(227,26,26,0.07); border-color: var(--red-600); }

  /* Spinner */
  .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin 0.7s linear infinite; display: none;
  }
  .btn-primary.loading .spinner { display: inline-block; }
  .btn-primary.loading .btn-label { opacity: 0.5; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── Voucher panel ── */
  .vc-icon-wrap { text-align: center; margin-bottom: 18px; }
  .vc-icon-wrap svg { width: 64px; height: 64px; }
  .vc-heading {
    font-size: 20px; font-weight: 700; color: var(--text-primary);
    text-align: center; margin-bottom: 8px;
  }
  .vc-sub {
    font-size: 13px; color: var(--text-muted);
    text-align: center; margin-bottom: 22px; line-height: 1.5;
  }
  .vc-field { margin-bottom: 6px; }
  .vc-input {
    width: 100%; padding: 13px 16px;
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-input);
    font-family: 'JetBrains Mono', monospace; font-size: 16px;
    font-weight: 600; letter-spacing: 0.12em; text-align: center;
    color: var(--text-primary); outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
  }
  .vc-input:focus {
    border-color: var(--border-focus); background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(18,196,214,0.10);
  }
  .vc-input::placeholder { color: var(--text-muted); font-weight: 400; letter-spacing: 0.06em; }
  .vc-error {
    font-size: 12px; color: var(--red-600); min-height: 18px;
    margin-top: 5px; padding-left: 2px;
  }
  .vc-btn { margin-top: 4px; }
  .vc-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0; color: var(--text-muted); font-size: 13px;
  }
  .vc-divider::before, .vc-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }

  /* ── Voucher code box in success screen ── */
  .vcb {
    margin: 18px 0 4px;
    background: linear-gradient(135deg, rgba(18,196,214,0.08), rgba(1,181,116,0.06));
    border: 1.5px solid rgba(18,196,214,0.22);
    border-radius: 14px; padding: 14px 16px; text-align: center;
  }
  .vcb-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px;
  }
  .vcb-code-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
  .vcb-code {
    font-family: 'JetBrains Mono', monospace; font-size: 18px;
    font-weight: 700; letter-spacing: 0.12em; color: var(--primary);
  }
  .vcb-copy {
    border: none; background: rgba(18,196,214,0.12); color: var(--primary);
    border-radius: 8px; padding: 5px 7px; min-width: 44px; min-height: 44px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s;
  }
  .vcb-copy:hover { background: rgba(18,196,214,0.22); }
  .vcb-copy svg { width: 16px; height: 16px; }
  .vcb-hint {
    font-size: 11px; color: var(--text-muted); margin-top: 8px;
  }
  .vcb-expiry {
    font-size: 11px; font-weight: 500; color: var(--red-600); margin-top: 4px;
  }
  .vcb-notconnected {
    font-size: 11px; font-weight: 600; color: var(--amber-on-tint);
    margin-top: 8px; padding: 8px 10px; text-align: left; line-height: 1.4;
    background: rgba(255,197,61,0.14); border-radius: 8px;
  }
  .vcb-connected {
    font-size: 11px; font-weight: 600; color: var(--green-on-tint);
    margin-top: 8px; padding: 8px 10px; text-align: left; line-height: 1.4;
    background: var(--green-100); border-radius: 8px;
  }
  .vcb-use-now {
    /* display toggled to flex by showUseVoucherButton() */
    display: none; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 14px;
    border: none; border-radius: var(--radius-md); cursor: pointer;
    background: var(--primary); color: #fff;
    font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
    transition: background 0.15s;
  }
  .vcb-use-now:hover    { background: var(--blue-800); }
  .vcb-use-now:active   { transform: scale(0.98); }
  .vcb-use-now:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
  .vcb-use-now.loading .spinner { display: inline-block; }
  .vcb-use-error {
    font-size: 11px; font-weight: 500; color: var(--red-600);
    margin-top: 6px; text-align: left; line-height: 1.4;
  }
  .vcb-use-error:empty { display: none; }

  /* Success screen */
  .success-screen { display: none; }
  .success-screen.visible { display: block; }
  .success-header { text-align: center; padding: 1rem 0 1.5rem; }
  .check-ring {
    width: 64px; height: 64px; border-radius: 50%; background: var(--green-100);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  }
  .check-ring svg { width: 30px; height: 30px; }
  @keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .success-title { font-size: 20px; font-weight: 600; color: var(--text-primary); }
  .success-sub   { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

  /* Receipt blocks */
  .receipt-block { margin-bottom: 14px; }
  .receipt-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-muted);
    margin-bottom: 6px; padding-left: 2px;
  }
  .info-table { background: var(--bg-muted); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 0; }
  .info-row   { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
  .info-row:last-child { border-bottom: none; }
  .info-row .i-label { color: var(--text-secondary); }
  .info-row .i-val   { font-weight: 500; color: var(--text-primary); }
  .info-row .i-val.mono { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--blue-600); }
  #recDuration { color: var(--amber-on-tint); font-weight: 600; }

  .usage-bar-wrap { margin: 0.75rem 0 1.5rem; }
  .usage-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
  .usage-bar-track { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
  .usage-bar-fill  { height: 100%; background: var(--blue-400); border-radius: 999px; transition: width 1s linear; }

  .success-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 0.5rem; }
  .btn-download {
    background: var(--blue-600); border: none; border-radius: var(--radius-md);
    padding: 10px 24px; font-size: 13px; font-weight: 500; color: #fff; cursor: pointer;
    font-family: 'Outfit', sans-serif; transition: background 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  }
  .btn-download:hover { background: var(--blue-800); }
  .btn-download:active { transform: scale(0.98); }
  .btn-download:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

  .page-footer { font-size: 12px; color: var(--chrome-text-faint); text-align: center; }
  .page-footer a { color: var(--chrome-text-soft); text-decoration: none; }
  .page-footer a:hover { color: var(--chrome-text); }

  /* ── Customer-service floating button + hint bubble ── */
  .cs-fab-wrap {
    position: fixed; right: 20px; bottom: 20px; z-index: 50;
    display: flex; align-items: center; gap: 12px;
  }
  .cs-fab {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: #ffffff;
    box-shadow: 0 8px 20px rgba(18,196,214,0.35);
    transition: background 0.15s, transform 0.15s;
    will-change: transform;
  }
  .cs-fab svg { width: 24px; height: 24px; }
  .cs-fab:hover  { background: var(--blue-800); transform: translateY(-2px); }
  .cs-fab:active { transform: translateY(0) scale(0.94); }

  /* Speech-bubble hint pointing at the button */
  .cs-fab-bubble {
    position: relative;
    display: flex; align-items: center;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 9px 15px; border-radius: 14px;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    box-shadow: var(--shadow-card);
    animation: csBubbleIn 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.8s both,
               csBubbleFloat 2.6s ease-in-out 1.4s infinite;
  }
  /* Small badge overlapping the bubble's top-left corner */
  .cs-fab-bubble-close {
    position: absolute; top: -8px; left: -8px;
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0; padding: 0;
    border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
    background: var(--bg-card); color: var(--text-muted);
    box-shadow: var(--shadow-card);
    font-size: 14px; line-height: 1;
    transition: background 0.15s, color 0.15s;
  }
  .cs-fab-bubble-close:hover { background: var(--bg-muted); color: var(--text-primary); }
  .cs-fab-bubble-hidden { opacity: 0; pointer-events: none; animation: none; }
  /* Tail: bordered triangle + a slightly smaller fill triangle on top,
     the classic two-triangle trick for a bordered speech-bubble pointer. */
  .cs-fab-bubble::before,
  .cs-fab-bubble::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%);
    width: 0; height: 0;
    border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  }
  .cs-fab-bubble::before {
    right: -8px;
    border-left: 8px solid var(--border);
  }
  .cs-fab-bubble::after {
    right: -6.5px;
    border-left: 7px solid var(--bg-card);
  }
  @keyframes csBubbleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
  }
  @keyframes csBubbleFloat {
    0%, 100% { margin-top: 0; }
    50%      { margin-top: -4px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .cs-fab-bubble { animation: none; }
  }

  /* ── Modal konfirmasi keluar ── */
  .modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(6,17,31,0.75);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .modal-overlay.show { opacity: 1; pointer-events: all; }

  .modal-box {
    background: var(--bg-card); border-radius: var(--radius-xl);
    padding: 2rem 1.75rem; width: 100%; max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  }
  /* Focused programmatically on open (see showModal in voucher.js) so
     screen readers land inside the dialog; the panel's own appearance
     already signals focus, so no visible ring on the container itself. */
  .modal-box:focus, .tnc-box:focus { outline: none; }
  .modal-overlay.show .modal-box { transform: translateY(0) scale(1); }

  .modal-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(227,26,26,0.10); margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-icon svg { width: 26px; height: 26px; stroke: var(--red-600); }

  .modal-title { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 0.6rem; }
  .modal-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5rem; }
  .modal-desc strong { color: var(--text-primary); }

  .modal-actions { display: flex; flex-direction: column; gap: 10px; }
  .modal-btn-confirm {
    width: 100%; padding: 12px; border-radius: var(--radius-md); border: none;
    background: var(--red-600); color: #fff; font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: 'Outfit', sans-serif;
    transition: background 0.15s;
  }
  .modal-btn-confirm:hover:not(:disabled) { background: #c11414; }
  .modal-btn-confirm:disabled {
    background: #f2a8a8; cursor: not-allowed;
    font-variant-numeric: tabular-nums;
  }
  .modal-btn-cancel {
    width: 100%; padding: 11px; border-radius: var(--radius-md);
    border: 1.5px solid var(--border); background: none;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: 'Outfit', sans-serif;
    transition: background 0.15s, border-color 0.15s;
  }
  .modal-btn-cancel:hover { background: var(--bg-muted); border-color: var(--text-muted); }

  .modal-btn-proceed {
    width: 100%; padding: 14px; border-radius: var(--radius-md); border: none;
    background: linear-gradient(135deg, #01b574 0%, #018757 100%);
    color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
    cursor: pointer; font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 14px rgba(1,181,116,0.45);
    transition: filter 0.15s, box-shadow 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .modal-btn-proceed:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(1,181,116,0.55); }
  .modal-btn-proceed.loading .spinner { display: inline-block; }
  .pay-confirm-summary {
    background: var(--bg-muted); border-radius: var(--radius-md);
    padding: 0.8rem 1rem; margin: 0.9rem 0 0.1rem; display: flex; flex-direction: column; gap: 0.55rem;
  }
  .pc-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
  .pc-label { color: var(--text-muted); }
  .pc-val   { font-weight: 600; color: var(--text-main); }
  .pc-price { color: var(--primary); font-size: 15px; }

  /* ── T&C Modal ── */
  .tnc-overlay { align-items: flex-start; overflow-y: auto; padding: 20px; }
  .tnc-box {
    max-width: 520px; width: 100%; border-radius: 20px;
    overflow: hidden; display: flex; flex-direction: column;
    margin: auto; max-height: calc(100vh - 40px);
  }
  .tnc-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--border);
    background: var(--card-bg); position: sticky; top: 0; z-index: 1;
  }
  .tnc-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
  .tnc-meta  { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
  .tnc-close {
    background: none; border: none; cursor: pointer; line-height: 0;
    color: var(--text-muted); padding: 5px; border-radius: 8px;
    transition: color 0.15s, background 0.15s; flex-shrink: 0; margin-left: 12px;
  }
  .tnc-close:hover { color: var(--text-main); background: var(--bg-muted); }
  .tnc-body { padding: 1.2rem 1.4rem; overflow-y: auto; flex: 1; }
  .tnc-effective {
    font-size: 11px; color: var(--text-muted); background: var(--bg-muted);
    border-radius: 6px; padding: 5px 10px; margin-bottom: 1.2rem; display: inline-block;
  }
  .tnc-section {
    margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border);
  }
  .tnc-section:last-child { border-bottom: none; margin-bottom: 0.25rem; padding-bottom: 0; }
  .tnc-section h3 {
    font-size: 12.5px; font-weight: 700; color: var(--primary);
    margin-bottom: 0.4rem; font-family: 'Outfit', sans-serif;
  }
  .tnc-section p {
    font-size: 13px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 0.35rem;
  }
  .tnc-section p:last-child { margin-bottom: 0; }
  .tnc-section ul {
    font-size: 13px; line-height: 1.65; color: var(--text-secondary);
    padding-left: 1.3rem; margin: 0.3rem 0 0;
  }
  .tnc-section ul li { margin-bottom: 0.25rem; }

  @media (max-width: 400px) {
    .pay-methods { grid-template-columns: 1fr; }
    .plan-card { padding: 10px 6px; }
  }
