/* =========================================================
   SwiftCopy Mobile App Flow CSS
   Matches the Figma/Mobile App Flow Design
   Scoped to Mobile Viewports (< 992px)
   Desktop UI remains 100% untouched
   ========================================================= */

@media (min-width: 992px) {
    .mobile-bottom-nav,
    .mobile-bottom-sheet,
    .mobile-sheet-backdrop,
    .mobile-only-header,
    .mobile-quick-action-bar {
        display: none !important;
    }
}

@media (max-width: 991.98px) {

    /* --- Root & Container Overrides --- */
    body {
        background-color: #f8f9fc !important;
        padding-bottom: 96px !important; /* Space for floating bottom glass nav */
    }

    .dashboard-container {
        padding: 0 !important;
        min-height: auto;
    }

    .main-content {
        padding: 16px 16px 40px 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Hide desktop right panel by default on mobile so it doesn't clutter the flow */
    .right-panel {
        display: none !important;
    }

    /* --- 1. PERSISTENT MOBILE BOTTOM NAVIGATION (ROUND THICK GLASSMORPHISM) --- */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 20px !important;
        left: 18px !important;
        right: 18px !important;
        max-width: 480px;
        margin: 0 auto;
        height: 72px;
        background: rgba(255, 255, 255, 0.74) !important;
        -webkit-backdrop-filter: blur(28px) saturate(210%) brightness(106%) !important;
        backdrop-filter: blur(28px) saturate(210%) brightness(106%) !important;
        border: 2px solid rgba(255, 255, 255, 0.9) !important;
        border-radius: 9999px !important; /* Thick round capsule pill */
        box-shadow: 0 20px 48px -8px rgba(112, 71, 235, 0.2),
                    0 10px 24px -4px rgba(15, 23, 42, 0.12),
                    inset 0 2.5px 3px rgba(255, 255, 255, 0.95),
                    inset 0 -2px 3px rgba(112, 71, 235, 0.06) !important;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1050;
        padding: 0 12px;
    }

    [data-bs-theme="dark"] .mobile-bottom-nav {
        background: rgba(18, 24, 38, 0.8) !important;
        border: 2px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6),
                    inset 0 1.5px 2px rgba(255, 255, 255, 0.22),
                    inset 0 -2px 3px rgba(0, 0, 0, 0.4) !important;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #64748b;
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 700;
        flex: 1;
        height: 52px;
        border-radius: 9999px;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        gap: 3px;
        padding: 4px 6px;
    }

    .mobile-nav-item i {
        font-size: 1.28rem;
        line-height: 1;
        transition: transform 0.2s ease;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: #7047eb !important;
        background: linear-gradient(135deg, rgba(112, 71, 235, 0.14), rgba(131, 71, 229, 0.08)) !important;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8),
                    0 4px 12px rgba(112, 71, 235, 0.1);
    }

    [data-bs-theme="dark"] .mobile-nav-item:hover,
    [data-bs-theme="dark"] .mobile-nav-item.active {
        color: #a78bfa !important;
        background: rgba(139, 92, 246, 0.18) !important;
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12),
                    0 4px 14px rgba(0, 0, 0, 0.3);
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px) scale(1.08);
    }

    /* --- BOTTOM ACTION SHEETS (Trade & Profile) --- */
    .mobile-sheet-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1060;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        backdrop-filter: blur(3px);
    }

    .mobile-sheet-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
        z-index: 1070;
        padding: 12px 20px 30px 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        max-width: 540px;
        margin: 0 auto;
    }

    .mobile-bottom-sheet.show {
        transform: translateY(0);
    }

    .mobile-sheet-handle {
        width: 44px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 99px;
        margin: 0 auto 16px auto;
    }

    .mobile-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-sheet-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        text-align: center;
    }

    .mobile-sheet-action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #334155;
        font-size: 0.75rem;
        font-weight: 600;
        gap: 8px;
    }

    .action-icon-circle {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        transition: transform 0.15s ease;
    }

    .action-icon-circle:active {
        transform: scale(0.95);
    }

    .bg-purple-soft {
        background: #f1edfe;
    }

    .text-purple {
        color: #7047eb;
    }

    .profile-avatar-circle {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7047eb, #9d68f6);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1rem;
    }

    .mobile-sheet-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-sheet-menu-link {
        display: flex;
        align-items: center;
        padding: 12px 14px;
        border-radius: 12px;
        color: #334155;
        text-decoration: none;
        font-size: 0.88rem;
        font-weight: 600;
        gap: 14px;
        transition: background 0.15s;
    }

    .mobile-sheet-menu-link:hover,
    .mobile-sheet-menu-link:active {
        background: #f8fafc;
        color: #7047eb;
    }

    .mobile-sheet-menu-link i:first-child {
        font-size: 1.15rem;
        color: #7047eb;
    }

    .mobile-sheet-menu-link.text-danger i:first-child {
        color: #ef4444;
    }

    /* --- 2. CRYPTO WALLET FLOW (Home Screen) --- */
    /* Mobile Top Bar */
    .mobile-wallet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-top: 4px;
    }

    .mobile-greeting-label {
        font-size: 0.78rem;
        color: #64748b;
        margin-bottom: 2px;
        font-weight: 500;
    }

    .mobile-user-name {
        font-size: 1.25rem;
        font-weight: 800;
        color: #0f172a;
        letter-spacing: -0.3px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .mobile-bell-btn {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: #f1edfe;
        color: #7047eb;
        border: 1px solid #e0d7fc;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        text-decoration: none;
        position: relative;
    }

    /* Purple Balance Card — Mobile */
    .balance-card {
        background: linear-gradient(135deg, #4f22bd 0%, #2f1370 50%, #3a1580 100%) !important;
        border-radius: 24px !important;
        padding: 20px 18px 16px 18px !important;
        color: #ffffff !important;
        box-shadow: 0 12px 30px rgba(43, 23, 84, 0.3) !important;
        margin-bottom: 18px !important;
        border: none !important;
        text-align: left !important;
    }

    .balance-card-inner {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        margin-bottom: 14px !important;
    }

    .balance-card-left {
        flex: 1 !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    .balance-card-illustration {
        flex-shrink: 0 !important;
        width: 105px !important;
        height: 95px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: -6px !important;
        margin-right: -4px !important;
    }

    .wallet-3d-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28)) !important;
    }

    .balance-badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        border-radius: 8px !important;
        padding: 4px 10px !important;
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        color: rgba(255, 255, 255, 0.88) !important;
        margin-bottom: 8px !important;
    }

    .balance-amount {
        font-size: 2.3rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 2px !important;
        text-align: left !important;
        line-height: 1.15 !important;
    }

    .balance-change {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 0.78rem !important;
        color: #00D09C !important;
        font-weight: 600 !important;
        margin-bottom: 0 !important;
        text-align: left !important;
    }

    .action-buttons {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .action-btn {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 16px !important;
        color: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 4px !important;
        gap: 5px !important;
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .action-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.25) !important;
    }

    .action-btn i {
        font-size: 1.2rem !important;
        line-height: 1;
    }

    .action-btn span {
        font-size: 0.68rem !important;
        font-weight: 600 !important;
    }

    /* Connect Wallet Pill — Mobile */
    .connect-wallet-pill {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
        border-radius: 999px !important;
        padding: 11px 18px !important;
        color: #fff !important;
        font-size: 0.82rem !important;
        font-weight: 600 !important;
    }

    .connect-wallet-btn {
        display: none !important;
    }

    /* Assets Section */
    .mobile-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .mobile-section-title {
        font-size: 1.05rem;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
    }

    .crypto-list {
        background: #ffffff;
        border-radius: 20px;
        padding: 8px 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
        border: 1px solid #edf2f7;
    }

    .crypto-item {
        display: flex;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid #f1f5f9;
        text-decoration: none;
        color: inherit;
    }

    .crypto-item:last-child {
        border-bottom: none;
    }

    .crypto-item-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .crypto-item-info {
        flex: 1;
        min-width: 0;
    }

    .crypto-item-symbol {
        font-weight: 800;
        font-size: 0.92rem;
        color: #0f172a;
        line-height: 1.2;
    }

    .crypto-item-name {
        font-size: 0.72rem;
        color: #94a3b8;
        font-weight: 500;
    }

    .crypto-item-values {
        text-align: right;
    }

    .crypto-item-balance {
        font-weight: 800;
        font-size: 0.92rem;
        color: #0f172a;
        line-height: 1.2;
    }

    .crypto-item-change {
        font-size: 0.72rem;
        font-weight: 600;
    }

    .crypto-item-change.positive {
        color: #16a34a;
    }

    .crypto-item-change.negative {
        color: #ef4444;
    }

    /* --- 3. COMMON APP-BAR / FLOW TOP HEADER --- */
    .app-flow-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        position: relative;
        min-height: 42px;
    }

    .app-flow-back-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 1.15rem;
        z-index: 2;
    }

    .app-flow-title {
        position: absolute;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 1.05rem;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
        pointer-events: none;
    }

    .app-flow-action-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 1.15rem;
        z-index: 2;
    }

    /* --- 4. FLOW 1: SEND CRYPTO --- */
    .send-card, .swap-card, .receive-card {
        background: #ffffff !important;
        border-radius: 22px !important;
        padding: 22px 18px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid #edf2f7 !important;
        margin-bottom: 20px !important;
    }

    .flow-field-label {
        font-size: 0.8rem;
        font-weight: 700;
        color: #475569;
        margin-bottom: 8px;
        display: block;
    }

    .flow-asset-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 12px 14px;
        cursor: pointer;
        margin-bottom: 18px;
    }

    .flow-amount-wrapper {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 14px 16px;
        margin-bottom: 18px;
    }

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

    .flow-amount-input {
        border: none;
        background: transparent;
        font-size: 1.8rem;
        font-weight: 800;
        color: #0f172a;
        width: 60%;
        outline: none;
    }

    .flow-token-pill {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 700;
        font-size: 0.95rem;
        color: #0f172a;
        background: #ffffff;
        padding: 6px 12px;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
    }

    .flow-amount-subtext {
        font-size: 0.78rem;
        color: #94a3b8;
        font-weight: 500;
        margin-top: 4px;
    }

    .flow-input-group {
        position: relative;
        margin-bottom: 18px;
    }

    .flow-input-field {
        width: 100%;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 13px 46px 13px 14px;
        font-size: 0.88rem;
        color: #0f172a;
        outline: none;
    }

    .flow-input-icon-btn {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: #7047eb;
        font-size: 1.15rem;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .flow-dropdown-select {
        width: 100%;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 13px 14px;
        font-size: 0.88rem;
        color: #0f172a;
        outline: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
    }

    .flow-btn-primary {
        width: 100%;
        background: #7047eb;
        color: #ffffff;
        border: none;
        border-radius: 16px;
        padding: 15px;
        font-size: 0.98rem;
        font-weight: 700;
        box-shadow: 0 8px 24px rgba(112, 71, 235, 0.3);
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
    }

    .flow-btn-primary:active {
        transform: scale(0.98);
        background: #5e32df;
    }

    /* --- 5. FLOW 1: SWAP CRYPTO --- */
    .swap-flip-circle {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #ffffff;
        border: 2px solid #edf2f7;
        box-shadow: 0 4px 14px rgba(112, 71, 235, 0.15);
        color: #7047eb;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: -16px auto -16px auto;
        position: relative;
        z-index: 10;
        cursor: pointer;
        font-size: 1.15rem;
        transition: transform 0.2s ease;
    }

    .swap-flip-circle:active {
        transform: rotate(180deg) scale(0.95);
    }

    .swap-meta-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 4px;
        font-size: 0.8rem;
        color: #64748b;
        margin-top: 14px;
        margin-bottom: 20px;
    }

    /* --- 6. FLOW 2: COPY TRADING (Experts Browse) --- */
    .flow-pill-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 18px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .flow-pill-btn {
        background: #f1f5f9;
        border: none;
        border-radius: 99px;
        padding: 7px 18px;
        font-size: 0.78rem;
        font-weight: 700;
        color: #64748b;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .flow-pill-btn.active {
        background: #7047eb !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(112, 71, 235, 0.25);
    }

    .trader-row-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #ffffff;
        border-radius: 18px;
        padding: 14px 16px;
        margin-bottom: 10px;
        border: 1px solid #edf2f7;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
        text-decoration: none;
        color: inherit;
    }

    .trader-avatar-circle {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .trader-avatar-fallback {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7047eb, #8c60f5);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 0.9rem;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .trader-info-col {
        flex: 1;
        min-width: 0;
    }

    .trader-name-row {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 800;
        font-size: 0.92rem;
        color: #0f172a;
    }

    .trader-badge-verified {
        color: #3b82f6;
        font-size: 0.82rem;
    }

    .trader-sub-metrics {
        font-size: 0.72rem;
        color: #64748b;
        margin-top: 2px;
    }

    .trader-roi-green {
        color: #16a34a;
        font-weight: 700;
    }

    .btn-copy-green {
        background: #16a34a;
        color: #ffffff;
        border: none;
        border-radius: 99px;
        padding: 6px 18px;
        font-size: 0.78rem;
        font-weight: 700;
        transition: transform 0.15s ease, background 0.15s ease;
        text-decoration: none;
        white-space: nowrap;
    }

    .btn-copy-green:active {
        transform: scale(0.95);
        background: #15803d;
    }

    /* --- 7. FLOW 2: EXPERT DETAIL --- */
    .expert-hero-card {
        background: linear-gradient(135deg, #7047EB 0%, #5B2FD1 100%);
        border-radius: 24px;
        padding: 22px 20px 16px 20px;
        color: #ffffff;
        box-shadow: 0 12px 30px rgba(112, 71, 235, 0.28);
        margin-bottom: 20px;
        position: relative;
        overflow: hidden;
    }

    .expert-hero-metrics {
        display: flex;
        justify-content: space-between;
        position: relative;
        z-index: 2;
        margin-bottom: 16px;
    }

    .expert-hero-stat-label {
        font-size: 0.72rem;
        color: #e0d7fc;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .expert-hero-stat-val {
        font-size: 1.8rem;
        font-weight: 800;
        color: #ffffff;
        line-height: 1.2;
    }

    .expert-hero-sparkline {
        width: 100%;
        height: 64px;
        display: block;
    }

    /* Expert Sub-tabs */
    .expert-nav-tabs {
        display: flex;
        border-bottom: 2px solid #edf2f7;
        margin-bottom: 18px;
    }

    .expert-nav-tab {
        flex: 1;
        text-align: center;
        padding: 10px 0;
        font-size: 0.82rem;
        font-weight: 700;
        color: #64748b;
        cursor: pointer;
        position: relative;
        transition: color 0.2s;
    }

    .expert-nav-tab.active {
        color: #7047eb;
    }

    .expert-nav-tab.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 15%;
        right: 15%;
        height: 3px;
        background: #7047eb;
        border-radius: 99px;
    }

    .expert-stats-list {
        background: #ffffff;
        border-radius: 20px;
        padding: 6px 18px;
        border: 1px solid #edf2f7;
        box-shadow: 0 2px 12px rgba(0,0,0,0.02);
        margin-bottom: 24px;
    }

    .expert-stat-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.85rem;
    }

    .expert-stat-row:last-child {
        border-bottom: none;
    }

    .expert-stat-title {
        color: #64748b;
        font-weight: 600;
    }

    .expert-stat-num {
        font-weight: 800;
        color: #0f172a;
    }

    .expert-risk-badge {
        background: #fee2e2;
        color: #dc2626;
        font-size: 0.72rem;
        font-weight: 800;
        padding: 3px 10px;
        border-radius: 6px;
    }

    /* Floating / Sticky Start Copy CTA */
    .sticky-mobile-cta {
        position: fixed;
        bottom: 74px; /* Sits right above the 66px bottom nav bar */
        left: 16px;
        right: 16px;
        max-width: 488px;
        margin: 0 auto;
        z-index: 1040;
    }

    /* --- 8. FLOW 2: ACTIVE COPY (My Copied Traders) --- */
    .active-copy-card {
        background: #ffffff;
        border-radius: 20px;
        padding: 18px;
        border: 1px solid #edf2f7;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
        margin-bottom: 14px;
    }

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

    .active-copy-meta-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        background: #f8fafc;
        border-radius: 14px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .active-copy-meta-label {
        font-size: 0.7rem;
        color: #64748b;
        font-weight: 600;
    }

    .active-copy-meta-val {
        font-size: 0.88rem;
        font-weight: 800;
        color: #0f172a;
    }

    .active-copy-btn-details {
        width: 100%;
        background: #f1edfe;
        color: #7047eb;
        border: 1px solid #e0d7fc;
        border-radius: 12px;
        padding: 10px;
        font-size: 0.82rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    /* --- 9. FLOW 3: COPY TRADING HISTORY & TRADE DETAILS MODAL --- */
    .trade-history-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 0;
        border-bottom: 1px solid #f1f5f9;
        cursor: pointer;
    }

    .trade-history-row:last-child {
        border-bottom: none;
    }

    .trade-history-pnl {
        font-weight: 800;
        font-size: 0.92rem;
        text-align: right;
    }

    .trade-history-pnl.positive {
        color: #16a34a;
    }

    .trade-history-pnl.negative {
        color: #ef4444;
    }

    .timeframe-pills {
        display: flex;
        gap: 6px;
        justify-content: flex-end;
        margin-bottom: 12px;
    }

    .timeframe-pill {
        background: #f1f5f9;
        border: none;
        border-radius: 8px;
        padding: 4px 10px;
        font-size: 0.72rem;
        font-weight: 700;
        color: #64748b;
        cursor: pointer;
    }

    .timeframe-pill.active {
        background: #7047eb;
        color: #ffffff;
    }
}
