

.header-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 90% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.bg-ultra-soft {
    background-color: #f8f9fe;
}

/* Seção do Avatar */
.avatar-uploader {
    width: 180px;
    height: 180px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    border: 3px solid #007bff;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Badge de Notificação no Botão do Chat */
.chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Badge de Notificação - Pequeno no canto */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
    animation: pulse-notification 2s infinite;
}

/* Badge Grande ao Lado do Botão */
.chat-notification-counter {
    position: fixed;
    bottom: 40px;
    right: 105px;
    background: #ff4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 999;
    animation: slideInRight 0.3s ease-out;
    white-space: nowrap;
}

.chat-notification-counter.show {
    display: flex;
}

.chat-notification-counter i {
    font-size: 16px;
}

.chat-notification-counter .count {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animação de Pulso para Novas Mensagens */
@keyframes pulse-notification {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(255, 68, 68, 0.8);
    }
}

/* Animação no botão quando há notificações */
.chat-btn.has-notification {
    animation: shake-notification 0.5s ease-in-out;
}

@keyframes shake-notification {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Badge nas conversas individuais */
.chat-item .badge {
    font-size: 10px;
    padding: 4px 8px;
    margin-left: auto;
}

/* Efeito visual quando há mensagens não lidas */
.chat-item.has-unread {
    background-color: #f8f9fc;
    border-left: 3px solid #4e73df;
    font-weight: 600;
}

.chat-item.has-unread h6 {
    color: #4e73df;
}

/* Indicador de mensagem não lida */
.unread-indicator {
    width: 10px;
    height: 10px;
    background-color: #ff4444;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Notificação Toast (opcional) */
.chat-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chat-toast .toast-icon {
    width: 40px;
    height: 40px;
    background: #4e73df;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-toast .toast-content {
    flex: 1;
}

.chat-toast .toast-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 14px;
}

.chat-toast .toast-message {
    color: #666;
    margin: 0;
    font-size: 12px;
}

.chat-toast .toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

/* Responsivo */
@media (max-width: 768px) {
    .chat-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .notification-badge {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .chat-notification-counter {
        bottom: 30px;
        right: 85px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .chat-notification-counter i {
        font-size: 14px;
    }
    
    .chat-notification-counter .count {
        font-size: 14px;
    }
    
    .chat-notification-counter .text {
        display: none; /* Esconde o texto em telas pequenas */
    }
}

/* Animação de Fade In/Out para o contador */
.chat-notification-counter {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-notification-counter:not(.show) {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

/* Efeito Hover no contador */
.chat-notification-counter:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(255, 68, 68, 0.6);
    cursor: pointer;
}

/* Pulsação mais suave */
@keyframes pulse-notification {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 15px rgba(255, 68, 68, 0.8);
    }
}
/* ===================================
   BOTÃO FLUTUANTE DO CHAT
   =================================== */
.chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
}

.chat-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.chat-btn:active {
    transform: scale(0.95);
}

.chat-btn i {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ===================================
   BADGE PEQUENO (NO BOTÃO)
   =================================== */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.6);
    animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.5px;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 68, 68, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 20px rgba(255, 68, 68, 0.9);
    }
}

/* ===================================
   CONTADOR GRANDE (AO LADO)
   =================================== */
.chat-notification-counter {
    position: fixed;
    bottom: 42px;
    right: 115px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.45);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 999;
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-notification-counter.show {
    display: flex;
}

.chat-notification-counter:hover {
    transform: translateX(-8px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 68, 68, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.chat-notification-counter:active {
    transform: translateX(-8px) scale(0.98);
}

.chat-notification-counter i {
    font-size: 18px;
    animation: shake-envelope 1.5s ease-in-out infinite;
}

@keyframes shake-envelope {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

.chat-notification-counter .count {
    font-size: 20px;
    font-weight: 800;
    min-width: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: -0.5px;
}

.chat-notification-counter .text {
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   ANIMAÇÃO QUANDO HÁ NOTIFICAÇÕES
   =================================== */
.chat-btn.has-notification {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6), 0 0 0 8px rgba(102, 126, 234, 0.1);
        transform: scale(1.05);
    }
}

/* ===================================
   EFEITO DE "PING" NO BADGE
   =================================== */
.notification-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 68, 68, 0.5);
    transform: translate(-50%, -50%);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ===================================
   VARIAÇÕES DE CORES (OPCIONAL)
   =================================== */
/* Para poucas mensagens (1-5) */
.chat-notification-counter.low-count {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.45);
}

/* Para muitas mensagens (10+) */
.chat-notification-counter.high-count {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.45);
    animation: urgent-shake 0.5s ease-in-out;
}

@keyframes urgent-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===================================
   INDICADOR NA LISTA DE CONVERSAS
   =================================== */
.chat-item.has-unread {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    border-left: 4px solid #667eea;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.chat-item.has-unread:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(5px);
}

.chat-item.has-unread h6 {
    color: #667eea;
    font-weight: 700;
}

/* Ponto vermelho piscante */
.unread-indicator {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    animation: blink-dot 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

@keyframes blink-dot {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.4;
        transform: scale(0.9);
    }
}

/* Badge na conversa individual */
.chat-item .badge {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    margin-left: auto;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    animation: gentle-bounce 2s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ===================================
   RESPONSIVO
   =================================== */
@media (max-width: 768px) {
    .chat-btn {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .chat-btn i {
        font-size: 22px;
    }
    
    .notification-badge {
        min-width: 24px;
        height: 24px;
        font-size: 11px;
        top: -6px;
        right: -6px;
        border-width: 2px;
    }
    
    .chat-notification-counter {
        bottom: 32px;
        right: 90px;
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .chat-notification-counter i {
        font-size: 16px;
    }
    
    .chat-notification-counter .count {
        font-size: 16px;
        padding: 2px 6px;
        min-width: 20px;
    }
    
    .chat-notification-counter .text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chat-notification-counter .text {
        display: none; /* Esconde o texto em telas muito pequenas */
    }
    
    .chat-notification-counter {
        right: 85px;
        padding: 8px 12px;
        gap: 6px;
    }
}

/* ===================================
   MODO ESCURO (OPCIONAL)
   =================================== */
@media (prefers-color-scheme: dark) {
    .chat-notification-counter {
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .notification-badge {
        border-color: rgba(255, 255, 255, 0.9);
    }
    
    .chat-item.has-unread {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    }
}

/* ===================================
   ACESSIBILIDADE
   =================================== */
.chat-btn:focus,
.chat-notification-counter:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 3px;
}

/* Reduz movimento para usuários com preferência */
@media (prefers-reduced-motion: reduce) {
    .chat-btn,
    .notification-badge,
    .chat-notification-counter,
    .unread-indicator {
        animation: none !important;
        transition: none !important;
    }
}

/* ===================================
   EFEITOS ESPECIAIS
   =================================== */
/* Brilho sutil no hover */
.chat-notification-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.chat-notification-counter:hover::before {
    left: 100%;
}

/* Sombra interna no botão */
.chat-btn::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* Efeito de ondulação ao clicar */
.chat-btn:active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}
/* Animação do botão quando há notificações */
.chat-btn.has-notification {
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
    }
}
.avatar-uploader:hover .avatar-overlay {
    opacity: 1;
}

.hover-shine:hover {
    box-shadow: 0 0 30px rgba(0,123,255,0.2);
}

/* Campos de Formulário */
.floating-label {
    position: relative;
    margin-bottom: 2rem;
}

.floating-label label {
    position: absolute;
    top: -10px;
    left: 0;
    opacity: 0.6;
    transition: all 0.3s ease;
    font-size: 0.8em;
}

.border-dynamic {
    border: none !important;
    border-bottom: 2px solid #e9ecef !important;
    transition: all 0.3s ease;
    background-color: transparent;
}

.border-dynamic:focus {
    border-color: #007bff !important;
    box-shadow: none !important;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    top: -20px;
    left: 10px;
    opacity: 1;
    font-size: 0.7em;
    color: #007bff;
}

/* Botões e Interações */
.btn-magnetic {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-magnetic:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.btn-alt-gradient {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-hover-glow:hover {
    box-shadow: 0 0 20px rgba(0,123,255,0.5);
}

.btn-elegant {
    background: #fff;
    color: #007bff;
    border: 2px solid #007bff;
    transition: all 0.3s ease;
}

.btn-elegant:hover {
    background: #007bff;
    color: #fff;
}

.btn-pill {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

.with-arrow {
    padding-right: 2.5rem;
    position: relative;
}

.with-arrow i {
    position: absolute;
    right: 1rem;
    transition: transform 0.3s ease;
}

.with-arrow:hover i {
    transform: translateX(3px);
}

/* Animações */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Utilitários */
.letter-spacing-1 {
    letter-spacing: 1px;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-box {
    background: rgba(0,123,255,0.05);
    border-radius: 12px;
}

:root {
--primary-gradient: linear-gradient(135deg, #1877F2, #166FE5);
--secondary-gradient: linear-gradient(45deg, #00C6FF, #007BFF);
--success-color: #31A24C;
--danger-color: #FF4D4D;
--shadow-color: rgba(0, 123, 255, 0.2);
}
#chatList {
transition: all 0.3s ease;
}
#chatList li {
transition: all 0.3s ease;
transform-origin: top;
}

#chatList li[style*="display: none"] {
transform: scaleY(0);
height: 0;
opacity: 0;
margin: 0;
padding: 0;
border: 0;
}
.chat-item {
transition: background-color 0.2s ease;
}

.message-container {
transition: opacity 0.3s ease;
}
/* Estilo geral do modal-header */
.modal-header-chat {
background: var(--primary-gradient);
border-bottom: 2px solid rgba(255, 255, 255, 0.2);
padding: 20px 25px;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 6px 20px var(--shadow-color);
position: relative;
overflow: hidden;
}



/* Estilo do título */
.modal-header-chat .modal-title {
font-family: 'Poppins', sans-serif;
font-size: 1.6rem;
font-weight: 700;
color: white;
text-transform: uppercase;
letter-spacing: 1.5px;
position: relative;
z-index: 2;
}

/* Efeito de brilho no título */
.modal-header-chat .modal-title::after {
content: '';
position: absolute;
bottom: -8px;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
animation: shineEffect 3s infinite;
}

@keyframes shineEffect {
0% { transform: translateX(-100%) }
100% { transform: translateX(100%) }
}

/* Estilo do botão de fechar */
.modal-header-chat .btn-close {
background: transparent;
border: 0;
font-size: 1.3rem;
color: white;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
z-index: 2;
}

.modal-header-chat .btn-close:hover {
color: var(--danger-color);
transform: rotate(90deg) scale(1.3);
}


.chat-btn {
position: fixed;
bottom: 60px;
right: 40px;
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(135deg, #1877F2, #166FE5);
color: white;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
cursor: pointer;
transition: all 0.3s;
z-index: 1000;
}

.chat-btn:hover {
transform: scale(1.1) rotate(10deg);
box-shadow: 0 12px 25px rgba(24, 119, 242, 0.4);
}

/* ======= CONTAINER GERAL DO CHAT ======= */
.chat-container {
display: flex;
height: 85vh;                /* Ajuste conforme sua necessidade */
border-radius: 12px;
overflow: hidden;
background: #fff;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ======= SIDEBAR (LISTA DE CONTATOS E PESQUISA) ======= */
.conversas-list {
width: 300px;
background: #f0f2f5;        /* Cor inspirada no FB Messenger */
border-right: 1px solid #dee2e6;
display: flex;
flex-direction: column;
overflow-y: auto;
position: relative;
}

/* Cabeçalho do sidebar (título, pesquisa, etc.) */
.conversas-list .sidebar-header {
background: linear-gradient(135deg, #1877F2, #166FE5);
padding: 1rem;
color: #fff;
font-weight: 600;
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.conversas-list .sidebar-header h5 {
margin: 0;
font-size: 1rem;
}

/* Campo de pesquisa */
.conversas-list .search-wrapper {
background: #fff;
padding: 0.5rem 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}

.conversas-list .search-input {
flex: 1;
border-radius: 20px;
border: 1px solid #ccc;
padding: 0.4rem 0.8rem;
font-size: 0.9rem;
outline: none;
transition: all 0.2s;
}

.conversas-list .search-input:focus {
border-color: #1877F2;
}

/* Lista de contatos */
#chatList {
list-style: none;
margin: 0;
padding: 0;
}

/* Estilo para o chat ativo */
.chat-item.active-chat {
background: #e3f2fd; /* Cor de fundo azul clara para o chat ativo */
border-left: 4px solid #1877F2; /* Borda azul à esquerda */
}

/* Estilo para os chats inativos */
.chat-item {
background: #fff; /* Cor de fundo branca para os chats inativos */
border-left: 4px solid transparent; /* Borda transparente para os chats inativos */
}

/* Estilo para o hover nos chats */
.chat-item:hover {
background: #f0f2f5; /* Cor de fundo ao passar o mouse */
}

/* Estilo para o chat ativo ao passar o mouse */
.chat-item.active-chat:hover {
background: #d1e9ff; /* Cor de fundo azul mais clara ao passar o mouse */
}

.chat-item.has-chat {
background: #dfe3ee;
}

.chat-item .user-avatar {
width: 45px;
height: 45px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: relative;
}

.chat-item .online-status {
width: 10px;
height: 10px;
background: #31A24C;
position: absolute;
bottom: 3px;
right: 3px;

border: 2px solid white;
}
.online-status {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
bottom: 0;
right: 0;
border: 2px solid white;
}

.online-status.online {
background: #28a745;
}

.online-status.offline {
background: #6c757d;
}
/* Texto dentro do item de chat */
.chat-item .flex-grow-1 h6 {
margin: 0;
font-size: 0.95rem;
font-weight: 500;
}

.chat-item .flex-grow-1 small {
color: #888;
font-size: 0.8rem;
}

/* ======= ÁREA DO CHAT (DIREITA) ======= */
.chat-area {
flex: 1;
display: flex;
flex-direction: column;
background: #fff;
}

/* Header do chat */
.chat-header {
background: linear-gradient(135deg, #1877F2, #166FE5);
padding: 1rem;
color: #fff;
font-weight: 600;
font-size: 1rem;
display: flex;
align-items: center;
gap: 1rem;
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.chat-header .btn-back {
color: #fff;
font-size: 1.2rem;
background: transparent;
border: none;
display: none; /* Visível só em telas menores */
}

.chat-header h5 {
margin: 0;
}

/* Status online/offline */
#chatStatus {
font-size: 0.8rem;
color: #e0e0e0;
margin-left: 0.5rem;
}

/* Container de mensagens */
.message-container {
flex: 1;
overflow-y: auto;
padding: 1rem 2rem;
background: #fafafa;
background-image: linear-gradient(45deg, #f0f2f5 25%, transparent 25%),
                linear-gradient(-45deg, #f0f2f5 25%, transparent 25%);
background-size: 20px 20px;
background-position: 0 0, 10px 10px;
}
.message-content {
word-wrap: break-word; /* Quebra o texto em várias linhas */
overflow-wrap: break-word; /* Alternativa moderna para word-wrap */

max-width: 100%; /* Garante que o texto não ultrapasse o contêiner */
}

/* Estilo para o parágrafo dentro da mensagem */
.message-content p {
margin: 0; /* Remove margens padrão do parágrafo */
word-break: break-word; /* Quebra palavras longas se necessário */
}

/* Cada mensagem */
.message {
max-width: 60%;
margin: 0.5rem 0;
padding: 0.7rem 1rem;
border-radius: 16px;
position: relative;
font-size: 0.9rem;
line-height: 1.4;
box-shadow: 0 2px 6px rgba(0,0,0,0.05);
animation: messageAppear 0.2s ease-out;
}

.message-received {
background:rgb(218, 218, 218);
color: #333;
border: 1px solid #e4e6eb;
margin-right: auto;
}

.message-sent {
background: #1877F2;
color: #fff;
margin-left: auto;
border: 1px solid #166FE5;
}

/* Horário da mensagem */
.message-time {
display: block;
margin-top: 0.2rem;
font-size: 0.7rem;
text-align: right;
opacity: 0.7;
}

.message-received .message-time {
color: #666;
}

.message-sent .message-time {
color: #fff;
}

/* Animação de aparição */
@keyframes messageAppear {
from {
opacity: 0;
transform: translateY(5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

/* ======= ÁREA DE INPUT (PARTE INFERIOR DO CHAT) ======= */
.chat-input {
background: #f0f2f5;
padding: 1rem;
border-top: 1px solid #dee2e6;
}

.chat-input .input-group {
border-radius: 30px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
display: flex;
align-items: center;
}

.chat-input input[type='text'] {
flex: 1;
border: none;
padding: 0.8rem 1rem;
font-size: 0.9rem;
outline: none;
}

.chat-input button {
background: linear-gradient(135deg, #1877F2, #166FE5);
color: #fff;
border: none;
padding: 0.6rem 1rem;
font-size: 1rem;
cursor: pointer;
transition: opacity 0.2s;
}

.chat-input button:hover {
opacity: 0.9;
}

/* ======= SCROLLBAR PERSONALIZADA ======= */
.scrollbar-custom::-webkit-scrollbar {
width: 6px;
}

.scrollbar-custom::-webkit-scrollbar-track {
background: #ccc;
border-radius: 3px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
background: #1877F2;
border-radius: 3px;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
background: #0e65d5;
}

/* ======= RESPONSIVIDADE ======= */
@media (max-width: 992px) {
.chat-container {
flex-direction: column;
height: 90vh;
}

.conversas-list {
width: 100%;
height: 40vh;
border-right: none;
border-bottom: 1px solid #dee2e6;
order: 1;
}

.chat-area {
flex: 1;
order: 2;
}

.chat-header .btn-back {
display: inline-block;
}
}

@media (max-width: 576px) {
.message {
max-width: 80%;
}

.chat-input input[type='text'] {
font-size: 0.85rem;
}

.chat-input button {
padding: 0.6rem 0.8rem;
font-size: 0.9rem;
}
}

    .error:before {
content: attr(data-text);
position: absolute;
left: -2px;
text-shadow: 1px 0 #4e73df;
top: 0;
color: #5a5c69;
background: #f8f9fc;
overflow: hidden;
clip: rect(0, 900px, 0, 0);
animation: noise-anim-2 3s infinite linear alternate-reverse;
}

/* Animação corrigida para clip */
@keyframes noise-anim-2 {
0% {
    clip: rect(10px, 9999px, 25px, 0);
}
5% {
    clip: rect(58px, 9999px, 71px, 0);
}
10% {
    clip: rect(70px, 9999px, 90px, 0);
}
15% {
    clip: rect(80px, 9999px, 50px, 0);
}
20% {
    clip: rect(40px, 9999px, 60px, 0);
}
25% {
    clip: rect(20px, 9999px, 50px, 0);
}
30% {
    clip: rect(55px, 9999px, 80px, 0);
}
35% {
    clip: rect(30px, 9999px, 40px, 0);
}
40% {
    clip: rect(50px, 9999px, 60px, 0);
}
45% {
    clip: rect(35px, 9999px, 60px, 0);
}
50% {
    clip: rect(22px, 9999px, 35px, 0);
}
55% {
    clip: rect(58px, 9999px, 71px, 0);
}
60% {
    clip: rect(70px, 9999px, 90px, 0);
}
65% {
    clip: rect(80px, 9999px, 50px, 0);
}
70% {
    clip: rect(40px, 9999px, 60px, 0);
}
75% {
    clip: rect(20px, 9999px, 50px, 0);
}
80% {
    clip: rect(55px, 9999px, 80px, 0);
}
85% {
    clip: rect(30px, 9999px, 40px, 0);
}
90% {
    clip: rect(50px, 9999px, 60px, 0);
}
95% {
    clip: rect(35px, 9999px, 60px, 0);
}
100% {
    clip: rect(67px, 9999px, 68px, 0);
}
}

/* Botão Investimentos */
.btn-investimentos {
color: #000; /* Texto preto */
background-color: #f39c12; /* Amarelo */
border-color: #f39c12;
}

.btn-investimentos:hover {
color: #000;
background-color: #e67e22; /* Tom mais escuro de amarelo */
border-color: #e67e22;
}

.btn-investimentos:focus, .btn-investimentos.focus {
color: #000;
background-color: #e67e22;
border-color: #e67e22;
box-shadow: 0 0 0 .2rem rgba(231, 126, 34, .5);
}

.btn-investimentos.disabled, .btn-investimentos:disabled {
color: #000;
background-color: #f39c12;
border-color: #f39c12;
}

/* Botão Entradas */
.btn-entradas {
color: #000; /* Texto preto */
background-color: #28a745; /* Verde */
border-color: #28a745;
}

.btn-entradas:hover {
color: #000;
background-color: #218838; /* Tom mais escuro de verde */
border-color: #1e7e34;
}

.btn-entradas:focus, .btn-entradas.focus {
color: #000;
background-color: #218838;
border-color: #1e7e34;
box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5);
}

.btn-entradas.disabled, .btn-entradas:disabled {
color: #000;
background-color: #28a745;
border-color: #28a745;
}

/* Botão Saídas */
.btn-saidas {
color: #000; /* Texto preto */
background-color: #dc3545; /* Vermelho */
border-color: #dc3545;
}

.btn-saidas:hover {
color: #000;
background-color: #c82333; /* Tom mais escuro de vermelho */
border-color: #bd2130;
}

.btn-saidas:focus, .btn-saidas.focus {
color: #000;
background-color: #c82333;
border-color: #bd2130;
box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5);
}

.btn-saidas.disabled, .btn-saidas:disabled {
color: #000;
background-color: #dc3545;
border-color: #dc3545;
}

