/* =============================================================================
   COMPONENTES ESPECÍFICOS DO CRM
============================================================================= */

/* Estilos para o dropdown de configurações */
.header-actions {
    position: relative;
    margin-left: 15px;
}

.btn-header-action {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-header-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #007bff;
}

.config-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 60px;
    z-index: 999999;
    border: 1px solid #e9ecef;
    overflow: visible;
    transform: translateY(0);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    clip: unset;
    max-height: none;
}

.config-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.config-dropdown-content {
    padding: 8px 0;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.config-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

.config-item.logout:hover {
    background: #f8d7da;
    color: #721c24;
}

.config-item i {
    width: 16px;
    text-align: center;
}

.config-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

/* Estilos para templates de email */
.template-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.template-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.template-card.selected {
    border-color: #007bff;
    background: #f8f9ff;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.template-name {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.template-actions {
    display: flex;
    gap: 5px;
}

.btn-template {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-template.edit:hover {
    background: #ffc107;
    color: white;
}

.btn-template.delete:hover {
    background: #dc3545;
    color: white;
}

.template-preview {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    max-height: 80px;
    overflow: hidden;
}

.email-variables {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.variables-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.variable-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.variable-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

.variable-btn i {
    font-size: 10px;
}

.form-field-container {
    position: relative;
}

.field-with-variables {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email-template-option {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.email-template-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.email-template-option.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.template-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #007bff;
}

.template-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 16px;
}

.template-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.email-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Melhorias para task-content - botões estilo funil */
.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 20px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 12px;
}

.task-title-section {
    flex: 1;
}

.task-company-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.task-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.task-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-type-badge.task-type-ligacao {
    background: rgba(33, 150, 243, 0.1);
    color: #1976d2;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.task-type-badge.task-type-reuniao {
    background: rgba(156, 39, 176, 0.1);
    color: #8e24aa;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.task-type-badge.task-type-email {
    background: rgba(76, 175, 80, 0.1);
    color: #388e3c;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.task-type-badge.task-type-whatsapp {
    background: rgba(76, 175, 80, 0.1);
    color: #25d366;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.task-time-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.task-time-badge.urgent {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
    animation: pulse 2s infinite;
}

.task-completed-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Botões de ação estilo funil */
.task-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-contact:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-contact.btn-phone {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.btn-contact.btn-phone:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-contact.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.btn-contact.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-contact.btn-email {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-contact.btn-email:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-contact.btn-lead {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
}

.btn-contact.btn-lead:hover {
    background: linear-gradient(135deg, #7b1fa2, #6a1b9a);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

/* Descrição da tarefa */
.task-description {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(108, 117, 125, 0.05);
    border-radius: 8px;
    border-left: 3px solid #6c757d;
    margin: 8px 0;
}

.task-desc-icon {
    color: #6c757d;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.task-desc-text {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

/* Rodapé da tarefa */
.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.task-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.task-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.task-info-item i {
    width: 12px;
    font-size: 11px;
    color: #adb5bd;
}

/* Checkbox personalizado */
.task-checkbox-container {
    flex-shrink: 0;
}

.task-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    transition: color 0.2s ease;
}

.task-checkbox {
    display: none;
}

.task-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-checkbox:checked + .task-checkbox-custom {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
}

.task-checkbox:checked + .task-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.task-checkbox-label:hover .task-checkbox-custom {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Estados da tarefa */
.task-item {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.task-item.urgent .task-status-indicator {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: pulse 2s infinite;
}

.task-item.completed {
    opacity: 0.7;
}

.task-item.completed .task-company-name {
    text-decoration: line-through;
    color: #6c757d;
}

.task-item.completed .task-checkbox-text {
    color: #28a745;
    font-weight: 600;
}

/* Animações */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* =============================================================================
   CARDS E CONTAINERS DO DASHBOARD
   ============================================================================= */

/* Cards gerais do dashboard com padding adequado */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Card de atividade recente com largura e margem específicas - Estilo Executivo */
.card:not(.dashboard-grid .card) {
    max-width: 1360px;
    margin: 24px auto 20px auto;
    margin-left: 20px;
    margin-right: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.08),
        0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:not(.dashboard-grid .card)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.card:not(.dashboard-grid .card):hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.12),
        0 8px 32px rgba(0,0,0,0.06);
}

.card:not(.dashboard-grid .card) h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card:not(.dashboard-grid .card) h3::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Cards dentro do dashboard-grid mantêm largura controlada */
.dashboard-grid .card {
    max-width: none;
    margin: 0;
}

/* Títulos dos cards */
.card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
}

/* Stats cards específicos */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
    border: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
}

/* Task list com padding interno */
.task-list {
    padding: 16px 0;
    max-height: 400px;
    overflow-y: auto;
    max-width: 100%;
    margin: 0 auto;
}

/* Activity list com padding interno */
.activity-list {
    padding: 16px 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Quick Actions - Ações Rápidas com layout compacto */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
    width: 100%;
}

.quick-actions .btn {
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

/* Estados vazios com padding */
.no-tasks, .no-activity, .no-agenda {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background: rgba(108, 117, 125, 0.05);
    border-radius: 8px;
    border: 2px dashed rgba(108, 117, 125, 0.2);
}

.no-tasks i, .no-activity i, .no-agenda i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Dashboard grid - REMOVIDO para evitar conflito com main.css */
/* Todas as regras do dashboard-grid estão agora em main.css */

/* Stats grid também com largura controlada */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px auto;
    max-width: 1600px;
    padding: 0 20px;
}

/* Responsividade dos cards */
@media (max-width: 768px) {
    .card {
        padding: 16px;
        margin-bottom: 16px;
        max-width: 100%;
        margin-left: 16px;
        margin-right: 16px;
    }
    
    .card h3 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px auto;
        max-width: 100%;
        padding: 0 16px;
    }
    
    .card:not(.dashboard-grid .card) {
        max-width: 100%;
        margin: 16px 0;
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
    }
    
    .dashboard-grid .card {
        margin: 0;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .quick-actions .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Melhorias para tarefas no mobile */
    .task-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .task-actions {
        width: 100%;
        justify-content: center;
        gap: 10px;
        margin-top: 8px;
    }
    
    .btn-contact {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .task-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .task-checkbox-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .task-company-name {
        font-size: 15px;
        text-align: center;
    }
    
    .task-badges {
        justify-content: center;
    }
}

/* =============================================================================
   MODAL DE PERFIL COM BORDAS ARREDONDADAS
   ============================================================================= */

/* Modal de perfil com design igual aos cards */
#perfilModal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
  
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

#perfilModal .modal-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Cabeçalho do modal de perfil */
#perfilModal .modal-header {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#perfilModal .modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

#perfilModal .modal-header .close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

#perfilModal .modal-header .close:hover {
    color: #dc3545;
    transform: rotate(90deg);
}

/* Formulário do modal de perfil */
#perfilModal .form-group {
    margin-bottom: 20px;
}

#perfilModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

#perfilModal .form-group input,
#perfilModal .form-group textarea,
#perfilModal .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

#perfilModal .form-group input:focus,
#perfilModal .form-group textarea:focus,
#perfilModal .form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

#perfilModal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

#perfilModal .form-group small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Seções do modal de perfil */
#perfilModal hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #f1f3f4, #e9ecef, #f1f3f4);
    margin: 24px 0;
    border-radius: 1px;
}

/* Ações do formulário */
#perfilModal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f4;
}

#perfilModal .form-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

#perfilModal .form-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

#perfilModal .form-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

#perfilModal .form-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

#perfilModal .form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Preview da assinatura */
#perfilModal #perfil-signature-preview {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
}

#perfilModal #perfil-signature-preview small {
    color: #007bff;
    font-weight: 500;
}

/* Animação do modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsividade do modal de perfil */
@media (max-width: 768px) {
    #perfilModal .modal-content {
      
        
        width: 95%;
        border-radius: 8px;
    }
    
    #perfilModal .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    #perfilModal .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    #perfilModal .modal-header {
        font-size: 16px;
    }
}

/* =============================================================================
   TODOS OS MODAIS COM DESIGN CONSISTENTE
   ============================================================================= */

/* Estilos gerais para todos os modais */
.modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 15px;
    margin: 50px auto;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    transition: all 0.3s ease;
}

.modal .modal-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.modal .modal-content.large {
    max-width: 900px;
}

/* Cabeçalhos dos modais */
.modal .modal-header {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal .modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.modal .modal-header .close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal .modal-header .close:hover {
    color: #dc3545;
    transform: rotate(90deg);
}

/* Formulários dos modais */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.modal .form-group input,
.modal .form-group textarea,
.modal .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    color: #333;
    -webkit-text-fill-color: #333;
}

.modal .form-group input:-webkit-autofill,
.modal .form-group input:-webkit-autofill:hover,
.modal .form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #333;
    box-shadow: 0 0 0px 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus,
.modal .form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal .form-group small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Ações dos formulários */
.modal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f4;
}

.modal .form-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal .form-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.modal .form-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.modal .form-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.modal .form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Separadores nos modais */
.modal hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #f1f3f4, #e9ecef, #f1f3f4);
    margin: 24px 0;
    border-radius: 1px;
}

/* Responsividade geral dos modais */
@media (max-width: 768px) {
    .modal .modal-content {
        padding: 15px;
        margin: 10px auto;
        width: 95%;
        border-radius: 8px;
    }
    
    .modal .modal-content.large {
        max-width: 95%;
        padding: 12px;
    }
    
    .modal .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal .modal-header {
        font-size: 16px;
    }
    
    .modal .modal-header h3 {
        gap: 8px;
        font-size: 17px;
    }
    
    /* Botões de ação maiores em mobile para melhor touch */
    .modal .lead-action-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .modal .lead-actions {
        gap: 12px;
    }
}

/* =============================================================================
   BOTÕES DE AÇÕES RÁPIDAS NO MODAL DE LEADS
   ============================================================================= */

/* Container das ações rápidas no modal */
.modal .lead-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px 70px;
    margin-top: 12px;
}

/* Estilos específicos para os botões de ação no modal */
.modal .lead-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.modal .lead-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal .lead-action-btn:active {
    transform: translateY(0);
}

.modal .lead-action-btn.phone {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.modal .lead-action-btn.phone:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.modal .lead-action-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.modal .lead-action-btn.whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.modal .lead-action-btn.email {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.modal .lead-action-btn.email:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.modal .lead-action-btn.view {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
}

.modal .lead-action-btn.view:hover {
    background: linear-gradient(135deg, #7b1fa2, #6a1b9a);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.modal .lead-action-btn.prot {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.modal .lead-action-btn.prot:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.modal .lead-action-btn.receita {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.modal .lead-action-btn.receita:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.modal .lead-action-btn.trabalhista {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.modal .lead-action-btn.trabalhista:hover {
    background: linear-gradient(135deg, #5a6268, #545b62);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.modal .lead-action-btn.pgfn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
}

.modal .lead-action-btn.pgfn:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}