/* ==========================================================================
   Vận Mệnh Việt – Tài khoản & Affiliate
   Dark purple · gold accents · cosmic gradients · soft glow cards
   (CSS riêng vì app.css là bản Tailwind build tĩnh)
   ========================================================================== */

:root {
    --vm-bg:        #0b0716;
    --vm-bg-2:      #140c28;
    --vm-card:      rgba(26, 16, 50, 0.78);
    --vm-card-2:    rgba(38, 24, 72, 0.70);
    --vm-border:    rgba(200, 150, 60, 0.24);
    --vm-border-2:  rgba(170, 140, 255, 0.18);
    --vm-gold:      #C8963C;
    --vm-gold-l:    #E8B96A;
    --vm-gold-p:    #F5DFA8;
    --vm-purple:    #7C5CFF;
    --vm-text:      #EEE8F8;
    --vm-muted:     rgba(238, 232, 248, 0.64);
    --vm-dim:       rgba(238, 232, 248, 0.42);
    --vm-ok:        #4ADE80;
    --vm-warn:      #FBBF24;
    --vm-bad:       #F87171;
    --vm-radius:    18px;
}

/* ── Nền vũ trụ ─────────────────────────────────────────────────────────── */
.vm-cosmic {
    background-color: var(--vm-bg);
    background-image:
        radial-gradient(ellipse 60% 40% at 12% 8%,  rgba(124, 92, 255, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 55% 45% at 88% 30%, rgba(200, 150, 60, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(90, 50, 180, 0.22) 0%, transparent 75%),
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 85%, rgba(255,255,255,.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 42% 42%, rgba(245,223,168,.7) 0%, transparent 100%);
    background-attachment: fixed;
    color: var(--vm-text);
}

.vm-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.vm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Card ──────────────────────────────────────────────────────────────── */
.vm-card {
    position: relative;
    background: linear-gradient(160deg, var(--vm-card) 0%, rgba(16, 10, 34, 0.86) 100%);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius);
    box-shadow: 0 0 0 1px rgba(200,150,60,0.05) inset, 0 24px 60px rgba(0,0,0,0.45), 0 0 50px rgba(124,92,255,0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.vm-card--pad { padding: 22px; }
@media (min-width: 640px) { .vm-card--pad { padding: 28px; } }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.vm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
    text-decoration: none; cursor: pointer; border: 0; font-family: inherit;
    transition: transform .18s, box-shadow .18s, opacity .18s, background .18s;
    min-height: 48px;
}
.vm-btn:hover { transform: translateY(-1px); }
.vm-btn:focus-visible { outline: 2px solid var(--vm-gold-l); outline-offset: 2px; }
.vm-btn--gold {
    color: #1A1004;
    background: linear-gradient(135deg, #B8820A 0%, #E8B96A 50%, #C8963C 100%);
    box-shadow: 0 6px 24px rgba(200,150,60,0.35);
}
.vm-btn--gold:hover { box-shadow: 0 10px 34px rgba(200,150,60,0.5); }
.vm-btn--ghost {
    color: var(--vm-text); background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.16);
}
.vm-btn--ghost:hover { background: rgba(255,255,255,0.1); }
.vm-btn--google { color: #1f1f1f; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.vm-btn--block { width: 100%; }
.vm-btn--sm { padding: 9px 14px; min-height: 38px; font-size: 13px; border-radius: 10px; }
.vm-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.vm-alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.vm-alert--ok  { background: rgba(74,222,128,0.10); border: 1px solid rgba(74,222,128,0.30); color: #BBF7D0; }
.vm-alert--err { background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.32); color: #FECACA; }
.vm-alert p + p { margin-top: 4px; }

/* ── Auth pages ────────────────────────────────────────────────────────── */
.vm-auth { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 16px 56px; }
.vm-auth__card { width: 100%; max-width: 440px; overflow: hidden; }
.vm-auth__card::before {
    content: ''; display: block; height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--vm-gold) 30%, var(--vm-gold-l) 60%, transparent 100%);
}
.vm-auth__body { padding: 30px 22px 28px; }
@media (min-width: 480px) { .vm-auth__body { padding: 36px 32px 32px; } }
.vm-auth__icon {
    width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    background: radial-gradient(circle at 30% 30%, rgba(232,185,106,0.28), rgba(124,92,255,0.18));
    border: 1px solid rgba(200,150,60,0.35); box-shadow: 0 0 30px rgba(200,150,60,0.18);
}
.vm-auth__title { text-align: center; color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.vm-auth__sub { text-align: center; color: var(--vm-muted); font-size: 14px; margin: 8px 0 24px; line-height: 1.6; }
.vm-auth__foot { text-align: center; color: var(--vm-dim); font-size: 14px; margin-top: 20px; }
.vm-auth__trust { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--vm-dim); font-size: 12px; margin-top: 18px; }

.vm-field { margin-bottom: 16px; }
.vm-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: rgba(232,185,106,0.78); margin-bottom: 8px; }
.vm-label-row { display: flex; align-items: center; justify-content: space-between; }
.vm-input {
    width: 100%; background: rgba(8,5,18,0.7); border: 1.5px solid rgba(200,150,60,0.26);
    border-radius: 11px; padding: 12px 14px; color: var(--vm-text); font-size: 15px; font-family: inherit;
    outline: none; transition: border-color .2s, box-shadow .2s; min-height: 48px;
}
.vm-input::placeholder { color: rgba(238,232,248,0.30); }
.vm-input:focus { border-color: rgba(232,185,106,0.75); box-shadow: 0 0 0 3px rgba(200,150,60,0.14); }
.vm-input.is-invalid { border-color: rgba(248,113,113,0.7); }
.vm-error { color: #FCA5A5; font-size: 13px; margin-top: 6px; }
.vm-pass { position: relative; }
.vm-pass .vm-input { padding-right: 46px; }
.vm-pass__toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: 0; background: none; cursor: pointer; color: rgba(232,185,106,0.55);
    display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.vm-pass__toggle:hover { color: var(--vm-gold-l); }
.vm-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--vm-muted); line-height: 1.5; cursor: pointer; }
.vm-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--vm-gold); flex-shrink: 0; }
.vm-link { color: var(--vm-gold-l); text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: inherit; padding: 0; }
.vm-link:hover { color: var(--vm-gold-p); text-decoration: underline; }
.vm-divider { display: flex; align-items: center; gap: 12px; color: var(--vm-dim); font-size: 12px; margin: 20px 0; }
.vm-divider::before, .vm-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.10); }

/* OTP */
.vm-otp { display: flex; gap: 8px; justify-content: center; margin: 4px 0 8px; }
.vm-otp__box {
    width: 46px; height: 56px; text-align: center; font-size: 22px; font-weight: 800; color: var(--vm-text);
    background: rgba(8,5,18,0.7); border: 1.5px solid rgba(200,150,60,0.28); border-radius: 12px;
    outline: none; font-family: inherit; caret-color: var(--vm-gold);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.vm-otp__box:focus { border-color: var(--vm-gold); box-shadow: 0 0 0 3px rgba(200,150,60,0.15); }
.vm-otp__box.is-filled { border-color: rgba(232,185,106,0.6); background: rgba(200,150,60,0.07); }
@media (max-width: 360px) { .vm-otp__box { width: 40px; height: 50px; font-size: 19px; } .vm-otp { gap: 6px; } }

/* ── Affiliate: chung ──────────────────────────────────────────────────── */
.aff-section { padding: 56px 0; }
@media (min-width: 1024px) { .aff-section { padding: 80px 0; } }
.aff-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--vm-gold-p); background: rgba(200,150,60,0.10); border: 1px solid rgba(200,150,60,0.30);
}
.aff-h2 { color: #fff; font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; text-align: center; }
@media (min-width: 768px) { .aff-h2 { font-size: 34px; } }
.aff-lead { color: var(--vm-muted); font-size: 15px; line-height: 1.7; text-align: center; max-width: 640px; margin: 12px auto 0; }
.aff-gold-text {
    background: linear-gradient(135deg, #F5DFA8 0%, #E8B96A 40%, #C8963C 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Hero */
.aff-hero { position: relative; padding: 28px 0 56px; overflow: hidden; }
@media (min-width: 1024px) { .aff-hero { padding: 40px 0 88px; } }
.aff-hero::after {
    content: ''; position: absolute; width: 520px; height: 520px; right: -140px; top: -120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124,92,255,0.25) 0%, transparent 65%); pointer-events: none;
}
.aff-breadcrumb { display: flex; gap: 6px; font-size: 12px; color: var(--vm-dim); margin-bottom: 28px; flex-wrap: wrap; }
.aff-breadcrumb a { color: var(--vm-dim); text-decoration: none; }
.aff-breadcrumb a:hover { color: var(--vm-gold-l); }
.aff-breadcrumb [aria-current] { color: var(--vm-gold-l); }
.aff-hero__grid { display: grid; gap: 36px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 1024px) { .aff-hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.aff-h1 { color: #fff; font-weight: 900; line-height: 1.12; letter-spacing: -0.02em; font-size: 34px; margin: 18px 0 16px; }
@media (min-width: 640px) { .aff-h1 { font-size: 46px; } }
@media (min-width: 1024px) { .aff-h1 { font-size: 50px; } }
.aff-hero__sub { color: var(--vm-muted); font-size: 16px; line-height: 1.75; max-width: 560px; }
.aff-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.aff-hero__cta .vm-btn { flex: 1 1 200px; }
@media (min-width: 640px) { .aff-hero__cta .vm-btn { flex: 0 0 auto; } }
.aff-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 24px; color: var(--vm-muted); font-size: 13px; }
.aff-badges span { display: inline-flex; align-items: center; gap: 6px; }
.aff-badges svg { color: var(--vm-gold-l); flex-shrink: 0; }

.aff-orb {
    position: relative; aspect-ratio: 1; max-width: 380px; width: 100%; margin: 0 auto; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background:
        radial-gradient(circle at 35% 30%, rgba(245,223,168,0.18) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(60,30,120,0.9) 0%, rgba(20,10,44,0.95) 70%);
    border: 1px solid rgba(232,185,106,0.35);
    box-shadow: 0 0 80px rgba(124,92,255,0.35), 0 0 140px rgba(200,150,60,0.15), inset 0 0 60px rgba(124,92,255,0.25);
    animation: affFloat 7s ease-in-out infinite;
}
.aff-orb::before {
    content: ''; position: absolute; inset: -18px; border-radius: 50%;
    border: 1px dashed rgba(232,185,106,0.25); animation: affSpin 40s linear infinite;
}
.aff-orb__label { color: var(--vm-gold-p); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.aff-orb__value { font-size: 96px; font-weight: 900; line-height: 1; margin: 6px 0; }
@media (min-width: 640px) { .aff-orb__value { font-size: 120px; } }
.aff-orb__note { color: var(--vm-muted); font-size: 14px; }
@keyframes affFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes affSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aff-orb, .aff-orb::before { animation: none; } }

/* Steps */
.aff-steps { display: grid; gap: 16px; margin-top: 36px; counter-reset: affstep; }
@media (min-width: 768px) { .aff-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.aff-step { padding: 26px 22px; }
.aff-step__num {
    width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 20px; color: #1A1004; margin-bottom: 16px;
    background: linear-gradient(135deg, #E8B96A, #C8963C); box-shadow: 0 6px 22px rgba(200,150,60,0.35);
}
.aff-step__title { color: #fff; font-size: 18px; font-weight: 800; }
.aff-step__desc { color: var(--vm-muted); font-size: 14px; line-height: 1.7; margin-top: 8px; }

/* Tier cards */
.aff-tiers { display: grid; gap: 18px; margin-top: 36px; }
@media (min-width: 768px) { .aff-tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.aff-tier { padding: 28px 24px; text-align: center; overflow: hidden; }
.aff-tier__gem {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.aff-tier__name { font-size: 15px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.aff-tier__rate { font-size: 56px; font-weight: 900; line-height: 1.05; margin: 10px 0 2px; color: #fff; }
.aff-tier__per { color: var(--vm-dim); font-size: 13px; }
.aff-tier__range { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); color: var(--vm-muted); font-size: 14px; }
.aff-tier--silver .aff-tier__gem { background: linear-gradient(135deg, #E5E7EB, #9CA3AF); box-shadow: 0 0 26px rgba(229,231,235,0.25); }
.aff-tier--silver .aff-tier__name { color: #E5E7EB; }
.aff-tier--gold .aff-tier__gem { background: linear-gradient(135deg, #F5DFA8, #C8963C); box-shadow: 0 0 30px rgba(200,150,60,0.4); }
.aff-tier--gold .aff-tier__name { color: var(--vm-gold-l); }
.aff-tier--diamond {
    border-color: rgba(232,185,106,0.65);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,92,255,0.35) 0%, transparent 70%),
        linear-gradient(160deg, rgba(48,26,98,0.92) 0%, rgba(20,10,44,0.95) 100%);
    box-shadow: 0 0 0 1px rgba(232,185,106,0.25) inset, 0 30px 80px rgba(0,0,0,0.5), 0 0 70px rgba(124,92,255,0.35), 0 0 40px rgba(200,150,60,0.2);
}
@media (min-width: 768px) { .aff-tier--diamond { transform: translateY(-12px) scale(1.03); } }
.aff-tier--diamond .aff-tier__gem { background: linear-gradient(135deg, #C4B5FD, #7C5CFF 55%, #E8B96A); box-shadow: 0 0 40px rgba(124,92,255,0.6); }
.aff-tier--diamond .aff-tier__name { color: #DDD6FE; }
.aff-tier--diamond .aff-tier__rate { text-shadow: 0 0 30px rgba(232,185,106,0.45); }
.aff-tier__ribbon {
    position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
    color: #1A1004; background: linear-gradient(135deg, #F5DFA8, #C8963C); letter-spacing: .06em; text-transform: uppercase;
}
.aff-note { text-align: center; color: var(--vm-dim); font-size: 13px; margin-top: 22px; }

/* Calculator */
.aff-calc { display: grid; gap: 24px; padding: 24px; margin-top: 36px; }
@media (min-width: 900px) { .aff-calc { grid-template-columns: 1.1fr 0.9fr; padding: 34px; gap: 40px; } }
.aff-range-row { margin-bottom: 22px; }
.aff-range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--vm-muted); font-size: 14px; margin-bottom: 10px; }
.aff-range-head strong { color: #fff; font-size: 18px; }
.aff-range { width: 100%; accent-color: var(--vm-gold); height: 28px; cursor: pointer; }
.aff-result {
    border-radius: 16px; padding: 26px 22px; text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(200,150,60,0.18) 0%, transparent 70%), rgba(10,6,22,0.55);
    border: 1px solid rgba(232,185,106,0.35);
}
.aff-result__label { color: var(--vm-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.aff-result__value { font-size: 40px; font-weight: 900; margin: 8px 0 4px; line-height: 1.1; word-break: break-word; }
.aff-result__year { color: var(--vm-gold-p); font-size: 15px; font-weight: 700; }
.aff-result__rate { display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(124,92,255,0.18); color: #DDD6FE; font-size: 13px; font-weight: 700; }

/* Notice + lock */
.aff-notice { padding: 26px 22px; text-align: center; border-color: rgba(232,185,106,0.45); }
.aff-notice__title { color: #fff; font-size: 19px; font-weight: 800; line-height: 1.45; }
.aff-notice__sub { color: var(--vm-muted); font-size: 14px; margin-top: 8px; }
.aff-notice__btns { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .aff-notice__btns { grid-template-columns: 1fr 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }
.aff-locked { position: relative; margin-top: 20px; border-radius: var(--vm-radius); overflow: hidden; }
.aff-locked__content { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.aff-locked__overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(180deg, rgba(11,7,22,0.15) 0%, rgba(11,7,22,0.7) 100%);
    color: var(--vm-gold-p); font-weight: 800; font-size: 15px; text-align: center; padding: 16px;
}
.aff-locked__overlay svg { width: 34px; height: 34px; filter: drop-shadow(0 0 12px rgba(232,185,106,0.6)); }

/* Referral link box */
.aff-share-card { padding: 22px; }
@media (min-width: 768px) { .aff-share-card { padding: 30px; } }
.aff-share-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .aff-share-grid { grid-template-columns: 1fr 200px; align-items: start; } }
.aff-targets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.aff-target {
    padding: 8px 13px; min-height: 38px; border-radius: 999px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
    color: var(--vm-text); background: rgba(255,255,255,0.04); border: 1px solid rgba(232,185,106,0.25); transition: background .15s, border-color .15s, color .15s;
}
.aff-target:hover { border-color: rgba(232,185,106,0.55); }
.aff-target.is-active { color: #1A1004; background: linear-gradient(135deg, #F5DFA8, #C8963C); border-color: transparent; font-weight: 700; }
.aff-custom { margin-top: 12px; }
.aff-custom .aff-hint { display: block; margin-bottom: 8px; }
.aff-custom__input { font-family: inherit; font-size: 14px; border-style: solid; }
.aff-linkbox { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.aff-linkbox__input {
    flex: 1 1 220px; min-width: 0; min-height: 50px; padding: 12px 14px; border-radius: 12px; font-size: 15px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--vm-gold-p); background: rgba(8,5,18,0.75); border: 1.5px dashed rgba(232,185,106,0.45);
}
.aff-linkbox .vm-btn { flex: 0 0 auto; }
@media (max-width: 479px) { .aff-linkbox .vm-btn { flex: 1 1 100%; } }
.aff-code { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--vm-muted); font-size: 13px; }
.aff-code strong { color: #fff; letter-spacing: .14em; font-size: 15px; }
.aff-hint { color: var(--vm-dim); font-size: 13px; line-height: 1.6; margin-top: 10px; }
.aff-share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.aff-share a, .aff-share button {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; border-radius: 11px;
    font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid rgba(255,255,255,0.12);
    color: #fff; background: rgba(255,255,255,0.05); font-family: inherit; transition: background .15s, transform .15s;
}
.aff-share a:hover, .aff-share button:hover { background: rgba(255,255,255,0.11); transform: translateY(-1px); }
.aff-share .is-zalo { background: rgba(0,104,255,0.18); border-color: rgba(0,104,255,0.45); }
.aff-share .is-fb { background: rgba(24,119,242,0.18); border-color: rgba(24,119,242,0.45); }
.aff-share .is-ms { background: rgba(160,51,255,0.18); border-color: rgba(160,51,255,0.45); }
.aff-qr { text-align: center; }
.aff-qr__box { display: inline-flex; padding: 12px; background: #fff; border-radius: 14px; box-shadow: 0 0 30px rgba(200,150,60,0.25); }
.aff-qr__box img, .aff-qr__box canvas { display: block; width: 156px; height: 156px; }
.aff-qr__hint { color: var(--vm-dim); font-size: 12px; margin-top: 8px; }

/* Toast */
.aff-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999;
    padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #1A1004; max-width: calc(100vw - 32px);
    background: linear-gradient(135deg, #F5DFA8, #C8963C); box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* FAQ */
.aff-faq { max-width: 820px; margin: 32px auto 0; display: grid; gap: 12px; }
.aff-faq details { padding: 0; overflow: hidden; }
.aff-faq summary {
    list-style: none; cursor: pointer; padding: 18px 20px; color: #fff; font-weight: 700; font-size: 15px;
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.aff-faq summary::-webkit-details-marker { display: none; }
.aff-faq summary::after { content: '+'; color: var(--vm-gold-l); font-size: 22px; font-weight: 400; transition: transform .2s; flex-shrink: 0; }
.aff-faq details[open] summary::after { transform: rotate(45deg); }
.aff-faq__a { padding: 0 20px 18px; color: var(--vm-muted); font-size: 14px; line-height: 1.75; }

/* Final CTA */
.aff-final { text-align: center; padding: 40px 22px; }
@media (min-width: 768px) { .aff-final { padding: 56px 40px; } }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.aff-dash { padding: 28px 0 64px; }
.aff-dash__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.aff-dash__title { color: #fff; font-size: 26px; font-weight: 900; }
.aff-dash__sub { color: var(--vm-muted); font-size: 14px; margin-top: 4px; }
.aff-grid-2 { display: grid; gap: 18px; }
@media (min-width: 1024px) { .aff-grid-2 { grid-template-columns: 1.1fr 0.9fr; } }
.aff-tierbox { padding: 24px; }
.aff-tierbox__row { display: flex; align-items: center; gap: 16px; }
.aff-tierbox__gem { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.aff-tierbox__label { color: var(--vm-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.aff-tierbox__name { color: #fff; font-size: 24px; font-weight: 900; }
.aff-tierbox__rate { color: var(--vm-gold-p); font-size: 14px; font-weight: 700; }
.aff-progress { margin-top: 20px; }
.aff-progress__bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.aff-progress__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7C5CFF, #E8B96A); box-shadow: 0 0 16px rgba(232,185,106,0.5); }
.aff-progress__text { color: var(--vm-muted); font-size: 13px; margin-top: 8px; }
.aff-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (min-width: 768px) { .aff-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .aff-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.aff-stat { padding: 16px; border-radius: 14px; background: var(--vm-card-2); border: 1px solid var(--vm-border-2); }
.aff-stat__label { color: var(--vm-dim); font-size: 12px; }
.aff-stat__value { color: #fff; font-size: 20px; font-weight: 900; margin-top: 4px; word-break: break-word; }
.aff-stat--hl { border-color: rgba(232,185,106,0.55); background: radial-gradient(ellipse at 50% 0%, rgba(200,150,60,0.20), transparent 70%), var(--vm-card-2); }
.aff-stat--hl .aff-stat__value { color: var(--vm-gold-p); }

.aff-panel { margin-top: 18px; }
.aff-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.aff-panel__title { color: #fff; font-size: 17px; font-weight: 800; }
.aff-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.aff-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.aff-table th { text-align: left; color: var(--vm-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 12px 20px; white-space: nowrap; }
.aff-table td { padding: 13px 20px; color: var(--vm-text); border-top: 1px solid rgba(255,255,255,0.05); white-space: nowrap; }
.aff-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.aff-table .gold { color: var(--vm-gold-p); font-weight: 800; }
.aff-empty { padding: 28px 20px; text-align: center; color: var(--vm-dim); font-size: 14px; }
.aff-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.aff-pill--approved, .aff-pill--yes { color: #BBF7D0; background: rgba(74,222,128,0.12); }
.aff-pill--processing, .aff-pill--pending { color: #FDE68A; background: rgba(251,191,36,0.12); }
.aff-pill--paid { color: #DDD6FE; background: rgba(124,92,255,0.18); }
.aff-pill--cancelled, .aff-pill--rejected, .aff-pill--no { color: rgba(238,232,248,0.55); background: rgba(255,255,255,0.06); }

.aff-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.06); color: var(--vm-dim); font-size: 13px; }
.aff-pager a, .aff-pager span.is-disabled { padding: 8px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.12); color: var(--vm-text); text-decoration: none; font-weight: 600; }
.aff-pager span.is-disabled { opacity: .35; }
.aff-pager a:hover { border-color: var(--vm-gold); color: var(--vm-gold-p); }

.aff-withdraw { padding: 22px; }
.aff-withdraw__grid { display: grid; gap: 14px; }
@media (min-width: 768px) { .aff-withdraw__grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Promo banner (x-affiliate.promo-banner) ───────────────────────────── */
.aff-promo {
    position: relative; display: block; overflow: hidden; text-decoration: none; color: var(--vm-text);
    border-radius: 20px; padding: 24px 20px 22px;
    border: 1px solid rgba(232,185,106,0.5);
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(124,92,255,0.45) 0%, transparent 70%),
        radial-gradient(circle at 100% 100%, rgba(200,150,60,0.22) 0%, transparent 55%),
        linear-gradient(165deg, #2A1658 0%, #170C33 60%, #0E0722 100%);
    box-shadow: 0 0 0 1px rgba(232,185,106,0.12) inset, 0 20px 50px rgba(0,0,0,0.5), 0 0 50px rgba(124,92,255,0.30);
    transition: transform .25s, box-shadow .25s;
}
.aff-promo:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(232,185,106,0.2) inset, 0 26px 60px rgba(0,0,0,0.55), 0 0 70px rgba(124,92,255,0.45), 0 0 30px rgba(200,150,60,0.25); }
.aff-promo::before {
    content: ''; position: absolute; top: -60%; left: -40%; width: 60%; height: 220%; transform: rotate(25deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
    animation: affShine 5.5s ease-in-out infinite;
}
@keyframes affShine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
@media (prefers-reduced-motion: reduce) { .aff-promo::before { animation: none; display: none; } }
.aff-promo__badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase; color: var(--vm-gold-p); background: rgba(200,150,60,0.14); border: 1px solid rgba(200,150,60,0.35);
}
.aff-promo__upto { color: var(--vm-muted); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-top: 16px; font-weight: 700; }
.aff-promo__rate {
    font-size: 84px; font-weight: 900; line-height: .95; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FFF3D1 0%, #F5DFA8 30%, #E8B96A 60%, #C8963C 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 18px rgba(232,185,106,0.45));
}
.aff-promo__headline { color: #fff; font-size: 18px; font-weight: 800; line-height: 1.35; margin-top: 10px; }
.aff-promo__sub { color: var(--vm-muted); font-size: 13px; line-height: 1.65; margin-top: 8px; }
.aff-promo__points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.aff-promo__points li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--vm-text); }
.aff-promo__points li::before { content: '✦'; color: var(--vm-gold-l); font-size: 11px; }
.aff-promo__cta { margin-top: 18px; width: 100%; }

/* Compact (mobile) */
.aff-promo--compact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; }
.aff-promo--compact::before { display: none; }
.aff-promo--compact .aff-promo__rate { font-size: 40px; flex-shrink: 0; }
.aff-promo--compact .aff-promo__headline { font-size: 14px; margin: 0; }
.aff-promo--compact .aff-promo__go {
    margin-left: auto; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #1A1004;
    background: linear-gradient(135deg, #E8B96A, #C8963C); box-shadow: 0 4px 16px rgba(200,150,60,0.4);
}

/* ── Nav account menu ──────────────────────────────────────────────────── */
.vm-nav-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: #1A1004; background: linear-gradient(135deg, #E8B96A, #C8963C); overflow: hidden; flex-shrink: 0;
}
.vm-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vm-nav-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-nav-aff {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
    color: var(--vm-gold-p); text-decoration: none; border: 1px solid rgba(200,150,60,0.4); background: rgba(200,150,60,0.08);
    transition: background .15s;
}
.vm-nav-aff:hover { background: rgba(200,150,60,0.18); }
.vm-nav-btn-reset { background: none; border: 0; cursor: pointer; font-family: inherit; width: 100%; text-align: left; }

/* ── Landing affiliate: nội dung SEO ───────────────────────────────────── */
.aff-prose { max-width: 760px; margin: 20px auto 0; color: var(--vm-text); font-size: 15.5px; line-height: 1.8; }
.aff-prose p + p { margin-top: 14px; }
.aff-cards { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 640px) { .aff-cards--3, .aff-cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .aff-cards--3 { grid-template-columns: repeat(3, 1fr); } .aff-cards--4 { grid-template-columns: repeat(4, 1fr); } }
.aff-card { padding: 22px 20px; }
.aff-card__title { color: var(--vm-gold-p); font-size: 16px; font-weight: 800; line-height: 1.4; }
.aff-card__desc { color: var(--vm-muted); font-size: 14px; line-height: 1.7; margin-top: 8px; }
.aff-card__h2 { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.35; }
.aff-split { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 900px) { .aff-split { grid-template-columns: 1fr 1fr; } }
.aff-checklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; counter-reset: aff-tip; }
.aff-checklist li { position: relative; padding-left: 28px; color: var(--vm-text); font-size: 14.5px; line-height: 1.65; }
.aff-checklist li::before { content: '✦'; position: absolute; left: 4px; top: 0; color: var(--vm-gold-l); }
.aff-checklist--num li { counter-increment: aff-tip; }
.aff-checklist--num li::before { content: counter(aff-tip); top: 2px; width: 20px; height: 20px; left: 0; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #1A1004; background: linear-gradient(135deg, #E8B96A, #C8963C); }
.aff-explore { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.aff-explore a { padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--vm-text); border: 1px solid rgba(232,185,106,0.35); background: rgba(124,92,255,0.10); transition: background .15s, border-color .15s; }
.aff-explore a:hover { border-color: var(--vm-gold); background: rgba(200,150,60,0.16); color: var(--vm-gold-p); }

/* ── Loading khi submit (partials/form-loading, thuộc tính data-loading) ── */
.vm-spinner {
    display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.15em; margin-right: .5em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: vmSpin .7s linear infinite;
}
.is-loading { pointer-events: none; cursor: progress; opacity: .85; }
.vm-btn.is-loading { transform: none; }
@keyframes vmSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vm-spinner { animation-duration: 1.6s; } }
