/* CSS Corrigido - Menu Salvador */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
}

/* Header e Navegação - CORREÇÃO DA VISIBILIDADE */
.navbar {
    background: #2e7d32;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    color: #fff !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: #fff !important; /* CORREÇÃO: Cor branca sempre visível */
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffd54f !important; /* Amarelo no hover */
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: #ffd54f !important; /* Amarelo quando ativo */
    border-bottom: 2px solid #ffd54f;
}

/* Botão mobile */
.navbar-toggler {
    border-color: #fff;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1976d2, #2e7d32);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Botões */
.btn-custom {
    background: #ffd54f;
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-custom:hover {
    background: #ffeb3b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: #333;
}

/* Cards de Funcionalidades */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    color: #2e7d32;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #1976d2;
    margin-bottom: 15px;
}

/* Seção de Benefícios */
.benefits {
    padding: 80px 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.benefit-icon {
    background: #e8f5e8;
    color: #2e7d32;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
}

/* Formulário de Pré-cadastro */
.pre-cadastro {
    background: linear-gradient(135deg, #2e7d32, #1976d2);
    color: white;
    padding: 80px 0;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

/* Footer */
.footer {
    background: #1976d2;
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

/* Link do Admin no Rodapé - CORREÇÃO */
.footer-admin {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.admin-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #ffd54f;
    text-decoration: underline;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: #2e7d32;
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Painel Admin */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #1976d2, #2e7d32);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2e7d32;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Tabela de Leads - CORREÇÃO DA ORDENAÇÃO */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.table thead th:hover {
    background: #e9ecef;
}

.table thead th.sortable::after {
    content: " ↕";
    opacity: 0.5;
}

.table thead th.sort-asc::after {
    content: " ↑";
    opacity: 1;
    color: #2e7d32;
}

.table thead th.sort-desc::after {
    content: " ↓";
    opacity: 1;
    color: #2e7d32;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Botões de Ação */
.btn-action {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-right: 5px;
    border-radius: 5px;
}

.btn-edit {
    background: #ffc107;
    color: #333;
    border: none;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-export {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Login do Admin */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1976d2, #2e7d32);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .form-container {
        margin: 20px;
        padding: 30px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .admin-container {
        padding: 10px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2e7d32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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