/* ============================================================
   CoinPlay V2 — PAGES skin ("Royale Violet")
   Promo Center / Withdraw / Profile — presentation layer.
   Loads AFTER core.css and owns the final look.
   Scroll contract (DO NOT BREAK): page shells are flex-column
   100dvh; .promo-body / .withdraw-body / .profile-body is the
   single overflow-y:auto region; children flex-shrink: 0.
   This file only deepens visuals — never alters that layout.
   ============================================================ */

/* ---------- shared: tab bar ---------- */
.promo-tabs {
    background: linear-gradient(180deg, rgba(36,18,67,.98), rgba(21,10,40,.97));
    border-bottom: 1px solid rgba(245,196,81,.25);
    box-shadow: 0 8px 22px rgba(0,0,0,.35);
    padding: 10px 10px 0;
    gap: 2px;
}
.promo-tab {
    border-bottom: 3px solid transparent;
    border-radius: 14px 14px 0 0;
    padding: 9px 2px 8px;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}
.promo-tab:active { transform: scale(0.97); }
.promo-tab-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    filter: saturate(0.5) brightness(0.8);
    transition: filter 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.promo-tab.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
    background: linear-gradient(180deg, rgba(245,196,81,.10), transparent);
}
.promo-tab.active .promo-tab-icon {
    filter: none;
    transform: scale(1.14);
    box-shadow: 0 0 18px rgba(245,196,81,.55), 0 0 0 1px rgba(245,196,81,.4);
}

/* ---------- shared: cards ---------- */
.promo-card {
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
    position: relative;
    overflow: hidden;
}
.promo-card-label {
    color: var(--gold-bright);
    letter-spacing: 0.1em;
}

/* ---------- shared: heroes ---------- */
.promo-hero { padding: 14px 6px 18px; }
.promo-hero-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 26px rgba(245,196,81,.28);
    border: 1px solid rgba(245,196,81,.35);
}
.promo-hero-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ---------- shared: buttons ---------- */
.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.btn-primary:not(:disabled):hover::after { left: 120%; }

/* ---------- PROMO: invite ---------- */
.invite-link {
    background: rgba(10,6,22,.55);
    border: 1px solid rgba(245,196,81,.3);
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
}
.share-btn {
    background: linear-gradient(165deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border-radius: 16px;
    min-height: 68px;
    box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.share-btn:hover { box-shadow: 0 8px 18px rgba(0,0,0,.35), 0 0 14px rgba(245,196,81,.2); }
.share-btn:active { transform: scale(0.94); }
.share-ico { font-size: 1.55rem; }

.rate-row { padding: 9px 2px; }
.rate-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.rate-row b {
    background: linear-gradient(180deg, #ffe9a8, #f5c451 60%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 0.95rem;
}

/* ---------- PROMO: events ---------- */
.promo-ev {
    padding: 0;
    overflow: hidden;
}
.promo-ev > *:not(.promo-ev-img) { margin-left: 14px; margin-right: 14px; }
.promo-ev .promo-ev-title { margin-top: 12px; }
.promo-ev .promo-ev-dates { margin-bottom: 14px; }
.promo-ev-img {
    height: 130px;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(245,196,81,.25);
}
.promo-ev-dates {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(245,196,81,.1);
    border: 1px solid rgba(245,196,81,.3);
    border-radius: 999px;
    padding: 4px 12px;
}

/* ---------- PROMO: missions ---------- */
.promo-mis { position: relative; }
.promo-mis-head { align-items: flex-start; }
.promo-mis-title { font-size: 1rem; }
.promo-mis-meta { margin-top: 8px; }
.promo-progress { height: 12px; margin-top: 12px; }
.promo-progress-fill {
    position: relative;
    overflow: hidden;
}
.promo-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
    animation: pg-shine 2.2s ease-in-out infinite;
}
@keyframes pg-shine {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}
.promo-mis-foot { justify-content: space-between; align-items: center; }
.promo-mis-foot::before {
    content: '';
    flex: 1;
}

/* ---------- PROMO: rebate ---------- */
.rebate-card {
    border-radius: 24px;
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(245,196,81,.16), transparent 70%),
        linear-gradient(165deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 30px rgba(245,196,81,.14), inset 0 1px 0 rgba(255,255,255,.1);
    padding: 26px 16px;
}
.rebate-amount {
    font-size: 2.4rem;
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(245,196,81,.35));
}
.rebate-amount .coin-icon { -webkit-text-fill-color: initial; }
.rebate-sub b { color: var(--gold-bright); }

/* ---------- PROMO: data (7-level team) ---------- */
.level-pills { gap: 6px; }
.level-pill {
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    transition: all 0.18s ease;
}
.level-pill.active {
    transform: translateY(-1px);
}
.level-stat { border-radius: 14px; }
.level-stat b { font-size: 1rem; }

.member-row {
    border-radius: 16px;
    padding: 11px 13px;
    box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.07);
}
.member-earn { color: var(--gold-bright); }

.promo-loading, .promo-empty {
    border: 1px dashed rgba(245,196,81,.3);
    border-radius: 16px;
    background: rgba(255,255,255,.02);
    font-size: 0.88rem;
}

/* ---------- WITHDRAW ---------- */
.wd-balance-card {
    border-radius: 22px;
    padding: 20px 16px;
    text-align: center;
    background:
        radial-gradient(90% 80% at 50% 0%, rgba(245,196,81,.18), transparent 70%),
        linear-gradient(165deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(245,196,81,.4);
    box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 26px rgba(245,196,81,.13), inset 0 1px 0 rgba(255,255,255,.1);
    margin-bottom: 14px;
}
.wd-balance-amount {
    font-size: 2.3rem;
    font-weight: 900;
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(245,196,81,.35));
}
.wd-balance-amount .coin-icon { -webkit-text-fill-color: initial; }

.wd-input {
    border-radius: 13px;
    background: rgba(10,6,22,.5);
    border: 1px solid rgba(245,196,81,.28);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wd-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245,196,81,.18);
}
select.wd-input option { background: #1c1233; color: var(--text-primary); }

.seg-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-pill {
    flex: 1;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(245,196,81,.25);
    background: rgba(255,255,255,.05);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.seg-pill.active {
    color: #2a1a00;
    background: linear-gradient(180deg, #ffd76a, #e8a91c);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(245,196,81,.4);
}

/* method tabs — 3D icons */
.method-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.method-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px 10px;
    border-radius: 16px;
    border: 1px solid rgba(245,196,81,.22);
    background: rgba(255,255,255,.04);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}
.method-tab img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    filter: saturate(0.55) brightness(0.82);
    transition: all 0.2s ease;
}
.method-tab.active {
    border-color: rgba(245,196,81,.6);
    color: var(--gold-bright);
    background: linear-gradient(165deg, rgba(245,196,81,.12), rgba(255,255,255,.02));
    box-shadow: 0 8px 20px rgba(0,0,0,.35), 0 0 16px rgba(245,196,81,.25);
}
.method-tab.active img { filter: none; transform: scale(1.1); }

.wd-micon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    border: 1px solid rgba(245,196,81,.3);
}
.btn-xs {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    border: 1px solid rgba(245,196,81,.35);
    background: rgba(245,196,81,.1);
    color: var(--gold-bright);
    cursor: pointer;
}
.btn-xs.danger {
    border-color: rgba(239,68,68,.45);
    background: rgba(239,68,68,.1);
    color: #fca5a5;
}

.wd-form-title {
    color: var(--gold-bright);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* ---------- PROFILE ---------- */
.pf-head {
    border-radius: 24px;
    padding: 18px 16px;
    background:
        radial-gradient(110% 90% at 50% 0%, rgba(139,92,246,.22), transparent 65%),
        linear-gradient(165deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
    border: 1px solid rgba(245,196,81,.3);
    box-shadow: 0 14px 32px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
    position: relative;
    overflow: hidden;
}
@property --pf-ring { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.pf-avatar {
    width: 74px;
    height: 74px;
    padding: 4px;
    border-radius: 50%;
    border: none;
    object-fit: cover;
    flex-shrink: 0;
    background: conic-gradient(from var(--pf-ring), #f5c451, #8b5cf6, #22c55e, #f5c451);
    box-shadow: 0 0 20px rgba(139,92,246,.5), 0 6px 16px rgba(0,0,0,.5);
    animation: pf-ring-spin 7s linear infinite;
}
@keyframes pf-ring-spin {
    to { --pf-ring: 360deg; }
}
/* browsers without @property get a static ring — still looks right */
.pf-name { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.01em; }
.pf-id-row { color: var(--text-secondary); font-size: 0.78rem; margin-top: 4px; }
.pf-copy {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(245,196,81,.25);
    border-radius: 8px;
    padding: 2px 7px;
    cursor: pointer;
    font-size: 0.72rem;
    margin-left: 6px;
}
.pf-bal-val {
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.pf-bal-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); }

/* quick actions */
.pf-quick { display: flex; gap: 10px; }
.pf-qa {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 13px 4px 11px;
    border-radius: 18px;
    border: 1px solid rgba(245,196,81,.25);
    background: linear-gradient(165deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    color: var(--text-primary);
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
    transition: transform 0.12s ease;
}
.pf-qa:active { transform: scale(0.94); }
.pf-qa img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* VIP — rich gold card */
.pf-vip {
    border-radius: 22px;
    padding: 16px;
    background:
        radial-gradient(100% 90% at 50% 0%, rgba(255,233,168,.22), transparent 70%),
        linear-gradient(150deg, #8a5a10, #4d3105 55%, #2a1a00);
    border: 1px solid rgba(255,215,106,.65);
    box-shadow: 0 14px 32px rgba(0,0,0,.5), 0 0 26px rgba(245,196,81,.28), inset 0 1px 0 rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    gap: 13px;
    position: relative;
    overflow: hidden;
}
.pf-vip-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.5);
    flex-shrink: 0;
    border: 1px solid rgba(255,240,190,.5);
}
.pf-vip-main { flex: 1; min-width: 0; }
.pf-vip-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pf-vip-level {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffe9a8;
    text-shadow: 0 2px 8px rgba(0,0,0,.6);
    letter-spacing: 0.02em;
}
.pf-vip-next { font-size: 0.68rem; color: #ffe9a8; font-weight: 700; white-space: nowrap; }
.pf-vip .promo-progress {
    background: rgba(0,0,0,.45);
    border-color: rgba(255,240,190,.35);
}
.pf-vip-sub { font-size: 0.7rem; color: rgba(255,240,190,.85); margin-top: 5px; }
.pf-vip .btn-primary { box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.55); }

/* menu rows */
.pf-menu {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(245,196,81,.22);
    background: linear-gradient(165deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.pf-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(245,196,81,.12);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.pf-row:last-child { border-bottom: none; }
.pf-row:active { background: rgba(245,196,81,.08); }
.pf-ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(139,92,246,.14);
    border: 1px solid rgba(139,92,246,.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.pf-row > span:nth-child(2) { flex: 1; }
.pf-arrow {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 800;
    opacity: 0.85;
}
.pf-hint { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; }
.pf-row.pf-danger { color: #fca5a5; }
.pf-row.pf-danger .pf-ico {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.35);
}

/* ---------- tx / method rows (withdraw lists) ---------- */
.member-side .btn-xs + .btn-xs { margin-left: 6px; }

/* loading spinner */
.spinner {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(245,196,81,.25);
    border-top-color: var(--gold);
    animation: pg-spin 0.8s linear infinite;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* invite: level chip in commission rows */
.lv-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(139,92,246,.18);
    border: 1px solid rgba(139,92,246,.45);
    color: #c4b5fd;
    font-size: 0.66rem;
    font-weight: 800;
}

/* missions: 3D icon row */
.promo-mis-top { display: flex; align-items: center; gap: 12px; }
.promo-mis-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,.45), 0 0 14px rgba(245,196,81,.2);
    border: 1px solid rgba(245,196,81,.3);
}
.promo-mis-head { flex: 1; min-width: 0; }

/* data: member initial avatar */
.member-ava {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(245,196,81,.25);
}
.member-ava.on {
    color: #2a1a00;
    background: linear-gradient(180deg, #ffd76a, #e8a91c);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(245,196,81,.45);
}

/* tx row icon */
.tx-ico {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(139,92,246,.14);
    border: 1px solid rgba(139,92,246,.35);
}
.tx-amount { color: var(--gold-bright); }

/* security modal (password) form */
.pw-form { display: flex; flex-direction: column; gap: 10px; }
.pw-form .wd-input { width: 100%; box-sizing: border-box; }

/* about modal */
.about-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.about-box .about-emoji { text-align: center; font-size: 2.6rem; }
.about-box .about-title {
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem;
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.about-box .about-ver { font-size: 0.75rem; text-align: center; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; }
    .pf-avatar { animation: none; }
    .promo-progress-fill::after { animation: none; }
    .btn-primary::after { display: none; }
    *, *::before, *::after { transition: none !important; }
}

/* ============ DEPOSIT PAGE ============ */
.dep-detail-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; margin-bottom: 8px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(245, 196, 81, 0.18);
    border-radius: 12px; font-size: 0.85rem;
}
.dep-detail-row span { color: var(--text-secondary); min-width: 74px; }
.dep-detail-row b { flex: 1; word-break: break-all; font-size: 0.88rem; }
.dep-copy {
    background: rgba(245, 196, 81, 0.15); border: 1px solid rgba(245, 196, 81, 0.35);
    border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 0.85rem;
}
.dep-net-pills { margin-bottom: 10px; }
.dep-row {
    position: relative;
    padding: 10px 12px; margin-bottom: 8px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.dep-row-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dep-row-main b { color: var(--gold, #f5c451); }
.dep-row-main span { color: var(--text-secondary); font-size: 0.8rem; }
.dep-row-sub { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 0.75rem; }
.dep-row-note { margin-top: 6px; color: #f87171; font-size: 0.78rem; }
.dep-status {
    display: inline-block; margin-top: 6px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.dep-status-pending { background: rgba(245, 196, 81, 0.18); color: #f5c451; border: 1px solid rgba(245, 196, 81, 0.4); }
.dep-status-approved { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.dep-status-rejected { background: rgba(239, 68, 68, 0.14); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
