/* ===============================
   CLIENT DASHBOARD RESET
================================ */

/* Escape theme content constraints */
.client-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Neutralize common theme wrappers */
.client-dashboard * {
    box-sizing: border-box;
}

/* ===============================
   HEADER
================================ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.dashboard-greeting h1 {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

.dashboard-greeting p {
    font-size: 1.05rem;
    max-width: 640px;
    color: #4a5a55;
}

/* ===============================
   USER MENU
================================ */

.dashboard-user-menu {
    position: relative;
    font-weight: 500;
    color: #2f5d50;
    cursor: pointer;
}

.dashboard-user-menu:hover .user-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    padding: .75rem;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transition: all .2s ease;
}

.user-dropdown a {
    display: block;
    padding: .6rem .8rem;
    border-radius: 10px;
    text-decoration: none;
    color: #2f5d50;
}

.user-dropdown a:hover {
    background: #eef5f2;
}

.user-dropdown .logout {
    color: #b23b3b;
}

/* ===============================
   NEXT CONSULTATION
================================ */

.next-consultation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f7f5;
    border-radius: 24px;
    padding: 1.75rem 2rem;
    margin-bottom: 3.5rem;
}

/* ===============================
   DASHBOARD CARDS
================================ */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

.dashboard-card h2 {
    font-size: 1.75rem;
    margin-bottom: .75rem;
}

.dashboard-card p {
    font-size: 1rem;
    color: #4a5a55;
    max-width: 420px;
}

/* ===============================
   BILLING CARD
================================ */

.billing-card {
    max-width: 560px;
}

/* ===============================
   BUTTONS
================================ */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.25rem;
    padding: .75rem 1.75rem;
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
}

.btn-primary {
    background: #4f7f73;
    color: #ffffff;
}

.btn-secondary {
    background: #e6f0ed;
    color: #2f5d50;
}

.btn-secondary.disabled {
    opacity: .5;
    pointer-events: none;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .billing-card {
        max-width: 100%;
    }
}

/* Hide Woo My Account sidebar */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none;
}

/* Let content take full width */
.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    float: none;
}

/* ===============================
   MOBILE ACCOUNT MENU FIX
================================ */

@media (max-width: 768px) {

    .dashboard-user-menu {
        width: 100%;
    }

    .dashboard-user-menu .user-name {
        display: inline-block;
        margin-bottom: .5rem;
    }

    .dashboard-user-menu .user-dropdown {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        padding: 0;
        margin-top: .5rem;
        background: transparent;
    }

    .dashboard-user-menu .user-dropdown a {
        display: inline-block;
        margin-right: 1rem;
        padding: .4rem 0;
        background: none;
    }

    .dashboard-user-menu .user-dropdown .logout {
        color: #b23b3b;
    }
}
