/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: white; /* Fundo branco */
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
.bg-animation {
    display: none; /* Desativar animação de fundo se não for necessária */
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

/* Header Moderno */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Banner colorido */
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo-icon {
    font-size: 38px;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-text h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-voltar-painel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-voltar-painel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Linha animada no topo do header */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #a77bff, #834fe8, #667eea, #764ba2);
    animation: gradientFlow 10s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Dashboard Cards Modernos */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-total {
    border-left: 4px solid #10b981;
}

.card-ativos {
    border-left: 4px solid #3b82f6;
}

.card-inativos {
    border-left: 4px solid #6b7280;
}

.card-inadimplentes {
    border-left: 4px solid #ef4444;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
}

.card-content p {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 400;
}

.card-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Botão Novo Cliente */
.novo-cliente-container {
    text-align: center;
    margin-bottom: 40px;
}

.btn-novo-cliente {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-novo-cliente::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-novo-cliente:hover::before {
    left: 100%;
}

.btn-novo-cliente:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

/* Filtros Modernos */
.filtros {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.filtro-grupo {
    position: relative;
    flex: 0 1 220px; /* campos mais compactos */
    min-width: 160px;
}

.filtro-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.filtro-input, .filtro-select {
    width: 100%;
    padding: 8px 12px 8px 40px; /* menor altura */
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.2; /* compactar verticalmente */
    transition: all 0.3s ease;
    background: white;
}

.filtro-input:focus, .filtro-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filtro-acoes {
    display: flex;
    gap: 15px;
}

.btn-filtro-filtrar, .btn-filtro-limpar {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filtro-filtrar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-filtro-filtrar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-filtro-limpar {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-filtro-limpar:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Tabela de Clientes */
.tabela-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* empilhar verticalmente */
    align-items: center;
    gap: 20px;
}

.tabela-wrapper {
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
}

.lista-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
}

.tabela-clientes {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.tabela-clientes th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.95rem;
}

.tabela-clientes td {
    padding: 18px 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.tabela-clientes tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Células específicas */
.nome-cell {
    min-width: 200px;
}

.cpf-cell {
    min-width: 140px;
}

.telefone-cell {
    min-width: 180px;
}

.status-cell {
    min-width: 120px;
    text-align: center;
}

.acoes-cell {
    min-width: 150px;
    text-align: center;
}

/* Cliente Info com Avatar */
.cliente-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cliente-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.cliente-detalhes {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cliente-nome {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.cliente-email {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

/* Link do WhatsApp */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #25d366;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.1);
}

.whatsapp-link:hover {
    background: rgba(37, 211, 102, 0.2);
    color: #128c7e;
    transform: translateY(-1px);
}

.whatsapp-link i {
    font-size: 16px;
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ativo {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inativo {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-inadimplente {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-em-locacao {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Botões de Ação */
.acoes-cell {
    text-align: center;
    padding: 8px;
}

.acoes-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Botões chip suaves */
.btn-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.btn-chip i { font-size: 0.9rem; }

.btn-chip:hover { transform: translateY(-1px); }

.btn-chip-view { color: #1e40af; background: #e0e7ff; border-color: #c7d2fe; }
.btn-chip-edit { color: #065f46; background: #d1fae5; border-color: #a7f3d0; }
.btn-chip-danger { color: #7c2d12; background: #ffedd5; border-color: #fed7aa; }

.btn-visualizar {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-visualizar:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.btn-editar {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-editar:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.btn-excluir {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-excluir:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Estado Vazio */
.estado-vazio {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.estado-vazio i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #d1d5db;
}

.estado-vazio p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #9ca3af;
}

/* Modal */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw; /* Usar 100vw para garantir largura total da viewport */
    height: 100vh; /* Usar 100vh para garantir altura total da viewport */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    box-sizing: border-box; /* Incluir padding e border no cálculo do width/height */
    padding: 20px; /* Adicionar um padding para garantir margem nas bordas */
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 800px; /* Manter max-width padrão */
    max-height: calc(100vh - 40px); /* Ajustar max-height para 100vh - padding (20px * 2) */
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalFadeIn 0.3s ease;
    box-sizing: border-box; /* Garantir que o padding não aumente o tamanho */
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px 30px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fechar-modal {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.fechar-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Barra de Progresso */
.form-progress-container {
    padding: 20px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.form-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.form-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.form-progress-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Modal Body */
.modal-body {
    padding: 30px;
}

/* Formulário */
.form-grupo {
    margin-bottom: 25px;
}

.form-grupo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Foto Upload */
.foto-upload {
    position: relative;
}

.foto-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.foto-preview {
    width: 120px;
    height: 120px;
    border: 3px dashed #d1d5db;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #9ca3af;
}

.foto-preview:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.foto-preview i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.foto-preview span {
    font-size: 0.8rem;
    text-align: center;
}

/* CEP Container */
.cep-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cep-container input {
    flex: 1;
}

.btn-pequeno {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pequeno:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Seções Colapsáveis */
.section-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-color: rgba(102, 126, 234, 0.2);
}

.section-header.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #667eea;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h3 i {
    color: #667eea;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #9ca3af;
}

.section-header.active .toggle-icon {
    transform: rotate(180deg);
    color: #667eea;
}

.section-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.section-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation Badges */
.validation-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.validation-badge.valid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.validation-badge.invalid {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.validation-badge.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* Anexos Preview */
.anexo-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.anexo-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.anexo-preview-item img,
.anexo-preview-item .anexo-tipo-badge {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anexo-preview-item .remove-anexo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anexo-preview-item .anexo-tipo-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Checkbox e Tooltip */
.checkbox-grupo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
}

.checkbox-grupo input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.tooltip-info {
    color: #667eea;
    cursor: help;
    position: relative;
}

.tooltip-info::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip-info:hover::before {
    opacity: 1;
}

/* Ações do Formulário */
.form-acoes-cliente {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn-salvar, .btn-cancelar, .btn-salvar-e-locar {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-salvar {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-salvar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.btn-salvar-e-locar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-salvar-e-locar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-cancelar {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-cancelar:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Modal Visualizar */
.modal-visualizar .modal-content {
    max-width: 700px;
}

.visualizar-section {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.visualizar-section-title {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

.visualizar-section-title i {
    color: #667eea;
}

.visualizar-section p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #374151;
}

.visualizar-section strong {
    color: #1f2937;
}

/* Imagem do Cliente */
.cliente-imagem {
    max-width: 200px;
    max-height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #667eea;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cliente-imagem-placeholder {
    width: 200px;
    height: 200px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 80px;
    margin: 0 auto;
    border: 5px solid #667eea;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Estilos para Referências */
.referencias-visualizacao-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.referencia-visualizacao-item {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.referencia-visualizacao-item strong {
    display: block;
    margin-bottom: 5px;
    color: #1f2937;
}

.referencia-visualizacao-item a {
    color: #25d366;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.referencia-visualizacao-item a:hover {
    color: #128c7e;
}

/* Estilos para Anexos */
.anexos-tipo-container h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #4b5563;
    border-bottom: 1px dotted #d1d5db;
    padding-bottom: 5px;
    margin-top: 20px;
}

.visualizar-anexos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.visualizar-anexo-item {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    height: 150px; /* Altura fixa para os itens */
}

.visualizar-anexo-item img {
    max-width: 100%;
    max-height: 100px; /* Limitar altura da imagem dentro do item */
    object-fit: contain;
    border-radius: 8px;
}

.visualizar-anexo-item .btn-pequeno {
    margin-top: 10px;
    font-size: 0.8rem;
    padding: 6px 10px;
}

.visualizar-anexo-item .anexo-tipo-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(102, 126, 234, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Modal Confirmação */
.modal-confirmacao .modal-content {
    max-width: 500px;
}

.confirmacao-conteudo {
    text-align: center;
    padding: 20px;
}

.confirmacao-icon {
    font-size: 4rem;
    color: #f59e0b;
    margin-bottom: 20px;
}

.confirmacao-conteudo h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #374151;
}

.confirmacao-conteudo p {
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

.confirmacao-acoes {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-excluir {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-excluir:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.4);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #374151;
}

.toast-message {
    color: #6b7280;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        padding: 30px 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-text h1 {
        font-size: 1.8rem;
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .filtros {
        flex-direction: column;
        gap: 15px;
    }

    .filtro-grupo {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .form-acoes-cliente {
        flex-direction: column;
        gap: 10px;
    }

    .btn-salvar, .btn-cancelar, .btn-salvar-e-locar {
        width: 100%;
    }

    /* Tabela responsiva */
    .tabela-container {
        padding: 20px 15px;
    }

    .tabela-wrapper {
        max-width: 100%;
    }

    .tabela-clientes {
        font-size: 0.85rem;
    }

    .tabela-clientes th, .tabela-clientes td {
        padding: 12px 8px;
    }

    .cliente-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .cliente-nome {
        font-size: 0.9rem;
    }

    .cliente-email {
        font-size: 0.75rem;
    }

    .whatsapp-link {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .acoes-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px 15px;
    }

    .card-content p {
        font-size: 0.9rem;
    }

    .tabela-container {
        padding: 15px 10px;
    }

    .tabela-clientes th, .tabela-clientes td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }

    .cliente-info {
        gap: 8px;
    }

    .cliente-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .cliente-nome {
        font-size: 0.85rem;
    }

    .cliente-email {
        display: none; /* Ocultar email em telas muito pequenas */
    }

    .whatsapp-link {
        padding: 3px 6px;
        font-size: 0.75rem;
    }

    .whatsapp-link i {
        font-size: 14px;
    }

    .acoes-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .acoes-buttons {
        gap: 4px;
    }
}

/* ===== Overrides finais para modais (forçar acima de estilos inline do index.html) ===== */
body.mv-sidebar-active .modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    width: 100dvw !important;
    height: 100dvh !important;
    padding: 20px !important;
    display: none; /* padrão oculto */
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(5px);
    box-sizing: border-box !important;
}

body.mv-sidebar-active .modal.show {
    display: flex !important;
}

body.mv-sidebar-active .modal .modal-content,
body.mv-sidebar-active .modal .modal-content.modal-visualizar-cliente,
body.mv-sidebar-active #modal-visualizar-cliente .modal-content {
    width: min(900px, 96vw) !important;
    max-height: calc(100dvh - 40px) !important; /* deixa margem de 20px em cima/baixo */
    border-radius: 18px !important;
    overflow: hidden !important; /* controla rolagem pelo body interno */
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Cabeçalho fixo não é necessário; manter estático para evitar "grudar" na viewport */
body.mv-sidebar-active .modal .modal-header {
    position: static !important;
    flex: 0 0 auto !important;
}

/* Corpo do modal rolável dentro do limite de altura */
body.mv-sidebar-active .modal .modal-body {
    flex: 1 1 auto !important;
    overflow: auto !important;
    min-height: 0 !important; /* necessário para flexbox permitir rolagem */
    padding-bottom: 90px !important; /* espaço para os botões ficarem sempre visíveis */
}

/* Garante que o modal de confirmação e de visualizar sigam o mesmo limite */
body.mv-sidebar-active #modal-confirmar-exclusao .modal-content,
body.mv-sidebar-active #modal-visualizar-cliente .modal-content {
    max-height: calc(100dvh - 40px) !important;
}

/* Rodapé de ações sempre visível (Salvar/Cancelar) */
body.mv-sidebar-active .modal .form-acoes-cliente {
    position: sticky !important;
    bottom: 0 !important;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 16px 24px !important;
    z-index: 12 !important;
}

/* Estilos para a seção de Referências */

.referencias-pessoais {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border: 1px solid #9ae6b4;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.referencias-pessoais::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #38a169, #68d391);
}

.referencias-pessoais h4 {
    color: #2f855a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.form-help {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.8;
}

.referencia-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.referencia-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.referencia-item h5 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referencia-item h5::before {
    content: '👤';
    font-size: 1.2rem;
}

.referencia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-remover-referencia {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remover-referencia:hover {
    background: linear-gradient(135deg, #feb2b2 0%, #fc8181 100%);
    transform: scale(1.05);
}

.form-acoes-referencias {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-secundario {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border: 1px solid #81e6d9;
    color: #2c7a7b;
}

.btn-secundario:hover {
    background: linear-gradient(135deg, #b2f5ea 0%, #81e6d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 122, 123, 0.3);
}

/* Responsividade para referências */
@media (max-width: 768px) {
    .referencia-item {
        padding: 15px;
    }
    
    .referencia-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-remover-referencia {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .referencias-pessoais {
        padding: 15px;
    }
    
    .referencia-item {
        padding: 12px;
    }
}
/*
 Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
}

.toast {
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
}

.toast-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.toast-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.toast-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.toast-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Status badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-ativo {
  background-color: #d4edda;
  color: #155724;
}

.status-inativo {
  background-color: #f8d7da;
  color: #721c24;
}

/* WhatsApp link */
.whatsapp-link {
  color: #25d366;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.whatsapp-link:hover {
  color: #128c7e;
  text-decoration: underline;
}

/* Botões de ação */
.acoes-buttons {
  display: flex;
  gap: 5px;
}

.acoes-btn {
  padding: 6px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-visualizar {
  background-color: #007bff;
  color: white;
}

.btn-visualizar:hover {
  background-color: #0056b3;
}

.btn-editar {
  background-color: #28a745;
  color: white;
}

.btn-editar:hover {
  background-color: #1e7e34;
}

.btn-excluir {
  background-color: #dc3545;
  color: white;
}

.btn-excluir:hover {
  background-color: #c82333;
}

/* Cliente info */
.cliente-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cliente-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.cliente-detalhes {
  display: flex;
  flex-direction: column;
}

.cliente-nome {
  font-weight: 600;
  color: #2d3748;
}

.cliente-email {
  font-size: 12px;
  color: #718096;
}

/* Tabela responsiva */
.tabela-container {
  overflow-x: auto;
  margin-top: 20px;
}

.tabela-clientes {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tabela-clientes th,
.tabela-clientes td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.tabela-clientes th {
  background-color: #f7fafc;
  font-weight: 600;
  color: #2d3748;
}

.tabela-clientes tbody tr:hover {
  background-color: #f7fafc;
}

/* Estado vazio */
.estado-vazio {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.estado-vazio i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #e2e8f0;
}

.estado-vazio p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Botões */
.btn-novo-cliente {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-novo-cliente:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Filtros */
.filtros {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  align-items: center;
}

.filtro-grupo {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
}

.filtro-icon {
  color: #718096;
}

.filtro-input,
.filtro-select {
  border: none;
  outline: none;
  font-size: 14px;
  min-width: 150px;
}

.filtro-acoes {
  display: flex;
  gap: 10px;
}

.btn-filtro-filtrar,
.btn-filtro-limpar {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-filtro-filtrar {
  background-color: #007bff;
  color: white;
}

.btn-filtro-filtrar:hover {
  background-color: #0056b3;
}

.btn-filtro-limpar {
  background-color: #6c757d;
  color: white;
}

.btn-filtro-limpar:hover {
  background-color: #545b62;
}

/* Modal básico */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fechar-modal {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #718096;
}

.fechar-modal:hover {
  color: #2d3748;
}

.modal-body {
  padding: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
  .filtros {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filtro-grupo {
    width: 100%;
  }
  
  .filtro-input,
  .filtro-select {
    min-width: auto;
    width: 100%;
  }
  
  .acoes-buttons {
    flex-direction: column;
  }
  
  .cliente-info {
    flex-direction: column;
    text-align: center;
  }
}