/* =========================
   Premium Profile Dashboard
   ========================= */

.profile-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: 100vh;
}

@media (max-width: 600px) {
    .profile-section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
}

/* Header */
.profile-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.user-welcome h1 {
    font-size: 1.8rem;
    color: var(--third-color);
    margin-bottom: 0.5rem;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.logout-btn-premium {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn-premium:hover {
    background: #ef4444;
    color: white;
}

/* Grid Layout */
.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .profile-header-premium {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .profile-dashboard-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        overflow: hidden;
        /* Prevent grid leakage */
    }

    .member-card {
        padding: 1.25rem;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        margin-bottom: 1rem;
    }

    .stats-row {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1rem !important;
    }

    .stat-box {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .content-box {
        padding: 1.25rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Sidebar & Member Card */
.member-card {
    background: linear-gradient(135deg, var(--third-color) 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    margin-bottom: 1.5rem;
    border: 2px solid #FFD700;
}

.card-chip {
    width: 50px;
    height: 35px;
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    border-radius: 6px;
    margin-bottom: 2rem;
    position: relative;
}

.card-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    width: 60%;
    left: 20%;
    height: 60%;
}

.card-info h3 {
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin: 0.5rem 0 1.5rem;
    text-transform: uppercase;
}

.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    opacity: 0.8;
}

.card-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    /* Increased contrast */
    font-size: 1.5rem;
    letter-spacing: 2px;
}

@media (max-width: 600px) {
    .member-card {
        padding: 1.25rem;
        min-height: 160px;
        width: 100% !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .card-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        word-break: break-all;
    }

    .card-chip {
        width: 35px;
        height: 25px;
        margin-bottom: 0.8rem;
    }

    .card-logo {
        font-size: 0.9rem;
        top: 1rem;
        inset-inline-start: 1rem;
        opacity: 0.3;
    }

    .card-details {
        font-size: 0.75rem;
        flex-direction: row;
        /* Keep horizontal on mobile if content allows, or column if needed */
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

/* Menu */
.profile-menu {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.menu-item {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.menu-item:hover {
    background: var(--very-light-blue);
    color: var(--secondary-color);
}

.menu-item.active {
    background: linear-gradient(90deg, var(--very-light-blue) 0%, white 100%);
    color: var(--secondary-color);
    border-right: 3px solid var(--secondary-color);
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
    border-bottom: 3px solid transparent;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--secondary-color);
}

.stat-box.gold:hover {
    border-bottom-color: #FFD700;
}

.stat-box .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--very-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.stat-box.gold .icon {
    background: #fff8e1;
    color: #FFD700;
}

.stat-box .info h3 {
    font-size: 1.5rem;
    color: var(--third-color);
}

.stat-box .info p {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Content Box */
.content-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    min-height: 300px;
}

.box-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.box-header h2 {
    font-size: 1.4rem;
    color: var(--third-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.auth-btn.small {
    width: auto;
    display: inline-block;
    padding: 0.6rem 1.5rem;
    margin-top: 1rem;
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25d366;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.whatsapp-btn:hover {
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}
