/* =========================================
   DASHBOARD / PROFILE STYLES
   ========================================= */

body { background: #f8f8f8; color: #111; font-family: 'Poppins', sans-serif; }

/* HEADER FIX */
#main-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #eee; }

/* LAYOUT GRID */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* SIDEBAR */
.dash-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    height: fit-content;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 100px;
}

.user-brief { text-align: center; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.avatar-wrapper {
    width: 80px; height: 80px; margin: 0 auto 15px;
    border-radius: 50%; overflow: hidden; border: 2px solid #eee;
}
.avatar-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.brief-info h4 { font-family: 'Syne'; margin: 0 0 5px; font-size: 1.1rem; }
.badge-gold {
    background: #fff9c4; color: #fbc02d; padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; display: inline-block;
}

.dash-nav { display: flex; flex-direction: column; gap: 5px; }
.dash-nav a, .logout-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; color: #555; text-decoration: none;
    font-size: 0.95rem; border-radius: 6px; transition: 0.2s;
    background: none; border: none; width: 100%; cursor: pointer; text-align: left; font-family: 'Poppins';
}
.dash-nav a:hover, .dash-nav a.active { background: #f4f4f4; color: #000; font-weight: 600; }
.logout-link { color: #d32f2f; margin-top: 10px; border-top: 1px solid #eee; border-radius: 0; padding-top: 20px; }

/* MAIN CONTENT */
.dash-content { display: flex; flex-direction: column; gap: 25px; }

/* STATS CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card {
    background: #fff; padding: 20px; border-radius: 8px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.icon-box {
    width: 50px; height: 50px; background: #f9f9f9; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 1.2rem; color: #000;
}
.stat-info h3 { margin: 0; font-size: 1.4rem; font-weight: 700; font-family: 'Syne'; }
.stat-info p { margin: 0; color: #888; font-size: 0.85rem; }

/* CONTENT BOXES */
.content-box { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.box-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.box-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; }

/* FORM STYLES */
.profile-pic-row { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.big-avatar { width: 90px; height: 90px; border-radius: 50%; position: relative; }
.big-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #f0f0f0; }
.upload-icon {
    position: absolute; bottom: 0; right: 0; background: #000; color: #fff;
    width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    cursor: pointer; font-size: 0.8rem;
}
.pic-text h4 { margin: 0 0 5px; font-size: 1rem; }
.pic-text p { margin: 0; font-size: 0.8rem; color: #888; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; color: #666; margin-bottom: 8px; }
.form-group input, .form-group select {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px;
    font-family: 'Poppins'; background: #f9f9f9; color: #555;
}
.form-group input:disabled { background: #f0f0f0; cursor: not-allowed; }

.form-actions { display: flex; gap: 15px; justify-content: flex-end; }
.btn-text-blue { background: none; border: none; color: #000; font-weight: 600; cursor: pointer; text-decoration: underline; }
.btn-black-sm { background: #000; color: #fff; padding: 10px 25px; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.btn-outline-sm { background: #fff; border: 1px solid #ddd; padding: 10px 25px; cursor: pointer; border-radius: 4px; }

/* ADDRESS GRID */
.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.address-card {
    border: 1px solid #eee; padding: 20px; border-radius: 6px; position: relative;
}
.addr-tag { background: #eee; font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.addr-details { margin: 15px 0; color: #666; font-size: 0.9rem; line-height: 1.5; }
.addr-actions { display: flex; gap: 15px; font-size: 0.85rem; }
.addr-btn { cursor: pointer; color: #000; font-weight: 600; }
.addr-btn.delete { color: #d32f2f; }

/* MODAL */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000; display: none;
    justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; padding: 30px; width: 400px; border-radius: 8px; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.modal-box input { width: 100%; padding: 12px; border: 1px solid #ddd; margin-bottom: 15px; border-radius: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* FOOTER */
#main-footer { background: #111; color: #fff; padding: 60px 0 20px; margin-top: 60px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-links-group { display: flex; gap: 60px; }
.col ul { list-style: none; padding: 0; }
.col a { color: #aaa; text-decoration: none; line-height: 2; }
.footer-bottom { border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; text-align: center; color: #666; font-size: 0.8rem; }


/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media screen and (max-width: 768px) {
    .dashboard-layout { display: block; margin-top: 20px; }
    
    /* HORIZONTAL SCROLL SIDEBAR */
    .dash-sidebar {
        position: static; padding: 15px; margin-bottom: 20px;
        display: flex; flex-direction: column; gap: 15px;
    }
    .user-brief { display: flex; align-items: center; gap: 15px; text-align: left; border: none; margin: 0; padding: 0; }
    .avatar-wrapper { width: 50px; height: 50px; margin: 0; }
    
    .dash-nav {
        flex-direction: row; overflow-x: auto; white-space: nowrap; padding-bottom: 5px; border-top: 1px solid #eee; padding-top: 15px;
    }
    .dash-nav a { width: auto; background: #f9f9f9; padding: 8px 15px; border-radius: 20px; font-size: 0.85rem; }
    .dash-nav a.active { background: #000; color: #fff; }
    .logout-link { display: none; } /* Hide Logout on Mobile Tab, maybe put in settings */

    /* STACKED CONTENT */
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .address-grid { grid-template-columns: 1fr; }
    
    .footer-top, .footer-links-group { flex-direction: column; gap: 30px; }
}