/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cor-primaria: #3B5998;
    --cor-secundaria: #5B7FAF;
    --cor-fundo: #E9EBEE;
    --cor-branco: #FFFFFF;
    --cor-texto: #1c1e21;
    --cor-texto-claro: #666;
    --sombra-card: 0 1px 3px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    background-color: var(--cor-fundo);
    font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--cor-texto);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-bottom: 60px; /* Espaço para nav mobile */
}

.container-full {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== BARRA SUPERIOR ==================== */
.barra-superior {
    background: linear-gradient(to bottom, var(--cor-secundaria), var(--cor-primaria));
    color: white;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    height: 56px;
}

.barra-superior .container-full {
    display: flex;
    padding: 0 15px 0 50px;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 10px;
}

.logo-search {
    display: flex;
    align-items: center;
    margin-left: 0;
    gap: 10px;
    flex-shrink: 0;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px #1F3A5A;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo span {
    color: #FFD966;
    font-style: italic;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    height: 36px;
    transition: var(--transition);
}

.search-box input {
    border: none;
    padding: 8px 12px;
    width: 180px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.search-box button {
    background: #f5f5f5;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.nav-principal {
    display: flex;
    gap: 2px;
}

.nav-principal a {
    color: #D8DFEA;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 13px;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-principal a:hover,
.nav-principal a.ativo {
    background: rgba(255,255,255,0.15);
    color: white;
}

.badge {
    background: #FF4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    position: absolute;
    top: 2px;
    right: 2px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.notificacoes {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
}

.badge-notif {
    background: #FF4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    position: absolute;
    top: -2px;
    right: -2px;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: #ffb347;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-avatar-mini {
    display: flex;  
    align-items: center;
    padding: 2px 4px;
    gap: 3px;
    margin: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-avatar-mini:hover {
    background: rgba(255,255,255,0.1);
}

.user-name-text {
    font-size: 13px;
    font-weight: bold;
}

.seta {
    font-size: 10px;
}

/* ==================== MENU MOBILE ==================== */
.menu-mobile-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 15px;
    z-index: 1001;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.ativo {
    display: block;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.layout-principal {
    display: flex;
    max-width: 1200px;
    margin: 70px auto 20px;
    padding: 0 15px;
    gap: 15px;
}

/* ==================== SIDEBAR ESQUERDA ==================== */
.sidebar-esquerda {
    width: 250px;
    flex-shrink: 0;
}

.menu-lateral {
    background: var(--cor-branco);
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-card);
    overflow: hidden;
}

.perfil-resumo {
    text-align: center;
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
}

.avatar-medio img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.perfil-resumo h3 {
    margin: 10px 0 3px;
    color: #2B4B7A;
    font-size: 15px;
}

.status {
    color: var(--cor-texto-claro);
    font-style: italic;
    font-size: 12px;
}

.links-rapidos {
    list-style: none;
    margin: 0;
}

.links-rapidos li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: var(--transition);
    font-weight: bold;
    font-size: 14px;
}

.links-rapidos li:last-child a {
    border-bottom: none;
}

.links-rapidos li.ativo a,
.links-rapidos li a:hover {
    background: #E8F0FE;
    color: var(--cor-primaria);
    border-left: 3px solid var(--cor-primaria);
}

.contador {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

.amigos-online {
    padding: 15px;
}

.amigos-online h4 {
    font-size: 12px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amigo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
}

.bolinha {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
}

.bolinha.verde {
    background: #4CAF50;
}

/* ==================== CONTEÚDO CENTRAL ==================== */
.conteudo-central {
    flex: 1;
    min-width: 0;
}

.card {
    background: var(--cor-branco);
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-card);
    margin-bottom: 15px;
}

.status-updater {
    padding: 15px;
}

.updater-header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.avatar-mini-post img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.input-area {
    flex: 1;
    min-width: 0;
}

.input-area textarea {
    width: 100%;
    border: 1px solid #ccd0d5;
    border-radius: 20px;
    padding: 12px 15px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #f5f6f7;
    outline: none;
    transition: var(--transition);
}

.input-area textarea:focus {
    border-color: var(--cor-primaria);
    background: white;
}

.updater-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ebee;
    flex-wrap: wrap;
    gap: 5px;
}

.acoes-grupo {
    display: flex;
    gap: 5px;
}

.btn-anexo {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-anexo:hover {
    background: #f0f0f0;
}

.btn-publicar {
    background: #4A6EA8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-publicar:hover {
    background: #3C5C91;
    transform: translateY(-1px);
}

/* ==================== POSTS ==================== */
.post {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.post-user-info {
    font-size: 13px;
}

.post-user-name {
    font-weight: bold;
    color: var(--cor-primaria);
}

.post-tempo {
    color: #999;
    font-size: 11px;
}

.post-conteudo {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
}

.post-imagem {
    max-width: 100%;
    border-radius: var(--border-radius);
    margin: 10px 0;
    height: auto;
}

.post-acoes {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #e9ebee;
    font-size: 13px;
    color: var(--cor-texto-claro);
    flex-wrap: wrap;
}

.post-acoes span {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-acoes span:hover {
    background: #f0f2f5;
}

.post-comentarios {
    margin-top: 10px;
}

.novo-comentario input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

/* ==================== SIDEBAR DIREITA ==================== */
.sidebar-direita {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-direita .card {
    padding: 15px;
}

.sidebar-direita h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ebee;
    padding-bottom: 10px;
}

.lista-comunidades {
    list-style: none;
}

.lista-comunidades li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.lista-comunidades li:hover {
    color: var(--cor-primaria);
}

.niver-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
}

.stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.stat-item {
    flex: 1;
}

.stat-numero {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--cor-primaria);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
}

/* ==================== LOADER ==================== */
.carregando {
    text-align: center;
    padding: 20px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loader-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid var(--cor-primaria);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== NAVEGAÇÃO MOBILE INFERIOR ==================== */
.mobile-nav-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    padding: 5px;
    transition: var(--transition);
    gap: 3px;
}

.mobile-nav-item.ativo {
    color: var(--cor-primaria);
}

.mobile-nav-icon {
    font-size: 22px;
}

.mobile-nav-label {
    font-weight: bold;
}

/* ==================== RESPONSIVIDADE ==================== */

/* Tablet - 768px a 1024px */
@media (max-width: 1024px) {
    .sidebar-direita {
        display: none;
    }
    
    .nav-principal a {
        padding: 10px 10px;
        font-size: 12px;
    }
    
    .search-box input {
        width: 140px;
    }
}

/* Mobile - até 768px */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        font-size: 15px;
    }
    
    /* Mostrar menu mobile */
    .menu-mobile-btn {
        display: block;
    }
    
    /* Esconder navegação desktop */
    .nav-principal {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--cor-primaria);
        flex-direction: column;
        padding: 10px;
        z-index: 998;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    
    .nav-principal.ativo {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .nav-principal a {
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 15px;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Links mobile-only */
    .mobile-only {
        display: block !important;
    }
    
    .nav-principal.ativo .mobile-only {
        display: block !important;
        padding: 12px 20px;
        color: #fff;
        text-decoration: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 16px;
        transition: background 0.2s;
    }
    
    .nav-principal.ativo .mobile-only:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .nav-principal.ativo .mobile-only.ativo {
        background: rgba(255,255,255,0.2);
        font-weight: bold;
    }
    
    /* Esconder sidebar esquerda */
    .sidebar-esquerda {
        display: none;
    }
    
    /* Layout principal em coluna */
    .layout-principal {
        flex-direction: column;
        margin-top: 65px;
        padding: 10px;
        gap: 10px;
    }
    
    .conteudo-central {
        max-width: 100%;
        width: 100%;
    }
    
    .barra-superior {
        height: 50px;
    }

    .barra-superior .container-full {
        padding: 0 10px 0 50px;
        justify-content: space-between;
        gap: 5px;
    }
    
    .logo-search {
        gap: 5px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .search-box {
        height: 32px;
    }
    
    .search-box input {
        width: 100px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .user-name-text {
        display: none;
    }
    
    .user-menu {
        gap: 5px;
        flex-shrink: 0;
        margin-right: 0 !important;
        padding-right: 0 !important;
        min-width: auto;
    }
    
    .notificacoes {
        font-size: 17px;
        padding: 2px;
        margin: 0;
    }
    
    /* Mostrar navegação inferior mobile */
    .mobile-nav-bottom {
        display: flex;
    }
    
    /* Ajustes dos cards */
    .card {
        margin-bottom: 10px;
    }
    
    .status-updater {
        padding: 12px;
    }
    
    .updater-header {
        gap: 8px;
    }
    
    .avatar-mini-post img {
        width: 36px;
        height: 36px;
    }
    
    .input-area textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-anexo {
        font-size: 18px;
        padding: 6px 10px;
    }
    
    .btn-publicar {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Posts */
    .post {
        padding: 12px;
    }
    
    .post-acoes {
        gap: 5px;
    }
    
    .post-acoes span {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Dropdown user */
    .user-dropdown {
        position: fixed;
        top: 56px;
        right: 10px;
        min-width: 250px;
        max-width: 90vw;
    }
}

/* Mobile pequeno - até 480px */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .barra-superior {
        height: 50px;
    }
    
    .layout-principal {
        margin-top: 58px;
        padding: 8px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .search-box {
        display: none;
    }
    
    .menu-mobile-btn {
        top: 10px;
        left: 10px;
        font-size: 20px;
        width: 28px;
        height: 28px;
    }
    
    .barra-superior .container-full {
    padding: 0 55px 0 45px;
}
    
    .status-updater {
        padding: 10px;
    }
    
    .avatar-mini-post img {
        width: 32px;
        height: 32px;
    }
    
    .post-acoes span {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .mobile-nav-bottom {
        padding: 5px 0;
    }
    
    .mobile-nav-icon {
        font-size: 20px;
    }
    
    .mobile-nav-label {
        font-size: 10px;
    }
    
    .nav-principal {
        top: 50px;
    }
}

/* ==================== MODAIS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal-overlay.ativo {
    display: flex;
}

.modal-upload {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h3 {
    color: #333;
    font-size: 16px;
}

.btn-fechar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-fechar:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cancelar,
.btn-upload {
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    border: none;
    transition: var(--transition);
}

.btn-cancelar {
    background: #f0f0f0;
    color: #333;
}

.btn-upload {
    background: #4A6EA8;
    color: white;
}

.btn-upload:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 90vw;
}

.toast {
    background: white;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #27ae60;
    font-size: 14px;
}

.toast.erro {
    border-left-color: #e74c3c;
}

.toast.info {
    border-left-color: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icone {
    font-size: 20px;
}

.toast-mensagem {
    flex: 1;
    font-size: 13px;
}

.toast-fechar {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

@media (max-width: 768px) {
    .toast-container {
        top: 65px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* ==================== UPLOAD ==================== */
.upload-area-grande {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
    margin-bottom: 15px;
}

.upload-area-grande:hover,
.upload-area-grande.arrastando {
    border-color: var(--cor-primaria);
    background: #f0f4f8;
}

.upload-icone-grande {
    font-size: 40px;
    margin-bottom: 10px;
}

.upload-texto {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.upload-subtexto {
    font-size: 12px;
    color: #999;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remover {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== FORMULÁRIOS ==================== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 13px;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--cor-primaria);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* Progresso upload */
.progresso-upload {
    margin: 15px 0;
    display: none;
}

.progresso-barra {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progresso-preenchimento {
    height: 100%;
    background: linear-gradient(90deg, var(--cor-primaria), #4A6EA8);
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.progresso-texto {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* Configurações */
.modal-config {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.config-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
}

.config-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
}

.config-tab.ativo {
    color: var(--cor-primaria);
    border-bottom-color: var(--cor-primaria);
}

.config-content {
    padding: 20px;
}

.config-content .form-group {
    display: none;
}

.config-content .form-group.ativo {
    display: block;
}

.tema-opcoes {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tema-opcao {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.tema-opcao:hover {
    transform: scale(1.1);
}

.tema-opcao.selecionado {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 10px rgba(59, 89, 152, 0.5);
}

/* ==================== DROPDOWN USUÁRIO ==================== */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    min-width: 250px;
    margin-top: 8px;
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.ativo {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.dropdown-user-email {
    font-size: 11px;
    color: #666;
    word-break: break-all;
}

.dropdown-menu {
    list-style: none;
    padding: 8px 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: #f0f4f8;
    color: var(--cor-primaria);
}

.icone-menu {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.dropdown-divider {
    border-top: 1px solid #e0e0e0;
    margin: 5px 0;
}

.dropdown-footer {
    padding: 10px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.btn-sair {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: var(--transition);
}

.btn-sair:hover {
    background: #c0392b;
}

/* ==================== NOTIFICAÇÕES ==================== */
.notificacao-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.notificacao-item:hover {
    background: #f8f9fa;
}

/* ==================== TOUCH OPTIMIZATIONS ==================== */
@media (hover: none) and (pointer: coarse) {
    /* Aumentar áreas de toque */
    .nav-principal a,
    .links-rapidos li a,
    .post-acoes span,
    .btn-anexo,
    .btn-publicar,
    .mobile-nav-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Melhorar feedback de toque */
    .post-acoes span:active,
    .btn-anexo:active,
    .btn-publicar:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    /* Mantemos o tema claro por padrão, mas preparamos para dark mode */
    body.tema-escuro {
        --cor-fundo: #1a1a2e;
        --cor-branco: #16213e;
        --cor-texto: #e0e0e0;
        --cor-texto-claro: #aaa;
    }
}

/* Utilitários de animação */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ==================== CORREÇÃO DO FOOTER ==================== */

/* Remove conflitos anteriores */
html {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    /* Remove o padding-bottom fixo, será ajustado via media query */
}

/* Layout principal expande para empurrar o footer */
.layout-principal {
    flex: 1 0 auto;
    display: flex;
    max-width: 1200px;
    width: 100%;
    margin: 70px auto 0; /* Só margem top, sem margem bottom */
    padding: 0 15px 20px; /* Padding bottom pequeno só para respiro */
    gap: 15px;
}

/* Footer SEMPRE no final */
footer {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}

/* Ajuste para mobile: espaço para a nav inferior */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px; /* Só em mobile, para a nav bottom */
    }
    
    .layout-principal {
        margin-top: 65px;
        padding: 0 10px 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 65px;
    }
    
    .layout-principal {
        margin-top: 58px;
        padding: 0 8px 8px;
    }
}


.mobile-only {
    display: none;
}

/* Botões de excluir - Funciona PC e Mobile */
.btn-excluir-foto,
.btn-excluir-video,
.btn-excluir-scrap,
.btn-excluir-depoimento {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-excluir-foto:hover,
.btn-excluir-video:hover,
.btn-excluir-scrap:hover,
.btn-excluir-depoimento:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Container dos itens precisa ter position:relative */
.foto-item,
.video-item,
.scrap-item,
.depoimento-item {
    position: relative;
}

/* Ajuste para mobile - botão maior para dedos */
@media (max-width: 768px) {
    .btn-excluir-foto,
    .btn-excluir-video,
    .btn-excluir-scrap,
    .btn-excluir-depoimento {
        width: 36px;
        height: 36px;
        font-size: 18px;
        top: 5px;
        right: 5px;
    }
}