/**
 * P2P Money Global - Unified Production Stylesheet (Zero-FOUC Bundle)
 * Contains pre-compiled styles for all app pages & modals.
 */

/* ============================================================
   CRITICAL CSS: MODAL & OVERLAY DEFAULT CONCEALMENT (ANTI-FOUC)
   ============================================================ */
.modal-overlay:not(.active),
.fullscreen-modal-overlay:not(.active),
.trade-modal-overlay:not(.active),
.dialog-overlay:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-overlay.active,
.fullscreen-modal-overlay.active,
.trade-modal-overlay.active,
.dialog-overlay.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ============================================================
   RESPONSIVE TABLET & MOBILE CONTAINER OVERRIDES
   ============================================================ */
.app-container,
.mobile-container {
    width: 100%;
    max-width: var(--app-max-width, 480px) !important;
}

.modal-sheet-container,
.trade-modal-container {
    max-width: var(--app-max-width, 480px) !important;
}

.tabbar {
    max-width: var(--app-max-width, 480px) !important;
}


/* ========================================================
   STYLES FROM: cards.php
   ======================================================== */

        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --tabbar-height: 68px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer, #060709);
            color: var(--text-primary, #ffffff);
            font-family: var(--font-family);
            font-size: 14px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
        }

        .app-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--bg-main, #0c0d11);
            position: relative;
            padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 24px);
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
            display: flex;
            flex-direction: column;
        }

        /* Top Bar Header (Pixel-Perfect match to trades.php) */
        .cards-top-bar {
            padding: 18px 20px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            background: rgba(10, 11, 14, 0.95);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            z-index: 20;
            border-bottom: 1px solid rgba(222, 185, 120, 0.12);
        }

        .cards-top-left,
        .top-bar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .top-back-btn {
            color: #c9993b;
            font-size: 16px;
            text-decoration: none;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(223, 179, 95, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.2);
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .top-back-btn:hover {
            color: #fae4a8;
            background: rgba(223, 179, 95, 0.16);
            transform: translateX(-2px);
        }

        .cards-page-title {
            font-size: 17px;
            font-weight: 700;
            color: #fae4a8;
            letter-spacing: 0.3px;
        }

        .btn-top-info {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.22);
            color: var(--text-gold-muted, #9c8f78);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-top-info:hover {
            color: var(--theme-light, #fae4a8);
            border-color: var(--theme-primary, #dfb35f);
            background: rgba(222, 185, 120, 0.15);
        }

        .cards-content {
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .hero-action-card-single {
            background: radial-gradient(130% 120% at 20% 0%, rgba(223, 179, 95, 0.22) 0%, rgba(21, 23, 30, 0.95) 60%, #0c0d11 100%);
            border: 1px dashed rgba(222, 185, 120, 0.4);
            border-radius: 14px;
            padding: 11px 14px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(250, 228, 168, 0.15);
            position: relative;
            overflow: hidden;
        }

        .hero-action-card-single::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(250, 228, 168, 0.12), transparent);
            transition: left 0.6s ease;
        }

        .hero-action-card-single:hover::before {
            left: 100%;
        }

        .hero-action-card-single:hover {
            transform: translateY(-2px);
            border-color: var(--theme-primary, #dfb35f);
            border-style: solid;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), var(--theme-glow-soft);
        }

        .hero-action-card-single:active {
            transform: scale(0.98);
        }

        .action-icon-circle {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: var(--theme-gradient-avatar, linear-gradient(135deg, #fae4a8 0%, #d8aa53 50%, #996e1b 100%));
            color: #110d02;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
            box-shadow: 0 3px 12px rgba(216, 170, 83, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.5);
        }

        .hero-action-text-wrap {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .hero-action-title {
            font-size: 13.5px;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .hero-action-sub {
            font-size: 11px;
            color: var(--text-secondary, #94a3b8);
            line-height: 1.3;
        }

        .hero-action-arrow {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.12);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--theme-light, #fae4a8);
            font-size: 11px;
            flex-shrink: 0;
            transition: all 0.2s;
        }

        .hero-action-card-single:hover .hero-action-arrow {
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            color: #110d02;
            transform: translateX(3px);
        }

        .recommend-banner {
            background: rgba(222, 185, 120, 0.05);
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 12px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            color: #c5bba8;
            line-height: 1.35;
        }

        .recommend-banner i.info-icon {
            color: var(--theme-primary, #dfb35f);
            font-size: 14px;
            flex-shrink: 0;
        }

        .recommend-highlight-kbank {
            color: var(--theme-light, #fae4a8);
            font-weight: 700;
        }

        .cards-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 2px;
            padding: 0 2px;
        }

        .cards-section-title {
            font-size: 13px;
            font-weight: 800;
            color: var(--theme-primary, #dfb35f);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .cards-count-badge {
            font-size: 10px;
            font-weight: 700;
            color: var(--theme-light, #fae4a8);
            background: rgba(222, 185, 120, 0.12);
            border: 1px solid rgba(222, 185, 120, 0.28);
            padding: 2px 7px;
            border-radius: 20px;
        }

        .cards-list-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .bound-card-item {
            border-radius: 14px;
            padding: 12px 14px;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: all 0.25s ease;
        }

        .bound-card-item::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 140px;
            height: 140px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
            pointer-events: none;
        }

        .bound-card-item.is-primary {
            border: 1.5px solid rgba(250, 228, 168, 0.7);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), var(--theme-glow-soft);
        }

        .bound-card-item.bank-kbank {
            background: linear-gradient(135deg, #0d3824 0%, #061c12 55%, #07150e 100%);
            border-color: rgba(19, 133, 76, 0.45);
        }

        .bound-card-item.bank-scb {
            background: linear-gradient(135deg, #32194a 0%, #1c0d2b 55%, #0e0716 100%);
            border-color: rgba(142, 68, 173, 0.45);
        }

        .bound-card-item.bank-bbl {
            background: linear-gradient(135deg, #10254c 0%, #0a1730 55%, #060e1e 100%);
            border-color: rgba(41, 128, 185, 0.45);
        }

        .bound-card-item.bank-bay {
            background: linear-gradient(135deg, #443714 0%, #241c08 55%, #130f04 100%);
            border-color: rgba(212, 175, 55, 0.45);
        }

        .bound-card-item.bank-ktb {
            background: linear-gradient(135deg, #0c364c 0%, #061e2b 55%, #041118 100%);
            border-color: rgba(26, 188, 156, 0.45);
        }

        .bound-card-item.bank-gsb {
            background: linear-gradient(135deg, #44142f 0%, #240a19 55%, #14050d 100%);
            border-color: rgba(233, 30, 99, 0.45);
        }

        .bound-card-item.bank-default {
            background: linear-gradient(135deg, #1f242e 0%, #12151b 55%, #0a0c10 100%);
            border-color: rgba(160, 170, 185, 0.35);
        }

        .card-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .bank-info-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .bank-icon-badge {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #ffffff;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
            flex-shrink: 0;
        }

        .bank-icon-badge.kbank {
            background: #00a651;
        }

        .bank-icon-badge.scb {
            background: #4e2a84;
        }

        .bank-icon-badge.bbl {
            background: #1e3a8a;
        }

        .bank-icon-badge.bay {
            background: #b8860b;
        }

        .bank-icon-badge.ktb {
            background: #00a3e0;
        }

        .bank-icon-badge.gsb {
            background: #eb1985;
        }

        .bank-icon-badge.default {
            background: #4b5563;
        }

        .bank-text-wrap {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .bank-name-text {
            font-size: 13px;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .bank-type-text {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.65);
        }

        .card-top-right-badges {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .primary-account-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: linear-gradient(135deg, rgba(250, 228, 168, 0.22) 0%, rgba(223, 179, 95, 0.32) 100%);
            border: 1px solid rgba(250, 228, 168, 0.65);
            color: var(--theme-light, #fae4a8);
            font-size: 9.5px;
            font-weight: 800;
            padding: 2.5px 8px;
            border-radius: 16px;
            box-shadow: 0 0 8px rgba(223, 179, 95, 0.3);
            white-space: nowrap;
        }

        .btn-set-primary {
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.35);
            color: var(--theme-light, #fae4a8);
            font-size: 9.5px;
            font-weight: 700;
            padding: 2.5px 8px;
            border-radius: 16px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .btn-set-primary:hover {
            background: rgba(222, 185, 120, 0.22);
            border-color: var(--theme-primary, #dfb35f);
            color: #ffffff;
            box-shadow: 0 0 8px rgba(223, 179, 95, 0.3);
            transform: translateY(-1px);
        }

        .btn-set-primary:active {
            transform: scale(0.96);
        }

        .card-chip-symbol {
            width: 28px;
            height: 20px;
            border-radius: 4px;
            background: var(--theme-gradient-avatar, linear-gradient(135deg, #dfb35f 0%, #b8860b 100%));
            border: 1px solid #fae4a8;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #3b2800;
            font-size: 11px;
            box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
        }

        .card-number-display {
            font-family: 'Inter', monospace;
            font-size: 15px;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: 1.2px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .btn-card-view-qr {
            background: rgba(222, 185, 120, 0.12);
            border: 1px solid rgba(222, 185, 120, 0.3);
            color: var(--theme-light, #fae4a8);
            font-size: 10px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s;
        }

        .btn-card-view-qr:hover {
            background: var(--theme-gradient);
            border-color: #fae4a8;
            color: #110d02;
        }

        .card-bottom-row {
            display: flex;
            flex-direction: column;
            gap: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            padding-top: 8px;
        }

        .card-holder-row {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .card-holder-label {
            font-size: 10.5px;
            color: rgba(255, 255, 255, 0.55);
            font-weight: 500;
            white-space: nowrap;
        }

        .card-holder-name {
            font-size: 12px;
            font-weight: 700;
            color: #ffffff;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
        }

        .lock-name-icon {
            color: var(--theme-primary, #dfb35f);
            font-size: 10.5px;
        }

        .card-actions-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }

        .card-status-switch-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .card-btn-actions-wrap {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .status-pill {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1.5px 6px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        .status-pill.active {
            background: rgba(14, 203, 129, 0.15);
            border: 1px solid rgba(14, 203, 129, 0.4);
            color: #0ecb81;
        }

        .status-pill.inactive {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #8c8577;
        }

        .switch-toggle {
            position: relative;
            display: inline-block;
            width: 34px;
            height: 18px;
        }

        .switch-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.15);
            transition: 0.25s;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .switch-slider:before {
            position: absolute;
            content: "";
            height: 14px;
            width: 14px;
            left: 1.5px;
            bottom: 1px;
            background-color: white;
            transition: 0.25s;
            border-radius: 50%;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .switch-toggle input:checked+.switch-slider {
            background-color: #0ecb81;
        }

        .switch-toggle input:checked+.switch-slider:before {
            transform: translateX(16px);
        }

        .card-btn-action {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #cfc8b8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .card-btn-action.edit:hover {
            background: rgba(222, 185, 120, 0.25);
            border-color: var(--theme-primary);
            color: var(--theme-light);
        }

        .card-btn-action.delete:hover {
            background: rgba(246, 70, 93, 0.2);
            border-color: rgba(246, 70, 93, 0.4);
            color: #f6465d;
        }

        .empty-cards-state {
            padding: 48px 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            background: rgba(222, 185, 120, 0.03);
            border: 1px dashed rgba(222, 185, 120, 0.2);
            border-radius: 20px;
        }

        .empty-cards-icon {
            width: 68px;
            height: 68px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: var(--theme-primary, #dfb35f);
            margin-bottom: 4px;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.82);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-sheet-container {
            width: 100%;
            max-width: 480px;
            background: #12141c;
            border-top: 1.5px solid rgba(222, 185, 120, 0.4);
            border-radius: 26px 26px 0 0;
            padding: 20px 22px calc(24px + env(safe-area-inset-bottom));
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
            max-height: 88vh;
            overflow-y: auto;
        }

        .modal-overlay.active .modal-sheet-container {
            transform: translateY(0);
        }

        .modal-drag-bar {
            width: 40px;
            height: 4px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.2);
            margin: 0 auto 16px;
        }

        .modal-sheet-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }

        .modal-sheet-title {
            font-size: 17px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-modal-close {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #8c8577;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-modal-close:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 12.5px;
            font-weight: 700;
            color: #d1c7b7;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .req-star {
            color: #f6465d;
        }

        .form-input,
        .form-select {
            width: 100%;
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.22);
            border-radius: 12px;
            padding: 12px 14px;
            color: #ffffff;
            font-family: inherit;
            font-size: 14px;
            outline: none;
            transition: all 0.2s;
        }

        .form-input:focus,
        .form-select:focus {
            border-color: var(--theme-primary, #dfb35f);
            box-shadow: 0 0 12px rgba(223, 179, 95, 0.35);
            background: #14161f;
        }

        .form-input.is-locked {
            background: rgba(222, 185, 120, 0.06);
            border: 1px solid rgba(222, 185, 120, 0.3);
            color: var(--theme-light, #fae4a8);
            font-weight: 700;
            cursor: not-allowed;
        }

        .locked-name-help {
            font-size: 11.5px;
            color: var(--theme-primary, #dfb35f);
            display: flex;
            align-items: center;
            gap: 5px;
            margin-top: 4px;
            line-height: 1.35;
        }

        .qr-upload-area {
            border: 1.5px dashed rgba(222, 185, 120, 0.4);
            border-radius: 14px;
            background: rgba(222, 185, 120, 0.04);
            padding: 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            position: relative;
        }

        .qr-upload-area:hover {
            border-color: var(--theme-primary, #dfb35f);
            background: rgba(222, 185, 120, 0.09);
        }

        .qr-upload-icon {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.15);
            color: var(--theme-light, #fae4a8);
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .qr-upload-title {
            font-size: 13px;
            font-weight: 700;
            color: #ffffff;
        }

        .qr-upload-desc {
            font-size: 11.5px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .qr-preview-container {
            display: none;
            width: 100%;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .qr-preview-img {
            max-width: 140px;
            max-height: 140px;
            border-radius: 10px;
            border: 1.5px solid var(--theme-light, #fae4a8);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
            object-fit: contain;
            background: #ffffff;
            padding: 4px;
        }

        .btn-remove-qr {
            background: rgba(246, 70, 93, 0.15);
            border: 1px solid rgba(246, 70, 93, 0.3);
            color: #f6465d;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-remove-qr:hover {
            background: #f6465d;
            color: #ffffff;
        }

        .primary-switch-box {
            background: rgba(222, 185, 120, 0.07);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 12px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            margin-top: 6px;
        }

        .primary-switch-box input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--theme-primary, #dfb35f);
            cursor: pointer;
        }

        .primary-switch-text {
            flex: 1;
            font-size: 13px;
            color: var(--theme-light, #fae4a8);
            font-weight: 700;
            line-height: 1.35;
        }

        .primary-switch-sub {
            font-size: 11px;
            font-weight: 400;
            color: var(--text-gold-muted, #9c8f78);
        }

        .btn-submit-form {
            width: 100%;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            border: none;
            color: #110d02;
            font-size: 15px;
            font-weight: 800;
            padding: 14px;
            border-radius: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--theme-glow, 0 0 22px rgba(223, 179, 95, 0.45));
            transition: all 0.2s;
            margin-top: 8px;
        }

        .btn-submit-form:hover {
            transform: translateY(-2px);
            box-shadow: var(--theme-glow-strong, 0 0 28px rgba(223, 179, 95, 0.6));
        }

        .dialog-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 110;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }

        .dialog-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .dialog-box {
            width: 100%;
            max-width: 380px;
            background: #141720;
            border: 1.5px solid rgba(222, 185, 120, 0.35);
            border-radius: 22px;
            padding: 22px;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 14px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
        }

        .dialog-icon-capsule {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: rgba(246, 70, 93, 0.15);
            border: 1px solid rgba(246, 70, 93, 0.35);
            color: #f6465d;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
        }

        .dialog-title {
            font-size: 17px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
        }

        .dialog-desc {
            font-size: 13px;
            color: #9c9587;
            line-height: 1.5;
        }

        .dialog-actions-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 6px;
        }

        .btn-dialog-cancel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #b5a995;
            font-size: 13.5px;
            font-weight: 700;
            padding: 11px;
            border-radius: 12px;
            cursor: pointer;
        }

        .btn-dialog-confirm {
            background: #f6465d;
            border: none;
            color: #ffffff;
            font-size: 13.5px;
            font-weight: 800;
            padding: 11px;
            border-radius: 12px;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(246, 70, 93, 0.4);
        }

        .toast-notify {
            position: fixed;
            bottom: calc(var(--tabbar-height) + 24px);
            left: 50%;
            transform: translateX(-50%) translateY(40px);
            background: rgba(20, 23, 32, 0.96);
            border: 1px solid rgba(222, 185, 120, 0.5);
            color: var(--theme-light, #fae4a8);
            font-size: 13px;
            font-weight: 700;
            padding: 10px 20px;
            border-radius: 30px;
            z-index: 120;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
            opacity: 0;
            pointer-events: none;
            transition: all 0.25s ease;
            white-space: nowrap;
        }

        .toast-notify.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    

/* ========================================================
   STYLES FROM: user.php
   ======================================================== */

        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --tabbar-height: 68px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer, #060709);
            color: var(--text-primary, #ffffff);
            font-family: var(--font-family);
            font-size: 14px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
        }

        .app-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--bg-main, #0c0d11);
            position: relative;
            padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 32px);
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
            display: flex;
            flex-direction: column;
        }

        .user-profile-header {
            padding: 38px 20px 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            position: relative;
        }

        .user-avatar-wrap {
            width: 82px;
            height: 82px;
            border-radius: 24px;
            background: var(--theme-gradient-avatar, linear-gradient(135deg, #fae4a8 0%, #d8aa53 50%, #996e1b 100%));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: 900;
            color: #120d02;
            letter-spacing: 0.5px;
            box-shadow: 0 10px 28px rgba(223, 179, 95, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.6);
            margin-bottom: 14px;
            border: 2px solid rgba(250, 228, 168, 0.65);
            position: relative;
        }

        .user-email-text {
            font-size: 19px;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: -0.3px;
            margin-bottom: 5px;
        }

        .user-id-row {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--text-gold-muted, #9c8f78);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 4px 10px;
            border-radius: 10px;
            background: rgba(222, 185, 120, 0.05);
            border: 1px solid rgba(222, 185, 120, 0.15);
            transition: all 0.2s;
        }

        .user-id-row:hover {
            color: var(--theme-light, #fae4a8);
            border-color: var(--theme-primary, #dfb35f);
            background: rgba(222, 185, 120, 0.12);
        }

        .user-id-row i {
            font-size: 12px;
            opacity: 0.85;
        }

        .user-content-area {
            padding: 0 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .hero-referral-card {
            background: radial-gradient(130% 120% at 20% 0%, rgba(223, 179, 95, 0.18) 0%, rgba(21, 23, 30, 0.95) 60%, #0c0d11 100%);
            border: 1px solid rgba(222, 185, 120, 0.35);
            border-radius: 18px;
            padding: 16px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(250, 228, 168, 0.2);
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }

        .hero-referral-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            border-radius: 4px 0 0 4px;
        }

        .hero-referral-card:hover {
            transform: translateY(-2px);
            border-color: var(--theme-primary, #dfb35f);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), var(--theme-glow-soft);
        }

        .hero-referral-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .hero-referral-icon-box {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: rgba(222, 185, 120, 0.15);
            border: 1px solid rgba(222, 185, 120, 0.35);
            color: var(--theme-light, #fae4a8);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .hero-referral-text {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .hero-referral-title {
            font-size: 15.5px;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: -0.2px;
        }

        .hero-referral-sub {
            font-size: 12px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .chevron-icon {
            color: var(--theme-primary, #dfb35f);
            font-size: 14px;
            opacity: 0.7;
            transition: all 0.2s;
        }

        .hero-referral-card:hover .chevron-icon,
        .user-menu-item:hover .chevron-icon {
            color: var(--theme-light, #fae4a8);
            opacity: 1;
            transform: translateX(3px);
        }

        .user-menu-group {
            background: var(--bg-card, #15171e);
            border: var(--border-theme-subtle, 1px solid rgba(222, 185, 120, 0.18));
            border-radius: 18px;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
        }

        .user-menu-item {
            padding: 16px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: background 0.2s ease;
            position: relative;
        }

        .user-menu-item:hover {
            background: rgba(222, 185, 120, 0.04);
        }

        .user-menu-item:not(:last-child) {
            border-bottom: 1px solid rgba(222, 185, 120, 0.08);
        }

        .menu-item-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .menu-item-icon-box {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 19px;
            flex-shrink: 0;
        }

        .icon-income {
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .icon-invite {
            background: rgba(6, 182, 212, 0.15);
            color: #06b6d4;
            border: 1px solid rgba(6, 182, 212, 0.3);
        }

        .icon-statement {
            background: rgba(222, 185, 120, 0.12);
            color: #fae4a8;
            border: 1px solid rgba(222, 185, 120, 0.25);
        }

        .icon-security {
            background: rgba(234, 179, 8, 0.15);
            color: #eab308;
            border: 1px solid rgba(234, 179, 8, 0.3);
        }

        .icon-vip {
            background: rgba(223, 179, 95, 0.18);
            color: #fbbf24;
            border: 1px solid rgba(223, 179, 95, 0.4);
        }

        .icon-lang {
            background: rgba(14, 165, 233, 0.15);
            color: #0ea5e9;
            border: 1px solid rgba(14, 165, 233, 0.3);
        }

        .icon-help {
            background: rgba(249, 115, 22, 0.15);
            color: #f97316;
            border: 1px solid rgba(249, 115, 22, 0.3);
        }

        .icon-about {
            background: rgba(56, 189, 248, 0.15);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.3);
        }

        .icon-terms {
            background: rgba(148, 163, 184, 0.15);
            color: #cbd5e1;
            border: 1px solid rgba(148, 163, 184, 0.25);
        }

        .menu-item-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .menu-item-title {
            font-size: 14.5px;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: -0.2px;
        }

        .menu-item-sub {
            font-size: 12px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .menu-item-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .menu-item-value-text {
            font-size: 13px;
            color: var(--theme-light, #fae4a8);
            font-weight: 700;
        }

        .btn-logout-row {
            margin-top: 10px;
            margin-bottom: 24px;
        }

        .btn-user-logout {
            width: 100%;
            background: transparent;
            border: 1.5px solid rgba(246, 70, 93, 0.45);
            border-radius: 28px;
            padding: 13px;
            color: #f6465d;
            font-size: 14.5px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-user-logout:hover {
            background: rgba(246, 70, 93, 0.1);
            border-color: #f6465d;
            box-shadow: 0 4px 18px rgba(246, 70, 93, 0.25);
            transform: translateY(-1px);
        }

        .user-floating-support {
            position: fixed;
            right: calc(50% - 240px + 18px);
            bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 20px);
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--cs-btn-bg, linear-gradient(135deg, #fae4a8 0%, #d8aa53 50%, #996e1b 100%));
            color: var(--cs-btn-text, #110d02);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            box-shadow: var(--cs-btn-glow, 0 0 25px rgba(223, 179, 95, 0.55));
            cursor: pointer;
            z-index: 45;
            transition: all 0.25s ease;
        }

        @media (max-width: 480px) {
            .user-floating-support {
                right: 18px;
            }
        }

        .user-floating-support:hover {
            transform: scale(1.08);
            box-shadow: 0 0 32px rgba(223, 179, 95, 0.8);
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.82);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-sheet-container {
            width: 100%;
            max-width: 480px;
            background: #12141c;
            border-top: 1.5px solid rgba(222, 185, 120, 0.4);
            border-radius: 26px 26px 0 0;
            padding: 18px 22px calc(24px + env(safe-area-inset-bottom));
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
            max-height: 88vh;
            overflow-y: auto;
        }

        .modal-overlay.active .modal-sheet-container {
            transform: translateY(0);
        }

        .modal-drag-bar {
            width: 40px;
            height: 4px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.2);
            margin: 0 auto 16px;
        }

        .modal-sheet-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }

        .modal-sheet-title {
            font-size: 17px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-modal-close {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #8c8577;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-modal-close:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }

        .referral-qr-wrapper {
            background: #ffffff;
            border-radius: 22px;
            padding: 16px;
            display: inline-block;
            margin: 0 auto 18px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
        }

        .referral-qr-img {
            width: 190px;
            height: 190px;
            display: block;
        }

        .referral-code-card {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 16px;
            padding: 14px 18px;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 14px;
        }

        .referral-code-label {
            font-size: 12px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .referral-code-value {
            font-size: 26px;
            font-weight: 900;
            color: var(--theme-light, #fae4a8);
            letter-spacing: 6px;
            font-family: 'Inter', monospace;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .referral-code-copy-btn {
            font-size: 15px;
            color: var(--theme-primary, #dfb35f);
            cursor: pointer;
            transition: all 0.2s;
        }

        .referral-code-copy-btn:hover {
            color: #ffffff;
            transform: scale(1.15);
        }

        .referral-link-box {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 14px;
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 18px;
        }

        .referral-link-text {
            font-size: 12.5px;
            color: #cbd5e1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-family: monospace;
        }

        .btn-copy-link-pill {
            background: rgba(222, 185, 120, 0.15);
            border: 1px solid rgba(222, 185, 120, 0.35);
            color: var(--theme-light, #fae4a8);
            font-size: 11.5px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 8px;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.2s;
        }

        .btn-copy-link-pill:hover {
            background: var(--theme-gradient);
            border-color: #fae4a8;
            color: #110d02;
        }

        .btn-share-now {
            width: 100%;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            border: none;
            color: #110d02;
            font-size: 15px;
            font-weight: 800;
            padding: 14px;
            border-radius: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--theme-glow, 0 0 22px rgba(223, 179, 95, 0.45));
            transition: all 0.2s;
        }

        .btn-share-now:hover {
            transform: translateY(-2px);
            box-shadow: var(--theme-glow-strong, 0 0 28px rgba(223, 179, 95, 0.6));
        }

        .info-stat-card {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 14px;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .info-stat-label {
            font-size: 12px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .info-stat-num {
            font-size: 18px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
        }

        .dialog-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 110;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }

        .dialog-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .dialog-box {
            width: 100%;
            max-width: 380px;
            background: #141720;
            border: 1.5px solid rgba(222, 185, 120, 0.35);
            border-radius: 22px;
            padding: 22px;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 14px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
        }

        .dialog-icon-capsule {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: rgba(246, 70, 93, 0.15);
            border: 1px solid rgba(246, 70, 93, 0.35);
            color: #f6465d;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
        }

        .dialog-title {
            font-size: 17px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
        }

        .dialog-desc {
            font-size: 13px;
            color: #9c9587;
            line-height: 1.5;
        }

        .dialog-actions-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 6px;
        }

        .btn-dialog-cancel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #b5a995;
            font-size: 13.5px;
            font-weight: 700;
            padding: 11px;
            border-radius: 12px;
            cursor: pointer;
        }

        .btn-dialog-confirm {
            background: #f6465d;
            border: none;
            color: #ffffff;
            font-size: 13.5px;
            font-weight: 800;
            padding: 11px;
            border-radius: 12px;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(246, 70, 93, 0.4);
        }

        .toast-notify {
            position: fixed;
            bottom: calc(var(--tabbar-height) + 24px);
            left: 50%;
            transform: translateX(-50%) translateY(40px);
            background: rgba(20, 23, 32, 0.96);
            border: 1px solid rgba(222, 185, 120, 0.5);
            color: var(--theme-light, #fae4a8);
            font-size: 13px;
            font-weight: 700;
            padding: 10px 20px;
            border-radius: 30px;
            z-index: 120;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
            opacity: 0;
            pointer-events: none;
            transition: all 0.25s ease;
            white-space: nowrap;
        }

        .toast-notify.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .fullscreen-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 105;
            display: flex;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .fullscreen-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .fullscreen-modal-view {
            width: 100%;
            max-width: 480px;
            height: 100vh;
            height: 100dvh;
            background: var(--bg-main, #0c0d11);
            display: flex;
            flex-direction: column;
            transform: translateY(100%);
            transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
            overflow: hidden;
            position: relative;
        }

        .fullscreen-modal-overlay.active .fullscreen-modal-view {
            transform: translateY(0);
        }

        .fullscreen-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            background: rgba(12, 13, 17, 0.98);
            border-bottom: 1px solid rgba(222, 185, 120, 0.18);
            position: sticky;
            top: 0;
            z-index: 20;
            flex-shrink: 0;
        }

        .fullscreen-nav-title {
            font-size: 17px;
            font-weight: 800;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 10px;
            letter-spacing: -0.2px;
        }

        .btn-nav-round {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.22);
            color: var(--text-gold-muted, #9c8f78);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-nav-round:hover {
            color: var(--theme-light, #fae4a8);
            border-color: var(--theme-primary, #dfb35f);
            background: rgba(222, 185, 120, 0.18);
            transform: scale(1.05);
        }

        .fullscreen-content {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .income-hero-card {
            background: radial-gradient(130% 120% at 20% 0%, rgba(223, 179, 95, 0.22) 0%, rgba(21, 23, 30, 0.96) 65%, #0c0d11 100%);
            border: 1px solid rgba(222, 185, 120, 0.35);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(250, 228, 168, 0.25);
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
            min-height: fit-content;
            width: 100%;
            display: flex;
            flex-direction: column;
        }

        .income-hero-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
        }

        .income-hero-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 6px;
        }

        .income-hero-subtitle {
            font-size: 12.5px;
            color: var(--text-gold-muted, #9c8f78);
            font-weight: 600;
        }

        .income-badge-live {
            font-size: 11px;
            font-weight: 700;
            color: #0ecb81;
            background: rgba(14, 203, 129, 0.12);
            border: 1px solid rgba(14, 203, 129, 0.3);
            padding: 2px 8px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .live-dot-pulse {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #0ecb81;
            display: inline-block;
            box-shadow: 0 0 8px #0ecb81;
            animation: pulse-dot 1.8s infinite;
        }

        .income-hero-amount {
            font-size: 32px;
            font-weight: 900;
            letter-spacing: -0.5px;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 16px;
            font-family: 'Inter', sans-serif;
        }

        .income-hero-breakdown {
            display: grid;
            grid-template-columns: 1fr auto 1fr auto 1fr;
            align-items: center;
            background: rgba(15, 16, 21, 0.8);
            border: 1px solid rgba(222, 185, 120, 0.18);
            border-radius: 14px;
            padding: 10px 12px;
        }

        .breakdown-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: center;
        }

        .breakdown-label {
            font-size: 10.5px;
            color: var(--text-gold-muted, #9c8f78);
            white-space: nowrap;
        }

        .breakdown-val {
            font-size: 13.5px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
        }

        .breakdown-divider {
            width: 1px;
            height: 24px;
            background: rgba(222, 185, 120, 0.18);
        }

        .filter-controls-card {
            background: var(--bg-card, #15171e);
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 18px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
            flex-shrink: 0;
        }

        .pro-search-box {
            position: relative;
            display: flex;
            align-items: center;
            width: 100%;
        }

        .pro-search-icon {
            position: absolute;
            left: 14px;
            color: var(--theme-primary, #dfb35f);
            font-size: 14px;
            pointer-events: none;
        }

        .pro-search-input {
            width: 100%;
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 14px;
            padding: 11px 40px 11px 38px;
            color: #ffffff;
            font-size: 13.5px;
            font-family: var(--font-family);
            outline: none;
            transition: all 0.2s ease;
        }

        .pro-search-input:focus {
            border-color: var(--theme-primary, #dfb35f);
            box-shadow: 0 0 16px rgba(223, 179, 95, 0.25);
            background: #13151d;
        }

        .pro-search-input::placeholder {
            color: #71695b;
            font-size: 12.5px;
        }

        .btn-clear-input {
            position: absolute;
            right: 12px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.12);
            border: none;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .btn-clear-input:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .period-filter-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12.5px;
        }

        .period-filter-title {
            color: var(--theme-light, #fae4a8);
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .period-active-range {
            color: var(--text-gold-muted, #9c8f78);
            font-size: 11.5px;
            font-weight: 600;
        }

        .period-chips-group {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 2px;
            scrollbar-width: none;
        }

        .period-chips-group::-webkit-scrollbar {
            display: none;
        }

        .period-chip {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.2);
            color: #cfc5b4;
            font-size: 12px;
            font-weight: 700;
            padding: 7px 14px;
            border-radius: 20px;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            flex-shrink: 0;
        }

        .period-chip:hover {
            color: var(--theme-light, #fae4a8);
            border-color: rgba(222, 185, 120, 0.45);
        }

        .period-chip.active {
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
            color: #110d02;
            border-color: #fae4a8;
            box-shadow: 0 4px 14px rgba(223, 179, 95, 0.35);
        }

        .custom-date-box {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 14px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            animation: fadeInDown 0.25s ease;
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .date-input-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .date-label {
            font-size: 10.5px;
            color: var(--text-gold-muted, #9c8f78);
            font-weight: 600;
        }

        .pro-date-picker {
            width: 100%;
            background: #171922;
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 8px;
            color: #ffffff;
            font-size: 12px;
            padding: 6px 8px;
            outline: none;
            font-family: inherit;
            color-scheme: dark;
        }

        .pro-date-picker:focus {
            border-color: var(--theme-primary, #dfb35f);
        }

        .date-separator-arrow {
            color: var(--theme-primary, #dfb35f);
            font-size: 12px;
            padding-top: 14px;
        }

        .btn-apply-date {
            background: rgba(222, 185, 120, 0.18);
            border: 1px solid rgba(222, 185, 120, 0.4);
            color: var(--theme-light, #fae4a8);
            font-size: 11.5px;
            font-weight: 700;
            padding: 7px 12px;
            border-radius: 8px;
            cursor: pointer;
            margin-top: 14px;
            white-space: nowrap;
            transition: all 0.2s;
        }

        .btn-apply-date:hover {
            background: var(--theme-gradient);
            color: #110d02;
        }

        .list-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 4px;
            flex-shrink: 0;
        }

        .list-section-title {
            font-size: 14.5px;
            font-weight: 800;
            color: var(--theme-light, #fae4a8);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .list-count-badge {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-gold-muted, #9c8f78);
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.18);
            padding: 2px 9px;
            border-radius: 12px;
        }

        .income-list-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .income-item-card {
            background: var(--bg-card, #15171e);
            border: 1px solid rgba(222, 185, 120, 0.16);
            border-radius: 16px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
            transition: all 0.2s ease;
        }

        .income-item-card:hover {
            border-color: rgba(222, 185, 120, 0.35);
            transform: translateY(-1px);
        }

        .income-item-left {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .income-icon-pill {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 17px;
            flex-shrink: 0;
        }

        .income-icon-pill.referral {
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .income-icon-pill.rebate {
            background: rgba(14, 203, 129, 0.15);
            color: #0ecb81;
            border: 1px solid rgba(14, 203, 129, 0.3);
        }

        .income-item-info {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

        .income-item-title {
            font-size: 13.5px;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .income-item-meta {
            font-size: 11px;
            color: var(--text-gold-muted, #9c8f78);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .income-item-right {
            text-align: right;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 3px;
            flex-shrink: 0;
        }

        .income-item-amount {
            font-size: 15px;
            font-weight: 800;
            color: #0ecb81;
            font-family: 'Inter', monospace;
        }

        .income-item-status {
            font-size: 10px;
            font-weight: 700;
            color: #0ecb81;
            background: rgba(14, 203, 129, 0.12);
            padding: 1px 6px;
            border-radius: 8px;
        }

        .empty-filter-state {
            padding: 42px 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            background: rgba(222, 185, 120, 0.03);
            border: 1px dashed rgba(222, 185, 120, 0.2);
            border-radius: 20px;
        }

        .empty-filter-icon {
            width: 58px;
            height: 58px;
            border-radius: 50%;
            background: rgba(222, 185, 120, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--theme-primary, #dfb35f);
        }

        .empty-filter-title {
            font-size: 15px;
            font-weight: 800;
            color: #ffffff;
        }

        .empty-filter-desc {
            font-size: 12px;
            color: var(--text-gold-muted, #9c8f78);
            max-width: 260px;
            line-height: 1.5;
        }

        .btn-reset-filters {
            background: rgba(222, 185, 120, 0.15);
            border: 1px solid rgba(222, 185, 120, 0.35);
            color: var(--theme-light, #fae4a8);
            font-size: 12px;
            font-weight: 700;
            padding: 8px 16px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-reset-filters:hover {
            background: var(--theme-gradient);
            color: #110d02;
        }

        .statement-hero-card {
            background: radial-gradient(130% 120% at 20% 0%, rgba(223, 179, 95, 0.22) 0%, rgba(21, 23, 30, 0.96) 65%, #0c0d11 100%);
            border: 1px solid rgba(222, 185, 120, 0.35);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(250, 228, 168, 0.25);
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }

        .statement-hero-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--theme-gradient, linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%));
        }

        .statement-hero-breakdown {
            display: grid;
            grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
            align-items: center;
            background: rgba(15, 16, 21, 0.8);
            border: 1px solid rgba(222, 185, 120, 0.18);
            border-radius: 14px;
            padding: 10px 8px;
            gap: 2px;
        }

        .statement-item-card {
            background: var(--bg-card, #15171e);
            border: 1px solid rgba(222, 185, 120, 0.16);
            border-radius: 16px;
            padding: 13px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
            transition: all 0.2s ease;
        }

        .statement-item-card:hover {
            border-color: rgba(222, 185, 120, 0.35);
            transform: translateY(-1px);
        }

        .statement-item-left {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .statement-icon-pill {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
        }

        .statement-icon-pill.p2p-sell {
            background: rgba(14, 203, 129, 0.15);
            color: #0ecb81;
            border: 1px solid rgba(14, 203, 129, 0.3);
        }

        .statement-icon-pill.p2p-buy {
            background: rgba(14, 165, 233, 0.15);
            color: #0ea5e9;
            border: 1px solid rgba(14, 165, 233, 0.3);
        }

        .statement-icon-pill.deposit {
            background: rgba(168, 85, 247, 0.15);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, 0.3);
        }

        .statement-icon-pill.withdraw {
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .statement-item-info {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

        .statement-item-title {
            font-size: 13px;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .statement-item-meta {
            font-size: 10.5px;
            color: var(--text-gold-muted, #9c8f78);
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .ref-copy-pill {
            background: rgba(222, 185, 120, 0.1);
            border: 1px solid rgba(222, 185, 120, 0.22);
            color: var(--theme-light, #fae4a8);
            padding: 1px 6px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 10px;
            font-family: monospace;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s;
        }

        .ref-copy-pill:hover {
            background: rgba(222, 185, 120, 0.25);
            color: #ffffff;
        }

        .statement-extra-note {
            font-size: 10px;
            color: #887d6d;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .statement-item-right {
            text-align: right;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 2px;
            flex-shrink: 0;
        }

        .statement-item-amount {
            font-size: 14.5px;
            font-weight: 800;
            font-family: 'Inter', monospace;
        }

        .statement-item-amount.positive {
            color: #0ecb81;
        }

        .statement-item-amount.negative {
            color: #ffffff;
        }

        .statement-usdt-sub {
            font-size: 10px;
            color: var(--text-gold-muted, #9c8f78);
            font-weight: 600;
        }

        .statement-status-pill {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1.5px 6px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .statement-status-pill.completed {
            color: #0ecb81;
            background: rgba(14, 203, 129, 0.12);
            border: 1px solid rgba(14, 203, 129, 0.25);
        }

        .statement-status-pill.processing {
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.25);
        }

        .invite-summary-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            flex-shrink: 0;
        }

        .invite-stat-card {
            background: var(--bg-card, #15171e);
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 16px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        }

        .invite-stat-card.gold-border {
            border-color: rgba(222, 185, 120, 0.4);
            background: radial-gradient(130% 120% at 0% 0%, rgba(223, 179, 95, 0.12) 0%, #15171e 80%);
        }

        .invite-stat-label {
            font-size: 11.5px;
            color: var(--text-gold-muted, #9c8f78);
            font-weight: 600;
        }

        .invite-stat-val {
            font-size: 20px;
            font-weight: 800;
            color: #ffffff;
            font-family: 'Inter', sans-serif;
        }

        .invite-stat-val.gold {
            color: var(--theme-light, #fae4a8);
        }

        .invite-stat-val.green {
            color: #0ecb81;
        }

        .invite-stat-val.amber {
            color: #f59e0b;
        }

        .invite-friends-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .invite-friend-card {
            background: var(--bg-card, #15171e);
            border: 1px solid rgba(222, 185, 120, 0.16);
            border-radius: 16px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
            transition: all 0.2s ease;
        }

        .invite-friend-card:hover {
            border-color: rgba(222, 185, 120, 0.35);
            transform: translateY(-1px);
        }

        .friend-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .friend-user-profile {
            display: flex;
            align-items: center;
            gap: 11px;
        }

        .friend-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 13.5px;
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            flex-shrink: 0;
        }

        .friend-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .friend-email {
            font-size: 13.5px;
            font-weight: 700;
            color: #ffffff;
        }

        .friend-uid-row {
            font-size: 11px;
            color: var(--text-gold-muted, #9c8f78);
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
        }

        .friend-uid-row:hover {
            color: var(--theme-light, #fae4a8);
        }

        .kyc-badge {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .kyc-badge.verified {
            background: rgba(14, 203, 129, 0.15);
            border: 1px solid rgba(14, 203, 129, 0.4);
            color: #0ecb81;
        }

        .kyc-badge.pending {
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid rgba(245, 158, 11, 0.4);
            color: #f59e0b;
        }

        .friend-stats-bar {
            background: var(--bg-card-inner, #0f1015);
            border: 1px solid rgba(222, 185, 120, 0.12);
            border-radius: 12px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .friend-stat-col {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .friend-stat-title {
            font-size: 10px;
            color: var(--text-gold-muted, #9c8f78);
        }

        .friend-stat-amount {
            font-size: 12.5px;
            font-weight: 800;
            color: #ffffff;
        }

        .friend-stat-amount.gold {
            color: var(--theme-light, #fae4a8);
        }

        .friend-reg-time {
            font-size: 10.5px;
            color: #71695b;
            text-align: right;
        }

        .quick-invite-bottom-card {
            background: radial-gradient(130% 120% at 20% 0%, rgba(223, 179, 95, 0.15) 0%, rgba(21, 23, 30, 0.95) 70%, #0c0d11 100%);
            border: 1px solid rgba(222, 185, 120, 0.3);
            border-radius: 18px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 6px;
            flex-shrink: 0;
        }
    

/* ========================================================
   STYLES FROM: trades.php
   ======================================================== */

        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-family);
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: #07080b;
            color: #ffffff;
            display: flex;
            justify-content: center;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .app-container,
        .mobile-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            min-height: 100dvh;
            background: #0a0b0e;
            position: relative;
            display: flex;
            flex-direction: column;
            padding-bottom: calc(var(--tabbar-height, 68px) + env(safe-area-inset-bottom) + 24px);
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
        }

        /* Top Bar Header */
        .trades-top-bar {
            padding: 18px 20px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            background: rgba(10, 11, 14, 0.95);
            backdrop-filter: blur(16px);
            z-index: 20;
            border-bottom: 1px solid rgba(222, 185, 120, 0.12);
        }

        .top-bar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .top-back-btn {
            color: #c9993b;
            font-size: 16px;
            text-decoration: none;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(223, 179, 95, 0.08);
            border: 1px solid rgba(222, 185, 120, 0.2);
            transition: all 0.2s ease;
        }

        .top-back-btn:hover {
            color: #fae4a8;
            background: rgba(223, 179, 95, 0.16);
            transform: translateX(-2px);
        }

        .trades-page-title {
            font-size: 17px;
            font-weight: 700;
            color: #fae4a8;
            letter-spacing: 0.3px;
        }

        .top-bar-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-icon-top {
            color: #8c8577;
            background: transparent;
            border: none;
            font-size: 16px;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .btn-icon-top:hover {
            color: #fae4a8;
            background: rgba(255, 255, 255, 0.05);
        }

        /* Main Content Container */
        .trades-content {
            padding: 16px 18px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            flex: 1;
        }

        /* Top Segmented Control Switcher (⚡ P2P Market vs 📋 คำสั่งซื้อของฉัน) */
        .trade-segmented-switcher {
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: #111319;
            border: 1.5px solid rgba(222, 185, 120, 0.25);
            border-radius: 18px;
            padding: 4px;
            gap: 6px;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.05);
        }

        .segment-tab-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 14px;
            border-radius: 14px;
            font-size: 14px;
            font-weight: 700;
            color: #8c8577;
            background: transparent;
            border: none;
            cursor: pointer;
            position: relative;
            transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .segment-tab-btn i {
            font-size: 13px;
        }

        .segment-tab-btn.active {
            background: linear-gradient(135deg, #fae4a8 0%, #dfb35f 50%, #c9993b 100%);
            color: #0c0d12;
            font-weight: 800;
            box-shadow: 0 4px 16px rgba(223, 179, 95, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.8);
        }

        /* Badge จำนวนรายการที่กำลังดำเนินการ (Processing Orders Badge) */
        .orders-badge {
            position: absolute;
            top: 2px;
            right: 4px;
            background: linear-gradient(135deg, #f6465d 0%, #e02f47 100%);
            color: #ffffff;
            font-size: 10.5px;
            font-weight: 800;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #111319;
            box-shadow: 0 0 10px rgba(246, 70, 93, 0.7);
            line-height: 1;
            z-index: 10;
            animation: badge-pulse 2s infinite ease-in-out;
            pointer-events: none;
        }

        @keyframes badge-pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.12);
                box-shadow: 0 0 14px rgba(246, 70, 93, 0.95);
            }
        }

        /* ==============================================================
           VIEW: 📋 คำสั่งซื้อของฉัน (Orders / #/pages/order/order)
           ============================================================== */
        #viewMyOrders {
            display: none;
            /* Default to market view */
            flex-direction: column;
            gap: 14px;
        }

        /* Search Bar */
        .order-search-box {
            position: relative;
            display: flex;
            align-items: center;
        }

        .order-search-input {
            width: 100%;
            background: #12141c;
            border: 1.5px solid rgba(222, 185, 120, 0.22);
            border-radius: 14px;
            padding: 13px 44px 13px 16px;
            font-size: 14px;
            color: #ffffff;
            outline: none;
            transition: all 0.25s ease;
        }

        .order-search-input::placeholder {
            color: #5c5850;
            font-size: 13.5px;
        }

        .order-search-input:focus {
            border-color: #dfb35f;
            box-shadow: 0 0 15px rgba(223, 179, 95, 0.25);
            background: #151822;
        }

        .order-search-btn {
            position: absolute;
            right: 12px;
            background: transparent;
            border: none;
            color: #8c8577;
            font-size: 15px;
            cursor: pointer;
            padding: 6px;
            transition: color 0.2s;
        }

        .order-search-btn:hover {
            color: #fae4a8;
        }

        /* Filter Status Pills (ทั้งหมด / กำลังดำเนินการ / เสร็จสมบูรณ์) */
        .order-filter-pills-row {
            display: flex;
            align-items: center;
            gap: 8px;
            overflow-x: auto;
            scrollbar-width: none;
            padding: 2px 0;
        }

        .order-filter-pills-row::-webkit-scrollbar {
            display: none;
        }

        .filter-status-pill {
            background: #12141c;
            border: 1px solid rgba(222, 185, 120, 0.18);
            border-radius: 12px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            color: #8c8577;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
        }

        .filter-status-pill:hover {
            color: #ffffff;
            border-color: rgba(222, 185, 120, 0.4);
        }

        .filter-status-pill.active {
            background: linear-gradient(135deg, rgba(250, 228, 168, 0.2) 0%, rgba(223, 179, 95, 0.12) 100%);
            border-color: #dfb35f;
            color: #fae4a8;
            font-weight: 700;
            box-shadow: 0 0 12px rgba(223, 179, 95, 0.25);
        }

        /* Orders List Container */
        .orders-list-wrap {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 4px;
        }

        /* Order Card Component */
        .order-card-item {
            border-radius: 20px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
            transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
            cursor: pointer;
        }

        /* 1. Completed Orders (Settled / Archive Record - Clean & Subdued) */
        .order-card-item[data-status="completed"] {
            background: linear-gradient(160deg, #13151d 0%, #0c0d12 100%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
            opacity: 0.88;
        }

        .order-card-item[data-status="completed"]:hover {
            opacity: 1;
            transform: translateY(-2px);
            border-color: rgba(222, 185, 120, 0.35);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
        }

        .order-card-item[data-status="completed"] .btn-view-order-detail {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #8c8577;
        }

        .order-card-item[data-status="completed"] .btn-view-order-detail:hover {
            color: #fae4a8;
            border-color: rgba(222, 185, 120, 0.4);
            background: rgba(223, 179, 95, 0.12);
        }

        /* 2. Processing Orders (Active / In-progress Deal - Ultra-Luxury Standout) */
        .order-card-item[data-status="processing"] {
            background: radial-gradient(130% 120% at 50% -10%, #242938 0%, #151824 45%, #0e1017 100%);
            border: 1.5px solid rgba(223, 179, 95, 0.8);
            box-shadow: 0 14px 40px rgba(0, 0, 0, 0.88), 0 0 26px rgba(223, 179, 95, 0.28), inset 0 1px 2px rgba(250, 228, 168, 0.55);
            position: relative;
            overflow: hidden;
        }

        /* Radiant Golden Top Shimmer Bar */
        .order-card-item[data-status="processing"]::before {
            content: '';
            position: absolute;
            top: 0;
            left: 8%;
            right: 8%;
            height: 2.5px;
            background: linear-gradient(90deg, transparent, #fae4a8 30%, #dfb35f 70%, transparent);
            border-radius: 2px;
            filter: drop-shadow(0 0 8px rgba(250, 228, 168, 0.95));
        }

        .order-card-item[data-status="processing"]:hover {
            transform: translateY(-3px);
            border-color: #fae4a8;
            box-shadow: 0 18px 46px rgba(0, 0, 0, 0.95), 0 0 34px rgba(223, 179, 95, 0.42), inset 0 1px 3px rgba(250, 228, 168, 0.7);
        }

        /* Active Processing Order Highlight Pill */
        .order-active-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 10px;
            font-weight: 800;
            color: #fae4a8;
            background: rgba(223, 179, 95, 0.16);
            border: 1px solid rgba(222, 185, 120, 0.4);
            padding: 2px 7px;
            border-radius: 6px;
            letter-spacing: 0.2px;
        }

        .order-active-pill i {
            color: #dfb35f;
            font-size: 9.5px;
        }

        .order-card-header {
            display: flex;
            flex-direction: column;
            gap: 7px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            padding-bottom: 10px;
        }

        .order-header-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }

        .order-number-row {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 6px;
        }

        .order-type-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 13px;
            font-weight: 800;
            padding: 4px 10px;
            border-radius: 8px;
        }

        .order-type-badge .badge-coin-icon {
            font-size: 10px;
            color: #dfb35f;
            filter: drop-shadow(0 0 4px rgba(223, 179, 95, 0.4));
            margin-left: -1px;
            margin-right: 1px;
        }

        .order-type-badge.sell {
            background: rgba(246, 70, 93, 0.16);
            color: #f6465d;
            border: 1px solid rgba(246, 70, 93, 0.35);
        }

        .order-type-badge.buy {
            background: rgba(14, 203, 129, 0.16);
            color: #0ecb81;
            border: 1px solid rgba(14, 203, 129, 0.35);
        }

        .order-number-text {
            font-size: 11.5px;
            color: #8c8577;
            font-family: monospace;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .order-copy-mini-btn {
            background: transparent;
            border: none;
            color: #6d675b;
            font-size: 11px;
            padding: 2px 5px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
        }

        .order-copy-mini-btn:hover {
            color: #dfb35f;
            background: rgba(223, 179, 95, 0.12);
        }

        .order-status-badge {
            font-size: 11.5px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .order-status-badge.processing {
            background: linear-gradient(135deg, rgba(14, 203, 129, 0.22) 0%, rgba(10, 160, 100, 0.28) 100%);
            color: #0ecb81;
            border: 1px solid rgba(14, 203, 129, 0.55);
            box-shadow: 0 0 14px rgba(14, 203, 129, 0.35);
            font-weight: 800;
        }

        .order-status-badge.completed {
            background: rgba(140, 133, 119, 0.14);
            color: #9e988f;
            border: 1px solid rgba(160, 153, 142, 0.22);
            font-weight: 600;
        }

        .order-status-badge.cancelled {
            background: rgba(140, 133, 119, 0.15);
            color: #8c8577;
            border: 1px solid rgba(140, 133, 119, 0.3);
        }

        /* Pulsing Live Beacon for Processing Deals (Active Green) */
        .live-dot-pulse {
            display: inline-block;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #0ecb81;
            box-shadow: 0 0 8px #0ecb81;
            animation: live-beacon-pulse 1.8s infinite ease-in-out;
            margin-right: 2px;
        }

        @keyframes live-beacon-pulse {
            0% {
                transform: scale(0.9);
                opacity: 0.8;
                box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.85);
            }

            70% {
                transform: scale(1.15);
                opacity: 1;
                box-shadow: 0 0 0 6px rgba(14, 203, 129, 0);
            }

            100% {
                transform: scale(0.9);
                opacity: 0.8;
                box-shadow: 0 0 0 0 rgba(14, 203, 129, 0);
            }
        }

        /* Order Metrics Grid */
        .order-metrics-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            padding: 4px 0;
        }

        .order-metric-cell {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .metric-cell-label {
            font-size: 11px;
            color: #8a8375;
            font-weight: 500;
        }

        .metric-cell-val {
            font-size: 14px;
            font-weight: 700;
            color: #ffffff;
        }

        .metric-cell-val.total-thb {
            color: #fae4a8;
            font-weight: 800;
        }

        /* Processing Order Highlight for Total THB */
        .order-card-item[data-status="processing"] .metric-cell-val.total-thb {
            color: #fae4a8;
            font-size: 15.5px;
            font-weight: 900;
            text-shadow: 0 0 14px rgba(223, 179, 95, 0.6);
        }

        .order-card-item[data-status="completed"] .metric-cell-val.total-thb {
            color: #d1c6b2;
            font-weight: 700;
        }

        /* Order Footer */
        .order-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 12px;
            color: #646056;
        }

        .order-time-text {
            font-size: 11.5px;
            color: #7d7768;
        }

        .btn-view-order-detail {
            background: rgba(223, 179, 95, 0.12);
            border: 1px solid rgba(222, 185, 120, 0.3);
            color: #fae4a8;
            font-size: 11.5px;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-view-order-detail:hover {
            background: rgba(223, 179, 95, 0.25);
            border-color: #fae4a8;
        }

        /* Standout Action Button for Processing Order */
        .order-card-item[data-status="processing"] .btn-view-order-detail {
            background: linear-gradient(135deg, #fae4a8 0%, #dfb35f 100%);
            border: 1px solid #fae4a8;
            color: #110d02;
            font-size: 11.5px;
            font-weight: 800;
            padding: 5px 13px;
            box-shadow: 0 4px 14px rgba(223, 179, 95, 0.4);
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .order-card-item[data-status="processing"] .btn-view-order-detail:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(223, 179, 95, 0.6);
            background: linear-gradient(135deg, #ffffff 0%, #fae4a8 50%, #dfb35f 100%);
        }

        /* Empty State Container (100% Match to 34_0.jpg) */
        .empty-orders-state {
            display: none;
            /* Shown dynamically when no orders */
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 70px 20px;
            text-align: center;
            gap: 14px;
        }

        .empty-icon-capsule {
            width: 72px;
            height: 72px;
            border-radius: 22px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(222, 185, 120, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #5c5850;
            font-size: 30px;
            margin-bottom: 4px;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
        }

        .empty-title {
            font-size: 16px;
            font-weight: 700;
            color: #b5a892;
            letter-spacing: 0.2px;
        }

        .empty-subtitle {
            font-size: 13px;
            color: #646056;
            font-weight: 500;
        }

        /* Demo Switcher Pill (For user testing: toggle between sample orders and empty state) */
        .demo-toggle-row {
            display: flex;
            justify-content: center;
            margin-top: 10px;
        }

        .btn-toggle-demo {
            background: transparent;
            border: 1px dashed rgba(222, 185, 120, 0.3);
            color: #8c8577;
            font-size: 11px;
            padding: 4px 12px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-toggle-demo:hover {
            color: #fae4a8;
            border-color: #fae4a8;
        }

        /* ==============================================================
           VIEW: ⚡ P2P Market (Radar / Wi-Fi Sonar Matching - 33_0.jpg)
           ============================================================== */
        #viewP2PMarket {
            display: flex;
            /* Active by default */
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px 16px 20px;
            text-align: center;
            gap: 24px;
            flex: 1;
            min-height: calc(100vh - 240px);
            min-height: calc(100dvh - 240px);
        }

        /* Sonar Radar Dish Animation */
        .radar-sonar-container {
            width: 220px;
            height: 220px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 20px 0 10px;
        }

        .radar-ripple-ring {
            position: absolute;
            border-radius: 50%;
            border: 1.5px solid rgba(223, 179, 95, 0.4);
            animation: radar-ripple 3.2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .radar-ripple-ring:nth-child(1) {
            width: 90px;
            height: 90px;
            animation-delay: 0s;
        }

        .radar-ripple-ring:nth-child(2) {
            width: 140px;
            height: 140px;
            animation-delay: 0.8s;
        }

        .radar-ripple-ring:nth-child(3) {
            width: 190px;
            height: 190px;
            animation-delay: 1.6s;
        }

        .radar-ripple-ring:nth-child(4) {
            width: 230px;
            height: 230px;
            animation-delay: 2.4s;
        }

        @keyframes radar-ripple {
            0% {
                transform: scale(0.6);
                opacity: 0.9;
                border-color: rgba(250, 228, 168, 0.8);
            }

            70% {
                opacity: 0.25;
                border-color: rgba(223, 179, 95, 0.3);
            }

            100% {
                transform: scale(1.15);
                opacity: 0;
            }
        }

        .radar-center-hub {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: radial-gradient(circle at 35% 35%, #2a2516 0%, #151410 70%, #0c0d12 100%);
            border: 2px solid #dfb35f;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fae4a8;
            font-size: 32px;
            z-index: 5;
            box-shadow:
                0 0 30px rgba(223, 179, 95, 0.45),
                inset 0 2px 4px rgba(255, 255, 255, 0.4),
                inset 0 -2px 6px rgba(0, 0, 0, 0.8);
        }

        .radar-center-hub i {
            animation: radar-rotate-pulse 2s infinite ease-in-out;
        }

        @keyframes radar-rotate-pulse {

            0%,
            100% {
                transform: scale(1) rotate(0deg);
                opacity: 1;
            }

            50% {
                transform: scale(1.08) rotate(4deg);
                opacity: 0.85;
            }
        }

        .market-matching-status-card {
            width: 100%;
            background: radial-gradient(130% 100% at 50% 0%, #1a1d26 0%, #12141a 50%, #090a0e 100%);
            border: 1.5px solid rgba(222, 185, 120, 0.35);
            border-radius: 22px;
            padding: 22px 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(250, 228, 168, 0.4);
        }

        .radar-headline {
            font-size: 18px;
            font-weight: 800;
            color: #fae4a8;
            letter-spacing: 0.3px;
        }

        .radar-desc {
            font-size: 13.5px;
            color: #9c9485;
            line-height: 1.5;
            max-width: 320px;
            margin: 0 auto;
        }

        .market-live-stat-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: rgba(14, 203, 129, 0.12);
            border: 1px solid rgba(14, 203, 129, 0.35);
            color: #0ecb81;
            font-size: 12.5px;
            font-weight: 700;
            padding: 6px 16px;
            border-radius: 20px;
            margin-top: 6px;
        }

        .pulse-green-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #0ecb81;
            box-shadow: 0 0 10px #0ecb81;
            animation: pulse-dot 1.5s infinite;
        }

        /* Order Details Modal */
        .trade-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: flex-end;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .trade-modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .trade-modal-container {
            width: 100%;
            max-width: 480px;
            background: #111319;
            border-top: 2px solid #dfb35f;
            border-radius: 28px 28px 0 0;
            padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
            display: flex;
            flex-direction: column;
            gap: 16px;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
        }

        .trade-modal-overlay.active .trade-modal-container {
            transform: translateY(0);
        }

        .modal-drag-handle {
            width: 40px;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            margin: 0 auto 6px;
        }

        .modal-trade-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-trade-title {
            font-size: 18px;
            font-weight: 800;
            color: #fae4a8;
        }

        .btn-close-trade-modal {
            background: rgba(255, 255, 255, 0.08);
            border: none;
            color: #8c8577;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .btn-close-trade-modal:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }

        .modal-detail-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: #0c0d12;
            border: 1px solid rgba(222, 185, 120, 0.2);
            border-radius: 16px;
            padding: 14px 16px;
        }

        .modal-detail-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 13px;
        }

        .modal-item-label {
            color: #8a8375;
        }

        .modal-item-val {
            color: #ffffff;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .modal-item-val.highlight {
            color: #fae4a8;
            font-size: 15px;
            font-weight: 800;
        }

        .copy-tag-btn {
            background: rgba(223, 179, 95, 0.15);
            border: 1px solid rgba(222, 185, 120, 0.3);
            color: #fae4a8;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 6px;
            cursor: pointer;
        }
    

/* ========================================================
   STYLES FROM: index.php
   ======================================================== */

        :root {
            --tabbar-height: 68px;
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer);
            color: var(--text-primary);
            font-family: var(--font-family);
            font-size: 14px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
        }

        /* App Shell (Mobile-first centered on desktop) */
        .app-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--bg-main);
            position: relative;
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
            padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 16px);
            display: flex;
            flex-direction: column;
        }

        /* Top Header */
        .header {
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 40;
            background: rgba(12, 13, 17, 0.9);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .avatar {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--gold-gradient-avatar);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 16px;
            color: #120d02;
            box-shadow: 0 4px 14px rgba(216, 170, 83, 0.35);
        }

        .user-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .user-email {
            font-weight: 700;
            font-size: 15px;
            color: #ffffff;
            letter-spacing: -0.2px;
        }

        .user-id-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-gold-muted);
            cursor: pointer;
            transition: color 0.2s;
        }

        .user-id-badge:hover {
            color: var(--gold-light);
        }

        .btn-copy {
            opacity: 0.7;
            font-size: 11px;
            transition: opacity 0.2s, transform 0.15s;
        }

        .user-id-badge:hover .btn-copy {
            opacity: 1;
            transform: scale(1.1);
        }

        .btn-notify {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #181a20;
            border: 1px solid rgba(222, 185, 120, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #c2b093;
            cursor: pointer;
            position: relative;
            transition: all 0.2s;
        }

        .btn-notify:active {
            transform: scale(0.92);
            background: #232630;
        }

        .notify-badge {
            position: absolute;
            top: 7px;
            right: 7px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--gold-primary);
            border: 2px solid var(--bg-main);
            box-shadow: 0 0 8px rgba(223, 179, 95, 0.8);
        }

        /* Content Area */
        .content {
            padding: 14px 18px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        /* Realtime Status Bar */
        .connection-status-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(222, 185, 120, 0.05);
            border: 1px solid var(--border-gold);
            padding: 8px 16px;
            border-radius: 12px;
            font-size: 12px;
            color: var(--text-gold-light);
        }

        .live-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--gold-light);
            display: inline-block;
            margin-right: 8px;
            box-shadow: 0 0 10px rgba(250, 228, 168, 0.9);
            animation: pulse-dot 2s infinite;
        }

        @keyframes pulse-dot {
            0% { transform: scale(0.9); opacity: 0.7; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(0.9); opacity: 0.7; }
        }

        .time-text {
            color: var(--text-gold-muted);
            font-size: 12px;
        }

        /* Card Base Styles */
        .gold-card {
            background: var(--bg-card);
            border: 1px solid var(--border-gold);
            border-radius: 20px;
            padding: 20px;
            position: relative;
        }

        /* Total Balance Card */
        .card-balance {
            display: flex;
            flex-direction: column;
        }

        .balance-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .balance-label {
            font-size: 14px;
            font-weight: 500;
            color: #a89f8f;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .eye-toggle {
            cursor: pointer;
            opacity: 0.8;
            transition: opacity 0.2s;
            font-size: 15px;
            color: #a89f8f;
        }

        .eye-toggle:hover {
            opacity: 1;
            color: var(--gold-light);
        }

        .live-rates-tag {
            font-size: 12px;
            color: var(--gold-primary);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .balance-main {
            margin-top: 14px;
        }

        .balance-amount {
            font-size: 34px;
            font-weight: 800;
            letter-spacing: -0.5px;
            color: var(--text-gold-bright);
            display: flex;
            align-items: baseline;
            gap: 8px;
            line-height: 1.1;
        }

        .balance-unit {
            font-size: 16px;
            font-weight: 700;
            color: var(--gold-primary);
        }

        .balance-fiat {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-gold-muted);
            margin-top: 6px;
        }

        .balance-sub-grid {
            display: flex;
            justify-content: space-between;
            margin-top: 22px;
            padding-top: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .sub-stat-label {
            font-size: 11px;
            color: #786f60;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .sub-stat-value {
            font-size: 15px;
            font-weight: 700;
            color: #ffffff;
            margin-top: 3px;
        }

        /* Action Buttons: Ultra-Premium Luxury VIP Action Group */
        .action-buttons-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-top: 2px;
        }

        .btn-action {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 14px 18px;
            border-radius: 18px;
            font-weight: 800;
            font-size: 15px;
            letter-spacing: 0.3px;
            cursor: pointer;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
            user-select: none;
        }

        .btn-action:hover {
            transform: translateY(-2px);
        }

        .btn-action:active {
            transform: translateY(1px) scale(0.97);
        }

        .btn-action-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            flex-shrink: 0;
            transition: transform 0.25s ease;
        }

        .btn-action:hover .btn-action-icon {
            transform: scale(1.1);
        }

        .btn-action-text {
            font-weight: 800;
            letter-spacing: 0.3px;
        }

        /* 1. Deposit Button: Radiant Ingot Gold with Specular Highlight */
        .btn-deposit {
            background: linear-gradient(135deg, #fae4a8 0%, #dfb35f 40%, #c9993b 85%, #b38226 100%);
            color: #0c0d12;
            border: 1px solid rgba(255, 255, 255, 0.45);
            box-shadow: 
                0 10px 24px rgba(223, 179, 95, 0.38),
                0 4px 10px rgba(0, 0, 0, 0.5),
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                inset 0 -2px 4px rgba(0, 0, 0, 0.25);
        }

        .btn-deposit .btn-action-icon {
            background: rgba(12, 13, 18, 0.15);
            color: #0c0d12;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
        }

        .btn-deposit:hover {
            box-shadow: 
                0 14px 30px rgba(223, 179, 95, 0.55),
                0 6px 14px rgba(0, 0, 0, 0.6),
                inset 0 1px 2px rgba(255, 255, 255, 0.95);
        }

        /* Light sheen sweep on Deposit */
        .btn-deposit::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -60%;
            width: 40%;
            height: 200%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
            transform: rotate(25deg);
            transition: all 0.75s ease;
        }

        .btn-deposit:hover::after {
            left: 130%;
        }

        /* 2. Withdraw Button: Deep Obsidian Glass with Radiant Gold Border */
        .btn-withdraw {
            background: radial-gradient(120% 120% at 50% 0%, #1e222d 0%, #12141c 55%, #0b0c10 100%);
            color: #fae4a8;
            border: 1.5px solid rgba(250, 228, 168, 0.45);
            box-shadow: 
                0 10px 24px rgba(0, 0, 0, 0.75),
                0 0 20px rgba(223, 179, 95, 0.12),
                inset 0 1px 2px rgba(250, 228, 168, 0.35),
                inset 0 -1px 3px rgba(0, 0, 0, 0.6);
        }

        .btn-withdraw .btn-action-icon {
            background: rgba(223, 179, 95, 0.14);
            border: 1px solid rgba(250, 228, 168, 0.35);
            color: #fae4a8;
            box-shadow: 0 0 10px rgba(223, 179, 95, 0.2);
        }

        .btn-withdraw:hover {
            border-color: rgba(250, 228, 168, 0.85);
            background: radial-gradient(120% 120% at 50% 0%, #252b39 0%, #151822 55%, #0e0f14 100%);
            box-shadow: 
                0 14px 30px rgba(0, 0, 0, 0.85),
                0 0 26px rgba(223, 179, 95, 0.3),
                inset 0 1px 2px rgba(250, 228, 168, 0.6);
        }

        .btn-withdraw::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -60%;
            width: 40%;
            height: 200%;
            background: linear-gradient(90deg, transparent, rgba(250, 228, 168, 0.2), transparent);
            transform: rotate(25deg);
            transition: all 0.75s ease;
        }

        .btn-withdraw:hover::after {
            left: 130%;
        }

        /* Operating Capital Card */
        .card-capital {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .capital-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .capital-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 8px;
            letter-spacing: 0.3px;
        }

        .capital-body {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .capital-amount {
            font-size: 32px;
            font-weight: 800;
            color: var(--text-gold-bright);
            line-height: 1;
            display: flex;
            align-items: baseline;
            gap: 8px;
        }

        .capital-unit {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-gold-muted);
        }

        .btn-request {
            background: var(--gold-gradient);
            color: #110d02;
            padding: 10px 20px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 800;
            border: none;
            cursor: pointer;
            box-shadow: var(--gold-glow-soft);
            transition: all 0.2s;
        }

        .btn-request:active {
            transform: scale(0.94);
        }

        /* Today's Data Card */
        .card-stats {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .stats-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 8px;
            letter-spacing: 0.3px;
        }

        .box-sold-stat {
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            border-radius: 14px;
            padding: 16px;
        }

        .sold-top-row {
            padding-bottom: 12px;
            border-bottom: 1px dashed rgba(222, 185, 120, 0.15);
        }

        .sold-label {
            font-size: 12px;
            color: var(--text-gold-muted);
            margin-bottom: 6px;
        }

        .sold-amount {
            font-size: 26px;
            font-weight: 800;
            color: var(--text-gold-bright);
            line-height: 1;
        }

        .channels-row {
            display: flex;
            margin-top: 12px;
            gap: 16px;
        }

        .channel-col {
            flex: 1;
        }

        .channel-label {
            font-size: 11px;
            color: #8a7d6a;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 4px;
        }

        .channel-value {
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
        }

        .channels-divider {
            width: 1px;
            background: rgba(222, 185, 120, 0.12);
        }

        /* Dual Grid for Income & Commission */
        .stats-grid-dual {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .box-grid-stat {
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            border-radius: 14px;
            padding: 14px;
        }

        .grid-stat-label {
            font-size: 12px;
            color: var(--text-gold-muted);
            margin-bottom: 6px;
        }

        .grid-stat-value {
            font-size: 18px;
            font-weight: 800;
            color: var(--text-gold-bright);
            display: flex;
            align-items: baseline;
            gap: 4px;
        }

        .grid-stat-unit {
            font-size: 10px;
            color: var(--gold-primary);
            font-weight: 600;
        }

        .grid-stat-fiat {
            font-size: 11px;
            color: var(--text-gold-muted);
            margin-top: 4px;
        }

        /* Customer Service Floating Button */
        .cs-floating-btn {
            position: fixed;
            bottom: calc(var(--tabbar-height) + 20px);
            right: 20px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--gold-gradient-avatar);
            color: #110d02;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 0 25px rgba(223, 179, 95, 0.55);
            z-index: 50;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        @media (min-width: 500px) {
            .cs-floating-btn {
                right: calc(50% - 240px + 20px);
            }
        }

        .cs-floating-btn:active {
            transform: scale(0.9);
        }

        /* Bottom Tabbar */
        .tabbar {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 480px;
            height: var(--tabbar-height);
            background: #0c0d11;
            border-top: 1px solid rgba(222, 185, 120, 0.18);
            display: flex;
            align-items: center;
            justify-content: space-around;
            padding-bottom: env(safe-area-inset-bottom);
            z-index: 60;
        }

        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            color: var(--tab-inactive);
            text-decoration: none;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: color 0.2s, transform 0.15s;
            flex: 1;
            min-width: 0;
            width: 20%;
            height: 100%;
            position: relative;
        }

        .tab-icon-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 24px;
        }

        .tab-item i {
            font-size: 19px;
            transition: transform 0.2s;
        }

        .tab-item.active {
            color: var(--gold-primary);
        }

        .tab-item.active i {
            color: var(--gold-primary);
            transform: scale(1.1);
        }

        /* Interactive Regular Modals */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 105;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-box {
            background: #15171e;
            border: 1px solid var(--border-gold);
            border-radius: 20px;
            width: 100%;
            max-width: 400px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
            animation: modal-enter 0.25s ease-out;
        }

        @keyframes modal-enter {
            from { opacity: 0; transform: translateY(20px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .modal-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--gold-primary);
        }

        .modal-close {
            background: transparent;
            border: none;
            color: var(--text-gold-muted);
            font-size: 18px;
            cursor: pointer;
        }

        .modal-input {
            width: 100%;
            padding: 12px 14px;
            background: #0f1015;
            border: 1px solid var(--border-gold-subtle);
            border-radius: 12px;
            color: #ffffff;
            font-size: 13px;
            margin-bottom: 16px;
            outline: none;
        }

        .modal-input:focus {
            border-color: var(--gold-primary);
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: rgba(21, 23, 30, 0.95);
            border: 1px solid var(--border-gold);
            color: var(--text-gold-bright);
            padding: 12px 24px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 600;
            pointer-events: none;
            opacity: 0;
            transition: all 0.25s ease;
            z-index: 200;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toast.show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    

/* ========================================================
   STYLES FROM: deposit.php
   ======================================================== */

        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer);
            color: var(--text-primary);
            font-family: var(--font-family);
            font-size: 14px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
        }

        .mobile-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--bg-main);
            position: relative;
            padding: 16px 20px 40px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
        }

        /* Top Nav Header */
        .top-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 48px;
            margin-bottom: 14px;
        }

        .nav-back, .nav-action {
            color: #ffffff;
            font-size: 18px;
            text-decoration: none;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .nav-back:active, .nav-action:active {
            background: rgba(222, 185, 120, 0.12);
        }

        .nav-title {
            font-size: 17px;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: -0.3px;
        }

        /* Main Card Container */
        .card-deposit {
            background: var(--bg-card);
            border-radius: 24px;
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 24px;
            border: 1px solid var(--border-gold);
        }

        /* Network Pill */
        .network-selector {
            width: 100%;
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            color: var(--gold-primary);
            font-size: 14px;
            font-weight: 800;
            padding: 13px;
            border-radius: 12px;
            text-align: center;
            margin-bottom: 24px;
            letter-spacing: 0.5px;
        }

        /* QR Code Frame */
        .qr-wrapper {
            background: #ffffff;
            padding: 16px;
            border-radius: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            margin-bottom: 22px;
        }

        .qr-code-img {
            width: 180px;
            height: 180px;
            display: block;
            border-radius: 8px;
        }

        /* Label */
        .section-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--gold-light);
            margin-bottom: 12px;
            text-align: center;
        }

        /* Address Box */
        .address-box {
            width: 100%;
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            border-radius: 14px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 18px;
        }

        .address-text {
            font-size: 12px;
            color: #d1c7b7;
            font-family: monospace;
            word-break: break-all;
            line-height: 1.4;
        }

        .btn-copy-icon {
            color: var(--gold-primary);
            font-size: 17px;
            cursor: pointer;
            padding: 6px;
            transition: transform 0.15s, color 0.15s;
        }

        .btn-copy-icon:hover {
            color: var(--gold-light);
        }

        .btn-copy-icon:active {
            transform: scale(0.88);
        }

        /* Warning Banner */
        .warning-banner {
            width: 100%;
            background: rgba(222, 185, 120, 0.06);
            border: 1px solid rgba(222, 185, 120, 0.25);
            border-radius: 14px;
            padding: 14px 16px;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 20px;
            font-size: 12px;
            line-height: 1.5;
            color: var(--gold-light);
        }

        .warning-icon {
            font-size: 15px;
            margin-top: 1px;
            flex-shrink: 0;
            color: var(--gold-primary);
        }

        /* Save QR Action */
        .btn-save-qr {
            color: var(--gold-primary);
            font-size: 13px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            transition: opacity 0.2s;
        }

        .btn-save-qr:active {
            opacity: 0.7;
        }

        /* Submit Button (Luxury Gold) */
        .btn-submit-txn {
            width: 100%;
            background: var(--gold-gradient);
            color: #110d02;
            font-size: 15px;
            font-weight: 800;
            padding: 16px;
            border-radius: 16px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--gold-glow);
            transition: transform 0.15s, box-shadow 0.2s;
        }

        .btn-submit-txn:active {
            transform: scale(0.97);
            box-shadow: 0 4px 12px rgba(223, 179, 95, 0.35);
        }

        /* Customer Support Floating Button */
        .cs-floating-btn {
            position: fixed;
            bottom: 30px;
            right: 20px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--gold-gradient-avatar);
            color: #110d02;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 0 25px rgba(223, 179, 95, 0.55);
            z-index: 50;
            transition: transform 0.2s;
        }

        @media (min-width: 500px) {
            .cs-floating-btn {
                right: calc(50% - 240px + 20px);
            }
        }

        .cs-floating-btn:active {
            transform: scale(0.9);
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-box {
            background: #15171e;
            border: 1px solid var(--border-gold);
            border-radius: 20px;
            width: 100%;
            max-width: 400px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
            animation: modal-enter 0.2s ease-out;
        }

        @keyframes modal-enter {
            from { opacity: 0; transform: translateY(16px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }

        .modal-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--gold-primary);
        }

        .modal-close {
            background: transparent;
            border: none;
            color: var(--text-gold-muted);
            font-size: 18px;
            cursor: pointer;
        }

        .modal-input {
            width: 100%;
            padding: 12px 14px;
            background: #0f1015;
            border: 1px solid var(--border-gold-subtle);
            border-radius: 12px;
            color: #ffffff;
            font-size: 13px;
            margin-bottom: 16px;
            outline: none;
        }

        .modal-input:focus {
            border-color: var(--gold-primary);
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: rgba(21, 23, 30, 0.95);
            border: 1px solid var(--border-gold);
            color: var(--text-gold-bright);
            padding: 12px 24px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 600;
            pointer-events: none;
            opacity: 0;
            transition: all 0.2s ease;
            z-index: 200;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toast.show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    

/* ========================================================
   STYLES FROM: withdraw.php
   ======================================================== */

        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-outer);
            color: var(--text-primary);
            font-family: var(--font-family);
            font-size: 14px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
        }

        .mobile-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--bg-main);
            position: relative;
            padding: 16px 20px 40px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
        }

        /* Top Nav Header */
        .top-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 48px;
            margin-bottom: 14px;
            position: relative;
        }

        .nav-back {
            color: #ffffff;
            font-size: 18px;
            text-decoration: none;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .nav-back:active {
            background: rgba(222, 185, 120, 0.12);
        }

        .nav-title {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            font-size: 17px;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: -0.3px;
        }

        /* Main Form Card */
        .card-exchange {
            background: var(--bg-card);
            border-radius: 24px;
            padding: 22px 20px;
            display: flex;
            flex-direction: column;
            gap: 18px;
            margin-bottom: 22px;
            border: 1px solid var(--border-gold);
        }

        .field-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .field-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .field-label {
            font-size: 13px;
            color: var(--text-gold-muted);
            font-weight: 500;
        }

        .field-sublabel {
            font-size: 12px;
            color: var(--text-gold-muted);
        }

        /* Network Box */
        .network-box {
            width: 100%;
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            color: var(--gold-primary);
            font-size: 14px;
            font-weight: 800;
            padding: 13px;
            border-radius: 12px;
            text-align: center;
            letter-spacing: 0.5px;
        }

        /* Input Wrapper */
        .input-wrapper {
            background: var(--bg-card-inner);
            border: 1px solid var(--border-gold-subtle);
            border-radius: 14px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            transition: border-color 0.2s;
        }

        .input-wrapper:focus-within {
            border-color: var(--gold-primary);
        }

        .input-field {
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 14px;
            width: 100%;
            outline: none;
            font-family: inherit;
        }

        .input-field::placeholder {
            color: #555146;
            font-size: 13px;
        }

        .input-icon-btn {
            color: var(--gold-primary);
            font-size: 16px;
            cursor: pointer;
            padding: 4px;
            transition: transform 0.15s;
        }

        .input-icon-btn:active {
            transform: scale(0.9);
        }

        /* Amount Input Extensions */
        .amount-unit-box {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #ffffff;
            font-size: 13px;
            font-weight: 600;
        }

        .btn-max {
            color: var(--gold-primary);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            background: transparent;
            border: none;
            padding: 2px 4px;
            transition: opacity 0.2s;
        }

        .btn-max:active {
            opacity: 0.7;
        }

        .divider-vertical {
            width: 1px;
            height: 14px;
            background: rgba(222, 185, 120, 0.25);
        }

        /* Rows */
        .info-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 13px;
        }

        .info-label {
            color: var(--text-gold-muted);
        }

        .info-val {
            color: #ffffff;
            font-weight: 600;
        }

        .val-highlight {
            color: var(--text-gold-bright);
            font-size: 17px;
            font-weight: 800;
        }

        /* Email Code Split Input */
        .code-input-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .btn-get-code {
            background: var(--gold-gradient);
            color: #110d02;
            border: none;
            border-radius: 12px;
            padding: 13px 18px;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
            transition: opacity 0.2s;
        }

        .btn-get-code:active {
            transform: scale(0.96);
        }

        .btn-get-code:disabled {
            background: #252834;
            color: #64748b;
            cursor: not-allowed;
        }

        /* Confirm Exchange Button */
        .btn-confirm-exchange {
            width: 100%;
            background: var(--gold-gradient);
            color: #110d02;
            font-size: 15px;
            font-weight: 800;
            padding: 16px;
            border-radius: 16px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--gold-glow);
            margin-top: 4px;
            transition: transform 0.15s, box-shadow 0.2s;
        }

        .btn-confirm-exchange:active {
            transform: scale(0.97);
            box-shadow: 0 4px 12px rgba(223, 179, 95, 0.35);
        }

        /* Bottom Footnotes */
        .footnote-list {
            margin-top: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 0 4px;
        }

        .footnote-item {
            font-size: 12px;
            color: #646056;
            line-height: 1.5;
        }

        /* Customer Support Floating Button */
        .cs-floating-btn {
            position: fixed;
            bottom: 30px;
            right: 20px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--gold-gradient-avatar);
            color: #110d02;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 0 25px rgba(223, 179, 95, 0.55);
            z-index: 50;
            transition: transform 0.2s;
        }

        @media (min-width: 500px) {
            .cs-floating-btn {
                right: calc(50% - 240px + 20px);
            }
        }

        .cs-floating-btn:active {
            transform: scale(0.9);
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: rgba(21, 23, 30, 0.95);
            border: 1px solid var(--border-gold);
            color: var(--text-gold-bright);
            padding: 12px 24px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 600;
            pointer-events: none;
            opacity: 0;
            transition: all 0.2s ease;
            z-index: 200;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toast.show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        /* Support Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-box {
            background: #15171e;
            border: 1px solid var(--border-gold);
            border-radius: 20px;
            width: 100%;
            max-width: 400px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
        }
    
