/* --- Global Reset & Variables --- */
:root {
    --maroon: #8B0000;
    --gold: #DAA520;
    --bg: #f4f7f6; /* Light grey-blue for a more professional dashboard feel */
    --white: #ffffff;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; 
    background-color: var(--bg); 
    color: #333; 
    display: flex; /* Required for Sidebar Layout */
    min-height: 100vh;
}

/* --- Sidebar Navigation --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--maroon);
    color: white;
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header { 
    padding: 30px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    text-align: center;
}

.nav-links { 
    list-style: none; 
    padding: 20px 0; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.nav-links li {
    padding: 15px 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links li:hover, .nav-links li.active {
    background: rgba(255,255,255,0.1);
    color: var(--gold);
    border-left: 4px solid var(--gold);
}

/* --- Main Content Area --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
    transition: 0.3s ease;
}

/* --- Shared Dashboard Cards --- */
.points-card, .history-card, .profile-header-card, .info-card { 
    background: var(--white); 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    margin-bottom: 30px;
}

.points-card { 
    padding: 40px; 
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    border-left: 8px solid var(--gold);
}

.points-display h1 { 
    font-size: 4rem; 
    color: var(--maroon); 
    margin: 0; 
}

.label { 
    color: #888; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* --- Buttons --- */
.redeem-btn { 
    background: var(--maroon); 
    color: white; 
    border: none; 
    padding: 15px 40px; 
    border-radius: 12px; 
    font-weight: bold; 
    cursor: pointer; 
    font-size: 1rem;
    transition: 0.3s;
}

.redeem-btn:hover { background: #600000; transform: translateY(-2px); }

/* --- Eco-Impact Row --- */
.eco-impact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.eco-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--gold);
    transition: transform 0.3s ease;
    text-align: center;
}

.eco-card:hover { transform: translateY(-5px); }

.progress-container {
    width: 100%;
    background: #eee;
    border-radius: 10px;
    height: 10px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    height: 100%;
    transition: width 1s ease-in-out;
}

/* --- Profile View --- */
.profile-header-card { padding: 40px; text-align: center; }

.avatar-circle {
    width: 100px; height: 100px; 
    background: #f0f0f0; 
    border-radius: 50%;
    margin: 0 auto 15px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 3rem;
}

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

.info-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 15px 0; 
    border-bottom: 1px solid #eee; 
}

/* --- Activity History --- */
.history-card { padding: 25px; }

.history-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 15px; 
    border-radius: 12px; 
    margin-bottom: 12px;
    border: 1px solid #eee;
    border-left: 6px solid #ccc;
}

/* --- Mobile Header & Responsiveness --- */
.mobile-header { display: none; }

@media (max-width: 850px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    
    .main-content { 
        margin-left: 0; 
        width: 100%; 
        padding: 20px; 
        padding-top: 80px; 
    }

    .mobile-header { 
        display: flex; 
        position: fixed; 
        top: 0; 
        width: 100%; 
        height: 60px; 
        background: var(--maroon); 
        color: white; 
        align-items: center; 
        padding: 0 20px; 
        justify-content: space-between;
        z-index: 1001;
    }

    .points-card { flex-direction: column; text-align: center; gap: 20px; }
    .eco-impact-row, .profile-grid { grid-template-columns: 1fr; }
}