/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filtros */
.filtros-container {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
}

.filtro-grupo label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.9rem;
}

.filtro-grupo select,
.filtro-grupo input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-limpar {
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: fit-content;
}

.btn-limpar:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Resultados Info */
.resultados-info {
    padding: 20px 30px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.resultados-info p {
    font-weight: 600;
    color: #1976d2;
}

#total-resultados {
    color: #0d47a1;
    font-size: 1.1rem;
}

/* Tabela */
.tabela-container {
    padding: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f3f4;
}

tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

td {
    padding: 15px;
    font-size: 0.9rem;
}

/* Badges para tipo e risco */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-renda-fixa {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge-renda-variavel {
    background: #fff3e0;
    color: #f57c00;
}

.badge-fundos {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-criptomoedas {
    background: #fce4ec;
    color: #c2185b;
}

.badge-risco-baixo {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge-risco-medio {
    background: #fff8e1;
    color: #f9a825;
}

.badge-risco-alto {
    background: #ffebee;
    color: #d32f2f;
}

/* Valores monetários */
.valor-monetario {
    font-weight: 600;
    color: #2e7d32;
}

.rentabilidade {
    font-weight: 600;
    color: #1976d2;
}

/* Sem resultados */
.sem-resultados {
    text-align: center;
    padding: 60px 30px;
    color: #6c757d;
}

.sem-resultados h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.sem-resultados p {
    font-size: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .filtros-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .tabela-container {
        padding: 20px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 10px 8px;
    }

    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .filtros-container {
        padding: 15px;
    }

    .tabela-container {
        padding: 15px;
    }

    th, td {
        padding: 8px 6px;
    }
}

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

tbody tr {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

