:root { 
    --primary: #2E7D32; 
    --bg-body: #f0f2f5; 
    --text-color: #333; 
    --card-bg: #fff; 
    --border-color: #ddd; 
    --gold: #FFD700; 
}

.dark-mode { 
    --bg-body: #18191a; 
    --text-color: #e4e6eb; 
    --card-bg: #242526; 
    --border-color: #3e4042; 
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Poppins', sans-serif; 
    background: var(--bg-body); 
    color: var(--text-color); 
    padding-bottom: 80px; 
    transition: 0.3s; 
}

/* --- LAYOUT --- */
.main-layout { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr); 
    width: 100%; 
    max-width: 1400px; 
    margin: 0 auto; 
    gap: 20px; 
    padding: 10px; 
}

@media (min-width: 900px) { 
    .main-layout { 
        grid-template-columns: 280px minmax(0, 1fr) 280px; 
        padding: 20px; 
    } 
    .sidebar-left, .sidebar-right { 
        display: block !important; 
    } 
}

.sidebar-left, .sidebar-right { 
    display: none; 
}

.profile-column { 
    width: 100%; 
    border-radius: 20px; 
    overflow: hidden; 
}

/* HEADER */
.profile-header { 
    height: 220px; 
    position: relative; 
    background: #ccc; 
    overflow: hidden; 
    border-radius: 20px 20px 0 0; 
}

.header-bg-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    position: absolute; 
    top: 0; 
    left: 0; 
    z-index: 1; 
}

.header-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.1)); 
    z-index: 2; 
}

.back-btn { 
    position: absolute; 
    top: 20px; 
    left: 20px; 
    color: white; 
    cursor: pointer; 
    font-size: 24px; 
    z-index: 10; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); 
    background: rgba(0,0,0,0.2); 
    padding: 5px; 
    border-radius: 50%; 
}

.edit-cover-btn { 
    position: absolute; 
    bottom: 15px; 
    right: 15px; 
    background: rgba(0,0,0,0.6); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.5); 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    z-index: 5; 
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px); 
}

body.left-handed-mode .back-btn { 
    left: auto; 
    right: 20px; 
}

body.left-handed-mode .mobile-nav { 
    flex-direction: row-reverse; 
}

/* CARD & REPUTATION */
.profile-card { 
    background: var(--card-bg); 
    width: 100%; 
    border-radius: 0 0 20px 20px; 
    padding: 0 20px 20px 20px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    text-align: center; 
    position: relative; 
    z-index: 5; 
    margin-bottom: 20px; 
}

.avatar-container { 
    position: relative; 
    width: 120px; 
    height: 120px; 
    margin: -60px auto 10px; 
}

.profile-avatar { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    border: 5px solid var(--card-bg); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    object-fit: cover; 
    background: #eee; 
}

.edit-avatar-btn { 
    position: absolute; 
    bottom: 5px; 
    right: 0; 
    background: var(--primary); 
    color: white; 
    border: 2px solid white; 
    border-radius: 50%; 
    width: 32px; 
    height: 32px; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
}

.user-name { 
    font-size: 22px; 
    font-weight: 800; 
    margin: 5px 0; 
    color: var(--text-color); 
}

.user-badge { 
    background: #E8F5E9; 
    color: var(--primary); 
    padding: 4px 12px; 
    border-radius: 15px; 
    font-size: 11px; 
    font-weight: bold; 
    display: inline-block; 
    margin-bottom: 10px; 
}

.dark-mode .user-badge { 
    background: #1b5e20; 
    color: #a5d6a7; 
}

.user-bio { 
    font-size: 13px; 
    color: #666; 
    margin-bottom: 10px; 
    font-style: italic; 
    max-width: 90%; 
    margin-left: auto; 
    margin-right: auto; 
}

.dark-mode .user-bio { 
    color: #aaa; 
}

.user-reputation { 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    background: rgba(255, 215, 0, 0.1); 
    color: #d4af37; 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-weight: bold; 
    font-size: 13px; 
    margin-bottom: 15px; 
    border: 1px solid rgba(255, 215, 0, 0.3); 
}

.stats-row { 
    display: flex; 
    justify-content: space-around; 
    margin: 15px 0; 
    border-top: 1px solid var(--border-color); 
    padding-top: 15px; 
}

.stat-item { 
    display: flex; 
    flex-direction: column; 
}

.stat-val { 
    font-size: 18px; 
    font-weight: 800; 
    color: var(--text-color); 
}

.stat-label { 
    font-size: 11px; 
    color: #999; 
    text-transform: uppercase; 
}

.action-area { 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
    margin-bottom: 10px; 
}

.btn-action { 
    flex: 1; 
    padding: 8px; 
    border-radius: 10px; 
    border: none; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    transition: 0.2s; 
    font-size: 13px; 
}

.btn-msg { background: #2196F3; color: white; }
.btn-edit { background: #e4e6eb; color: #333; }
.dark-mode .btn-edit { background: #3a3b3c; color: #e4e6eb; }

/* TABS */
.tabs-container { 
    background: var(--card-bg); 
    border-radius: 15px; 
    padding: 5px; 
    margin-bottom: 10px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}

.tabs-scroll { 
    display: flex; 
    overflow-x: auto; 
    gap: 15px; 
    scrollbar-width: none; 
    padding: 5px; 
}

.tabs-scroll::-webkit-scrollbar { display: none; }

.tab-item { 
    padding: 8px 10px; 
    font-size: 13px; 
    font-weight: 600; 
    color: #888; 
    cursor: pointer; 
    white-space: nowrap; 
    position: relative; 
    transition: color 0.3s; 
}

.tab-item.active { color: var(--primary); }
.tab-item.active::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background: var(--primary); 
    border-radius: 3px 3px 0 0; 
}

.tab-content { display: none; padding-top: 10px; }
.tab-content.active { display: block; }

/* FEED POSTS */
.feed-post { 
    background: var(--card-bg); 
    border-radius: 15px; 
    padding: 15px; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    border: 1px solid var(--border-color); 
    text-align: left; 
}

.post-header-feed { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 10px; 
}

.post-avatar-feed { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover; 
}

.post-img-feed { 
    width: 100%; 
    border-radius: 10px; 
    margin-top: 10px; 
    object-fit: cover; 
    max-height: 400px; 
    cursor: pointer; 
}

.post-actions-feed { 
    display: flex; 
    gap: 15px; 
    margin-top: 15px; 
    border-top: 1px solid var(--border-color); 
    padding-top: 10px; 
    font-size: 13px; 
    font-weight: bold; 
}

/* DASHBOARD GRÁFICO */
.dash-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-bottom: 20px; 
}

.dash-card { 
    background: var(--card-bg); 
    padding: 20px; 
    border-radius: 15px; 
    text-align: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    border: 1px solid var(--border-color); 
}

.dash-val { 
    font-size: 28px; 
    font-weight: 800; 
    color: var(--primary); 
    margin-top: 5px; 
}

.chart-container { 
    background: var(--card-bg); 
    padding: 15px; 
    border-radius: 15px; 
    border: 1px solid var(--border-color); 
}

/* GALERIA & OUTROS */
.posts-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 2px; 
}

.grid-item { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 1/1; 
    cursor: pointer; 
    overflow: hidden; 
    background: #ddd; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.grid-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.2s; 
}

.grid-item:hover .grid-img { transform: scale(1.05); }

.empty-gallery { 
    text-align: center; 
    color: #ccc; 
    padding: 40px; 
    grid-column: 1/-1; 
}

.friends-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    padding: 10px; 
}

.friend-card { 
    background: var(--card-bg); 
    border-radius: 15px; 
    padding: 15px 10px; 
    text-align: center; 
    cursor: pointer; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

.friend-img { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 10px; 
}

.friend-name { 
    font-size: 13px; 
    font-weight: 600; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

/* ABOUT & MODAIS */
.about-section { 
    background: var(--card-bg); 
    border-radius: 15px; 
    padding: 20px; 
    text-align: left; 
}

.about-item { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 15px; 
    font-size: 13px; 
}

.about-icon { 
    color: #757575; 
    font-size: 24px; 
    margin-right: 15px; 
}

.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 6000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
}

.modal-content { 
    background: var(--card-bg); 
    width: 95%; 
    max-width: 450px; 
    border-radius: 15px; 
    padding: 20px; 
    max-height: 90vh; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
}

.form-group { 
    margin-bottom: 15px; 
    text-align: left; 
}

.form-input { 
    width: 100%; 
    padding: 10px; 
    border-radius: 8px; 
    border: 1px solid #ddd; 
}

.bio-textarea { 
    width: 100%; 
    height: 100px; 
    padding: 10px; 
    border-radius: 10px; 
    resize: none; 
    font-family: inherit; 
}

.lightbox-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.95); 
    z-index: 8000; 
    display: none; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}

.lightbox-img { 
    max-width: 95%; 
    max-height: 60vh; 
    border-radius: 10px; 
    margin-bottom: 20px; 
}

.lightbox-caption { 
    color: white; 
    text-align: center; 
    width: 90%; 
    margin-bottom: 20px; 
}

.lightbox-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    color: white; 
    font-size: 30px; 
    cursor: pointer; 
    background: rgba(255,255,255,0.1); 
    border-radius: 50%; 
    padding: 5px; 
}

.mobile-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 60px; 
    background: var(--card-bg); 
    border-top: 1px solid var(--border-color); 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    z-index: 1000; 
}

.nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    font-size: 10px; 
    color: #999; 
    text-decoration: none; 
}

.nav-item.active { 
    color: var(--primary); 
    font-weight: bold; 
}

/* ==========================================
   UTILITY CLASSES (PARA ZERAR ERROS DO EDITOR)
========================================== */
.ad-wrapper { 
    padding: 0; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    background: var(--card-bg); 
    border-radius: 15px; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    margin-bottom: 15px; 
}
.ad-label { font-size: 10px; color: #999; padding: 5px; text-align: center; background: #f9f9f9; border-bottom: 1px solid var(--border-color); }
.ad-box { 
    padding: 10px; 
    min-height: 250px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: transparent; 
}

/* ==========================================
   RODAPÉ LATERAL (SOBRE, PRIVACIDADE, ETC)
========================================== */
.side-footer {
    padding: 10px 15px;
    font-size: 12px;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

.side-footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.side-footer a:hover {
    text-decoration: underline;
    color: var(--primary);
}

.side-footer p {
    margin: 8px 0 0 0;
    font-size: 11px;
}
.ad-ins { display: block; width: 100%; }
.icon-md { font-size: 20px; }
.icon-sm { font-size: 16px; }
.tab-dash { display: none; color: var(--primary); }
.about-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.m-0 { margin: 0; }
.btn-edit-link { display: none; background: none; border: none; color: var(--primary); font-weight: bold; cursor: pointer; }
.bio-empty { font-style: italic; color: #666; }
.divider { border: 0; border-top: 1px solid var(--border-color); margin: 20px 0; }
.dash-title { margin: 0 0 15px 5px; color: var(--primary); }
.dash-label { font-size: 12px; color: #888; text-transform: uppercase; }
.loading-txt { padding: 10px; text-align: center; }
.mt-0 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 15px; }
.btn-gray { background: #eee; }
.btn-green { background: var(--primary); color: white; }
.nav-map { color: var(--primary); }
.icon-map { font-size: 40px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)); }

/* ==========================================
   VISUAL DAS LATERAIS (PC) E RANKING
========================================== */
.card-side { 
    background: var(--card-bg); 
    border-radius: 15px; 
    padding: 15px; 
    margin-bottom: 15px; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}

.side-title { 
    font-weight: 800; 
    font-size: 15px; 
    margin-bottom: 15px; 
    color: var(--text-color); 
}

/* 🌟 CÓPIA EXATA DA BARRA DO SEU SOCIAL.CSS */
.ranking-list { 
    max-height: 250px; 
    overflow-y: auto; 
    padding-right: 5px; 
}
.ranking-list::-webkit-scrollbar { 
    width: 4px; 
}
.ranking-list::-webkit-scrollbar-thumb { 
    background: #ccc; 
    border-radius: 4px; 
}

.ranking-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 0; 
    border-bottom: 1px solid var(--border-color); 
    color: var(--text-color); 
    cursor: pointer;
    transition: 0.2s;
}
.ranking-item:hover {
    transform: translateY(-2px);
}

.rank-badge { 
    width: 25px; 
    height: 25px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    font-size: 12px; 
    color: white; 
    flex-shrink: 0; 
}

.rank-1 { background: var(--gold); box-shadow: 0 0 10px var(--gold); } 
.rank-2 { background: #C0C0C0; } 
.rank-3 { background: #CD7F32; } 
.rank-4 { background: #E91E63; } 
.rank-5 { background: #9C27B0; } 
.rank-7 { background: #2196F3; }

.rank-score { 
    margin-left: auto; 
    font-size: 12px; 
    font-weight: bold; 
    color: var(--primary); 
}