/* Reset e Variáveis CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --light-blue: #dbeafe;
    --success-green: #10b981;
    --warning-red: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-900: #111827;
}

/* Layout Principal */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-900);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

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

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sistema de Abas */
.tabs {
    display: flex;
    background: var(--gray-100);
    border-bottom: 3px solid var(--gray-300);
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab {
    padding: 18px 30px;
    cursor: pointer;
    background: var(--gray-200);
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.tab.active {
    background: white;
    color: var(--primary-blue);
    border-bottom: 3px solid var(--primary-blue);
}

.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

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

/* Banner de Boas-Vindas */
.welcome-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.welcome-banner h2 {
    color: #92400e;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.welcome-banner p {
    color: #78350f;
    line-height: 1.6;
    font-size: 1.05em;
}

/* Formulários */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fef9c3;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Botões */
.btn {
    padding: 15px 40px;
    background: var(--success-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Cards de Resultado */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.result-card.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: var(--success-green);
}

.result-card.warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: var(--warning-red);
}

.result-card h3 {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.result-card .value {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-blue);
}

.result-card.success .value {
    color: var(--success-green);
}

.result-card.warning .value {
    color: var(--warning-red);
}

/* Gráficos */
.chart-container {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--gray-900);
    font-size: 1.3em;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

thead {
    background: var(--primary-blue);
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

tbody tr:hover {
    background: var(--light-blue);
}

/* Caixas de Dica */
.tip-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 5px solid var(--success-green);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}

.tip-box h4 {
    color: #065f46;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.tip-box p {
    color: #047857;
    line-height: 1.6;
}

/* Comparador de Bancos */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.bank-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
}

.bank-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.bank-card.best {
    border-color: var(--success-green);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    position: relative;
}

.bank-card.best::before {
    content: 'MELHOR OPÇÃO';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--success-green);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.bank-card h3 {
    color: var(--gray-900);
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Guia de Uso */
.guide-steps {
    counter-reset: step-counter;
}

.guide-step {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-left: 3px solid var(--gray-300);
}

.guide-step:last-child {
    border-left: none;
}

.guide-step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: -20px;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
}

.guide-step h4 {
    color: var(--gray-900);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.guide-step p {
    color: var(--gray-700);
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .tab {
        padding: 12px 15px;
        font-size: 13px;
    }

    .tab-content {
        padding: 20px;
    }

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

/* Ícones */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}