.dashboard-page {
    background: var(--bg-dark);
    min-height: 100vh;
}

.dashboard-page.blur-active .dash-navbar,
.dashboard-page.blur-active .dash-main,
.dashboard-page.blur-active .dash-footer,
.dashboard-page.blur-active .mobile-bottom-nav {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.registration-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

body:has(.registration-overlay:not(.hidden)) {
    overflow: hidden;
}

.registration-overlay.hidden {
    display: none;
}

.registration-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.registration-popup {
    position: relative;
    background: linear-gradient(145deg, #1e1e1e, #141414);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.registration-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    animation: logoAppear 0.6s ease-out 0.3s forwards;
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.registration-logo img {
    width: 200%;
    height: 200%;
    object-fit: contain;
}

.registration-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.registration-referral {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.registration-referral .referral-id {
    color: #FCC904;
    font-weight: 600;
}

.registration-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.registration-desc .highlight-text {
    color: #FCC904;
    font-weight: 500;
}

.registration-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.reg-stat {
    flex: 1;
    max-width: 140px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.reg-stat:hover {
    border-color: rgba(255, 202, 4, 0.3);
    background: rgba(255, 202, 4, 0.05);
}

.reg-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.reg-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.registration-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.registration-secure i {
    color: #2ecc71;
}

.registration-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #FCC904, #e5a800);
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.registration-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(252, 201, 4, 0.4);
}

.registration-btn i {
    transition: transform 0.3s ease;
}

.registration-btn:hover i {
    transform: translateX(4px);
}

/* Inline registration error under the Register button */
.registration-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 59, 59, 0.12);
    border: 1px solid rgba(255, 59, 59, 0.35);
    color: #ff4d4d;
    font-size: 13px;
    line-height: 1.35;
}
.registration-error.hidden {
    display: none;
}

@media (max-width: 480px) {
    .registration-popup {
        padding: 30px 24px;
    }
    
    .registration-logo {
        width: 60px;
        height: 60px;
    }
    
    .registration-title {
        font-size: 1.5rem;
    }
    
    .reg-stat-value {
        font-size: 1.3rem;
    }
}

.dash-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.dash-particle {
    position: absolute;
    background: #FFCA04;
    border-radius: 50%;
    opacity: 0;
    animation: dashParticleFloat 15s ease-in-out infinite;
    box-shadow: 0 0 4px 1px rgba(255, 202, 4, 0.2);
}

@keyframes dashParticleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 0.25;
    }
    50% {
        opacity: 0.15;
        transform: translateY(-30px) translateX(15px);
    }
    90% {
        opacity: 0.25;
    }
}

@media (max-width: 768px) {
    .dash-particles {
        display: none;
    }
}

.dash-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, #1e1e1e, #161616);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 202, 4, 0.25);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dash-nav-container {
    max-width: 1800px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.dash-logo-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.dash-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1px 12px 1px 4px;
    background: rgba(255, 202, 4, 0.08);
    border: 1px solid rgba(255, 202, 4, 0.25);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.dash-user-profile:hover {
    border-color: rgba(255, 202, 4, 0.4);
    background: rgba(255, 202, 4, 0.12);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
}

/* Founder verified badge on top avatar */
.user-avatar.is-founder::after {
    content: "✔";
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 202, 4, 0.95);
    color: #1a1300;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
}



.user-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-nickname {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-id span {
    color: var(--primary);
}

.mobile-chat-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: rgba(252, 201, 4, 0.15);
    border: 1px solid rgba(252, 201, 4, 0.3);
    border-radius: 10px;
    color: #FCC904;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-chat-btn:hover {
    background: rgba(252, 201, 4, 0.25);
    border-color: #FCC904;
}

.dash-disconnect-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    color: #e74c3c;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dash-disconnect-btn:hover {
    background: rgba(231, 76, 60, 0.25);
    border-color: #e74c3c;
}

.dash-main {
    padding-top: 90px;
    padding-bottom: 0px;
    min-height: 100vh;
}

.dash-footer {
    margin-bottom: 0;
}

.dash-layout {
    display: flex;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 24px;
}

.dash-panels {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

.dash-panel {
    background: linear-gradient(145deg, #1a1a1a, #111111);
    border: 1px solid rgba(255, 202, 4, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dash-panel:hover {
    border-color: rgba(255, 202, 4, 0.5);
    box-shadow: 0 10px 50px rgba(255, 202, 4, 0.15);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 202, 4, 0.12), rgba(206, 177, 92, 0.06));
    border-bottom: 1px solid rgba(255, 202, 4, 0.2);
}

.panel-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.2rem;
}

.panel-title h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.panel-subtitle strong {
    color: var(--primary);
}

.panel-content {
    padding: 16px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.panel-content::-webkit-scrollbar {
    width: 4px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.dash-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-info-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.dash-info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.dash-info-value {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-info-value i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.dash-info-value.highlight {
    color: var(--primary);
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-stat-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dash-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 32px;
    height: 32px;
    background: rgba(252, 201, 4, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FCC904;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

.stat-value.orange {
    color: #FCC904;
}

.stat-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dash-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.dash-action-btn.primary {
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    color: #000;
}

.dash-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 201, 4, 0.4);
}

.dash-action-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.dash-action-btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dash-referral-card,
.dash-cycles-card,
.dash-history-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    margin-bottom: 14px;
}

.referral-header,
.cycles-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.referral-icon,
.cycles-icon {
    width: 40px;
    height: 40px;
    background: rgba(252, 201, 4, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FCC904;
    font-size: 1rem;
}

.referral-info h3,
.cycles-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.referral-info p,
.cycles-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.referral-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 202, 4, 0.1);
    border: 1px solid rgba(255, 202, 4, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.referral-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cycles-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.cycle-stat {
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cycle-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cycle-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.cycle-value.orange {
    color: #FCC904;
}

.claim-roi-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgba(252, 201, 4, 0.2), rgba(206, 177, 92, 0.1));
    border: 1px solid rgba(252, 201, 4, 0.3);
    border-radius: 10px;
    color: #FCC904;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.claim-roi-btn:hover {
    background: rgba(252, 201, 4, 0.3);
    border-color: #FCC904;
}

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

.history-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.view-all-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.view-all-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px;
}

.cycles-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--text-muted);
}

.cycles-empty-state p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.cycles-empty-state span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.teams-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.teams-overview-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.teams-overview-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 202, 4, 0.3);
}

.overview-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.overview-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.overview-value.orange {
    color: #FCC904;
}

@media (max-width: 480px) {
    .teams-overview-grid {
        grid-template-columns: 1fr;
    }
}

.teams-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
	margin-top: 15px;
}

.teams-icon {
    width: 36px;
    height: 36px;
    background: rgba(252, 201, 4, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FCC904;
    font-size: 0.95rem;
}

.teams-icon.gold {
    background: rgba(255, 202, 4, 0.15);
    color: var(--primary);
}

.teams-icon.purple {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
}

.teams-section-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.levels-list,
.ranks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-item,
.rank-item {
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.level-header,
.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.level-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 2px;
}

.level-income {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.level-status,
.rank-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.level-status.locked {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
}

.rank-status.failed {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.rank-status.active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.level-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.orange {
    background: var(--gradient-secondary);
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 2px;
}

.rank-reward {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rank-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rank-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 6px 0;
    border-top: 1px solid var(--border-color);
}

.rank-progress-row span:first-child {
    color: var(--text-secondary);
}

.rank-progress-row .ended {
    color: #e74c3c;
}

.team-layers-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-layers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.layer-item:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.layer-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
}

.layer-info {
    flex: 1;
}

.layer-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
}

.layer-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.layer-view-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.layer-view-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.wallet-overview {
    margin-bottom: 14px;
}

.wallet-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.wallet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.wallet-history-empty {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    color: var(--text-muted);
}

.wallet-history-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
    display: block;
}

.wallet-history-empty p {
    font-size: 0.85rem;
}

.wallet-stat {
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    text-align: center;
}

.wallet-stat-icon {
    width: 32px;
    height: 32px;
    background: rgba(252, 201, 4, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FCC904;
    font-size: 0.85rem;
    margin: 0 auto 8px;
}

.wallet-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.wallet-stat-value {
    font-size: 1rem;
    font-weight: 700;
}

.wallet-rules {
    padding: 14px;
    background: rgba(252, 201, 4, 0.08);
    border: 1px solid rgba(252, 201, 4, 0.2);
    border-radius: 12px;
    margin-bottom: 14px;
}

.rules-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FCC904;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rules-list {
    list-style: none;
    padding-left: 0;
}

.rules-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.rules-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #FCC904;
}

.wallet-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    margin-bottom: 12px;
}

.wallet-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wallet-card-icon {
    width: 36px;
    height: 36px;
    background: rgba(252, 201, 4, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FCC904;
    font-size: 0.9rem;
}

.wallet-card-icon.purple {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
}

.wallet-card-title {
    flex: 1;
    font-weight: 700;
    font-size: 0.9rem;
}

.wallet-card-balance {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.wallet-card-input input {
    width: 100%;
    padding: 12px 14px;
    padding-right: 76px; /* room for MAX button */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 12px;
}

.wallet-card-input {
    position: relative;
}

.wallet-max-btn {
    position: absolute;
    right: 6px;
    top: 39%;
    transform: translateY(-50%);
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(252, 201, 4, 0.35);
    background: rgba(252, 201, 4, 0.12);
    color: #FCC904;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    user-select: none;
}

.wallet-max-btn:hover {
    background: rgba(252, 201, 4, 0.18);
}

.wallet-max-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.wallet-max-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 420px) {
    .wallet-card-input input {
        padding-right: 68px;
    }
    .wallet-max-btn {
        right: 8px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}
.wallet-card-input input:focus {
    outline: none;
    border-color: #FCC904;
}

.wallet-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.wallet-btn.withdraw {
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    color: #000;
}

.wallet-btn.withdraw:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 201, 4, 0.4);
}

.wallet-btn.reinvest {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.wallet-btn.reinvest:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dash-chat {
    width: 340px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1a1a1a, #111111);
    border: 1px solid rgba(255, 202, 4, 0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    position: sticky;
    top: 90px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 202, 4, 0.2);
    background: linear-gradient(135deg, rgba(255, 202, 4, 0.12), rgba(206, 177, 92, 0.06));
}

.chat-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-back-btn:hover {
    border-color: #FCC904;
    color: #FCC904;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.chat-title i {
    color: #FCC904;
}

.chat-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-message {
    display: flex;
    gap: 10px;
}

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-message.own .message-content {
    background: rgba(252, 201, 4, 0.15);
    border-color: rgba(252, 201, 4, 0.3);
}

.chat-message.system {
    justify-content: center;
}

.chat-message.system .message-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-message.system .message-text i {
    margin-right: 6px;
    color: #FCC904;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
}

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

.message-author {
    font-weight: 600;
    font-size: 0.8rem;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.message-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #FCC904;
}

.chat-send-btn {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border: none;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(252, 201, 4, 0.4);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, #1e1e1e, #161616);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 202, 4, 0.25);
    z-index: 1000;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.bottom-nav-item:hover i {
    animation: iconWiggle 0.5s ease;
}

@keyframes iconWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
}

.bottom-nav-item.active {
    color: #FCC904;
}

.bottom-nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border-radius: 0 0 3px 3px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content.wide {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-title i {
    color: #FCC904;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
}

.deposit-balances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.balance-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.balance-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.balance-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.deposit-input-group {
    margin-bottom: 20px;
}

.deposit-input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #FCC904;
    font-weight: 700;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 14px 14px 36px;
    padding-right: 76px; /* room for MAX button in modals */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #FCC904;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

/* Hide number input arrows (spinners) inside modals (Deposit/Withdraw) */
.modal-content input[type="number"]::-webkit-outer-spin-button,
.modal-content input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.modal-content input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Reuse MAX button styling inside modals (center vertically) */
.modal-content .input-with-icon .wallet-max-btn {
    top: 50%;
}

.input-with-icon input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(252, 201, 4, 0.2);
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.deposit-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.deposit-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 201, 4, 0.4);
}

.deposit-info {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
}

.deposit-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #FCC904;
}

.deposit-info ul {
    list-style: none;
    padding: 0;
}

.deposit-info ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.deposit-info ul li i {
    color: #2ecc71;
}

.deposit-roi-info {
    padding: 16px;
    background: rgba(252, 201, 4, 0.08);
    border: 1px solid rgba(252, 201, 4, 0.2);
    border-radius: 12px;
}

.roi-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FCC904;
    font-weight: 700;
    margin-bottom: 12px;
}

.roi-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roi-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.roi-row .highlight {
    color: #FCC904;
    font-weight: 700;
}

.withdraw-balance {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
}

.withdraw-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.withdraw-value {
    font-size: 2rem;
    font-weight: 700;
    color: #FCC904;
}

.history-table-header {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.history-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-btn.is-active {
    background: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.55);
    color: #fff;
}

.history-pagination .pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-page .footer {
    margin-top: 80px;
}

.dash-footer {
    margin-bottom: 0;
}

@media (max-width: 1400px) {
    .dash-panels {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dash-chat {
        width: 300px;
    }
}

@media (max-width: 1100px) {
    .dash-layout {
        flex-direction: column;
    }
    
    .dash-panels {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dash-chat {
        width: 100%;
        height: 400px;
        position: static;
    }
}

@media (max-width: 768px) {
    .dash-navbar {
        height: 60px;
    }
    
    .dash-nav-container {
        padding: 0 12px;
    }
    
    .dash-logo span {
        display: block;
        font-size: 0.85rem;
    }
    
    .dash-logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .dash-user-info {
        gap: 8px;
    }
    
    .dash-user-profile {
        padding: 0;
        background: transparent;
        border: none;
        order: 1;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 0.75rem;
        border-radius: 50%;
        aspect-ratio: 1;
    }
    
    .user-details {
        display: none;
    }
    
    .mobile-chat-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        order: 2;
    }
    
    .dash-disconnect-btn span {
        display: none;
    }
    
    .dash-disconnect-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        order: 3;
    }
    
    .dash-main {
        padding-top: 75px;
        padding-bottom: 20px;
    }
    
    .dash-layout {
        padding: 0 12px;
    }
    
    .dash-panels {
        grid-template-columns: 1fr;
    }
    
    .dash-panels.mobile-hidden {
        display: none;
    }
    
    .dash-panel {
        display: none;
    }
    
    .dash-panel.active {
        display: block;
    }
    
    .dash-chat {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 70px;
        width: 100%;
        height: auto;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border-color);
        z-index: 100;
        background: var(--bg-card);
            background-color: var(--bg-card);
        opacity: 1;
}
    
    .dash-chat.mobile-active {
        display: flex;
    }
    
    .chat-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .panel-content {
        max-height: none;
    }
    
    .wallet-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    
    .dash-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .dash-stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-sub {
        font-size: 0.65rem;
    }
    
    .dash-footer {
        margin-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .dash-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dash-action-buttons {
        grid-template-columns: 1fr;
    }
    
    .deposit-balances {
        grid-template-columns: 1fr;
    }
    
    .history-table-header {
        display: none;
    }
}

.profile-modal {
    max-width: 360px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.profile-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    border: 3px solid rgba(252, 201, 4, 0.3);
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.profile-avatar-upload {
    cursor: pointer;
}

.profile-avatar-upload span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(252, 201, 4, 0.15);
    border: 1px solid rgba(252, 201, 4, 0.3);
    border-radius: 10px;
    color: #FCC904;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.profile-avatar-upload:hover span {
    background: rgba(252, 201, 4, 0.25);
    border-color: #FCC904;
}

.profile-input-group {
    margin-bottom: 20px;
}

.profile-input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.profile-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.profile-input-group input:focus {
    outline: none;
    border-color: #FCC904;
    box-shadow: 0 0 0 3px rgba(252, 201, 4, 0.15);
}

.profile-save-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
	margin-top: 20px;
}

.profile-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 201, 4, 0.4);
}

.usdt-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.wallet-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.wallet-history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(252, 201, 4, 0.3);
}

.history-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.history-item-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.history-item-icon.pending {
    background: rgba(252, 201, 4, 0.15);
    color: #FCC904;
}

.history-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.history-item-status.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.history-item-status.pending {
    background: rgba(252, 201, 4, 0.15);
    color: #FCC904;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 0.6fr 1.5fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.history-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(252, 201, 4, 0.3);
}

.history-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.history-type.roi {
    color: #10B981;
}

.history-type.level {
    color: #8B5CF6;
}

.history-type.rank {
    color: #FCC904;
}

.history-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: #10B981;
}

.history-from {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.history-layer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 15px;
    text-align: center;
}

.history-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

@media (max-width: 768px) {
    .history-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .history-from,
    .history-layer,
    .history-time {
        display: none;
    }
}

.dash-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.dash-history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(252, 201, 4, 0.3);
}

.dash-history-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.dash-history-icon.roi {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.dash-history-icon.level {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

.dash-history-icon.rank {
    background: rgba(252, 201, 4, 0.15);
    color: #FCC904;
}

.dash-history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dash-history-type {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-history-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.dash-history-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: #10B981;
    flex-shrink: 0;
}

.layer-modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.layer-modal-stat {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.layer-modal-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.layer-modal-stat-value.orange {
    color: #FCC904;
}

.layer-modal-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.layer-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.layer-member-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.layer-member-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(252, 201, 4, 0.3);
}

.layer-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.layer-member-info {
    flex: 1;
    min-width: 0;
}

.layer-member-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.layer-member-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.layer-member-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.layer-member-stat {
    text-align: right;
}

.layer-member-stat-value {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.layer-member-stat-value.green {
    color: #10B981;
}

.layer-member-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.layer-member-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.layer-member-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.layer-member-status.inactive {
    background: rgba(128, 128, 128, 0.15);
    color: #888;
}

.layer-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.layer-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
    display: block;
}

@media (max-width: 600px) {
    .layer-modal-stats {
        grid-template-columns: 1fr;
    }
    
    .layer-member-stats {
        display: none;
    }
}

.withdrawal-modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.withdrawal-modal-stat {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.withdrawal-modal-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.withdrawal-modal-stat-value.orange {
    color: #FCC904;
}

.withdrawal-modal-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.withdrawal-history-table {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.withdrawal-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 0.8fr 1.2fr;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.withdrawal-table-body {
    max-height: 350px;
    overflow-y: auto;
}

.withdrawal-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 0.8fr 1.2fr;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    transition: background 0.2s ease;
}

.withdrawal-table-row:last-child {
    border-bottom: none;
}

.withdrawal-table-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.wth-col.amount {
    font-weight: 600;
    color: #fff;
}

.wth-col.wallet {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wth-col.date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.status-badge.pending {
    background: rgba(252, 201, 4, 0.15);
    color: #FCC904;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.tx-link {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-family: monospace;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tx-link:hover {
    color: #fff;
}

.tx-link i {
    font-size: 0.65rem;
    margin-left: 4px;
}

.tx-pending {
    font-size: 0.8rem;
    color: #FCC904;
    font-style: italic;
}

.tx-failed {
    font-size: 0.75rem;
    color: #EF4444;
}

@media (max-width: 768px) {
    .withdrawal-modal-stats {
        grid-template-columns: 1fr;
    }
    
    .withdrawal-table-header {
        display: none;
    }
    
    .withdrawal-table-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .wth-col.wallet,
    .wth-col.tx {
        display: none;
    }
}

.cycles-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.cycles-overview-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.cycles-overview-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 202, 4, 0.3);
}

.cycles-section {
    margin-bottom: 20px;
}

.cycles-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cycles-section-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.cycles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cycle-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.cycle-item:hover {
    border-color: rgba(255, 202, 4, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

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

.cycle-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.cycle-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.cycle-badge.completed {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
}

.cycle-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cycle-item-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
}

.cycle-amount {
    text-align: center;
    padding-right: 16px;
    border-right: 1px solid var(--border-color);
}

.cycle-amount-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cycle-amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cycle-progress-info {
    flex: 1;
}

.cycle-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cycle-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.cycle-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #FCC904, #CEB15C);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.cycle-progress-fill.completed {
    background: linear-gradient(135deg, #10B981, #34d399);
}

.cycle-earnings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}

.cycle-earning-item {
    text-align: right;
}

.earning-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.earning-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.earning-value.orange {
    color: #FCC904;
}

.cycles-modal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.cycles-modal-stat {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.cycles-modal-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cycles-modal-stat-value.orange {
    color: #FCC904;
}

.cycles-modal-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cycles-modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cycles-modal-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.cycles-modal-item.completed {
    opacity: 0.8;
}

.cycles-modal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cycles-modal-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cycles-modal-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cycles-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.cycles-modal-label {
    color: var(--text-secondary);
}

.cycles-modal-value {
    font-weight: 600;
}

.cycles-modal-value.orange {
    color: #FCC904;
}

.cycles-modal-value.green {
    color: #10B981;
}

.cycle-progress-bar.modal-bar {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .cycles-overview {
        grid-template-columns: 1fr;
    }
    
    .cycle-item-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cycle-amount {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
    }
    
    .cycle-earnings {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 12px;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .cycle-earning-item {
        text-align: center;
    }
    
    .cycles-modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* Referral link (shown after first deposit) */
.referral-link-area {
    margin-top: 10px;
}

.referral-link-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.referral-link-row input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
}

.btn-copy {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 202, 4, 0.35);
    background: rgba(255, 202, 4, 0.15);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
    white-space: nowrap;
}

.btn-copy:hover {
    background: rgba(255, 202, 4, 0.22);
}

.btn-copy:active {
    transform: translateY(1px);
}


.deposit-warning {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.12);
    border: 1px solid rgba(255, 77, 79, 0.35);
    border-radius: 8px;
}

.deposit-warning.hidden {
    display: none;
}


.deposit-error {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 60, 60, 0.15);
  color: #ff4d4f;
  font-size: 14px;
  border: 1px solid rgba(255, 60, 60, 0.4);
}

.deposit-error.hidden {
  display: none;
}


/* ===== Live Chat Threads + Verified Badge ===== */
.verified-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  margin-left:6px;
  border-radius:50%;
  font-size:11px;
  line-height:1;
  background: rgba(0, 200, 255, .18);
  border: 1px solid rgba(0, 200, 255, .35);
}

.chat-placeholder{
  padding: 18px;
}

.chat-loading{
  padding: 18px;
  opacity: .85;
}

.chat-thread-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding: 12px 10px;
}

.chat-thread-section{
  display: inline-block;
  margin: 10px 6px 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  opacity: 1;
  color: #0b1a12;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  color: #10B981;
}

.chat-thread-empty{
  padding: 5px 12px;
  opacity: .75;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border-radius: 20px; 
}

.chat-thread-item{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  text-align:left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 10px;
  cursor:pointer;
}

.chat-thread-item:hover{
  background: rgba(255,255,255,0.06);
}

.chat-thread-emoji{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.chat-thread-avatar{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;

  position: relative;
  overflow: visible;

  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.chat-thread-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display:block;
}


/* Live chat thread: trash button UNDER avatar */
.chat-thread-avatar{
  position: relative;
  overflow: visible !important; /* чтобы кнопка могла выйти вниз */
}

.chat-thread-avatar img{
  border-radius: 12px; /* чтобы картинка оставалась "скруглённой" */
}

/* сама корзина */
.chat-thread-delete-btn{
  position: absolute;
  left: 50%;
  bottom: -10px;               /* под аватаром */
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}

.chat-thread-delete-btn i{
  font-size: 10px;
  line-height: 1;
}

.chat-thread-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

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

.chat-thread-title{
  font-weight: 600;
  font-size: 14px;
}

.chat-thread-sub{
  font-size: 12px;
  opacity: .75;
}

.chat-connect-btn{
  background: rgba(0, 200, 255, .18);
  border: 1px solid rgba(0, 200, 255, .35);
  padding: 8px 12px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

/* Profile modal meta */
.profile-meta{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.profile-meta-row{
  display:flex;
  gap:8px;
  font-size: 12px;
  padding: 4px 0;
}
.profile-meta-label{ opacity:.7; }
.profile-meta-value{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.profile-avatar-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
}


/* Inline action feedback (success/error) */
.cf-inline-alert{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}
.cf-inline-alert.hidden{
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.cf-inline-alert.success{
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: rgba(209, 250, 229, 0.95);
}
.cf-inline-alert.error{
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: rgba(254, 226, 226, 0.95);
}
.cf-inline-alert.info{
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: rgba(219, 234, 254, 0.95);
}
.cf-inline-alert .icon{
  margin-top: 1px;
  opacity: .95;
}


/* ===== CF Page Loader ===== */
.cf-page-loader{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(10,10,14,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity .35s ease, visibility .35s ease;
}
.cf-page-loader.is-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.cf-page-loader__card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  padding:22px 24px;
  border-radius:18px;
  background:rgba(16,16,22,.55);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}
.cf-page-loader__logo{
  width:86px;
  height:86px;
  object-fit:contain;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
}
.cf-page-loader__spinner{
  width:42px;
  height:42px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.85);
  animation: cfSpin .9s linear infinite;
}
@keyframes cfSpin { to { transform: rotate(360deg); } }
.cf-page-loader__text{
  font-size:13px;
  letter-spacing:.2px;
  opacity:.85;
}

/* ===== Scroll to top ===== */
.cf-scroll-top{
  position:fixed;
  right:18px;
  bottom:20px;
  z-index:1200;
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(16,16,22,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color:rgba(255,255,255,.92);
  font-size:20px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 16px 38px rgba(0,0,0,.35);
  transform: translateY(12px);
  opacity:0;
  pointer-events:none;
  transition: opacity .25s ease, transform .25s ease;
}
.cf-scroll-top.is-visible{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.cf-scroll-top:hover{
  transform: translateY(-2px);
}


@media (max-width: 768px) {
    .wallet-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 340px) {
    .wallet-stats {
        grid-template-columns: 1fr;
    }
}


/* ===== Mobile: lock background scroll when chat is open ===== */
body.cf-scroll-locked{
  overflow:hidden !important;
  touch-action: none;
}

/* Prevent scroll chaining/bounce from chat to page */
.dash-chat,
.chat-messages{
  overscroll-behavior: contain;
}


/* ===== Founder badge near Disconnect ===== */
.cf-founder-badge{
  display:none;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  margin-right:10px;
  font-size:12px;
  line-height:1;
  font-weight:900;
  background: rgba(255, 204, 0, 0.95);
  color: rgba(0,0,0,0.92);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
}
.cf-founder-badge.is-visible{ display:inline-flex; }



/* ================================
   LIVE CHAT UI PATCH (append)
   - Bigger white text
   - Avatar images constrained (no giant logo)
   - Verified badge: yellow circle + black check
   ================================ */

/* Make chat feel more "dynamic" + readable */
.chat-messages{
  gap: 16px; /* was 14px */
}
.message-content{
  border-radius: 14px;
  padding: 12px 16px; /* bigger bubble */
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255, 202, 4, 0.14);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.chat-message.sent .message-content,
.chat-message.own .message-content{
  background: rgba(252, 201, 4, 0.16);
  border-color: rgba(252, 201, 4, 0.35);
  box-shadow: 0 12px 34px rgba(252, 201, 4, 0.10);
}

/* Sender line bigger */
.message-sender,
.message-author{
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
}

/* Message text bigger + white */
.message-text{
  font-size: 1.02rem;     /* was ~0.85rem */
  line-height: 1.55;
  color: rgba(255,255,255,0.92); /* was muted */
  font-weight: 600;
}

/* Time a bit clearer */
.message-time{
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}

/* ===== FIX: Message avatar image must NEVER overflow ===== */
.message-avatar{
  width: 42px;   /* a bit bigger */
  height: 42px;
  border-radius: 12px;
  overflow: hidden;              /* <<< critical */
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  border: 1px solid rgba(255, 202, 4, 0.22);
}

.message-avatar span{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  color: #0b0b0b;
  background: linear-gradient(135deg, #FFCA04, #CEB15C);
}

.message-avatar img{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;             /* <<< critical */
  border-radius: 12px;
}

/* Same fix for thread list avatars */
.chat-thread-avatar{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;              /* <<< critical */
  border: 1px solid rgba(255, 202, 4, 0.18);
}
.chat-thread-avatar img{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;             /* <<< critical */
}

/* ===== VERIFIED BADGE: yellow circle + black check ===== */
/* You currently have it blue here: .verified-badge {...} :contentReference[oaicite:2]{index=2} */
.verified-badge{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFCA04, #CEB15C) !important;
  border: 1px solid rgba(255, 202, 4, 0.65) !important;
  color: #0b0b0b !important;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55), 0 10px 18px rgba(0,0,0,0.25);
}

/* Optional: make chat input feel punchier */
.chat-input{
  font-size: 1rem;
  font-weight: 650;
}
.chat-send-btn{
  box-shadow: 0 10px 22px rgba(252, 201, 4, 0.18);
}
.chat-send-btn:hover{
  transform: translateY(-1px);
}


/* ================================
   FINAL CHAT/UI POLISH PATCH
   - Fix avatars in circles (header + profile modal + chat)
   - Make thread list brighter
   - Verified badge yellow+black
   - Back button visible only when needed (JS sets display)
   ================================ */

/* ===== Header avatar circle (top right profile) ===== */
.user-avatar,
#userAvatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;                 /* <<< critical */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  border: 1px solid rgba(255, 202, 4, 0.28);
}
.user-avatar.has-image,
#userAvatar.has-image{
  background-size: cover;
}

/* If inside avatar.js you render <img> instead of bg */
.user-avatar img,
#userAvatar img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ===== Profile modal avatar preview circle ===== */
#profileAvatarPreview{
  border-radius: 50% !important;
  overflow: hidden !important;      /* <<< critical */
  background-size: cover;
  background-position: center;
}
#profileAvatarPreview img{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover !important;
}

/* ===== Chat list section titles: brighter + bold ===== */
.chat-thread-section{
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-top: 14px;
  margin-bottom: 10px;
  text-transform: none;
}

/* Chat thread item richer */
.chat-thread-item{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255, 202, 4, 0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.30);
}
.chat-thread-item:hover{
  border-color: rgba(255, 202, 4, 0.35);
  transform: translateY(-1px);
}

/* Thread name bigger + white */
.chat-thread-title{
  color: #fff;
  font-weight: 850;
  font-size: 1.02rem;
}
.chat-thread-sub{
  color: rgba(255,255,255,0.68);
  font-weight: 650;
  font-size: 0.82rem;
}

/* ===== Fix avatar images in chat bubbles (no giant logo) ===== */
.message-avatar,
.chat-thread-avatar{
  overflow: hidden;                 /* <<< critical */
}
.message-avatar img,
.chat-thread-avatar img{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover !important;
}

/* ===== Verified badge: yellow circle + black check ===== */
.verified-badge{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFCA04, #CEB15C) !important;
  border: 1px solid rgba(255, 202, 4, 0.65) !important;
  color: #0b0b0b !important;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55), 0 10px 18px rgba(0,0,0,0.25);
}

/* ===== Back button visibility (JS toggles display) ===== */
.chat-back-btn{
  display: none;  /* default hidden; JS shows in DM */
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 202, 4, 0.18);
  background: rgba(255,255,255,0.06);
  color: #FFCA04;
}
.chat-back-btn:hover{
  border-color: rgba(255, 202, 4, 0.45);
  transform: translateY(-1px);
}

/* === FIX: Header avatar conflict === */
.user-avatar,
#userAvatar{
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  overflow: hidden !important;      /* <<< главное */
  background-size: cover !important;
  background-position: center !important;
  display: block !important;
}

/* If avatar rendered as <img> inside */
.user-avatar img,
#userAvatar img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}


/* === FIX: Founder checkmark above avatar === */
.user-avatar.is-founder::after{
  z-index: 50 !important;          /* <<< поднимаем над аватаром */
  pointer-events: none;
}

/* Подстраховка: сам аватар ниже галочки */
.user-avatar{
  position: relative;
  z-index: 1;
}


/* === FIX: Founder badge clipped by overflow:hidden === */
.user-avatar.is-founder::after{
  right: 3px !important;          /* было -4px -> обрезалось */
  bottom: 3px !important;         /* было -4px -> обрезалось */
  z-index: 9999 !important;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.65), 0 10px 18px rgba(0,0,0,0.25);
}



/* ================================
   FIX #1: Founder check near avatar (not behind / not clipped)
   ================================ */

/* ВАЖНО: для аватара в шапке нам НЕ нужен overflow:hidden.
   Кроп делает background-size:cover или img + border-radius. */
.dash-user-profile .user-avatar,
.dash-user-profile #userAvatar{
  overflow: visible !important;
  position: relative !important;
  z-index: 5 !important;
}

/* если внутри аватара рисуется <img> — пусть он будет круглым и кропнутым */
.dash-user-profile .user-avatar img,
.dash-user-profile #userAvatar img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

/* сама галочка поверх всего */
.dash-user-profile .user-avatar.is-founder::after{
  right: -4px !important;
  bottom: -4px !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}



/* ================================
   FIX #2: Back arrow perfectly centered
   ================================ */

.chat-back-btn{
  padding: 0 !important;          /* чтобы ничего не толкало иконку */
  line-height: 0 !important;      /* убираем лишнюю высоту строки */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.chat-back-btn i{
  display: block !important;
  line-height: 1 !important;
  margin: 0 !important;
  transform: translateX(-0.5px);  /* микро-подстройка, убирает “косой” визуал FA */
}



/* Chat: delete (trash) button under avatar */
.message-avatar{
  position: relative;
  overflow: visible;
}

.message-delete-btn{
  position: absolute;
  left: 50%;
  bottom: -27px;
  transform: translateX(-50%);
  width: 45px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.message-delete-btn:hover{
  background: rgba(0,0,0,.75);
}

.message-delete-btn i{
  font-size: 10px;
  line-height: 1;
}



/* Inline confirm under message (instead of browser confirm) */
.cf-inline-confirm{
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 80, 80, 0.28);
  background: rgba(255, 80, 80, 0.10);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 260px;
  color: rgba(255,255,255,0.92);
  font-size: 12px;
}

.cf-inline-confirm__text{
  line-height: 1.2;
  opacity: .95;
}

.cf-inline-confirm__actions{
  display: flex;
  gap: 8px;
}

.cf-inline-confirm__btn{
  border: 0;
  outline: none;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* OK (зелёный) */
.cf-inline-confirm__btn.cf-ok{
  background: rgba(35, 220, 120, 0.22);
  border: 1px solid rgba(35, 220, 120, 0.35);
  color: rgba(255,255,255,0.95);
}

/* Cancel (серый/красный) */
.cf-inline-confirm__btn.cf-cancel{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}

.cf-inline-confirm__btn:hover{
  filter: brightness(1.12);
}

/* ===== FIX: chat send button returns back after closing error ===== */
.chat-input-container{
  position: relative; /* якорь для абсолютной ошибки */
}

/* Ошибка рядом с кнопкой: НЕ должна двигать layout */
.chat-input-error,
.chat-send-error,
.cf-chat-error{
  position: absolute;
  right: 16px;
  bottom: 76px;          /* подними над кнопкой/инпутом (подстрой при необходимости) */
  z-index: 50;
  max-width: 240px;
}

/* Если у ошибки есть крестик/close — пусть он не меняет размеры контейнера */
.chat-input-error.hidden,
.chat-send-error.hidden,
.cf-chat-error.hidden{
  display: none !important; /* важно: не opacity */
}

/* Подстраховка: если кто-то добавил transform/margin к кнопке */
.chat-send-btn{
  transform: none !important;
  margin-right: 0 !important;
}


/* ================================
   Responsive FIX: buttons don't "fly" on small widths
   ================================ */

/* 1) Grid becomes truly elastic */
.dash-action-buttons,
.wallet-card-actions{
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* 2) Allow children to shrink inside grid (critical!) */
.dash-action-btn,
.wallet-btn{
  min-width: 0;
}

/* 3) Referral link row: allow wrap instead of pushing layout */
.referral-link-row{
  flex-wrap: wrap;               /* was nowrap via default */
}

.referral-link-row input{
  min-width: 0;                  /* allow shrinking */
  flex: 1 1 220px;               /* can wrap nicely */
}

.btn-copy{
  flex: 0 0 auto;
}

/* 4) When it gets narrower — stack actions, keep everything aligned */
@media (max-width: 560px){
  .dash-action-buttons,
  .wallet-card-actions{
    grid-template-columns: 1fr !important;
  }

  .referral-link-row input{
    flex: 1 1 100%;
  }

  .btn-copy{
    width: 100%;
    justify-content: center;
  }
}


/* Hide number input arrows (spinners) in ROI Wallet + Network Reward Wallet */
.wallet-card input[type="number"]::-webkit-outer-spin-button,
.wallet-card input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wallet-card input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
  appearance: textfield;
}

.registration-referral .referral-id[data-frontman="1"]::after{
  content:" ✔";
  color: inherit;
  font-weight: 800;
}
