/* Estilos específicos para a página gerenciar.html */

.management-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Estilo para o fundo escuro do modal (sobreposição) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.75); /* bg-gray-900 com opacidade */
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInBackground 0.3s ease-out;
}

/* Estilo para a caixa de conteúdo branca do modal */
.modal-box {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    width: 91.666667%; /* w-11/12 */
    max-width: 42rem; /* md:max-w-2xl */
    margin: auto;
    animation: fadeInContent 0.3s ease-out;
}

@keyframes fadeInBackground {
    from { background-color: rgba(17, 24, 39, 0); }
    to { background-color: rgba(17, 24, 39, 0.75); }
}

@keyframes fadeInContent {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Estilos para o Toast de Notificação */
.toast {
    animation: slideInUp 0.3s ease-out forwards, fadeOut 0.5s ease-in 3s forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* A animação fadeOut já existe no seu style.css, mas garantimos aqui */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden; /* Garante que o elemento não bloqueie cliques após sumir */
    }
}

/* Estilo para Input com Floating Label */
.floating-label-group {
    position: relative;
}

.floating-label-input {
    border: 2px solid #e2e8f0; /* slate-200 */
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    transition: border-color 0.2s;
}

.floating-label-input:focus {
    outline: none;
    border-color: #4f46e5; /* indigo-600 */
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #64748b; /* slate-500 */
    background-color: white;
    padding: 0 0.25rem;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.floating-label-input:focus + .floating-label,
.floating-label-input:not(:placeholder-shown) + .floating-label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: #4f46e5; /* indigo-600 */
}
/* Estilo para Input com Floating Label */
.floating-label-group {
    position: relative;
}

.floating-label-input {
    border: 2px solid #e2e8f0; /* slate-200 */
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    transition: border-color 0.2s;
    /* Adicionado para garantir que o placeholder não apareça */
    color: #0f172a; /* slate-900 */
}

.floating-label-input:focus {
    outline: none;
    border-color: #4f46e5; /* indigo-600 */
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #64748b; /* slate-500 */
    background-color: white;
    padding: 0 0.25rem;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

/* O :placeholder-shown é a chave para a animação funcionar corretamente */
.floating-label-input:focus + .floating-label,
.floating-label-input:not(:placeholder-shown) + .floating-label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: #4f46e5; /* indigo-600 */
}

/* Estilo para Input com Floating Label */
.floating-label-group {
    position: relative;
}

.floating-label-input {
    border: 2px solid #e2e8f0; /* slate-200 */
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    transition: border-color 0.2s;
    color: #0f172a; /* slate-900 - Importante para o efeito funcionar */
}

.floating-label-input:focus {
    outline: none;
    border-color: #4f46e5; /* indigo-600 */
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #64748b; /* slate-500 */
    background-color: white;
    padding: 0 0.25rem;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

/* O :placeholder-shown é a chave para a animação funcionar corretamente */
/* Quando o input está focado ou não está mostrando o placeholder (tem valor) */
.floating-label-input:focus + .floating-label,
.floating-label-input:not(:placeholder-shown) + .floating-label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: #4f46e5; /* indigo-600 */
}

/* --- CORREÇÃO PARA ROLAGEM DE MODAIS ALTOS --- */

.modal-box {
    /* Define uma altura máxima para o modal (ex: 85% da altura da tela) */
    max-height: 85vh; 
    
    /* Transforma o modal em um container flex para controlar o conteúdo */
    display: flex;
    flex-direction: column;
}

.modal-content {
    /* Aplica a barra de rolagem vertical APENAS quando o conteúdo transborda */
    overflow-y: auto;
    
    /* Faz a área de conteúdo crescer para preencher o espaço disponível */
    flex-grow: 1;
}

/* ================================================================ */
/* ===== ESTILOS v3.1 PARA A CENTRAL DE COMUNICAÇÃO (CSS PURO) ===== */
/* ================================================================ */

/* Labels e Utilitários */
.form-label {
    display: block;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: #475569; /* slate-600 */
    margin-bottom: 0.25rem; /* 4px */
}

/* Indicador de Passos (Estilo "Barra de Progresso") */
.step-indicator-container {
    display: flex;
    align-items: center;
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #64748b; /* slate-500 */
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
    width: 5rem; /* 80px */
    text-align: center;
    flex-shrink: 0;
    transition: color 0.3s ease-in-out;
}
.step .step-circle {
    height: 2rem; /* 32px */
    width: 2rem; /* 32px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-width: 2px;
    border-color: #cbd5e1; /* slate-300 */
    border-radius: 9999px;
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
}
.step-divider {
    flex-grow: 1;
    height: 0.25rem; /* 4px */
    background-color: #e2e8f0; /* slate-200 */
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
}

/* Estado Ativo do Passo */
.step.active {
    color: #4f46e5; /* indigo-600 */
}
.step.active .step-circle {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px #e0e7ff; /* ring-4 ring-indigo-100 */
}

/* Estado Concluído do Passo */
.step.completed .step-circle {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}
.step.completed + .step-divider {
    background-color: #4f46e5;
}

/* Lista de Destinatários (Cards) */
#comunicacao-recipients-list .recipient-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
#comunicacao-recipients-list .recipient-card:hover {
    background-color: #f1f5f9; /* slate-100 */
}
#comunicacao-recipients-list .recipient-card.selected {
    background-color: #eef2ff; /* indigo-50 */
    border-color: #a5b4fc; /* indigo-300 */
}

/* --- NOVO SISTEMA DE BOTÕES --- */

/* Botão Principal (WhatsApp Green) */
.btn-whatsapp {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    font-size: 0.875rem; /* 14px */
    font-weight: 700;
    color: white;
    background-color: #25D366;
    transition: all 0.2s ease-in-out;
}
.btn-whatsapp:hover {
    background-color: #1DA851;
    transform: scale(1.02);
}

/* Botão Secundário (Salvar Modelo) */
.btn-secondary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1; /* slate-300 */
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155; /* slate-700 */
    background-color: white;
    transition: background-color 0.2s ease-in-out;
}
.btn-secondary:hover {
    background-color: #f1f5f9; /* slate-100 */
}

/* Botão Terciário (Ver Clientes) */
.btn-tertiary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 2px solid #4f46e5; /* indigo-600 */
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    font-size: 0.875rem;
    font-weight: 700;
    color: #4f46e5; /* indigo-600 */
    background-color: transparent;
    transition: all 0.2s ease-in-out;
}
.btn-tertiary:hover {
    background-color: #4f46e5;
    color: white;
}

/* Botões de Link (Marcar/Desmarcar) */
.btn-subtle {
    padding: 0.25rem 0.75rem;
    background-color: #f1f5f9; /* slate-100 */
    border: 1px solid #e2e8f0; /* slate-200 */
    color: #475569; /* slate-600 */
    border-radius: 0.375rem;
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}
.btn-subtle:hover {
    background-color: #e2e8f0; /* slate-200 */
    border-color: #cbd5e1; /* slate-300 */
}
/* Melhora o foco no campo de texto da comunicação */
#comunicacao-message-body:focus {
    border-color: #4f46e5; /* Cor índigo, a mesma do seu app */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); /* Adiciona um "brilho" sutil */
    outline: none; /* Remove a borda padrão do navegador */
}
