:root {
    --pink: #fe2c55;
    --pink-2: #ff4d6d;
    --pink-dark: #e51e45;
    --pink-soft: #fff1f4;
    --pink-border: #ffd3dd;
    --ink: #111827;
    --ink-2: #1f2937;
    --muted: #6b7280;
    --muted-2: #8a93a3;
    --bg: #f6f8fb;
    --card: #ffffff;
    --line: #eef1f6;
    --line-2: #e6eaf2;
    --blue: #2563eb;
    --green: #16a34a;
    --amber: #d97706;
    --gold: #f5b942;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-card: 0 12px 32px rgba(15, 23, 42, .05);
    --shadow-pink: 0 10px 24px rgba(254, 44, 85, .22);
    --shadow-blue: 0 10px 22px rgba(37, 99, 235, .28);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 108px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    border: 0;
    background: none;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

img,
svg {
    display: block;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.container {
    width: 95%;
    max-width: 1440px;
    margin: 0 auto;
}

.page {
    max-width: 1360px;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.muted {
    color: var(--muted);
}

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    height: 68px;
}

.header-inner {
    height: 68px;
    max-width: 1460px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header .container {
    width: calc(100% - 52px);
    max-width: 1460px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 45%, #0f766e 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 6px 14px rgba(15, 23, 42, .18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand-letter {
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.brand-coin {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe28a, var(--gold) 62%, #e09b16);
    border: 2px solid #fff;
    color: #8a5a00;
    font-size: 10px;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.brand-name {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-tiktok {
    display: inline-block;
    margin-left: 2px;
    background: linear-gradient(180deg, #fff6d6, #ffe9a8);
    border-radius: 5px;
    padding: 0 3px;
    color: #111;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 15px;
}

.user-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 6px 5px 18px;
    background: #fff;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.wallet {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
}

.wallet strong {
    color: var(--pink);
    font-weight: 800;
}

.pill-divider {
    width: 1px;
    height: 24px;
    background: var(--line-2);
}

.avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px;
    border-radius: 999px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    background: linear-gradient(140deg, #0e7490, #155e75);
    text-transform: uppercase;
}

.avatar-btn .chev {
    color: var(--muted);
}

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 248px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    padding: 8px;
    z-index: 950;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg);
}

.dropdown-item svg {
    color: var(--muted);
}

.dropdown-item--danger {
    color: #dc2626;
}

.dropdown-item--danger svg {
    color: #dc2626;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 700;
    font-size: 15px;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    white-space: nowrap;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--pink-2), var(--pink));
    box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(254, 44, 85, .3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn.is-disabled,
.btn:disabled {
    background: #cbd3df;
    box-shadow: none;
    color: #fff;
    transform: none;
}

.btn.is-soft-disabled {
    background: #ffd3dd;
    box-shadow: none;
    color: #fff;
}

.btn-soft {
    background: var(--pink-soft);
    color: var(--pink);
    border: 1px solid var(--pink-border);
}

/* ---------------- Cards ---------------- */
.card {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, .75);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-card);
}

.card-head {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.card-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.6px;
}

.card-sub {
    margin-top: 5px;
    font-size: 15px;
    color: var(--muted);
}

/* ---------------- Notice ---------------- */
.notice {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 20px 52px 20px 22px;
    background: linear-gradient(180deg, #fffdf6, #fffbf1);
    border: 1px solid #fbe6b7;
    border-radius: 20px;
}

.notice-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fef3e2;
    color: #e08a1e;
}

.notice-title {
    font-size: 16px;
    font-weight: 800;
    color: #b45309;
    letter-spacing: .2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.notice-body p {
    font-size: 15px;
    color: #8a5a1d;
    line-height: 1.55;
}

.notice-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--pink);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notice-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #b45309;
}

.notice-close:hover {
    background: rgba(217, 119, 6, .1);
}

.notice-dismissed .notice {
    display: none !important;
}

/* ---------------- Prompts ---------------- */
.prompt {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    margin-top: 22px;
}

.prompt--pink {
    border: 1.5px dashed #ffa9bb;
    background: linear-gradient(90deg, #fff5f7, #fff);
}

.prompt--cyan {
    border: 1.5px dashed #67e8f9;
    background: linear-gradient(90deg, #ecfeff, #f8feff);
}

.prompt-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ffe4e9;
    color: var(--pink);
}

.prompt--cyan .prompt-icon {
    background: #cffafe;
    color: #0891b2;
}

.prompt-body {
    flex: 1;
    min-width: 0;
}

.prompt-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.prompt--cyan .prompt-title {
    color: #0e7490;
}

.prompt-sub {
    margin-top: 2px;
    font-size: 14.5px;
    color: var(--muted);
}

.prompt-action {
    flex-shrink: 0;
}

/* ---------------- Account picker ---------------- */
.account-picker {
    position: relative;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid #e8edf5;
    border-radius: var(--radius-lg);
    user-select: none;
}

.account-picker[data-clickable="true"] {
    cursor: pointer;
}

.account-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    background: linear-gradient(140deg, #64748b, #334155);
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.account-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid #e0e7ff;
}

.account-coins {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 3px 10px 3px 4px;
    border-radius: 999px;
    background: #fff7e3;
    border: 1px solid #f7e3b2;
    color: #a16207;
    font-size: 13px;
    font-weight: 800;
}

.account-chevron {
    color: var(--muted);
    flex-shrink: 0;
}

.account-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    padding: 8px;
    z-index: 1000;
    max-height: 320px;
    overflow: auto;
}

.account-menu--up {
    top: auto;
    bottom: calc(100% + 8px);
}

.account-menu-label {
    padding: 6px 12px 8px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.account-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
}

.account-menu-item:hover {
    background: var(--bg);
}

.account-menu-item.is-selected {
    background: #fff5f8;
}

.account-menu-item .account-avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.account-menu-name {
    font-size: 14.5px;
    font-weight: 700;
}

.account-menu-sub {
    font-size: 12.5px;
    color: var(--muted);
}

.account-menu-name,
.account-menu-sub {
    display: block;
}

.account-menu-item .check {
    margin-left: auto;
    color: var(--pink);
    flex-shrink: 0;
}

.account-menu-item .check.is-hidden {
    visibility: hidden;
}

.account-menu-item--link {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    padding-top: 14px;
}

.account-menu-item--link .account-menu-name {
    color: var(--pink);
}

.account-avatar--add {
    background: #eef2ff;
    color: #2563eb;
    display: grid;
    place-items: center;
}

/* ---------------- Coin chip ---------------- */
.coin {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe28a, var(--gold) 60%, #e09b16);
    color: #8a5a00;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(180, 120, 0, .25);
    flex-shrink: 0;
}

.coin--sm {
    width: 16px;
    height: 16px;
    font-size: 9px;
}

.coin--lg {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

/* ---------------- Savings note ---------------- */
.save-note {
    margin-top: 18px;
    padding: 13px 20px;
    border-radius: 12px;
    background: var(--pink-soft);
    border: 1px solid #ffe1e8;
    color: var(--pink);
    font-size: 15px;
    font-weight: 600;
}

/* ---------------- Packages ---------------- */
.packages {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.package {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 92px;
    padding: 16px 12px;
    background: var(--bg);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.package:hover {
    border-color: #dbe2ec;
    transform: translateY(-1px);
}

.package-amount {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.package-price {
    font-size: 14px;
    color: var(--muted);
}

.package.is-selected {
    background: #fff5f7;
    border-color: var(--pink);
    box-shadow: 0 8px 20px rgba(254, 44, 85, .1);
}

.package.is-selected .package-price {
    color: var(--pink);
    font-weight: 600;
}

.package-custom .package-amount {
    font-size: 18px;
}

/* ---------------- Summary ---------------- */
.summary {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.summary-total {
    min-width: 160px;
}

.summary-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

.summary-amount {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -.8px;
}

.summary-hint {
    margin-top: 2px;
    font-size: 13.5px;
    color: var(--muted);
}

.summary-hint.is-warning {
    color: #dc2626;
    font-weight: 600;
}

.summary .btn {
    width: 100%;
}

/* ---------------- Modals ---------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, .58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    animation: fadeIn .18s ease;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
    display: flex;
    flex-direction: column;
    animation: popIn .22s ease;
}

.modal--custom {
    max-width: 620px;
}

.modal--link {
    max-width: 520px;
}

.modal--gift {
    max-width: 520px;
}

.modal-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 64px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.modal-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.5px;
    text-align: center;
}

.modal-back,
.modal-close,
.modal-help {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ink-2);
}

.modal-help {
    right: 16px;
}

.modal-back {
    left: 16px;
}

.modal-close {
    right: 16px;
}

.modal-back:hover,
.modal-close:hover,
.modal-help:hover {
    background: var(--bg);
}

.modal-body {
    padding: 22px 26px;
    overflow-y: auto;
}

.modal-foot {
    padding: 6px 26px 24px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- Payment modal ---------------- */
.secure-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #eefbf4;
    border: 1px solid #c9f0da;
    color: #15803d;
    font-size: 15px;
    font-weight: 700;
}

.order-account {
    margin-top: 16px;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.order-account-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-account-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.2;
}

.order-account-sub {
    font-size: 14px;
    color: var(--muted);
}

.order-divider {
    border-top: 1px dashed #d9e0ea;
    margin: 16px 0 12px;
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 15.5px;
    color: var(--muted);
}

.order-row strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-size: 16.5px;
    font-weight: 800;
}

.order-row--total strong {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -.6px;
    color: var(--ink);
}

.pay-note {
    margin-top: 18px;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.65;
}

.form-error {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.form-error a {
    color: #b91c1c;
    text-decoration: underline;
    font-weight: 800;
    white-space: nowrap;
}

.modal .btn-block {
    padding: 15px 22px;
    font-size: 17px;
}

/* ---------------- Custom sheet ---------------- */
.custom-label {
    font-size: 16px;
    font-weight: 700;
}

.custom-display {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 18px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--ink);
}

.custom-display .placeholder {
    color: #b6bfcc;
    font-weight: 600;
    letter-spacing: .5px;
}

.keypad {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.key {
    height: 62px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid #f0f3f8;
    font-size: 21px;
    font-weight: 700;
    display: grid;
    place-items: center;
    transition: background .12s ease, transform .12s ease;
}

.key:hover {
    background: #eef2f8;
}

.key:active {
    transform: scale(.97);
}

.key--func {
    background: #eef1f6;
}

.custom-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 14px;
    font-size: 18px;
    font-weight: 800;
}

.custom-total span:last-child {
    font-size: 20px;
    font-weight: 900;
}

/* ---------------- Link TikTok modal ---------------- */
.link-steps {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.link-steps li::marker {
    color: var(--pink);
    font-weight: 800;
}

.qr-box {
    width: 260px;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line-2);
    border-radius: 18px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.qr-box svg,
.qr-box img {
    width: 100%;
    height: auto;
}

.qr-box--live {
    min-height: 260px;
}

.qr-box--live img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.qr-image {
    display: block;
    width: 340px;
    max-width: 100%;
    height: auto;
    margin: 24px auto 0;
    border-radius: 12px;
}

.qr-placeholder {
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

.qr-status {
    min-height: 22px;
    margin: 12px 0 10px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
}

.link-url {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 14px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--muted);
}

.link-url span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line-2);
    flex-shrink: 0;
}

.icon-btn:hover {
    color: var(--pink);
    border-color: var(--pink-border);
}

.modal-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    color: #92400e;
    font-size: 13.5px;
    line-height: 1.6;
}

.link-cta {
    margin-top: 16px;
}

/* ---------------- Deposit ---------------- */
.qr-caption {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.bank-card {
    margin-top: 22px;
    padding: 6px 20px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: #fff;
}

.bank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 2px;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 16px;
}

.bank-row:last-child {
    border-bottom: 0;
}

.bank-label {
    color: var(--muted);
}

.bank-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 17px;
    text-align: right;
    word-break: break-word;
}

.bank-value--pink {
    color: var(--pink);
}

.bank-value--green {
    color: #0f9d6e;
    letter-spacing: .5px;
}

.copy-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--line-2);
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--muted);
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--pink);
    border-color: var(--pink-border);
}

.copy-btn.is-copied {
    color: var(--green);
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.deposit-note {
    margin-top: 22px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f0fdf7;
    border: 1px dashed #86efac;
    color: #166534;
    font-size: 14.5px;
    line-height: 1.55;
}

/* ---------------- History ---------------- */
.search-box {
    position: relative;
    margin-top: 22px;
}

.search-box svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    height: 58px;
    border-radius: 16px;
    border: 1px solid var(--line-2);
    background: var(--bg);
    padding: 0 18px 0 50px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-box input::placeholder {
    color: #9aa4b2;
}

.search-box input:focus {
    border-color: #ffb3c4;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(254, 44, 85, .08);
}

.history-list {
    margin-top: 18px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tx-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.tx-row:last-child {
    border-bottom: 0;
}

.tx-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.tx-icon--deposit {
    background: #ecfdf5;
    color: #059669;
}

.tx-icon--topup {
    background: #fff1f4;
    color: var(--pink);
}

.tx-icon--gift {
    background: #f5f3ff;
    color: #7c3aed;
}

.tx-main {
    flex: 1;
    min-width: 0;
}

.tx-desc {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.tx-meta {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tx-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
}

.tx-reason {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
}

.tx-right {
    text-align: right;
    flex-shrink: 0;
}

.tx-amount {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.2px;
    white-space: nowrap;
}

.tx-amount--plus {
    color: #059669;
}

.tx-amount--minus {
    color: var(--pink);
}

.tx-status {
    margin-top: 4px;
}

.status-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: #ecfdf5;
    color: #047857;
}

.status-chip--pending {
    background: #fffbeb;
    color: #b45309;
}

.status-chip--failed {
    background: #fef2f2;
    color: #b91c1c;
}

.empty-state {
    margin-top: 18px;
    border: 1px dashed #d8dfea;
    border-radius: var(--radius-lg);
    padding: 58px 24px;
    text-align: center;
    color: var(--muted);
}

.empty-state svg {
    margin: 0 auto 14px;
    color: #aab4c3;
}

.empty-state p {
    font-size: 15.5px;
    font-weight: 500;
}

.pager {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pager a,
.pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid var(--line-2);
    background: #fff;
    color: var(--ink-2);
}

.pager a:hover {
    border-color: var(--pink-border);
    color: var(--pink);
}

.pager span.is-current {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}

.pager span.is-disabled {
    color: #c3cbd6;
    background: var(--bg);
}

/* ---------------- Gifts ---------------- */
.step-panel {
    margin-top: 22px;
    padding: 18px 20px 20px;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fffafb, #fff);
}

.step-panel--muted {
    border-color: var(--line-2);
    background: #fff;
}

.step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #06b6d4, #fe2c55);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.step-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.seller-select {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: #fff;
    font-size: 15.5px;
    color: #9aa4b2;
    text-align: left;
}

.seller-select.has-value {
    color: var(--ink);
}

.seller-select svg:first-child {
    color: var(--muted);
}

.seller-select .chev {
    margin-left: auto;
    color: var(--muted);
    transition: transform .15s ease;
}

.seller-select[aria-expanded="true"] .chev {
    transform: rotate(180deg);
}

.seller-panel {
    position: relative;
}

.seller-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    padding: 8px;
    z-index: 80;
    max-height: 340px;
    overflow: auto;
}

.seller-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    text-align: left;
}

.seller-option:hover {
    background: var(--bg);
}

.seller-option .account-avatar {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.seller-info {
    flex: 1;
    min-width: 0;
}

.seller-name {
    font-size: 15px;
    font-weight: 800;
}

.seller-sub {
    margin-top: 1px;
    font-size: 12.5px;
    color: var(--muted);
}

.seller-rate {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--pink);
    white-space: nowrap;
}

.seller-selected-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: var(--bg);
}

.seller-selected-card .account-avatar {
    width: 48px;
    height: 48px;
}

.seller-change {
    margin-left: auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--pink-border);
    color: var(--pink);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px 13px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-md);
    background: #fff;
    text-align: center;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.gift-card:hover {
    border-color: #dbe2ec;
    transform: translateY(-1px);
}

.gift-card.is-selected {
    border-color: var(--pink);
    background: #fff5f7;
}

.gift-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #fbcfe8, #fda4af);
    color: #be123c;
}

.gift-card:nth-child(2n) .gift-icon {
    background: linear-gradient(140deg, #bfdbfe, #93c5fd);
    color: #1d4ed8;
}

.gift-card:nth-child(3n) .gift-icon {
    background: linear-gradient(140deg, #fde68a, #fcd34d);
    color: #92400e;
}

.gift-name {
    font-size: 15px;
    font-weight: 800;
}

.gift-cost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
}

.gift-price {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--pink);
}

.gift-summary {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-2);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gift-summary-info {
    flex: 1;
    min-width: 150px;
}

.gift-summary-label {
    font-size: 13.5px;
    color: var(--muted);
    font-weight: 600;
}

.gift-summary-total {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -.5px;
}

.gift-summary .btn {
    min-width: 230px;
}

/* ---------------- Login ---------------- */
.auth-page {
    min-height: calc(100vh - 68px - 108px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-xl);
    padding: 34px 32px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.auth-logo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #0f172a, #0f766e);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .2);
}

.auth-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.6px;
}

.auth-sub {
    margin-top: 6px;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-card .btn {
    margin-top: 24px;
    padding: 14px 20px;
    font-size: 15.5px;
}

.auth-note {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px dashed var(--line-2);
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
}

.auth-back {
    display: inline-block;
    margin-top: 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pink);
}

/* ---------------- Bottom nav & support ---------------- */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 880;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 26px rgba(15, 23, 42, .06);
}

.nav-inner {
    width: 95%;
    max-width: 1440px;
    margin: 0 auto;
    height: 78px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

/* Khi tặng quà bị tắt: chỉ còn 2 mục, dàn đều 2 bên. */
.nav-inner:not(:has(.nav-center)) .nav-item {
    flex: 1;
    justify-content: center;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #7b8595;
}

.nav-item svg {
    color: #64748b;
}

.nav-item.is-active,
.nav-item.is-active svg {
    color: var(--pink);
}

.nav-center {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.nav-fab {
    width: 56px;
    height: 56px;
    margin-top: -20px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-blue);
    border: 4px solid #fff;
    transition: background .15s ease, box-shadow .15s ease;
}

.nav-fab:hover {
    background: #1d4ed8;
}

.nav-center.is-active .nav-fab {
    background: var(--pink);
    box-shadow: var(--shadow-pink);
}

.nav-center-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #7b8595;
    margin-top: 2px;
}

.nav-center.is-active .nav-center-label {
    color: var(--pink);
}

.support-btn {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 890;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pink-border);
    color: var(--pink);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(254, 44, 85, .14);
}

.support-btn:hover {
    background: var(--pink-soft);
}

/* ---------------- Toasts ---------------- */
.toast-wrap {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid var(--line-2);
    border-left: 4px solid var(--green);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .16);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    animation: toastIn .2s ease;
}

.toast--error {
    border-left-color: #dc2626;
}

.toast--info {
    border-left-color: var(--blue);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(12px);
    transition: opacity .2s ease, transform .2s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

[hidden] {
    display: none !important;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .card {
        padding: 24px;
    }

    .card-title {
        font-size: 25px;
    }

    .packages {
        gap: 12px;
    }

    .nav-center {
        width: 96px;
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: 96px;
    }

    .site-header,
    .header-inner {
        height: 60px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .brand-letter {
        font-size: 19px;
    }

    .brand-coin {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .brand-name {
        font-size: 19px;
    }

    .login-btn {
        padding: 9px 14px;
        font-size: 13.5px;
    }

    .user-pill {
        padding: 4px 5px 4px 12px;
        gap: 7px;
    }

    .wallet {
        font-size: 13.5px;
    }

    .avatar {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .page {
        padding-top: 14px;
        gap: 14px;
    }

    .notice {
        padding: 16px 44px 16px 16px;
        gap: 12px;
        border-radius: 16px;
    }

    .notice-icon {
        width: 38px;
        height: 38px;
    }

    .notice-body p {
        font-size: 13.5px;
    }

    .notice-title {
        font-size: 14px;
    }

    .notice-close {
        top: 10px;
        right: 8px;
    }

    .card {
        padding: 20px 18px;
        border-radius: 20px;
    }

    .card-title {
        font-size: 22px;
    }

    .card-sub {
        font-size: 13.5px;
    }

    .prompt {
        flex-wrap: wrap;
        padding: 16px;
    }

    .prompt-icon {
        width: 44px;
        height: 44px;
    }

    .prompt-title {
        font-size: 16px;
    }

    .prompt-sub {
        font-size: 13px;
    }

    .prompt-action {
        width: 100%;
    }

    .prompt-action .btn {
        width: 100%;
    }

    .packages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .package {
        min-height: 78px;
        padding: 12px 8px;
    }

    .package-amount {
        font-size: 16.5px;
    }

    .package-price {
        font-size: 12.5px;
    }

    .save-note {
        font-size: 13.5px;
        padding: 11px 14px;
    }

    .summary {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .summary .btn {
        width: 100%;
        min-width: 0;
    }

    .summary-amount {
        font-size: 23px;
    }

    .modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: none;
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
    }

    .modal-head {
        padding: 18px 52px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 18px;
    }

    .modal-foot {
        padding: 4px 18px 20px;
    }

    .order-account {
        padding: 15px 16px;
    }

    .order-account-name {
        font-size: 17px;
    }

    .key {
        height: 54px;
        font-size: 19px;
    }

    .custom-display {
        min-height: 56px;
        font-size: 19px;
    }

    .bank-row {
        font-size: 14.5px;
        gap: 10px;
    }

    .bank-value {
        font-size: 15px;
    }

    .gift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gift-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .gift-summary .btn {
        width: 100%;
        min-width: 0;
    }

    .tx-row {
        padding: 14px;
        gap: 11px;
    }

    .tx-icon {
        width: 38px;
        height: 38px;
    }

    .tx-desc {
        font-size: 14px;
    }

    .tx-amount {
        font-size: 14.5px;
    }

    .nav-inner {
        height: 70px;
    }

    .nav-center {
        width: 84px;
    }

    .nav-fab {
        width: 52px;
        height: 52px;
        margin-top: -18px;
    }

    .nav-item span,
    .nav-center-label {
        font-size: 11.5px;
    }

    .support-btn {
        right: 12px;
        bottom: 88px;
        padding: 9px 15px;
        font-size: 13.5px;
    }

    .toast-wrap {
        left: 12px;
        right: 12px;
        top: 72px;
        max-width: none;
    }

    .step-panel {
        padding: 15px 14px 16px;
    }

    .step-title {
        font-size: 15.5px;
    }

    .auth-page {
        min-height: auto;
        padding: 22px 0;
    }

    .auth-card {
        padding: 26px 20px;
    }

    .auth-title {
        font-size: 22px;
    }
}

@media (max-width: 420px) {
    .brand-tiktok {
        display: none;
    }

    .user-pill {
        padding-left: 10px;
        gap: 6px;
    }

    .wallet {
        font-size: 12.5px;
    }

    .package-amount {
        font-size: 15px;
    }

    .coin {
        width: 17px;
        height: 17px;
        font-size: 9px;
    }
}
