/* ============================================================================
 * BullLike 2029 — Neo-fintech / Soft Dashboard (Wise / Atyp-display style)
 * Clean rewrite — no legacy CSS · lime accent #C6EF4E
 * Built 2026-05-27
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Anuphan:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================================
 * Tokens — light is default; .dark / [data-theme="dark"] override
 * ========================================================================== */
:root {
    --lime: #C6EF4E;
    --lime-2: #B5DD3D;
    --lime-soft: rgba(198, 239, 78, 0.16);
    --lime-ink: #1A2010;
    --lime-text: #4d7c0f; /* readable lime as TEXT on LIGHT bg; --lime stays bright for fills/buttons. Overridden to bright lime in dark mode. */

    --red: #FF6B6B;
    --red-soft: rgba(255, 107, 107, 0.12);
    --amber: #FFB547;
    --blue: #6FA8FF;

    /* Light (default) */
    --bg: #EEF0E8;
    --bg-1: #F6F7F1;
    --surface: #FFFFFF;
    --surface-2: #F4F6F0;
    --surface-3: #E9ECE2;
    --line: rgba(0, 0, 0, 0.06);
    --line-2: rgba(0, 0, 0, 0.10);
    --line-strong: rgba(0, 0, 0, 0.18);
    --text: #14160F;
    --text-2: #4A5048;
    --text-3: #7A807A;
    --text-4: #B5BAB2;

    --paper: #FFFFFF;
    --paper-2: #F4F6F0;
    --paper-ink: #14160F;
    --paper-mute: rgba(20, 22, 15, 0.6);
    --paper-mute-2: rgba(20, 22, 15, 0.45);
    --paper-line: rgba(20, 22, 15, 0.06);

    --invert: #14160F;
    --invert-ink: #F4F6F0;

    --r-xs: 8px;
    --r-sm: 12px;
    --r: 18px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-pill: 999px;

    --rail-w: 240px;
    --rail-w-collapsed: 76px;
    --topbar-h: 64px;
}

html.dark, html[data-theme="dark"], :root[data-theme="dark"] {
    --bg: #0B0F0E;
    --bg-1: #11161A;
    --surface: #1A2024;
    --surface-2: #232A2F;
    --surface-3: #2D353B;
    --line: rgba(255, 255, 255, 0.06);
    --line-2: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --lime-text: #C6EF4E; /* bright lime reads fine as text on dark */
    --text: #F2F4F1;
    --text-2: #A8B0AC;
    --text-3: #6F7873;
    --text-4: #444C49;

    --paper: #161C1A;
    --paper-2: #1F2622;
    --paper-ink: #ECF4D9;
    --paper-mute: rgba(236, 244, 217, 0.6);
    --paper-mute-2: rgba(236, 244, 217, 0.45);
    --paper-line: rgba(198, 239, 78, 0.10);

    --invert: var(--lime);
    --invert-ink: var(--lime-ink);
}

/* ============================================================================
 * Reset + base
 * ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Anuphan', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--lime-text); }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { padding-left: 1.4em; margin: 0; }
ul.list-bare { list-style: none; padding: 0; margin: 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

::selection { background: var(--lime); color: var(--lime-ink); }

/* ============================================================================
 * Typography
 * ========================================================================== */
.display { font-family: 'Plus Jakarta Sans', 'Anuphan', sans-serif; font-weight: 800; letter-spacing: -0.03em; }
.mono { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, monospace; }
.num { font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; font-weight: 600; letter-spacing: -0.01em; }

.t-display { font-size: 88px; line-height: 0.95; letter-spacing: -0.04em; font-weight: 800; }
.t-h1 { font-size: 56px; line-height: 1; letter-spacing: -0.035em; font-weight: 800; }
.t-h2 { font-size: 32px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; }
.t-h3 { font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
.t-eyebrow { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0.02em; }

@media (max-width: 768px) {
    .t-display { font-size: 56px; }
    .t-h1 { font-size: 36px; }
    .t-h2 { font-size: 24px; }
    .t-h3 { font-size: 18px; }
}

.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-lime { color: var(--lime-text); }
.text-red { color: var(--red); }
.text-paper { color: var(--paper-ink); }

.muted { color: var(--text-3); }

/* ============================================================================
 * Surfaces — cards
 * ========================================================================== */
.card {
    background: var(--surface);
    border-radius: var(--r);
    border: 1px solid var(--line);
}
.card-paper {
    background: var(--paper);
    color: var(--paper-ink);
    border-radius: var(--r);
    border: 1px solid var(--paper-line);
}
.card-paper .text-2 { color: var(--paper-mute); }
.card-paper .text-3 { color: var(--paper-mute-2); }
.card-lime {
    background: var(--lime);
    color: var(--lime-ink);
    border-radius: var(--r);
}
.card-lime .text-2 { color: rgba(26, 32, 16, 0.65); }
.card-padded { padding: 24px; }
.card-padded-lg { padding: 32px; }

.card-hover { transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10); }

/* ============================================================================
 * Pills / capsules
 * ========================================================================== */
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--line);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
}
.pill:hover { background: var(--surface-3); color: var(--text); }
.pill-active {
    background: var(--lime);
    color: var(--lime-ink);
    border-color: transparent;
    font-weight: 600;
}
.pill-active:hover { background: var(--lime-2); color: var(--lime-ink); }
.pill-ghost {
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--text-2);
}
.pill-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.pill-dark {
    background: var(--invert);
    color: var(--invert-ink);
    border-color: transparent;
}
.pill-sm { padding: 5px 12px; font-size: 12px; }
.pill-lg { padding: 12px 22px; font-size: 14px; }

/* ============================================================================
 * Buttons
 * ========================================================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform .12s, background .15s, color .15s, border-color .15s, box-shadow .15s;
    text-decoration: none;
    justify-content: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--lime); color: var(--lime-ink); }
.btn-primary:hover { background: var(--lime-2); color: var(--lime-ink); }
.btn-dark { background: var(--invert); color: var(--invert-ink); }
.btn-dark:hover { color: var(--invert-ink); }
.btn-light { background: var(--paper); color: var(--paper-ink); border-color: var(--paper-line); }
.btn-light:hover { background: var(--paper-2); color: var(--paper-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #e85a5a; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }
.btn-icon-only { padding: 10px; aspect-ratio: 1; justify-content: center; }

/* ============================================================================
 * Forms — field / label
 * ========================================================================== */
.label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 8px;
    font-weight: 500;
}
.field {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .12s, background .12s;
}
.field:focus { outline: none; border-color: var(--lime-text); background: var(--surface); }
.field::placeholder { color: var(--text-3); }
.field-bare { background: transparent; padding: 0; border-radius: 0; }
.field-sq { border-radius: var(--r-sm); padding: 12px 14px; }

textarea.field { border-radius: var(--r-sm); min-height: 120px; line-height: 1.6; resize: vertical; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 12px) center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-row { display: grid; gap: 12px; }
.field-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .field-row.two { grid-template-columns: 1fr; } }

.checkbox-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--lime-text); cursor: pointer; }

/* ============================================================================
 * Chips
 * ========================================================================== */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--text-2);
}
.chip-lime  { background: var(--lime); color: var(--lime-ink); }
.chip-red   { background: var(--red-soft); color: var(--red); }
.chip-amber { background: rgba(255, 181, 71, 0.15); color: var(--amber); }
.chip-blue  { background: rgba(111, 168, 255, 0.15); color: var(--blue); }
.chip-dark  { background: var(--invert); color: var(--invert-ink); }
.chip-paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-line); }
.chip-mute  { background: var(--surface-2); color: var(--text-3); }
.chip-sm    { padding: 2px 8px; font-size: 10px; }
.chip-lg    { padding: 6px 14px; font-size: 12px; }

/* ============================================================================
 * Status dots
 * ========================================================================== */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-lime  { background: var(--lime); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }
.dot-blue  { background: var(--blue); }
.dot-pulse { animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 239, 78, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(198, 239, 78, 0); }
}

/* ============================================================================
 * Bar (progress)
 * ========================================================================== */
.bar { height: 6px; background: rgba(20, 22, 15, 0.06); border-radius: 100px; overflow: hidden; }
html.dark .bar, html[data-theme="dark"] .bar { background: rgba(255, 255, 255, 0.08); }
.bar > div { height: 100%; background: var(--lime); border-radius: 100px; transition: width .3s ease; }
.bar-paper { background: rgba(20, 22, 15, 0.10); }
.bar-paper > div { background: #14160F; }
html.dark .bar-paper, html[data-theme="dark"] .bar-paper { background: rgba(255, 255, 255, 0.10); }
html.dark .bar-paper > div, html[data-theme="dark"] .bar-paper > div { background: var(--lime); }

/* ============================================================================
 * Avatar
 * ========================================================================== */
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--text);
    font-size: 12px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 26px; }
.avatar-lime { background: var(--lime); color: var(--lime-ink); }
.avatar-dark { background: var(--invert); color: var(--invert-ink); }
.avatar-stack > * + * { margin-left: -8px; border: 2px solid var(--surface); }

/* ============================================================================
 * Icons (SVG stroke style)
 * ========================================================================== */
.ico { stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icobox {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icobox-lime { background: var(--lime-soft); color: var(--lime-text); }
.icobox-red  { background: var(--red-soft); color: var(--red); }
.icobox-lg { width: 48px; height: 48px; border-radius: 14px; }
.icobox-xl { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }

/* ============================================================================
 * Social platform badges
 * ========================================================================== */
.social-badge {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 11px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.social-badge.instagram { background: #E4405F; }
.social-badge.tiktok    { background: #000; }
.social-badge.youtube   { background: #FF0000; }
.social-badge.facebook  { background: #1877F2; }
.social-badge.twitter   { background: #1DA1F2; }
.social-badge.spotify   { background: #1DB954; }
.social-badge.telegram  { background: #229ED9; }
.social-badge.discord   { background: #5865F2; }
.social-badge-lg { width: 40px; height: 40px; font-size: 14px; }

/* ============================================================================
 * Sparkline
 * ========================================================================== */
.spark { display: block; }

/* ============================================================================
 * Decorative blob
 * ========================================================================== */
.blob {
    position: absolute; pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
    z-index: 0;
}
.blob-lime { background: var(--lime); }
.blob-red  { background: var(--red); }
.blob-blue { background: var(--blue); }

/* ============================================================================
 * Table
 * ========================================================================== */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
    text-align: left;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
    padding: 12px 16px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.tbl th.right { text-align: right; }
.tbl td { padding: 14px 16px; vertical-align: middle; border-top: 1px solid var(--line); }
.tbl td.right { text-align: right; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl tr.is-selected td { background: var(--lime-soft); }
.card-paper .tbl th { color: rgba(20, 22, 15, 0.5); }
.card-paper .tbl td { border-color: rgba(20, 22, 15, 0.06); }
.card-paper .tbl tr:hover td { background: rgba(20, 22, 15, 0.03); }
html.dark .card-paper .tbl th, html[data-theme="dark"] .card-paper .tbl th { color: rgba(236, 244, 217, 0.5); }
html.dark .card-paper .tbl td, html[data-theme="dark"] .card-paper .tbl td { border-color: rgba(255, 255, 255, 0.06); }
html.dark .card-paper .tbl tr:hover td, html[data-theme="dark"] .card-paper .tbl tr:hover td { background: rgba(255, 255, 255, 0.03); }

.tbl-empty { padding: 48px 16px; text-align: center; color: var(--text-3); }
.tbl-empty i { font-size: 32px; margin-bottom: 8px; opacity: .6; display: block; }

/* ============================================================================
 * Order cards (orders page) — responsive list, great on mobile/tablet
 * ========================================================================== */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-date-sep { display: flex; align-items: center; gap: 8px; margin: 14px 2px 2px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.order-date-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.order-date-sep i { color: var(--lime-text); }

.order-card {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(150px, 0.9fr) auto;
    align-items: center;
    gap: 18px;
}
.order-card .oc-info { min-width: 0; }
.order-card .oc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; flex-wrap: wrap; }
.order-card .oc-id { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; color: var(--text-3); cursor: pointer; }
.order-card .oc-id:hover { color: var(--lime-text); }
.order-card .oc-copy { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 2px 5px; font-size: 13px; border-radius: 6px; line-height: 1; transition: color .15s, background .15s; }
.order-card .oc-copy:hover { color: var(--lime-text); background: var(--surface-2); }
.order-card .oc-service { font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .oc-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--lime-text); margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .oc-link:hover { color: var(--lime-text); }
.order-card .oc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; }
.order-card .oc-meta .m { font-size: 11.5px; color: var(--text-3); display: inline-flex; gap: 5px; align-items: baseline; }
.order-card .oc-meta .m b { font-family: 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); font-size: 12.5px; }

.order-card .oc-progress { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.order-card .oc-progress .pr-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--text-3); gap: 8px; }
.order-card .oc-progress .pr-top b { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--lime-text); font-variant-numeric: tabular-nums; }

.order-card .oc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.order-card .oc-charge { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.order-card .oc-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.oc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .14s, border-color .14s, color .14s, transform .12s; text-decoration: none; }
.oc-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.oc-btn i { font-size: 14px; }
.oc-btn-repeat { background: var(--lime); color: var(--lime-ink); border-color: transparent; box-shadow: var(--glow-lime); }
.oc-btn-repeat:hover { background: var(--lime-2); color: var(--lime-ink); }
.oc-btn-refill { color: var(--lime-text); }
.oc-btn-danger { color: var(--red); }
.oc-btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

@media (max-width: 920px) {
    .order-card { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
    .order-card .oc-side { flex-direction: row; align-items: center; justify-content: space-between; }
    .order-card .oc-actions { flex: 1; justify-content: flex-end; }
}
@media (max-width: 520px) {
    .order-card .oc-side { flex-direction: column; align-items: stretch; gap: 12px; }
    .order-card .oc-actions { justify-content: stretch; }
    .order-card .oc-actions .oc-btn { flex: 1; justify-content: center; }
    .order-card .oc-actions .oc-btn-icon { flex: 0 0 auto; }
}

/* Deposit-history rows (addfunds modal) */
.afh-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.afh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 11px 14px; background: var(--surface-2); border-radius: 12px; }
.afh-row .afh-method { display: flex; align-items: center; gap: 10px; min-width: 0; }
@media (max-width: 480px) {
    .afh-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
    .afh-row .afh-date { grid-column: 1; font-size: 11px; }
    .afh-row .afh-amount { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}

/* ============================================================================
 * Pagination
 * ========================================================================== */
.pager {
    display: flex; align-items: center; gap: 4px;
    padding: 16px;
    justify-content: center;
}
.pager a, .pager span, .pager button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.pager a:hover { background: var(--surface-2); }
.pager .active, .pager a.active { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.pager .disabled { opacity: .4; pointer-events: none; }

/* ============================================================================
 * Alerts (flash messages)
 * ========================================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--r-sm);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success { background: var(--lime-soft); color: var(--lime-ink); border-color: rgba(198, 239, 78, 0.3); }
html.dark .alert-success, html[data-theme="dark"] .alert-success { color: var(--lime-text); }
.alert-danger  { background: var(--red-soft); color: var(--red); border-color: rgba(255, 107, 107, 0.3); }
.alert-warning { background: rgba(255, 181, 71, 0.12); color: var(--amber); border-color: rgba(255, 181, 71, 0.3); }
.alert-info    { background: rgba(111, 168, 255, 0.12); color: var(--blue); border-color: rgba(111, 168, 255, 0.3); }
.alert .alert-close { margin-left: auto; background: transparent; border: 0; cursor: pointer; opacity: .6; color: inherit; font-size: 18px; line-height: 1; }
.alert .alert-close:hover { opacity: 1; }

/* ============================================================================
 * App layout — rail (sidebar) + topbar + main
 * ========================================================================== */
.app {
    display: grid;
    grid-template-columns: var(--rail-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas:
        "rail topbar"
        "rail main";
    min-height: 100vh;
}
.outside {
    display: block;
    min-height: 100vh;
}

/* Sidebar (rail) */
.rail {
    grid-area: rail;
    background: var(--bg-1);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}
.rail-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
}
.rail-brand-mark {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--lime-ink);
    display: grid; place-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.05em;
}
.rail-brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.rail-section {
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
    color: var(--text-3); text-transform: uppercase;
    padding: 14px 12px 6px;
}
.rail-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-2);
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    width: 100%;
    transition: background .12s, color .12s;
    text-decoration: none;
}
.rail-item:hover { color: var(--text); background: var(--surface-2); }
.rail-item.active {
    background: var(--lime);
    color: var(--lime-ink);
    font-weight: 600;
}
.rail-item .rail-badge {
    margin-left: auto;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(20, 22, 15, 0.08);
    color: var(--text);
}
html.dark .rail-item .rail-badge, html[data-theme="dark"] .rail-item .rail-badge { background: rgba(255, 255, 255, 0.08); }
.rail-item.active .rail-badge { background: rgba(26, 32, 16, 0.18); color: var(--lime-ink); }
.rail-foot {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 10px;
}
.rail-foot .rail-user-meta { flex: 1; min-width: 0; }
.rail-foot .rail-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rail-foot .rail-user-email { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-foot .rail-balance { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--lime-text); }

/* ---- Rail account card (sidebar footer) ---- */
.rail-account {
    margin-top: auto;
    display: flex; flex-direction: column; gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(198,239,78,0.10), transparent 60%),
        var(--bg);
    box-shadow: var(--shadow), var(--hairline);
}
html.dark .rail-account, html[data-theme="dark"] .rail-account { background: radial-gradient(120% 100% at 100% 0%, rgba(198,239,78,0.10), transparent 60%), var(--surface); }
.ra-top { display: flex; align-items: center; gap: 10px; }
.ra-avatar {
    position: relative; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 16px;
    color: var(--lime-ink);
    background: linear-gradient(135deg, var(--lime), #FFB547);
}
/* slowly-rotating "story ring" around the avatar */
.ra-avatar::before {
    content: ""; position: absolute; inset: -3px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--lime), #FFB547, #6FA8FF, var(--lime));
    z-index: -1;
    animation: raSpin 7s linear infinite;
}
.ra-avatar::after {
    content: ""; position: absolute; inset: -1px; border-radius: 50%;
    background: var(--surface); z-index: -1;
}
html.dark .ra-avatar::after, html[data-theme="dark"] .ra-avatar::after { background: var(--surface); }
@keyframes raSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ra-avatar::before { animation: none; } }
.ra-crown {
    position: absolute; bottom: -3px; right: -3px;
    width: 17px; height: 17px; border-radius: 50%;
    display: grid; place-items: center; font-size: 10px;
    color: #FFB547; background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ra-meta { flex: 1; min-width: 0; }
.ra-name { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-tier {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 3px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
    color: var(--lime-text); background: var(--lime-soft);
    border-radius: 999px; padding: 3px 9px; text-decoration: none;
    transition: background .14s, transform .12s;
}
.ra-tier:hover { color: var(--lime-text); transform: translateY(-1px); }
.ra-tier i { font-size: 12px; }
.ra-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); flex-shrink: 0; transition: background .14s, color .14s; }
.ra-icon:hover { color: var(--text); background: var(--surface-2); }

.ra-wallet {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    background: var(--surface-2); position: relative; overflow: hidden;
    text-decoration: none; transition: transform .14s;
}
.ra-wallet:hover { transform: translateY(-1px); }
.ra-wallet::after { /* sheen sweep on hover */
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-18deg); opacity: 0; pointer-events: none;
}
.ra-wallet:hover::after { animation: raSheen .9s ease; }
@keyframes raSheen { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ra-wallet:hover::after { animation: none; } }
.ra-wallet-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; }
.ra-balance { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-topup {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center; font-size: 22px;
    background: var(--lime); color: var(--lime-ink);
    box-shadow: var(--glow-lime); transition: transform .14s;
}
.ra-topup:hover { transform: translateY(-2px) scale(1.06); color: var(--lime-ink); }

/* Brand mark: subtle gradient + glow */
.rail-brand-mark { background: linear-gradient(135deg, var(--lime), var(--lime-2)); box-shadow: 0 4px 12px rgba(198,239,78,0.30); }

/* Trim-decimals: hide balance amounts until formatDecimals (layout.twig) runs → no flash of long converted decimals. Reveal failsafe via the 800ms timeout in that script. */
.format-decimal { visibility: hidden; }
html.bl-decimals-done .format-decimal { visibility: visible; }

/* Topbar */
.topbar {
    grid-area: topbar;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}
.topbar-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    color: var(--text);
    font-size: 13px;
    transition: border-color .12s, background .12s;
}
.topbar-search input:focus { outline: none; border-color: var(--lime-text); background: var(--surface); }
.topbar-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .12s;
    position: relative;
    text-decoration: none;
}
.topbar-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.topbar-icon-btn .badge-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.topbar-cta {
    background: var(--lime);
    color: var(--lime-ink);
    padding: 9px 18px;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 13px;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.topbar-cta:hover { background: var(--lime-2); color: var(--lime-ink); }

/* Main content */
.main {
    grid-area: main;
    padding: 24px;
    overflow-x: hidden;
}
.main-narrow { max-width: 1200px; margin: 0 auto; }

/* Mobile bottom-bar */
.mobile-bar {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 8px 16px;
    z-index: 80;
    justify-content: space-around;
    align-items: center;
}
.mobile-bar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 10px;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
}
.mobile-bar a.active { color: var(--lime-text); }
.mobile-bar .mobile-bar-fab {
    background: var(--lime); color: var(--lime-ink);
    width: 52px; height: 52px;
    border-radius: 50%;
    margin-top: -32px;
    box-shadow: 0 8px 20px rgba(198, 239, 78, 0.4);
}

@media (max-width: 992px) {
    .app {
        grid-template-columns: 1fr;
        grid-template-rows: var(--topbar-h) 1fr;
        grid-template-areas:
            "topbar"
            "main";
    }
    .rail { display: none; }
    .mobile-bar { display: flex; }
    .main { padding: 16px 16px 88px; }
}
@media (max-width: 640px) {
    .topbar { padding: 0 12px; }
    .topbar-search { display: none; }
    .d-none-mob { display: none; }   /* hide topbar CTA label on phones — was referenced but never defined */
    .topbar-cta { padding: 0 12px; }
}

/* ============================================================================
 * Public nav (for landing / public pages)
 * ========================================================================== */
.pub-nav {
    display: flex; align-items: center;
    padding: 18px 32px;
    gap: 28px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
}
.pub-nav-links { display: flex; gap: 4px; flex: 1; }
.pub-nav-links a {
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
}
.pub-nav-links a:hover { color: var(--text); }
.pub-nav-links a.active { background: var(--surface-2); color: var(--text); }
.pub-nav-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 768px) {
    .pub-nav-links { display: none; }
    .pub-nav { padding: 14px 16px; }
}
@media (max-width: 560px) {
    /* keep the guest top-nav on one line on phones (was overflowing ~23px) */
    .pub-nav { padding: 12px 14px; gap: 8px; }
    .pub-nav .rail-brand-name { font-size: 16px; }
    .pub-nav .rail-brand-mark { width: 30px; height: 30px; font-size: 15px; }
    .pub-nav-actions { gap: 6px; }
    .pub-nav-actions .bl-lang-code { display: none; }      /* keep flag, drop the TH/EN text */
    .pub-nav-actions .bl-lang-trigger { padding: 0 6px; }
    .pub-nav-actions .pill, .pub-nav-actions .btn { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 430px) {
    /* narrow phones: logo mark only so brand + auth buttons fit one line */
    .pub-nav .rail-brand-name { display: none; }
    .pub-nav-actions { gap: 5px; }
    .pub-nav-actions .pill, .pub-nav-actions .btn { padding-left: 11px; padding-right: 11px; }
}

/* Public footer — collapses 4 cols -> 2 -> 1 on smaller screens */
.pub-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.pub-footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
@media (max-width: 860px) { .pub-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; } }
@media (max-width: 520px) { .pub-footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ============================================================================
 * Bento grid (dashboard)
 * ========================================================================== */
.bento { display: grid; gap: 16px; }
.bento-3 { grid-template-columns: repeat(3, 1fr); }
.bento-2 { grid-template-columns: 2fr 1fr; }
.bento-21 { grid-template-columns: 1.7fr 1fr; }
@media (max-width: 992px) {
    .bento-3 { grid-template-columns: 1fr; }
    .bento-2, .bento-21 { grid-template-columns: 1fr; }
}

/* ============================================================================
 * Modals
 * ========================================================================== */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(20, 22, 15, 0.35);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1100;
    padding: 20px;
    animation: fadeIn .25s ease-out;
}
html.dark .modal-backdrop, html[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.5); }
.modal-backdrop.is-hidden { display: none; }
.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: modalIn .3s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
}
.modal-close:hover { background: var(--surface-3); }
.modal-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--lime-soft);
    color: var(--lime-text);
    display: grid; place-items: center;
    font-size: 26px;
    margin: 0 auto 16px;
}
.modal-icon.danger { background: var(--red-soft); color: var(--red); }
.modal-icon.lime { background: var(--lime); color: var(--lime-ink); }
.modal-title { font-size: 22px; font-weight: 800; text-align: center; margin: 0 0 8px; letter-spacing: -0.015em; }
.modal-sub { font-size: 14px; color: var(--text-2); text-align: center; margin: 0 0 22px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions > * { flex: 1; }
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 940px; }

/* Membership tier ladder (neworder modal) */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .tier-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.tier-card.is-current { border-color: var(--lime-text); box-shadow: var(--glow-lime); background: var(--lime-soft); }
.tier-head { display: flex; align-items: center; gap: 8px; }
.tier-head i { color: var(--lime-text); font-size: 18px; }
.tier-head .tier-name { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.tier-spend { display: flex; flex-direction: column; gap: 1px; }
.tier-perks { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-direction: column; gap: 5px; }
.tier-perks li { font-size: 12px; color: var(--text-2); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.tier-perks li i { color: var(--lime-text); font-size: 13px; margin-top: 1px; flex-shrink: 0; }

/* Trust list (neworder sidebar) */
.os-trust { display: flex; flex-direction: column; gap: 16px; }
.os-trust-row { display: flex; align-items: flex-start; gap: 12px; }
.os-t-title { font-size: 13px; font-weight: 700; }
.os-t-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }

/* Level progress (membership modal) */
.level-progress { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.level-progress .lp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.level-progress .lp-msg { font-size: 13px; font-weight: 600; }
.level-progress .lp-remain { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: var(--lime-text); font-size: 15px; }
.level-progress .bar { height: 9px; }
.level-progress .lp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--lime-2), var(--lime)); box-shadow: 0 0 12px rgba(198,239,78,0.45); transition: width .8s cubic-bezier(.16,1,.3,1); }
.level-progress .lp-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: 10.5px; color: var(--text-3); font-weight: 600; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ============================================================================
 * Toast
 * ========================================================================== */
.toast-row { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    animation: toastIn .35s cubic-bezier(.16, 1, .3, 1);
    min-width: 320px;
    max-width: 420px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--lime-soft); color: var(--lime-text); }
.toast.error   .toast-icon { background: var(--red-soft); color: var(--red); }
.toast.warn    .toast-icon { background: rgba(255, 181, 71, 0.15); color: var(--amber); }
.toast.info    .toast-icon { background: rgba(111, 168, 255, 0.15); color: var(--blue); }
.toast-body { flex: 1; min-width: 0; }
.toast-body b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.toast-body p { margin: 2px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.toast-close { background: transparent; border: 0; cursor: pointer; color: var(--text-3); font-size: 16px; padding: 2px; }

/* ============================================================================
 * Dropdown
 * ========================================================================== */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 6px;
    min-width: 220px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    animation: ddIn .2s cubic-bezier(.16, 1, .3, 1);
}
.dropdown-menu.is-hidden { display: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    color: var(--text);
    transition: background .12s;
    text-decoration: none;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.danger { color: var(--red); }
.dropdown-sep { height: 1px; background: var(--line); margin: 4px 0; }

/* ============================================================================
 * Tooltip
 * ========================================================================== */
.tooltip {
    background: var(--invert);
    color: var(--invert-ink);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: inline-block;
}
.tooltip::after {
    content: ''; position: absolute;
    bottom: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: var(--invert);
}

/* ============================================================================
 * Skeleton (loading)
 * ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================================
 * Drawer (slide-in side panel)
 * ========================================================================== */
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 24px;
    z-index: 1090;
    animation: drawerIn .3s cubic-bezier(.16, 1, .3, 1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}
.drawer.is-hidden { display: none; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ============================================================================
 * Confetti
 * ========================================================================== */
@keyframes confetti { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(360px) rotate(720deg); opacity: 0; } }
.confetti-piece { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: confetti 1.8s ease-out forwards; pointer-events: none; }

/* ============================================================================
 * Pop in
 * ========================================================================== */
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 60% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
.pop-in { animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1); }

/* ============================================================================
 * Code blocks (api docs)
 * ========================================================================== */
.code-block {
    background: #0A0E0C;
    border-radius: var(--r-sm);
    padding: 16px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: #d6e0d3;
    overflow-x: auto;
    position: relative;
    line-height: 1.7;
}
.code-block .copy-btn {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #d6e0d3;
    border: 0;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.code-block .copy-btn:hover { background: rgba(255, 255, 255, 0.12); }
.code-block .k { color: #ff79c6; }
.code-block .s { color: #f1fa8c; }
.code-block .n { color: #bd93f9; }
.code-block .c { color: #6272a4; font-style: italic; }
.code-block .v { color: #50fa7b; }

/* ============================================================================
 * Stat blocks (used in dashboard / orders / affiliates)
 * ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 992px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 18px 20px;
}
.stat .stat-l { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; margin-bottom: 8px; }
.stat .stat-v { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 28px; color: var(--text); letter-spacing: -0.02em; line-height: 1; }
.stat .stat-v small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.stat .stat-delta { font-size: 11px; color: var(--lime-text); margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.stat .stat-delta.down { color: var(--red); }

/* ============================================================================
 * Utility classes (BL = BullLike)
 * ========================================================================== */
.is-hidden { display: none !important; }
.is-invisible { visibility: hidden !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mono { font-family: 'JetBrains Mono', monospace; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.w-full { width: 100%; }
.max-w-md { max-width: 480px; }
.max-w-lg { max-width: 640px; }
.max-w-xl { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky-top { position: sticky; top: 24px; z-index: 1 !important; }

.rounded-pill { border-radius: var(--r-pill); }
.rounded-md { border-radius: var(--r-sm); }
.rounded-lg { border-radius: var(--r); }
.rounded-xl { border-radius: var(--r-lg); }
.rounded-full { border-radius: 9999px; }

/* RTL */
body.rtl, body.rtl-enable { direction: rtl; }

/* ============================================================================
 * End of base — page-specific styles below this comment
 * ========================================================================== */

/* ============================================================================
 * Platform-injected form fields (PerfectPanel order #fields, account, tickets)
 * use Bootstrap .form-control / .form-select / .control-label — theme them to
 * match the dark design (was rendering as unstyled white boxes).
 * ========================================================================== */
.form-control,
.form-select,
select.form-control,
textarea.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color .12s, background .12s;
}
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--lime-text);
    background: var(--surface);
    box-shadow: none;
}
.form-control::placeholder { color: var(--text-3); }
.form-control[readonly] { background: var(--surface-3); cursor: default; }
textarea.form-control { min-height: 110px; line-height: 1.6; resize: vertical; }
select.form-control, .form-select {
    appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 18px) center, calc(100% - 12px) center;
    background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.control-label, .form-label {
    display: block; font-size: 12px; color: var(--text-3);
    margin-bottom: 8px; font-weight: 500;
}
.form-group { margin-bottom: 16px; }
.form-check-input, input[type="checkbox"], input[type="radio"] { accent-color: var(--lime-text); }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .form-control { flex: 1; }

/* select2 (loaded on tickets/account/child-panel) — dark theme */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r-sm); min-height: 46px; padding: 7px 10px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 30px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
.select2-dropdown { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.select2-container--default .select2-results__option { color: var(--text); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--lime); color: var(--lime-ink); }
.select2-search__field { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }

/* ============================================================================
 * Language switcher (site['languages']) — from bulllike 3
 * ========================================================================== */
.dropdown-item.is-active { background: var(--surface-2); }
.bl-lang-trigger { font-weight: 600; font-size: 13px; }
.bl-lang-code { font-weight: 700; letter-spacing: 0.02em; }
.bl-flag {
    width: 24px; height: 18px;
    border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; letter-spacing: 0.02em;
    flex-shrink: 0;
    color: #fff;
}
.bl-flag-th { background: linear-gradient(180deg, #A51931 0 25%, #F4F5F8 25% 33%, #2D2A4A 33% 67%, #F4F5F8 67% 75%, #A51931 75% 100%); color: #2D2A4A; text-shadow: 0 1px 1px rgba(255,255,255,0.5); }
.bl-flag-en { background: linear-gradient(135deg, #012169 0 50%, #C8102E 50% 100%); }

/* ============================================================================
 * Bootstrap visibility helpers — PerfectPanel's order JS shows/hides per-service
 * #fields groups via `.hidden` (and `.d-none`). The new theme dropped Bootstrap,
 * so these MUST be defined or ALL order fields show at once.
 * ========================================================================== */
.hidden { display: none !important; }
.d-none { display: none !important; }
[hidden] { display: none !important; }
.hide { display: none !important; }
.invisible { visibility: hidden !important; }

/* ============================================================================
 * FIXES (2026-06-04): select2 dark dropdown, theme-toggle icon, lang trigger
 * ========================================================================== */
/* select2 (PerfectPanel order form data-select) — force readable on dark */
.select2-dropdown { background: var(--surface) !important; border-color: var(--line) !important; }
.select2-results__option { color: var(--text) !important; background: transparent !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--selected { background: var(--lime) !important; color: var(--lime-ink) !important; }
.select2-container--default .select2-selection__rendered { color: var(--text) !important; }
.select2-container--default .select2-selection__placeholder { color: var(--text-3) !important; }
.select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--text) !important; background: var(--surface-2) !important;
    border: 1px solid var(--line) !important; border-radius: 8px !important;
}

/* Topbar theme-toggle: show only the active theme's icon (was showing moon+sun stacked) */
.theme-dark-icon, .theme-light-icon { display: none !important; }
html.dark .theme-dark-icon, html[data-theme="dark"] .theme-dark-icon { display: inline-block !important; }
html.light .theme-light-icon, html[data-theme="light"] .theme-light-icon { display: inline-block !important; }

/* Language switcher trigger: inline row (override .topbar-icon-btn's grid/fixed-width) */
.bl-lang-trigger { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; width: auto !important; }

/* Language dropdown open/close — explicit display beats leftover bootstrap .dropdown-menu{display:none} */
.bl-lang .dropdown-menu { display: none !important; }
.bl-lang.bl-open .dropdown-menu { display: block !important; }

/* Built-in service search (services_search): platform engine renders a select2 search inside #new-order-search */
#new-order-search { width: 100%; }
#new-order-search .search-dropdown, #new-order-search .input-wrapper { position: relative; width: 100%; }
#new-order-search .input-wrapper__prepend { position: absolute; top: 50%; transform: translateY(-50%); left: 12px; background: none; border: none; color: var(--text-3); z-index: 2; padding: 0; display: flex; align-items: center; }
[dir="rtl"] #new-order-search .input-wrapper__prepend { left: auto; right: 12px; }
#new-order-search .input-wrapper__prepend .fa-search, #new-order-search .input-wrapper__prepend .fas { color: var(--text-3); }
#new-order-search input.form-control, #new-order-search .select2-selection--single { padding-left: 38px !important; }
[dir="rtl"] #new-order-search input.form-control, [dir="rtl"] #new-order-search .select2-selection--single { padding-left: 14px !important; padding-right: 38px !important; }

/* Country-flag language switcher — circular flag badge (redesigned) */
.bl-flag-img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line-2); display: inline-block; vertical-align: middle; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: border-color .15s; }
.bl-lang-trigger:hover .bl-flag-img { border-color: var(--lime-text); }
.bl-lang-trigger .bl-lang-code { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.bl-lang .dropdown-item { display: flex; align-items: center; gap: 10px; }
.bl-lang .dropdown-item .bl-flag-img { width: 22px; height: 22px; }

/* Category/service/search dropdown readability — options + their inner <a> were #333 (leftover bootstrap link color) on a dark dropdown. Force bright. */
.select2-container--default .select2-results__option { color: var(--text) !important; }
.select2-container--default .select2-results__option a,
.select2-container--default .select2-results__option a:link,
.select2-container--default .select2-results__option a:visited,
.select2-results__option a { color: var(--text) !important; text-decoration: none !important; }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--surface-2) !important; }
/* highlighted (keyboard) AND :hover — lime bg + DARK text on the option and ALL its children (was white-on-lime = unreadable) */
.select2-container--default .select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option:hover { background-color: var(--lime-text) !important; color: var(--lime-ink) !important; }
.select2-container--default .select2-results__option--highlighted *,
.select2-container--default .select2-results__option:hover * { color: var(--lime-ink) !important; }
/* inner <a> needs higher specificity than the bright-link rule (li+class+a = 0,2,2 > 0,2,1) */
.select2-container--default li.select2-results__option--highlighted a,
.select2-container--default li.select2-results__option--highlighted a:link,
.select2-container--default li.select2-results__option--highlighted a:visited,
.select2-container--default li.select2-results__option:hover a { color: var(--lime-ink) !important; }
.select2-results__option strong, .select2-results__option b, .select2-results__option mark { color: var(--lime-text); background: transparent; font-weight: 800; }

/* Real platform FAQ ({{ faq }} HTML blob) — make the injected accordion readable on the dark theme */
.bl-faq-cms { color: var(--text); }
.bl-faq-cms, .bl-faq-cms p, .bl-faq-cms span, .bl-faq-cms li, .bl-faq-cms div, .bl-faq-cms h1, .bl-faq-cms h2, .bl-faq-cms h3, .bl-faq-cms h4, .bl-faq-cms strong, .bl-faq-cms b { color: var(--text); }
.bl-faq-cms a { color: var(--text) !important; text-decoration: none; }
.bl-faq-cms a:hover { color: var(--lime-text) !important; }
.bl-faq-cms .panel, .bl-faq-cms .card, .bl-faq-cms .accordion-item, .bl-faq-cms [class*="accordion"] > [class*="item"], .bl-faq-cms details, .bl-faq-cms dt, .bl-faq-cms li { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--r-sm) !important; margin-bottom: 10px !important; overflow: hidden; list-style: none; }
.bl-faq-cms .panel-heading, .bl-faq-cms .panel-title, .bl-faq-cms .card-header, .bl-faq-cms summary, .bl-faq-cms dt { background: transparent !important; padding: 16px 20px !important; font-weight: 600 !important; cursor: pointer; color: var(--text) !important; }
.bl-faq-cms .panel-body, .bl-faq-cms .card-body, .bl-faq-cms dd { padding: 14px 20px !important; color: var(--text-2) !important; line-height: 1.7; margin: 0; background: var(--surface-2) !important; border-top: 1px solid var(--line); }
/* the FAQ question toggle is a <button class="btn"> with bootstrap's dark #212529 text → invisible on dark. Force bright + full-width row. */
.bl-faq-cms .card-header { padding: 0 !important; background: transparent !important; border: none !important; }
.bl-faq-cms .btn, .bl-faq-cms .card-header .btn { color: var(--text) !important; background: transparent !important; border: none !important; box-shadow: none !important; width: 100% !important; text-align: left !important; font-weight: 600 !important; font-size: 14.5px !important; line-height: 1.5 !important; display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px; padding: 16px 20px !important; cursor: pointer; white-space: normal !important; }
.bl-faq-cms .btn:hover { background: var(--surface-2) !important; color: var(--lime-text) !important; }
.bl-faq-cms .collapse { display: none; }
.bl-faq-cms .collapse.in, .bl-faq-cms .collapse.show { display: block; }
.bl-faq-cms .btn .arrow { color: var(--lime-text) !important; flex-shrink: 0; }
.bl-faq-cms .btn.collapsed .fa-angle-up, .bl-faq-cms .btn:not(.collapsed) .fa-angle-down { display: none; }

/* ============================================================================
 * v2 AESTHETIC POLISH — depth · light · glow · refined rhythm
 * Additive layer; lifts every page at once. Default = light theme.
 * ========================================================================== */
:root {
    --shadow-sm: 0 1px 2px rgba(24, 32, 12, 0.05);
    --shadow:    0 1px 2px rgba(24, 32, 12, 0.04), 0 10px 26px rgba(24, 32, 12, 0.07);
    --shadow-lg: 0 8px 16px rgba(24, 32, 12, 0.06), 0 28px 64px rgba(24, 32, 12, 0.13);
    --hairline:  inset 0 1px 0 rgba(255, 255, 255, 0.85);
    --glow-lime: 0 6px 18px rgba(150, 196, 40, 0.34);
    --ring-lime: 0 0 0 3px rgba(150, 196, 40, 0.30);
}
html.dark, html[data-theme="dark"], :root[data-theme="dark"] {
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow:    0 2px 4px rgba(0, 0, 0, 0.16), 0 10px 28px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.22), 0 30px 70px rgba(0, 0, 0, 0.42);
    --hairline:  inset 0 1px 0 rgba(255, 255, 255, 0.055);
    --glow-lime: 0 4px 14px rgba(198, 239, 78, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    --ring-lime: 0 0 0 3px rgba(198, 239, 78, 0.28);
}

/* Cards float — subtle top gradient + elevation + hairline */
.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 40%),
        var(--surface);
    box-shadow: var(--shadow), var(--hairline);
}
html.dark .card, html[data-theme="dark"] .card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 38%),
        var(--surface);
}
.card-paper { box-shadow: var(--shadow); }
html.dark .card-paper, html[data-theme="dark"] .card-paper { box-shadow: var(--shadow), var(--hairline); }
.card-lime { box-shadow: var(--glow-lime), 0 14px 34px rgba(198, 239, 78, 0.18); }

/* Inputs recessed; focus ring */
.field { box-shadow: inset 0 1px 2px rgba(24, 32, 12, 0.05); }
html.dark .field, html[data-theme="dark"] .field { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); }
.field:focus { box-shadow: var(--ring-lime); }

/* Primary button — lime glow + lift */
.btn-primary { box-shadow: var(--glow-lime); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(198, 239, 78, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-dark { box-shadow: var(--shadow-sm); }
.btn:focus-visible, .pill:focus-visible { outline: none; box-shadow: var(--ring-lime); }

/* Pills */
.pill-active { box-shadow: var(--glow-lime); }

/* Progress bars — directional gradient + glow */
.bar > div { background: linear-gradient(90deg, var(--lime-2), var(--lime)); box-shadow: 0 0 12px rgba(198, 239, 78, 0.45); }
.bar-paper > div { box-shadow: none; }

/* Chips a touch sharper */
.chip-lime { box-shadow: 0 2px 8px rgba(198, 239, 78, 0.30); }

/* Rail active glow + avatar ring */
.rail-item.active { box-shadow: var(--glow-lime); }
.avatar { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }

/* Overlays to the new elevation scale */
.modal-card { box-shadow: var(--shadow-lg), var(--hairline); }
.dropdown-menu { box-shadow: var(--shadow-lg); }
.toast { box-shadow: var(--shadow); }

/* ===== Payment-method cards (addfunds) — icon + left-aligned text + check, selected = lime ===== */
.pay-card { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm); transition: border-color .15s, background .15s; box-shadow: var(--shadow-sm); }
.pay-card:hover { border-color: var(--line-strong); }
.pay-card.is-selected { border-color: var(--lime-text); background: var(--lime-soft); box-shadow: var(--glow-lime); }
.pay-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.pay-card.is-selected .pay-ico { background: var(--surface); }
.pay-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.pay-name { font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.pay-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pay-check { color: var(--lime-text); font-size: 20px; opacity: 0; transition: opacity .15s; flex-shrink: 0; display: flex; align-items: center; }
.pay-card.is-selected .pay-check { opacity: 1; }
@media (max-width: 560px) { #bl-payment-methods { grid-template-columns: 1fr !important; } }

/* ===== Platform QR / PromptPay modal (Bootstrap, injected by payment engine) — center, theme, fix z-index ===== */
/* The theme's own .modal-backdrop is z-index 1100; Bootstrap's modal is 1050 → backdrop's blur covered the QR. Lift the QR modal above it. */
#qr-modal.modal { z-index: 1120 !important; }
#qr-modal.modal.show, #qr-modal.modal.in, #qr-modal.modal[style*="display: block"] { display: flex !important; align-items: center; justify-content: center; padding: 20px !important; }
#qr-modal .modal-dialog { margin: 0 !important; max-width: 380px !important; width: 100%; }
#qr-modal .modal-content { background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-lg) !important; box-shadow: var(--shadow-lg), var(--hairline) !important; overflow: hidden; }
#qr-modal .modal-body { padding: 26px 24px 24px !important; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; }
#qr-modal .close { position: absolute; top: 12px; right: 14px; background: var(--surface-2); border: 0; width: 32px; height: 32px; border-radius: 50%; color: var(--text); font-size: 18px; line-height: 1; opacity: 1; text-shadow: none; z-index: 3; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#qr-modal .close:hover { background: var(--surface-3); }
#qr-modal img { width: 232px !important; height: 232px !important; background: #fff; padding: 12px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.28); display: block; }
#qr-modal .alert { width: 100%; }
#qr-modal .modal-footer, #qr-modal [data-dismiss="modal"]:not(.close) { color: var(--text-3); }
/* enhancer-injected bits */
.bl-qr-title { font-weight: 800; font-size: 18px; color: var(--text); margin-bottom: 14px; letter-spacing: -0.01em; }
.bl-qr-steps { margin-top: 18px; width: 100%; display: flex; flex-direction: column; gap: 9px; }
.bl-qr-steps .s { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.45; text-align: left; }
.bl-qr-steps .s i { color: var(--lime-text); font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.bl-qr-note { margin-top: 14px; font-size: 11px; color: var(--text-3); line-height: 1.5; }

/* ============================================================================
 * v3 — MOTION & INTERACTION  ·  "alive, Apple-restrained"
 * One additive layer; lifts every page at once. Pure CSS — no per-template JS.
 * Goals: responsive hover feedback · gentle settle-in on load ·
 *        nothing idle/distracting · keep the lime theme on EVERY control
 *        (kills Bootstrap-blue buttons & the browser's blue focus ring).
 * Built 2026-06-05
 * ========================================================================== */
:root {
    --ease-spring: cubic-bezier(.16, 1, .3, 1);   /* settle / lift */
    --ease-out:    cubic-bezier(.22, .61, .36, 1); /* entrance */
    --t-fast: .14s;
    --t-med:  .22s;
}

/* ----------------------------------------------------------------------------
 * 0 · Accessibility — honour reduced-motion everywhere (covers the new + old)
 * -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
html { scroll-behavior: smooth; }

/* ----------------------------------------------------------------------------
 * 1 · Entrance — content settles in instead of snapping (base stays visible,
 *     so print / no-JS / reduced-motion always show the final state)
 * -------------------------------------------------------------------------- */
/* Headers & structure stay put; first-fold CARDS gently slide up to settle in.
 * NB: opacity is never touched — content is ALWAYS fully visible (safe on this
 * transactional panel + safe for print/capture); cards only translate a few px. */
@keyframes blRise { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
    .bento > *, .stat-grid > *, .orders-list > .order-card:nth-child(-n+5) {
        animation: blRise .45s var(--ease-out) both;
    }
    .bento > *:nth-child(1), .stat-grid > *:nth-child(1), .orders-list > .order-card:nth-child(1) { animation-delay: .02s; }
    .bento > *:nth-child(2), .stat-grid > *:nth-child(2), .orders-list > .order-card:nth-child(2) { animation-delay: .07s; }
    .bento > *:nth-child(3), .stat-grid > *:nth-child(3), .orders-list > .order-card:nth-child(3) { animation-delay: .12s; }
    .stat-grid > *:nth-child(4), .orders-list > .order-card:nth-child(4) { animation-delay: .17s; }
    .orders-list > .order-card:nth-child(5) { animation-delay: .22s; }
}

/* ----------------------------------------------------------------------------
 * 2 · Cards — smooth always; lift only when actually interactive
 * -------------------------------------------------------------------------- */
.card, .stat, .pay-card, .tier-card, .afh-row {
    transition: transform var(--t-med) var(--ease-spring),
                box-shadow var(--t-med) var(--ease-spring),
                border-color var(--t-fast);
}
/* plain container cards: deepen shadow on hover, no movement */
.card:hover { box-shadow: var(--shadow-lg), var(--hairline); }
/* clearly-clickable cards lift */
a.card:hover, label.card:hover, button.card:hover,
.card-hover:hover, .stat:hover, .pay-card:hover, .tier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--hairline);
}
a.card:hover { border-color: var(--line-2); }
.afh-row { transition: background var(--t-fast), transform var(--t-fast); }
.afh-row:hover { background: var(--surface-3); transform: translateX(2px); }

/* ----------------------------------------------------------------------------
 * 3 · Buttons & pills — spring press + lime sheen sweep on the solid CTAs
 * -------------------------------------------------------------------------- */
.btn { transition: transform var(--t-fast) var(--ease-spring), background .15s, color .15s, border-color .15s, box-shadow var(--t-med); position: relative; overflow: hidden; }
.btn > * { position: relative; z-index: 1; }
.btn:active { transform: scale(.96); }
/* trailing-arrow icons drift on hover (Apple "go" cue) */
.btn i.ri-arrow-right-line, .btn i.ri-arrow-right-up-line, .pill i.ri-arrow-right-line,
.oc-btn i { transition: transform var(--t-med) var(--ease-spring); }
.btn:hover i.ri-arrow-right-line, .btn:hover i.ri-arrow-right-up-line, .pill:hover i.ri-arrow-right-line { transform: translateX(3px); }
/* sheen — only on hover, never idle */
.btn-primary::after, .btn-dark::after {
    content: ""; position: absolute; inset: 0 auto 0 -60%; width: 45%; z-index: 0;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.30), transparent);
    transform: skewX(-18deg); opacity: 0; pointer-events: none;
}
.btn-primary:hover::after, .btn-dark:hover::after { animation: blSheen .85s ease; }
@keyframes blSheen { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 0; } }
.btn-dark::after { background: linear-gradient(100deg, transparent, rgba(198,239,78,.22), transparent); }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover::after, .btn-dark:hover::after { animation: none; } }

.pill, .oc-btn, .topbar-icon-btn, .topbar-cta { transition: transform var(--t-fast) var(--ease-spring), background .15s, color .15s, border-color .15s, box-shadow var(--t-med); }
.pill:hover, .topbar-cta:hover { transform: translateY(-1px); }
.pill:active, .oc-btn:active, .topbar-icon-btn:active { transform: scale(.95); }
.topbar-icon-btn:hover { transform: translateY(-1px); }

/* ----------------------------------------------------------------------------
 * 4 · Rail (sidebar) — items slide a touch; active gets a growing accent bar
 * -------------------------------------------------------------------------- */
.rail-item { transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-spring); position: relative; }
.rail-item:hover { transform: translateX(3px); }
.rail-item.active::before {
    content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0; border-radius: 3px; background: var(--lime-ink);
    animation: blBar .35s var(--ease-spring) forwards;
}
@keyframes blBar { to { height: 18px; } }
.rail-item i, .mobile-bar a i { transition: transform var(--t-med) var(--ease-spring); }
.rail-item:hover i, .mobile-bar a:hover i { transform: scale(1.12); }

/* ----------------------------------------------------------------------------
 * 5 · Dropdown / table / inputs / badges — small responsive touches
 * -------------------------------------------------------------------------- */
.dropdown-item { transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-fast); }
.dropdown-item:hover { padding-left: 18px; }
.tbl tr { transition: background var(--t-fast); }
.field, .form-control, .form-select { transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-med); }
.field:hover:not(:focus), .form-control:hover:not(:focus) { border-color: var(--line-2); }
.social-badge, .icobox { transition: transform var(--t-med) var(--ease-spring); }
.social-badge:hover, .os-trust-row:hover .icobox, a:hover > .icobox { transform: translateY(-2px) scale(1.06); }
.os-trust-row .icobox { transition: transform var(--t-med) var(--ease-spring); }

/* content / footer links — underline grows from the left */
.pub-footer-grid a, .bl-faq-cms a, .prose a {
    background-image: linear-gradient(var(--lime), var(--lime));
    background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat;
    transition: background-size var(--t-med) var(--ease-out), color var(--t-fast);
    padding-bottom: 1px;
}
.pub-footer-grid a:hover, .bl-faq-cms a:hover, .prose a:hover { background-size: 100% 1.5px; color: var(--lime-text) !important; }

/* ============================================================================
 * v3 · THEME-LOCK  —  keep the lime identity on EVERY control
 * PerfectPanel ships its own Bootstrap bundle; AJAX-injected buttons & the
 * browser focus ring can render Bootstrap-blue (#0d6efd / #007bff). Pin them.
 * ========================================================================== */
/* solid primary CTA — never let bootstrap repaint it blue */
.btn-primary, a.btn-primary, button.btn-primary, input.btn-primary {
    background: var(--lime) !important; color: var(--lime-ink) !important; border-color: transparent !important;
}
.btn-primary:hover { background: var(--lime-2) !important; }
/* bootstrap contextual buttons the platform may inject */
.btn-info, .btn-blue { background: var(--lime) !important; color: var(--lime-ink) !important; border-color: transparent !important; }
.btn-success { background: var(--lime) !important; color: var(--lime-ink) !important; border-color: transparent !important; }
.btn-secondary { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.btn-outline-primary { background: transparent !important; color: var(--lime-text) !important; border-color: var(--lime-text) !important; }
.btn-link { color: var(--lime-text) !important; text-decoration: none !important; }
/* bootstrap utility colours used inside injected widgets */
a.text-primary, .text-primary { color: var(--lime-text) !important; }
.bg-primary { background: var(--lime) !important; color: var(--lime-ink) !important; }
.badge-primary, .badge.bg-primary { background: var(--lime) !important; color: var(--lime-ink) !important; }

/* kill the blue OS / bootstrap focus ring; lime ring only for keyboard users */
.btn:focus, .pill:focus, .oc-btn:focus, button:focus, a:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus { outline: none !important; }
.btn:focus-visible, .pill:focus-visible, .oc-btn:focus-visible,
button:focus-visible, a.btn:focus-visible, [tabindex]:focus-visible { box-shadow: var(--ring-lime), var(--glow-lime); }
.field:focus, .form-control:focus, .form-select:focus, .topbar-search input:focus { box-shadow: var(--ring-lime) !important; }
a:focus-visible:not(.btn):not(.pill) { outline: 2px solid var(--lime) !important; outline-offset: 2px; border-radius: 4px; }

/* inputs: theme-coloured caret + kill the blue autofill wash */
input, textarea { caret-color: var(--lime-text); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}

/* ============================================================================
 * v4 — MORE LIFE  ·  richer, still tasteful
 * Sheen sweeps · soft idle glow on the buy CTAs · progress shimmer ·
 * icon micro-animation · link/nav underlines · theme cross-fade.
 * All gated by prefers-reduced-motion via the global guard above.
 * ========================================================================== */

/* ---- 1 · Smooth theme cross-fade (dark ↔ light eases instead of snapping) -- */
body, .rail, .topbar, .pub-nav, .card, .card-paper, .stat, .field, .form-control,
.pill, .chip, .modal-card, .dropdown-menu, .order-card, .pay-card, .tier-card, .mobile-bar {
    transition-property: background-color, border-color, color, box-shadow, transform;
    transition-duration: .35s, .35s, .25s, .22s, .22s;
    transition-timing-function: ease, ease, ease, var(--ease-spring), var(--ease-spring);
}

/* ---- 2 · Card sheen — a soft gleam sweeps across on hover (curated cards) --- */
.stat, .pay-card, .tier-card, .card-lime, .card-paper, a.card, label.card, .order-card {
    position: relative; overflow: hidden;
}
.stat::after, .pay-card::after, .tier-card::after, .card-lime::after,
.card-paper::after, a.card::after, label.card::after, .order-card::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -75%; width: 55%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.14), transparent);
    transform: skewX(-18deg); pointer-events: none; opacity: 0; z-index: 0;
}
.card-lime::after { background: linear-gradient(100deg, transparent, rgba(26,32,16,.14), transparent); }
.stat:hover::after, .pay-card:hover::after, .tier-card:hover::after, .card-lime:hover::after,
.card-paper:hover::after, a.card:hover::after, label.card:hover::after, .order-card:hover::after {
    animation: blSheen 1s ease;
}
@media (prefers-reduced-motion: reduce) {
    .stat:hover::after, .pay-card:hover::after, .tier-card:hover::after, .card-lime:hover::after,
    .card-paper:hover::after, a.card:hover::after, label.card:hover::after, .order-card:hover::after { animation: none; }
}
/* keep real content above the gleam */
.stat > *, .pay-card > *, .tier-card > *, .card-lime > *, .card-paper > *, .order-card > * { position: relative; z-index: 1; }

/* ---- 3 · Soft idle glow — only on the persistent "buy / top-up" CTAs -------- */
@keyframes blBreathe {
    0%, 100% { box-shadow: var(--glow-lime); }
    50%      { box-shadow: 0 8px 26px rgba(150, 196, 40, .50), inset 0 1px 0 rgba(255,255,255,.25); }
}
@media (prefers-reduced-motion: no-preference) {
    .btn-primary.btn-block, .mobile-bar-fab, .ra-topup, .topbar-cta { animation: blBreathe 3.4s ease-in-out infinite; }
    .btn-primary.btn-block:hover, .mobile-bar-fab:hover, .ra-topup:hover, .topbar-cta:hover { animation: none; }
}

/* ---- 4 · Progress bars — a light slowly travels across the fill ------------ */
.bar > div, .lp-fill { position: relative; overflow: hidden; }
.bar > div::after, .lp-fill::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45), transparent 80%);
    transform: translateX(-100%);
}
@media (prefers-reduced-motion: no-preference) {
    .bar > div::after, .lp-fill::after { animation: blProg 2.4s ease-in-out infinite; }
}
@keyframes blProg { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ---- 5 · Icon micro-animation on hover (contextual, subtle) ---------------- */
.btn i, .pill i, .oc-btn i, .rail-item i, .dropdown-item i, .topbar-icon-btn i, .ra-icon i {
    transition: transform var(--t-med) var(--ease-spring);
}
/* "add / new" plus rotates a quarter-turn */
.btn:hover i.ri-add-line, .pill:hover i.ri-add-line, .topbar-cta:hover i.ri-add-line { transform: rotate(90deg); }
/* refresh / refill / loop spins */
.btn:hover i[class*="loop"], .btn:hover i[class*="restart"], .btn:hover i[class*="refresh"],
.oc-btn:hover i[class*="loop"], .oc-btn:hover i[class*="restart"] { transform: rotate(180deg); }
/* settings gear turns */
a:hover > i.ri-settings-3-line, .ra-icon:hover i { transform: rotate(35deg); }
/* notification bell swings */
@keyframes blRing { 0%,100%{transform:rotate(0)} 20%{transform:rotate(14deg)} 40%{transform:rotate(-10deg)} 60%{transform:rotate(6deg)} 80%{transform:rotate(-3deg)} }
.topbar-icon-btn:hover i[class*="notification"], .topbar-icon-btn:hover i[class*="bell"] { animation: blRing .6s ease; transform-origin: 50% 10%; }

/* ---- 6 · Link & nav underlines ------------------------------------------- */
.pub-nav-links a { position: relative; }
.pub-nav-links a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--lime); border-radius: 2px; transform: scaleX(0); transform-origin: left;
    transition: transform var(--t-med) var(--ease-out);
}
.pub-nav-links a:hover::after, .pub-nav-links a.active::after { transform: scaleX(1); }

/* ---- 7 · Table rows — slide + lime accent bar on the left ------------------ */
.tbl tbody tr { position: relative; }
.tbl tbody tr td:first-child { position: relative; }
.tbl tbody tr:hover td:first-child::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
    border-radius: 3px; background: var(--lime); animation: blBar .3s var(--ease-spring) forwards;
}

/* ---- 8 · Chips & avatars — small pops + glow ------------------------------ */
.chip { transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-med); }
.chip-lime:hover, .chip-dark:hover { transform: translateY(-1px) scale(1.04); }
.avatar, .ra-avatar, .icobox { transition: transform var(--t-med) var(--ease-spring), box-shadow var(--t-med); }
.avatar:hover, .ra-avatar:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(198,239,78,.35); }
.icobox-lime:hover { box-shadow: 0 4px 16px rgba(198,239,78,.40); }

/* ---- 9 · Mobile bottom-bar — active item lifts & dot ---------------------- */
.mobile-bar a { transition: color var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.mobile-bar a:active { transform: scale(.92); }
.mobile-bar a.active { transform: translateY(-2px); }
.mobile-bar-fab { transition: transform var(--t-med) var(--ease-spring), box-shadow var(--t-med); }
.mobile-bar-fab:hover, .mobile-bar-fab:active { transform: translateY(-34px) scale(1.05); }

/* ---- 10 · Modal/dropdown entrances already spring; add backdrop ease ------- */
.modal-backdrop { transition: opacity .25s ease; }

/* ---- 11 · A touch more lift on the headline hover targets ------------------ */
.card-hover:hover, a.card:hover, label.card:hover, .stat:hover, .pay-card:hover, .tier-card:hover {
    transform: translateY(-4px);
}
.order-card:hover { transform: translateY(-2px); border-color: var(--line-2); }

/* ---- USER REQUEST (2026-06-05): remove the mirror-sheen sweep — too distracting. Neutralize both sheen keyframes + hide the sweep pseudo-elements. Idle glow / lifts / spring / icon motion stay. ---- */
@keyframes blSheen { 0%, 100% { opacity: 0; } }
@keyframes raSheen { 0%, 100% { opacity: 0; } }
.btn-primary::after, .btn-dark::after, .ra-wallet::after { display: none !important; }
.card::after, a.card::after, label.card::after, .stat::after, .tier-card::after, .order-card::after, .card-paper::after { background: none !important; animation: none !important; }
