/* ==========================================================
   APP THEME - shared look based on the home dashboard.
   Loaded last (see base.html) so it restyles each page's own
   CSS. Visual changes only; no layout logic or behaviour.
   ========================================================== */
:root {
    --t-bg: linear-gradient(180deg, #ebe8ff 0%, #d3e6f7 45%, #bfe3f8 100%);
    --t-header: #cbc8d6;
    --t-card: #f7f9fe;
    --t-card-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    --t-text: #111827;
    --t-muted: #4b5563;
    --t-purple: linear-gradient(120deg, #c79bf0 0%, #9b7bf0 50%, #7a5ce6 100%);
    --t-primary: #1a6bff;
    --t-green: #1e8a52;
}

body {
    background: var(--t-bg) fixed !important;
}

.phone-wrapper {
    background: transparent !important;
}

/* The withdrawal account page starts flush with its header. */
.phone-wrapper:has(.bank-details-screen) {
    padding-top: 0 !important;
}

/* ---------- Page wrappers: let the gradient show through ---------- */
.wallet-page,
.markets-screen,
.team-screen,
.team-level-panel,
.invite-page,
.wallet-history-screen,
.security-page,
.qp-settings-page,
.qp-settings-container {
    background: transparent !important;
    color: var(--t-text);
}

/* ---------- Header bar (same on every page) ---------- */
.cp-back-row,
.security-page .cp-back-row,
.wallet-header,
.market-topbar,
.team-header,
.inv-header,
.history-header {
    justify-content: flex-start !important;
    gap: 22px !important;
    min-height: 64px;
    padding: 12px 20px !important;
    background: var(--t-header) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.cp-page-label,
.security-page .cp-page-label,
.wallet-header h4,
.market-topbar h4,
.team-header h4,
.inv-header h4,
.history-header h4 {
    margin: 0;
    color: var(--t-text) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.15;
}

.market-eyebrow,
.history-header span {
    display: none !important;
}

/* back arrow: plain dark icon, no circle */
.cp-back-btn,
.security-page .cp-back-btn,
.wallet-back-btn,
.team-back-btn,
.inv-back-btn,
.qp-settings-header-btn,
.history-header-btn {
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    color: var(--t-text) !important;
    font-size: 1.5rem !important;
}

/* the home shortcut lives in the bottom nav */
.cp-home-btn,
.wallet-home-btn,
.team-home-btn,
.inv-home-btn,
.btn-header-action,
.history-header > a:last-child,
.qp-profile-topbar > a:last-child {
    display: none !important;
}

/* ---------- Cards ---------- */
.cp-form-card,
.security-page .cp-form-card,
.level-card,
.inv-card,
.history-card,
.market-card,
.auth-card,
.qp-settings-card,
.qp-profile-stats-card {
    background: var(--t-card) !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: var(--t-card-shadow) !important;
}

.history-empty,
.record-empty {
    background: rgba(247, 249, 254, .7) !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: var(--t-muted);
}

/* ---------- Hero / highlight cards: purple like the refer banner ---------- */
.inv-hero,
.wallet-hero,
.qp-profile-header {
    background: var(--t-purple) !important;
    border: 0 !important;
    box-shadow: 0 6px 14px rgba(122, 92, 230, .3) !important;
}

.wallet-hero::before,
.wallet-hero::after {
    display: none !important;
}

.wallet-hero .invite-card {
    background: rgba(255, 255, 255, .22) !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    box-shadow: none !important;
}

.wallet-hero .balance-value {
    color: #ffffff !important;
}

.team-details {
    color: var(--t-muted) !important;
}

.copy-btn {
    background: var(--t-primary) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.qp-profile-header {
    border-radius: 0 0 20px 20px !important;
}

.inv-stat-pill {
    background: rgba(255, 255, 255, .22) !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    box-shadow: none !important;
}

.inv-hero-code {
    color: #fff3b0 !important;
}

/* ---------- Primary buttons ---------- */
.cp-btn-save,
.security-page .cp-btn-save,
.btn-login,
.btn-register,
.inv-btn-gold {
    background: var(--t-primary) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.inv-btn-outline {
    background: rgba(255, 255, 255, .6) !important;
    border: 1px solid #7aa3d4 !important;
    color: var(--t-primary) !important;
    border-radius: 6px !important;
}

.qp-profile-btn-fill {
    background: var(--t-primary) !important;
    border-radius: 6px !important;
}

.qp-profile-btn-outline {
    background: rgba(255, 255, 255, .6) !important;
    border-color: #7aa3d4 !important;
    border-radius: 6px !important;
}

/* ---------- Inputs ---------- */
.form-control,
.cp-input-shell input,
.security-page .cp-input-shell input,
.search-box {
    background: #ffffff !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
}

.form-label,
.cp-label,
.security-page .cp-label,
.security-page .cp-label i {
    color: var(--t-text) !important;
}

/* ---------- Markets list ---------- */
.market-card {
    background: rgba(147, 185, 214, .35) !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}

.market-meta-row span {
    background: rgba(255, 255, 255, .7) !important;
}

.market-meta-row strong,
.coin-name,
.price {
    color: var(--t-text) !important;
}

.market-meta-row small,
.coin-sub,
.market-list-header {
    color: var(--t-muted) !important;
}

/* ---------- Team ---------- */
.level-card {
    background: var(--t-card) !important;
}

/* ---------- Settings / Mine ---------- */
.qp-settings-page {
    border: 0 !important;
    box-shadow: none !important;
}

.qp-profile-topbar {
    display: none !important;
}

.qp-profile-header {
    position: relative;
    overflow: hidden;
    padding: 30px 20px 54px !important;
}

.qp-profile-header::before,
.qp-profile-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    pointer-events: none;
}

.qp-profile-header::before {
    width: 150px;
    height: 150px;
    top: -50px;
    right: -30px;
}

.qp-profile-header::after {
    width: 90px;
    height: 90px;
    bottom: -30px;
    right: 70px;
}

.qp-profile-identity {
    position: relative;
    z-index: 1;
}

.qp-profile-avatar {
    width: 72px !important;
    height: 72px !important;
    background: linear-gradient(145deg, #ffffff 0%, #e4dcfb 100%) !important;
    border: 3px solid rgba(255, 255, 255, .85) !important;
    box-shadow: 0 4px 12px rgba(60, 40, 140, .3);
}

.qp-profile-avatar img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.qp-profile-meta h3 {
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

.qp-profile-meta span {
    font-weight: 500 !important;
}

.qp-profile-stat span {
    color: var(--t-muted) !important;
    font-size: .74rem !important;
    font-weight: 500 !important;
}

.qp-profile-stat strong {
    color: var(--t-text) !important;
    font-weight: 700 !important;
}

.qp-profile-btn-fill {
    background: var(--t-green) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.qp-profile-btn-outline {
    color: var(--t-primary) !important;
    font-weight: 600 !important;
}

.qp-setting-row {
    color: var(--t-text) !important;
}

.qp-setting-title {
    color: var(--t-text) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

.qp-setting-description {
    color: var(--t-muted) !important;
}

.qp-setting-icon,
.qp-icon-green,
.qp-icon-blue,
.qp-icon-yellow,
.qp-icon-gray {
    background: linear-gradient(145deg, #cdb2ec 0%, #9aa3e6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(110, 100, 200, .28) !important;
}

.qp-setting-arrow {
    color: #7b6fd6 !important;
}

.qp-settings-card .qp-setting-row:not(:last-child)::after {
    background: rgba(17, 24, 39, .08) !important;
}

.qp-download-button {
    background: var(--t-primary) !important;
    box-shadow: 0 3px 8px rgba(26, 107, 255, .3) !important;
}

.qp-form-field label {
    color: var(--t-text) !important;
}

.qp-form-field input,
.qp-form-field select,
.qp-form-field textarea {
    background: #ffffff !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
}

.qp-save-button {
    background: var(--t-primary) !important;
    border-radius: 6px !important;
}

.qp-logout-button {
    background: rgba(255, 255, 255, .75) !important;
    border: 1px solid #f1a5a5 !important;
    border-radius: 8px !important;
    color: #dc2626 !important;
    font-weight: 600 !important;
}

/* ---------- Login / register ---------- */
.phone-wrapper:has(.auth-screen) {
    display: block !important;
    padding: 0 0 36px !important;
    min-height: 100dvh;
}

.auth-screen {
    display: flex !important;
    flex-direction: column;
    gap: 14px !important;
    max-width: none !important;
    width: 100%;
}

.auth-screen .logo {
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 40px 20px 78px;
    background: var(--t-purple);
    border-radius: 0 0 28px 28px;
    box-shadow: 0 6px 14px rgba(122, 92, 230, .3);
}

.auth-screen .logo::before,
.auth-screen .logo::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    pointer-events: none;
}

.auth-screen .logo::before {
    width: 170px;
    height: 170px;
    top: -60px;
    right: -40px;
}

.auth-screen .logo::after {
    width: 110px;
    height: 110px;
    bottom: -40px;
    left: -20px;
}

.auth-screen .brand {
    position: relative;
    z-index: 1;
}

.auth-screen .brand-logo {
    width: 120px;
    max-width: 120px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(60, 40, 140, .3);
}

.auth-screen .logo p,
.brand-stacked p {
    margin: 10px 0 0 !important;
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.auth-card {
    position: relative;
    z-index: 2;
    margin: -46px 16px 0 !important;
    padding: 22px 18px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(90, 80, 180, .2) !important;
}

.auth-screen .form-label {
    color: #374151 !important;
    font-size: .72rem;
    font-weight: 700;
}

.btn-login,
.btn-register {
    background: linear-gradient(120deg, #3b82f6 0%, #7a5ce6 100%) !important;
    font-weight: 700 !important;
}

.forgot-password-link,
.register-link,
.link-text {
    color: #4f46e5 !important;
    font-weight: 700 !important;
}

.footer-text {
    margin: 0 16px;
    color: var(--t-muted) !important;
    font-size: .9rem !important;
}

/* ---------- Bottom nav ---------- */
.qp-nav-spacer {
    height: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
}

.qp-bottom-dock {
    width: calc(100% - 24px) !important;
    max-width: 406px !important;
    height: 78px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 6px !important;
    border: 0 !important;
    border-radius: 26px !important;
    background: rgba(255, 255, 255, .82) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(90, 80, 180, .22), 0 1px 3px rgba(15, 23, 42, .08);
    justify-content: space-around;
    align-items: center;
}

.qp-dock-item {
    flex: 1;
    gap: 0 !important;
    color: #4b5563 !important;
    font-size: 12px !important;
    font-weight: 600;
}

.qp-dock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.qp-dock-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: saturate(.75);
    transition: filter .2s ease, transform .2s ease;
}

.qp-dock-item.active {
    color: #4f46e5 !important;
    font-weight: 700;
}

.qp-dock-item.active .qp-dock-icon {
    background: linear-gradient(145deg, #cdb2ec 0%, #9aa3e6 100%);
    box-shadow: 0 4px 10px rgba(110, 100, 200, .35);
    transform: none;
}

.qp-dock-item.active .qp-dock-icon img {
    filter: none;
    transform: scale(1.08);
}

.qp-dock-label {
    margin-top: -2px;
    line-height: 1.1;
}

.qp-dock-item.active .qp-dock-label {
    margin-top: 3px;
}

.qp-dock-item:active .qp-dock-icon {
    transform: scale(.92);
}

/* uploaded images inside the Mine page icon circles */
.qp-setting-icon img {
    width: 62%;
    height: 62%;
    object-fit: contain;
}

/* =========================================================
   TYPE SCALE - a little smaller across the app
   (rem-based sizes follow html; the home page uses px, so
   those are stepped down below)
   ========================================================= */
html {
    font-size: 15px;
}

.qp-welcome-bar { font-size: 14px; }
.qp-action-label { font-size: 12px; }
.qp-market-title { font-size: 16px; }
.qp-table-header { font-size: 13px; }
.qp-coin-info strong { font-size: 13px; }
.qp-coin-info small { font-size: 11px; }
.qp-col-price { font-size: 13px; }
.qp-badge-change { font-size: 13px; }
.qp-dock-item { font-size: 11px !important; }

/* =========================================================
   HOME - carousel as wide as the cards, as little scrolling as possible
   ========================================================= */
.qp-page-topbar { padding: 6px 14px 2px; }
.qp-topbar-logo img { height: 32px; }

.qp-chart-header {
    width: calc(100% - 24px);
    height: 110px;
    margin: 2px 12px 0;
    border-radius: 14px;
}

.qp-hero-indicators { margin-bottom: 4px; }

.qp-welcome-bar {
    margin-top: 6px;
    padding: 5px 14px;
    font-size: 13px;
}

.qp-action-grid { padding: 4px 6px 0; }

.qp-action-circle {
    width: 40px;
    height: 40px;
}

.qp-action-icon {
    width: 24px;
    height: 24px;
}

.qp-action-item { gap: 2px; }
.qp-action-label { font-size: 11px; }

.qp-promo-banner {
    min-height: 50px;
    margin: 2px 12px 6px;
    padding: 3px 12px;
    border-radius: 12px;
}

.qp-promo-text h2 {
    margin-bottom: 1px;
    font-size: 13px;
    gap: 1px;
}

.qp-promo-ribbon { padding: 0 10px; }
.qp-promo-text p { font-size: 10px; }
.qp-avatar-yellow { font-size: 28px; }
.qp-avatar-blue { font-size: 26px; }
.qp-promo-left { left: 14px; }
.qp-promo-right { right: 14px; }

.qp-download-banner {
    min-height: 48px;
    margin: 0 12px 6px;
    padding: 3px 6px;
    border-radius: 12px;
}

.qp-download-phone {
    width: 30px;
    height: 40px;
    font-size: 17px;
    border-radius: 8px;
}

.qp-download-info small { font-size: 11px; }

.qp-download-action {
    flex-direction: row;
    gap: 8px;
}

.qp-download-arrow {
    width: 28px;
    height: 28px;
    font-size: 15px;
}

.qp-download-btn {
    padding: 3px 14px;
    font-size: 13px;
}

.qp-market-title {
    margin: 0 0 3px;
    font-size: 14px;
    line-height: 1.2;
}

.qp-crypto-table { padding: 0 12px 8px; }

.qp-table-header {
    padding: 6px 12px;
    margin-bottom: 3px;
    font-size: 12.5px;
}

.qp-crypto-row {
    padding: 5px 10px;
    margin-bottom: 3px;
}

.qp-crypto-badge {
    width: 30px;
    height: 30px;
}

.qp-badge-change {
    padding: 5px 8px;
    min-width: 70px;
    font-size: 12px;
}

/* =========================================================
   HEADER TITLES - one font stack and weight on every page
   ========================================================= */
.deposit-header h4,
.cp-page-label,
.security-page .cp-page-label,
.wallet-header h4,
.market-topbar h4,
.team-header h4,
.inv-header h4,
.history-header h4,
.mine-topbar h1,
.terminal-symbol-heading {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.15;
}

/* =========================================================
   COMPACT - Markets list cards
   ========================================================= */
.market-topbar { margin-bottom: 12px !important; }
.search-wrapper { margin-bottom: 10px !important; }
.market-list { gap: 8px !important; }

.market-card { padding: 9px 12px !important; }

.market-meta-row {
    margin-top: 8px !important;
    padding-top: 8px !important;
    gap: 6px !important;
}

.market-meta-row span { padding: 4px 6px !important; }
.market-meta-row small { margin-bottom: 1px !important; }

/* =========================================================
   UPLOADED ICONS ARE ALWAYS ROUND
   Anything uploaded from the admin Icons page lives under /site_icons/.
   A square image is cropped to a circle and fills its round tile.
   Built-in artwork and the wide carousel banners are left as they are.
   ========================================================= */
img[src*="/site_icons/"]:not(.qp-slide-img) {
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* round tiles: the uploaded image IS the tile */
.qp-action-circle img[src*="/site_icons/"],
.qp-profile-avatar img[src*="/site_icons/"],
.qp-setting-icon img[src*="/site_icons/"],
.mine-wallet-icon img[src*="/site_icons/"],
.tm-chip-icon img[src*="/site_icons/"],
.tm-stat-icon img[src*="/site_icons/"],
.lv-medal img[src*="/site_icons/"],
.wl-hero-icon img[src*="/site_icons/"],
.wl-stat-icon img[src*="/site_icons/"] {
    width: 100% !important;
    height: 100% !important;
}

/* bottom nav: a round icon with a little room for the active highlight */
.qp-dock-icon img[src*="/site_icons/"] {
    width: 34px !important;
    height: 34px !important;
}

/* small buttons that carry an icon */
.wallet-action img[src*="/site_icons/"] {
    width: 30px !important;
    height: 30px !important;
}

/* the wide carousel slides keep their shape */
.qp-slide-img[src*="/site_icons/"] {
    border-radius: 0 !important;
    object-fit: cover !important;
}

/* =========================================================
   HOME - sliding notice + room between the cards
   ========================================================= */
.qp-welcome-bar {
    margin-top: 12px;
    padding: 7px 14px;
}

.qp-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.qp-marquee-track {
    display: inline-block;
    margin: 0;
    padding-left: 100%;
    font-size: 13.5px;
    color: #111827;
    animation: qpMarquee var(--dur, 20s) linear infinite;
    will-change: transform;
}

.qp-marquee:hover .qp-marquee-track,
.qp-marquee:active .qp-marquee-track {
    animation-play-state: paused;
}

@keyframes qpMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .qp-marquee { white-space: normal; -webkit-mask-image: none; mask-image: none; }
    .qp-marquee-track { padding-left: 0; animation: none; }
}

.qp-action-grid { padding: 10px 6px 6px; }

.qp-promo-banner { margin: 6px 12px 12px; }
.qp-download-banner { margin: 0 12px 12px; }

.qp-market-title { margin: 2px 0 7px; }
.qp-table-header { margin-bottom: 5px; }
.qp-crypto-row { margin-bottom: 5px; }

/* =========================================================
   HOME - a little more room: taller carousel, roomier cards
   ========================================================= */
.qp-chart-header { height: auto; aspect-ratio: 400 / 160; }
.qp-welcome-bar { margin-top: 14px; padding: 8px 14px; }
.qp-action-grid { padding: 14px 6px 10px; }
.qp-action-item { gap: 4px; }
.qp-promo-banner { min-height: 58px; margin: 8px 12px 14px; }
.qp-download-banner { min-height: 56px; margin: 0 12px 14px; }
.qp-market-title { margin: 4px 0 9px; }
.qp-crypto-row { padding: 7px 10px; margin-bottom: 6px; }

/* =========================================================
   MINE - plain profile row, dark balance card, quick-link tiles
   ========================================================= */
.mine-page .mine-profile {
    margin: 0;
    padding: 16px 18px 6px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}
.mine-page .mine-profile::before,
.mine-page .mine-profile::after { display: none; }

.mine-page .qp-profile-avatar {
    width: 60px !important;
    height: 60px !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(90, 80, 180, .3) !important;
}

.mine-page .mine-id strong { color: #111827 !important; font-size: 1.2rem !important; }
.mine-page .mine-id span {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: #4b3fa8 !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
}

.mine-page .mine-vip {
    padding: 5px 12px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #ffe08a, #f5a623) !important;
    color: #5a3a00 !important;
    font-size: .8rem !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 8px rgba(245, 166, 35, .35);
}

/* dark bank-card style balance */
.mine-page .mine-wallet {
    position: relative;
    overflow: hidden;
    margin: 10px 16px 0 !important;
    padding: 16px 16px 14px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #1e1456 0%, #3b2a9e 55%, #6a49e0 100%) !important;
    box-shadow: 0 10px 22px rgba(40, 24, 120, .35) !important;
    color: #ffffff;
}

.mine-page .mine-wallet::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    top: -90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}

.mine-page .mine-wallet > * { position: relative; }

.mine-page .mine-wallet-main { padding-bottom: 12px !important; border: 0 !important; }
.mine-page .mine-label { color: rgba(255, 255, 255, .72) !important; font-weight: 600 !important; font-size: .78rem !important; }
.mine-page .mine-amount { color: #ffffff !important; font-size: 1.9rem !important; }
.mine-page .mine-amount.small { color: #ffffff !important; font-size: 1.05rem !important; }

.mine-page .mine-wallet-split { gap: 8px !important; padding-top: 0 !important; border: 0 !important; }

.mine-page .mine-wallet-cell {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
}

.mine-page .mine-wallet-icon {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 auto;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .9);
    font-size: .95rem !important;
}
.mine-page .mine-wallet-icon.wallet { background: rgba(255, 255, 255, .18); color: #ffffff !important; width: 44px !important; height: 44px !important; font-size: 1.3rem !important; }
.mine-page .mine-wallet-icon.recharge { color: #1e8a52 !important; }
.mine-page .mine-wallet-icon.withdraw { color: #dc3545 !important; }
.mine-page .mine-wallet-icon img { border-radius: 50%; }

.mine-page .mine-options-title { margin: 16px 18px 8px !important; color: #3b2f8f; font-size: 1.05rem !important; }

.mine-page .qp-settings-card {
    border: 0 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(90, 80, 180, .14) !important;
}

.mine-page .qp-setting-arrow { color: #a99be0 !important; }

.mine-page .qp-logout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border: 0 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #dc3545 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 10px rgba(220, 53, 69, .16);
}

/* Refer-a-friend card: text block sits in the middle with room above and below */
.qp-promo-banner { min-height: 78px; padding: 10px 12px; }
.qp-promo-text h2 { margin: 0 0 3px; }
.qp-promo-text p { margin: 0; line-height: 1.2; }

/* Withdrawal Account form: inputs must be clearly visible on the white card */
.qp-bank-form .qp-form-field input,
.qp-bank-form .qp-form-field select {
    height: 46px;
    background: #f5f2ff !important;
    border: 1.5px solid #cfc6f5 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(90, 80, 180, .12) !important;
    color: #111827 !important;
}

.qp-bank-form .qp-form-field input:focus,
.qp-bank-form .qp-form-field select:focus {
    background: #ffffff !important;
    border-color: #7a5ce6 !important;
    box-shadow: 0 0 0 3px rgba(122, 92, 230, .18) !important;
    outline: 0;
}

.qp-bank-form .qp-form-field input::placeholder { color: #9a93c4; }
.qp-bank-form .qp-form-field label { color: #3b2f8f !important; font-weight: 700; }
.qp-bank-form .qp-save-button { background: var(--t-purple) !important; border-radius: 10px !important; }

/* =========================================================
   TEAM - simple: one light invite card, one summary strip, plain level rows
   ========================================================= */
.team-screen .iv-card {
    margin: 10px 14px 0;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff !important;
    color: #111827;
    box-shadow: 0 2px 10px rgba(90, 80, 180, .14) !important;
}

.team-screen .iv-art,
.team-screen .iv-title,
.team-screen .iv-share-label { display: none !important; }

.team-screen .iv-top { display: block; margin: 0 0 10px; }
.team-screen .iv-headline {
    margin: 0;
    color: #3b2f8f !important;
    font-size: 1.05rem !important;
    font-weight: 800;
    letter-spacing: 0 !important;
    line-height: 1.2;
}
.team-screen .iv-headline span {
    display: block;
    margin-top: 2px;
    color: #6b7280 !important;
    font-size: .74rem;
    font-weight: 600;
}

.team-screen .iv-code {
    border: 1.5px dashed #cfc6f5 !important;
    background: #f5f2ff !important;
    box-shadow: none !important;
}
.team-screen .iv-code-main small { color: #6b7280 !important; letter-spacing: .3px; }
.team-screen .iv-code-main span { color: #3b2f8f !important; font-size: 1.5rem !important; letter-spacing: 3px; }
.team-screen .iv-code-copy { color: #7a5ce6 !important; background: transparent !important; }

.team-screen .iv-linkpill {
    border: 1px solid #e3def7 !important;
    background: #faf9ff !important;
    color: #4b5563 !important;
}
.team-screen .iv-linkpill i { color: #7a5ce6; }
.team-screen .iv-copy-link {
    background: #ece7ff !important;
    color: #4b3fa8 !important;
    box-shadow: none !important;
}

.team-screen .iv-socials { margin: 10px 0; gap: 10px; }
.team-screen .iv-social { width: 38px !important; height: 38px !important; font-size: 1.1rem !important; }

.team-screen .iv-share-btn {
    border: 0 !important;
    background: var(--t-purple) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(122, 92, 230, .3) !important;
}

/* summary strip: three numbers in one card */
.team-screen .tm-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 12px 14px 0;
    padding: 10px 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(90, 80, 180, .14);
}
.team-screen .tm-chips > div {
    padding: 2px 4px;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
}
.team-screen .tm-chips > div + div { border-left: 1px solid #e8e4f8; }
.team-screen .tm-chip-icon { display: none !important; }
.team-screen .tm-chips strong { display: block; color: #3b2f8f; font-size: 1.35rem; font-weight: 800; }
.team-screen .tm-chips > div > span:not(.tm-chip-icon) { color: #6b7280; font-size: .72rem; font-weight: 600; }

/* levels: plain rows inside one card */
.team-screen .tm-section-row { margin: 14px 18px 8px; }
.team-screen .tm-section-row h5 { color: #3b2f8f; font-size: 1rem; }
.team-screen .tm-levels { margin: 0 14px; padding: 0; }

.team-screen .lv-tree {
    gap: 0;
    padding: 4px 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(90, 80, 180, .14);
}

.team-screen .lv-node {
    padding: 11px 0;
    gap: 12px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.team-screen .lv-node + .lv-node { border-top: 1px solid #eeeaf9; }
.team-screen .lv-node::before { display: none; }

.team-screen .lv-medal { width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; box-shadow: none; }

.team-screen .lv-title { gap: 6px; }
.team-screen .lv-title strong { font-size: .95rem; }
.team-screen .lv-arrow { margin-left: auto; }

.team-screen .lv-stats { display: block; margin: 2px 0 0; }
.team-screen .lv-stat {
    display: inline;
    padding: 0;
    background: transparent;
    font-size: .76rem;
    font-weight: 600;
    color: #6b7280;
}
.team-screen .lv-stat b { margin-right: 3px; color: #111827; font-size: .8rem; }
.team-screen .lv-stat + .lv-stat::before { content: "\00b7"; margin: 0 6px; color: #b5aedb; }
.team-screen .lv-bar { display: none; }

/* Tradox logo: the icon sits on the violet header as is (no white plate) */
.auth-screen .brand-logo {
    width: 88px;
    max-width: 88px;
    padding: 0;
    border-radius: 24px;
    background: transparent;
    box-shadow: 0 8px 18px rgba(40, 24, 120, .35);
}
.qp-topbar-logo img { height: 34px; width: auto; }

/* =========================================================
   LOGIN / REGISTER - simple: white page, logo, plain form
   ========================================================= */
.phone-wrapper:has(.auth-screen) { background: #ffffff !important; }
html:has(.auth-screen), body:has(.auth-screen) { background: #ffffff !important; }

.auth-screen .logo {
    overflow: visible;
    padding: 44px 24px 6px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.auth-screen .logo::before,
.auth-screen .logo::after { display: none; }

.auth-screen .brand-logo {
    width: 64px;
    max-width: 64px;
    border-radius: 18px;
    box-shadow: 0 6px 14px rgba(90, 80, 180, .25);
}

.auth-screen .auth-hero-title {
    margin: 14px 0 0;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 800;
}

.auth-screen .logo p,
.auth-screen .brand-stacked p {
    margin: 4px 0 0 !important;
    color: #6b7280 !important;
    font-size: .9rem !important;
    font-weight: 500 !important;
    opacity: 1;
}

.auth-screen .auth-card {
    margin: 18px 24px 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.auth-screen .form-label {
    margin-bottom: 6px;
    color: #374151 !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-transform: none;
}

/* no field icons - just clear boxes */
.auth-card .input-wrap::before { display: none !important; }
.auth-card .input-wrap .form-control,
.auth-card .input-wrap input { padding-left: 14px !important; }
.auth-card .input-wrap.has-eye input { padding-right: 56px !important; }

.auth-screen .form-control,
.auth-screen .auth-card input {
    height: 48px !important;
    border: 1.5px solid #ddd8f3 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}
.auth-screen .form-control:focus,
.auth-screen .auth-card input:focus {
    border-color: #6b4fd8 !important;
    box-shadow: 0 0 0 3px rgba(107, 79, 216, .14) !important;
}

.auth-card .eye-btn { color: #6b4fd8; font-weight: 700; }

.auth-screen .btn-login,
.auth-screen .btn-register {
    height: 50px;
    border-radius: 12px !important;
    background: #6b4fd8 !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    letter-spacing: 0;
}

.auth-screen .forgot-password-row { margin: -4px 0 12px; }
.auth-screen .footer-text { margin-top: 6px; color: #6b7280 !important; }
.auth-card .eye-btn { width: auto; min-width: 44px; padding: 0 12px; right: 2px; }
.auth-screen .auth-card input::placeholder,
.auth-screen .form-control::placeholder {
    color: #a09ab8 !important;
    -webkit-text-fill-color: #a09ab8 !important;
    opacity: 1;
}

/* =========================================================
   TEAM - same look as Home: violet banner card, round pastel icons,
   light rounded rows
   ========================================================= */
/* invite = the violet "Refer a friend" banner */
.team-screen .iv-card {
    position: relative;
    overflow: hidden;
    margin: 10px 12px 0;
    padding: 16px 14px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #5a3fd6 0%, #7a5ce6 48%, #27b3c9 100%) !important;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(122, 92, 230, .3) !important;
}
.team-screen .iv-card::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -50px;
    top: -70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}
.team-screen .iv-card > * { position: relative; }

.team-screen .iv-headline { color: #ffffff !important; font-size: 1.15rem !important; }
.team-screen .iv-headline span { color: rgba(255, 255, 255, .88) !important; }

.team-screen .iv-code {
    border: 1.5px dashed rgba(255, 255, 255, .6) !important;
    background: rgba(255, 255, 255, .18) !important;
}
.team-screen .iv-code-main small { color: rgba(255, 255, 255, .85) !important; }
.team-screen .iv-code-main span { color: #ffffff !important; }
.team-screen .iv-code-copy { color: #ffffff !important; }

.team-screen .iv-linkpill {
    border: 0 !important;
    background: rgba(255, 255, 255, .92) !important;
    color: #4b3fa8 !important;
}
.team-screen .iv-copy-link {
    background: #ffffff !important;
    color: #4b32c8 !important;
    box-shadow: 0 2px 6px rgba(40, 24, 120, .2) !important;
}

.team-screen .iv-share-btn {
    background: #ffffff !important;
    color: #4b32c8 !important;
    box-shadow: 0 3px 8px rgba(40, 24, 120, .22) !important;
}

/* summary = three round-icon tiles like the Home quick actions */
.team-screen .tm-chips {
    margin: 12px 12px 0;
    padding: 0;
    gap: 10px;
    background: transparent;
    box-shadow: none;
}
.team-screen .tm-chips > div {
    padding: 10px 4px 9px;
    border: 0;
    border-radius: 14px;
    background: #f7f9fe !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08) !important;
}
.team-screen .tm-chips > div + div { border-left: 0; }
.team-screen .tm-chip-icon {
    display: flex !important;
    width: 38px;
    height: 38px;
    margin: 0 auto 4px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #cdb2ec 0%, #9aa3e6 100%) !important;
    box-shadow: 0 3px 8px rgba(110, 100, 200, .28);
    color: #ffffff;
    font-size: 1.05rem;
}
.team-screen .tm-chips strong { font-size: 1.2rem; color: #111827; }

/* levels = light rounded rows like the market list */
.team-screen .tm-section-row h5 { color: #111827; }
.team-screen .tm-levels { margin: 0 12px; }

.team-screen .lv-tree {
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.team-screen .lv-node {
    padding: 9px 12px;
    border-radius: 14px;
    background: #f7f9fe;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.team-screen .lv-node + .lv-node { border-top: 0; }
.team-screen .lv-medal { width: 40px; height: 40px; box-shadow: 0 3px 8px rgba(110, 100, 200, .28); }
.team-screen .lv-stat { color: #4b5563; }
.team-screen .lv-bar { display: block; height: 4px; margin-top: 6px; }

/* Team: the same gradient balance card as the Wallet page, showing the team */
.team-screen .tm-hero {
    position: relative;
    overflow: hidden;
    margin: 14px 12px 0;
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #5a3fd6 0%, #7a5ce6 48%, #27b3c9 100%);
    box-shadow: 0 8px 18px rgba(90, 63, 214, .35);
    color: #ffffff;
}
.team-screen .tm-hero::before,
.team-screen .tm-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.team-screen .tm-hero::before { width: 190px; height: 190px; top: -80px; right: -50px; background: rgba(255, 255, 255, .14); }
.team-screen .tm-hero::after { width: 130px; height: 130px; bottom: -60px; left: -30px; background: rgba(255, 255, 255, .1); }
.team-screen .tm-hero > * { position: relative; z-index: 1; }

.tm-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tm-hero-label { display: block; font-size: .8rem; letter-spacing: .8px; text-transform: uppercase; color: rgba(255, 255, 255, .86); }
.tm-hero-value { display: block; margin-top: 2px; font-size: 2.2rem; font-weight: 800; line-height: 1.1; letter-spacing: .5px; }
.tm-hero-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    font-size: 1.6rem;
}
.tm-hero-icon img { width: 62%; height: 62%; object-fit: contain; }

.tm-hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
.tm-hero-stats > div { padding: 4px 6px; text-align: center; }
.tm-hero-stats > div + div { border-left: 1px solid rgba(255, 255, 255, .3); }
.tm-hero-stats strong { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.15; }
.tm-hero-stats span { display: block; margin-top: 2px; font-size: .68rem; color: rgba(255, 255, 255, .88); }
.team-screen .iv-card { margin-top: 12px; }
