/* ==================================================
   DASHBOARD
================================================== */

.dashboard{

    width:100%;

    min-height:calc(100vh - 80px); /* Header height */

    display:flex;

    justify-content:center;

    align-items:center;

    padding:40px 0;

    box-sizing:border-box;
}

.dashboard-wrapper{
    margin-top: 120px !important;

    width:100%;

    max-width:var(--container-width);

    display:grid;

    grid-template-columns:300px 1fr;

    gap:32px;

    align-items:start;

    padding:0 32px;

    margin:auto;
}

/* ==================================================
   SIDEBAR
================================================== */

.dashboard-sidebar{

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    box-shadow:var(--shadow-sm);

    padding:24px;

    position:sticky;

    top:100px;

    height:fit-content;
}

.sidebar-user{

    display:flex;

    flex-direction:column;

    align-items:center;

    text-align:center;

    padding-bottom:24px;

    margin-bottom:24px;

    border-bottom:1px solid var(--border);
}

.avatar{

    width:80px;

    height:80px;

    border-radius:50%;

    background:var(--primary);

    color:#fff;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:var(--fs-xl);

    font-weight:700;

    margin-bottom:16px;
}

.sidebar-user h3{

    color:var(--text);

    font-size:var(--fs-lg);

    margin-bottom:6px;
}

.sidebar-user p{

    color:var(--text-muted);

    font-size:var(--fs-sm);
}

/* ==================================================
   MENU
================================================== */

.dashboard-sidebar nav{

    display:flex;

    flex-direction:column;

    gap:8px;
}

.dashboard-sidebar nav a{

    display:flex;

    align-items:center;

    text-decoration:none;

    color:var(--text);

    padding:14px 18px;

    border-radius:var(--radius-sm);

    transition:var(--transition);
}

.dashboard-sidebar nav a:hover{

    background:var(--surface-3);

    color:var(--primary);
}

.dashboard-sidebar nav a.active{

    background:var(--primary);

    color:#fff;
}

.logout-btn{

    margin-top:24px;

    width:100%;

    padding:14px;

    border:none;

    border-radius:var(--radius-sm);

    background:var(--warning-dark);

    color:#fff;

    cursor:pointer;

    transition:var(--transition);
}

.logout-btn:hover{

    opacity:.9;
}

/* ==================================================
   MAIN
================================================== */

.dashboard-main{

    min-width:0;

    display:flex;

    flex-direction:column;

    gap:24px;
}

.dashboard-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    padding:24px;

    box-shadow:var(--shadow-sm);
}

.dashboard-header h2{

    font-size:var(--fs-xl);

    color:var(--text);

    margin-bottom:6px;
}

.dashboard-header p{

    color:var(--text-muted);
}

.dashboard-body{

    display:flex;

    flex-direction:column;

    gap:24px;
}

/* ==================================================
   STATS
================================================== */

.stats{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:24px;
}

.stat-card{

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    box-shadow:var(--shadow-sm);

    padding:28px;

    transition:var(--transition);
}

.stat-card:hover{

    transform:translateY(-5px);

    box-shadow:var(--shadow-md);

    border-color:var(--primary);
}

.stat-card h2{

    color:var(--primary);

    font-size:var(--fs-2xl);

    margin-bottom:8px;
}

.stat-card span{

    color:var(--text-muted);
}

/* ==================================================
   CARD
================================================== */

.card{

    display:block;
    width:100%;

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    box-shadow:var(--shadow-sm);

    padding:24px;

    text-align:right;
    text-decoration:none;
    color:inherit;

    cursor:pointer;
    font-family:inherit;

    transition:var(--transition);
}

.card:hover{

    transform:translateY(-4px);

    box-shadow:var(--shadow-md);

    border-color:var(--primary);
}

.card h3{

    margin-bottom:20px;

    color:var(--text);
}



/* ==================================================
   TABLE
================================================== */

table{

    width:100%;

    border-collapse:collapse;
}

th{

    text-align:right;

    padding:16px;

    color:var(--text);

    border-bottom:1px solid var(--border);
}

td{

    padding:16px;

    color:var(--text-muted);

    border-bottom:1px solid var(--border);
}

/* ==================================================
   TICKETS
================================================== */

.ticket{

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    padding:24px;

    transition:var(--transition);
}

.ticket+.ticket{

    margin-top:16px;
}

.ticket:hover{

    border-color:var(--primary);
}

.ticket h4{

    margin-bottom:10px;

    color:var(--text);
}

.ticket p{

    color:var(--text-muted);

    margin-bottom:14px;
}

.ticket span{

    display:inline-block;

    padding:6px 14px;

    border-radius:999px;

    background:rgba(212,165,90,.15);

    color:var(--primary);
}

/* ==================================================
   ALERT
================================================== */

.alert-success{
    display: none;

    padding:18px;

    background:color-mix(in srgb, var(--green) 12%, var(--surface));

    color:var(--green);

    border-right:4px solid var(--green);

    border-radius:var(--radius-sm);
}

/* ==================================================
   RESPONSIVE
================================================== */

@media(max-width:1100px){

.dashboard{

    align-items:flex-start;

}

.dashboard-wrapper{

    grid-template-columns:1fr;

    padding:0 20px;

}

.dashboard-sidebar{

    position:relative;

    top:0;
}

}

@media(max-width:768px){

.dashboard-header{

    flex-direction:column;

    align-items:flex-start;

    gap:16px;
}

.stats{

    grid-template-columns:1fr;
}

}


/* ==========================================
   SIDEBAR
========================================== */

.dashboard-sidebar{

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    padding: calc(var(--unit) * 6);

    display: flex;

    flex-direction: column;

    gap: calc(var(--unit) * 6);

    position: sticky;

    top: 100px;

    height: fit-content;
}

/* ==========================================
   USER
========================================== */

.sidebar-user{

    display:flex;

    flex-direction:column;

    align-items:center;

    text-align:center;

    padding-bottom:calc(var(--unit) * 6);

    border-bottom:1px solid var(--border);
}

.avatar{

    width:88px;

    height:88px;

    border-radius:50%;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    display:flex;

    align-items:center;

    justify-content:center;

    color:#fff;

    font-size:var(--fs-xl);

    font-weight:700;

    margin-bottom:18px;

    box-shadow:0 10px 24px rgba(212,165,90,.25);
}

.sidebar-user h3{

    margin:0;

    color:var(--text);

    font-size:var(--fs-lg);
}

.sidebar-user p{

    margin-top:8px;

    color:var(--text-muted);

    font-size:var(--fs-sm);
}

/* ==========================================
   MENU
========================================== */

.dashboard-sidebar nav{

    display:flex;

    flex-direction:column;

    gap:8px;
}

.dashboard-sidebar nav a,
.dashboard-sidebar nav .sidebar-cart-link{

    display:flex;

    align-items:center;

    gap:14px;

    text-decoration:none;

    color:var(--text);

    padding:14px 18px;

    border-radius:14px;

    transition:all .25s ease;

    font-size:var(--fs-md);

    font-weight:500;
}

.dashboard-sidebar nav a:hover,
.dashboard-sidebar nav .sidebar-cart-link:hover{

    background:var(--surface-3);

    color:var(--primary);

    transform:translateX(-4px);
}

.sidebar-cart-link{

    width:100%;

    border:none;

    background:none;

    cursor:pointer;

    font-family:inherit;

    text-align:right;
}

.sidebar-cart-count{

    margin-inline-start:auto;

    min-width:22px;
    height:22px;
    padding:0 6px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:var(--primary);
    color:#fff;

    font-size:11px;
    font-weight:700;

    border-radius:999px;
}

.dashboard-sidebar nav a.active{

    background:var(--primary);

    color:#fff;

    box-shadow:0 10px 25px rgba(212,165,90,.25);
}

/* ==========================================
   DIVIDER
========================================== */

.sidebar-divider{

    height:1px;

    background:var(--border);

    margin:8px 0;
}

/* ==========================================
   LOGOUT
========================================== */

.logout-form{

    margin-top:auto;
}

.logout-btn{

    width:100%;

    border:none;

    border-radius:14px;

    padding:14px;

     background:var(--warning-dark);

    color:#fff;

    font-size:var(--fs-md);

    cursor:pointer;

    transition:.25s;
}

.logout-btn:hover{

    background:var(--warning-dark);

    transform:translateY(-2px);
}

/* ==================================================
   MOBILE DRAWER
================================================== */

.dashboard-sidebar-trigger,
.dashboard-sidebar-close,
.dashboard-sidebar-backdrop{
    display:none;
}

@media(max-width:900px){

    .dashboard-sidebar-trigger{
        display:flex;
        align-items:center;
        gap:10px;

        position:fixed;
        bottom:24px;
        left:50%;
        transform:translateX(-50%);

        padding:14px 26px;

        background:var(--gradient-primary);
        color:#fff;

        border:none;
        border-radius:999px;

        font-size:var(--fs-sm);
        font-weight:600;

        box-shadow:0 12px 28px rgba(184,135,60,.35);

        cursor:pointer;
        transition:transform .25s ease, box-shadow .25s ease;

        /* Below the header's own stacking context (.mobile-header is
           position:fixed with z-index:1000), so the site-wide mobile
           menu correctly covers this button when it's open instead of
           poking through above it. */
        z-index:500;
    }

    .dashboard-sidebar-trigger:hover{
        transform:translateX(-50%) translateY(-3px);
        box-shadow:0 16px 34px rgba(184,135,60,.4);
    }

    .dashboard-sidebar-trigger i{
        font-size:18px;
    }

    .dashboard-sidebar-backdrop{
        display:block;

        position:fixed;
        inset:0;

        background:var(--backdrop);
        backdrop-filter:blur(6px);
        -webkit-backdrop-filter:blur(6px);

        opacity:0;
        visibility:hidden;

        transition:var(--transition);

        z-index:9998;
    }

    .dashboard-sidebar-backdrop.active{
        opacity:1;
        visibility:visible;
    }

    .dashboard-sidebar{
        position:fixed;
        left:0;
        right:0;
        bottom:0;

        width:100%;
        max-width:none;
        max-height:85vh;

        border-radius:var(--radius-lg) var(--radius-lg) 0 0;
        border:none;
        border-top:1px solid var(--border-soft);

        box-shadow:var(--shadow-md);

        transform:translateY(110%);
        transition:transform .4s ease;

        overflow-y:auto;

        z-index:9999;
    }

    .dashboard-sidebar.active{
        transform:translateY(5%);
    }

    .dashboard-sidebar-close{
        display:flex;
        align-items:center;
        justify-content:center;

        position:absolute;
        top:16px;
        left:16px;

        width:34px;
        height:34px;

        background:var(--surface-2);
        border:none;
        border-radius:50%;

        color:var(--text);
        cursor:pointer;

        transition:var(--transition);
    }

    .dashboard-sidebar-close:hover{
        background:var(--border);
    }

    .dashboard-main{
        padding-bottom:100px;
    }
}

/* ==================================================
   CART ITEMS
================================================== */



/* ==================================================
   CHECKOUT BUTTON
================================================== */

.checkout-btn{

    width:100%;

    margin-top:24px;

    padding:16px 24px;

    border:none;

    border-radius:var(--radius-md);

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    color:#fff;

    font-size:var(--fs-md);

    font-weight:600;

    cursor:pointer;

    transition:all .3s ease;

    box-shadow:0 10px 24px rgba(212,165,90,.25);

}

.checkout-btn:hover{

    transform:translateY(-3px);

    box-shadow:0 16px 32px rgba(212,165,90,.35);

}

.checkout-btn:active{

    transform:translateY(0);

}

.checkout-btn:focus{

    outline:none;

    box-shadow:
        0 0 0 4px rgba(212,165,90,.2),
        0 10px 24px rgba(212,165,90,.3);

}

.checkout-btn i{

    margin-left:8px;

}













.card span{
    color:var(--text) ;
}

/* ==================================================
   WISHLIST
================================================== */

.wishlist-remove-form{
    position:absolute;
    top:12px;
    left:12px;

    z-index:5;
}

.wishlist-remove-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    width:36px;
    height:36px;

    border:none;
    border-radius:50%;

    background:var(--surface);
    box-shadow:var(--shadow-sm);

    color:var(--warning-dark);
    font-size:16px;

    cursor:pointer;

    transition:var(--transition);
}

.wishlist-remove-btn:hover{
    transform:scale(1.08);
    box-shadow:var(--shadow-md);
}