/* ==========================================
   RESET E VARIÁVEIS
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #059669;
    --success-dark: #047857;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --warning: #d97706;
    --warning-dark: #b45309;
    --info: #7c3aed;
    --info-dark: #6d28d9;
    --quant: #8b5cf6;
    --quant-dark: #7c3aed;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray: #6b7280;
    --gray-light: #9ca3af;
}

body {
    background: #f0f2f5;
    font-family: 'Inter', sans-serif;
}

/* ==========================================
   CONTAINER PRINCIPAL
   ========================================== */
.supremo-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ==========================================
   LOADING
   ========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   HEADER
   ========================================== */
.welcome-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    transform: translateY(0);
    transition: transform 0.3s;
}

.welcome-header:hover {
    transform: translateY(-5px);
}

.welcome-title {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.3em;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.5;
}

.welcome-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    padding: 12px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 1em;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ==========================================
   ASSISTANT CARD
   ========================================== */
.assistant-card {
    background: white;
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.15);
    border: 2px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.assistant-card::before {
    content: '🤖';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.05;
    transform: rotate(10deg);
    pointer-events: none;
}

.assistant-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.assistant-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: white;
    box-shadow: 0 10px 20px rgba(37,99,235,0.3);
}

.assistant-title {
    flex: 1;
    min-width: 250px;
}

.assistant-title h2 {
    font-size: 2em;
    color: var(--dark);
    margin-bottom: 5px;
}

.assistant-title p {
    color: var(--gray);
    font-size: 1.1em;
}

.assistant-online {
    background: #d1fae5;
    color: #065f46;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #059669;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ==========================================
   FORMULÁRIO
   ========================================== */
.invest-form {
    background: #f8fafc;
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    border: 2px dashed var(--primary);
}

.form-title {
    font-size: 1.5em;
    color: var(--dark);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.form-title .badge {
    background: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.7em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.form-group:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1em;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.form-group input.error {
    border-color: var(--danger);
    background: #fef2f2;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.9em;
}

.simulate-btn {
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 10px 20px rgba(37,99,235,0.3);
    position: relative;
    overflow: hidden;
}

.simulate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.simulate-btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.simulate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37,99,235,0.4);
}

.simulate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================
   MODAL DE COMPRA
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 1.8em;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-form .form-group {
    margin: 0;
}

.modal-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1em;
}

.modal-form input:focus {
    border-color: var(--primary);
    outline: none;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* ==========================================
   RESULTADO DA SIMULAÇÃO
   ========================================== */
.simulation-result {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    border: 2px solid var(--success);
    display: none;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.result-title {
    font-size: 1.8em;
    color: var(--dark);
}

.result-badge {
    background: var(--success);
    color: white;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .result-content {
        grid-template-columns: 1fr;
    }
}

.result-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.result-card h3 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--gray);
    font-weight: 500;
}

.result-value {
    font-weight: 600;
    color: var(--dark);
}

.result-value.success { color: var(--success); }
.result-value.danger { color: var(--danger); }

.analysis-box {
    margin: 20px 0;
    padding: 25px;
    background: #f0f9ff;
    border-radius: 15px;
    border-left: 5px solid var(--info);
    animation: slideIn 0.5s ease;
}

.analysis-box.error {
    background: #fee2e2;
    border-left-color: var(--danger);
}

.analysis-box.warning {
    background: #fef3c7;
    border-left-color: var(--warning);
}

.analysis-box h4 {
    color: var(--info-dark);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.analysis-box p {
    color: #1e293b;
    line-height: 1.8;
    margin-bottom: 15px;
}

.analysis-box ul {
    margin-left: 20px;
    color: #1e293b;
}

.analysis-box li {
    margin: 8px 0;
}

/* ==========================================
   RECOMENDAÇÕES
   ========================================== */
.recommendation-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    font-size: 1.2em;
    animation: pulse 2s infinite;
}

.rec-compra {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #059669;
}

.rec-venda {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #dc2626;
}

.rec-manter {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #9ca3af;
}

/* ==========================================
   PATRIMÔNIO
   ========================================== */
.patrimonio-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.patrimonio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}

.patrimonio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.patrimonio-titulo {
    font-size: 1.5em;
    color: var(--dark);
}

.patrimonio-valor {
    font-size: 3.5em;
    font-weight: 800;
    color: var(--dark);
    margin: 15px 0;
    line-height: 1.2;
}

.patrimonio-variacao {
    font-size: 1.3em;
    padding: 10px 25px;
    border-radius: 50px;
    display: inline-block;
}

.variacao-positiva {
    background: #d1fae5;
    color: #065f46;
}

.variacao-negativa {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================
   STATUS API
   ========================================== */
.api-status {
    background: #e0f2fe;
    border-left: 5px solid #0284c7;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.api-status.success {
    background: #d1fae5;
    border-left-color: #059669;
}

.api-status.error {
    background: #fee2e2;
    border-left-color: #dc2626;
}

.api-status.warning {
    background: #fef3c7;
    border-left-color: #d97706;
}

.api-status .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0284c7;
}

.api-status.success .status-indicator { background: #059669; }
.api-status.error .status-indicator { background: #dc2626; }
.api-status.warning .status-indicator { background: #d97706; }

/* ==========================================
   FILTRO DE PREÇO
   ========================================== */
.filtro-preco {
    background: #fef3c7;
    border-left: 5px solid #d97706;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.95em;
    animation: slideIn 0.5s ease;
}

.filtro-preco strong {
    color: #92400e;
    display: block;
    margin-bottom: 8px;
}

.preco-normal {
    color: #059669;
    font-weight: bold;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 5px;
}

.preco-anormal {
    color: #dc2626;
    font-weight: bold;
    text-decoration: line-through;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 5px;
}

/* ==========================================
   ALERTAS
   ========================================== */
.alertas-area {
    background: white;
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid var(--warning);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.alertas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.alertas-titulo {
    font-size: 1.8em;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.alertas-titulo span {
    background: var(--warning);
    color: white;
    padding: 5px 20px;
    border-radius: 50px;
    font-size: 0.7em;
}

.alertas-lista {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.alertas-lista::-webkit-scrollbar {
    width: 8px;
}

.alertas-lista::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.alertas-lista::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

.alerta-item {
    padding: 25px;
    margin-bottom: 15px;
    border-radius: 15px;
    position: relative;
    border-left: 8px solid transparent;
    animation: slideIn 0.5s ease;
    transition: all 0.3s;
}

.alerta-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alerta-urgente {
    background: #fee2e2;
    border-left-color: var(--danger);
}

.alerta-sucesso {
    background: #d1fae5;
    border-left-color: var(--success);
}

.alerta-atencao {
    background: #fef3c7;
    border-left-color: var(--warning);
}

.alerta-info {
    background: #dbeafe;
    border-left-color: var(--info);
}

.alerta-titulo {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--dark);
}

.alerta-mensagem {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #1e293b;
}

.alerta-explicacao {
    background: rgba(255,255,255,0.5);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-style: italic;
}

.alerta-horario {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #6b7280;
    font-size: 0.9em;
}

/* ==========================================
   GRID DE INVESTIMENTOS
   ========================================== */
.investimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .investimentos-grid {
        grid-template-columns: 1fr;
    }
}

.card-investimento {
    background: white;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    animation: fadeIn 0.5s ease;
}

.card-investimento:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.card-ativo {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--dark);
}

.card-status {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95em;
}

.status-lucro {
    background: #d1fae5;
    color: #065f46;
}

.status-prejuizo {
    background: #fee2e2;
    color: #991b1b;
}

.status-neutral {
    background: #f3f4f6;
    color: #4b5563;
}

/* ==========================================
   MÉTRICAS
   ========================================== */
.metricas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 500px) {
    .metricas-grid {
        grid-template-columns: 1fr;
    }
}

.metrica-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.metrica-item:hover {
    background: white;
    border-color: var(--primary);
}

.metrica-label {
    font-size: 0.9em;
    color: var(--gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.metrica-valor {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--dark);
}

.metrica-valor.lucro { color: var(--success); }
.metrica-valor.perda { color: var(--danger); }

.metrica-detalhe {
    font-size: 0.8em;
    color: var(--gray);
    margin-top: 5px;
}

/* ==========================================
   PROGRESSO
   ========================================== */
.progresso-wrapper {
    margin: 20px 0;
    padding: 10px 0;
}

.progresso-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 500;
}

.progresso-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
    max-width: 100%;
}

.progresso-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================
   ANÁLISE E HISTÓRICO
   ========================================== */
.analise-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.analise-titulo {
    font-size: 1.2em;
    font-weight: bold;
    color: #334155;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicador-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #cbd5e1;
}

.indicador-item:last-child {
    border-bottom: none;
}

.indicador-label {
    color: #64748b;
}

.indicador-value {
    font-weight: 600;
    color: var(--dark);
}

.historico-item {
    padding: 12px;
    margin: 8px 0;
    background: white;
    border-radius: 10px;
    font-size: 0.95em;
    border-left: 3px solid var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.historico-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.historico-data {
    color: var(--gray);
    font-size: 0.85em;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================
   GRÁFICO
   ========================================== */
.grafico-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    height: 300px;
    position: relative;
}

.grafico-titulo {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grafico-periodo {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn-periodo {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-periodo:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-periodo.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==========================================
   RANKING
   ========================================== */
.ranking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

.ranking-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.ranking-titulo {
    font-size: 1.3em;
    color: var(--dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.ranking-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item .success { color: var(--success); }
.ranking-item .danger { color: var(--danger); }

/* ==========================================
   ANÁLISE QUANTITATIVA (NOVO)
   ========================================== */
.quant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quant-card {
    background: linear-gradient(135deg, var(--quant), var(--quant-dark));
    border-radius: 25px;
    padding: 25px;
    color: white;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.quant-card h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.quant-metric {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.quant-metric:last-child {
    border-bottom: none;
}

.quant-label {
    opacity: 0.8;
}

.quant-value {
    font-weight: 700;
    font-size: 1.2em;
}

.quant-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.9em;
}

/* ==========================================
   REBALANCEAMENTO (NOVO)
   ========================================== */
.rebalance-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--warning);
}

.rebalance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rebalance-title {
    font-size: 1.4em;
    color: var(--dark);
}

.rebalance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
}

.rebalance-item.comprar {
    border-left-color: var(--success);
}

.rebalance-item.vender {
    border-left-color: var(--danger);
}

.rebalance-ativo {
    font-weight: 700;
    font-size: 1.2em;
}

.rebalance-acao {
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 600;
}

.acao-comprar {
    background: #d1fae5;
    color: #065f46;
}

.acao-vender {
    background: #fee2e2;
    color: #991b1b;
}

.rebalance-valor {
    font-weight: 600;
}

/* ==========================================
   MONTE CARLO (NOVO)
   ========================================== */
.montecarlo-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--info);
}

.montecarlo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.montecarlo-item {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.montecarlo-label {
    font-size: 0.9em;
    color: var(--gray);
    margin-bottom: 5px;
}

.montecarlo-value {
    font-weight: 700;
    color: var(--dark);
}

.montecarlo-min { color: var(--danger); }
.montecarlo-max { color: var(--success); }

/* ==========================================
   BOTÕES
   ========================================== */
.acoes-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.btn-vender {
    background: var(--danger);
    color: white;
}

.btn-comprar {
    background: var(--success);
    color: white;
}

.btn-analise {
    background: var(--info);
    color: white;
}

.btn-config {
    background: var(--dark);
    color: white;
}

.btn-export {
    background: var(--primary);
    color: white;
}

.btn-backup {
    background: var(--warning);
    color: white;
}

.btn-quant {
    background: var(--quant);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   CONFIGURAÇÕES
   ========================================== */
.config-panel {
    background: white;
    border-radius: 25px;
    padding: 35px;
    margin-top: 30px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.config-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s;
}

.config-item:hover {
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.config-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.config-item input,
.config-item select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s;
}

.config-item input:focus,
.config-item select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.config-item small {
    display: block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.9em;
}

/* ==========================================
   DICAS E INFORMAÇÕES
   ========================================== */
.dica-box {
    background: #f0f9ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid var(--info);
    animation: slideIn 0.5s ease;
}

.dica-box h4 {
    color: #0369a1;
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dica-box p {
    color: #075985;
    line-height: 1.6;
    margin-bottom: 10px;
}

.dica-box ul {
    margin-left: 20px;
    color: #075985;
}

.dica-box li {
    margin: 8px 0;
}

/* ==========================================
   FOOTER
   ========================================== */
.info-footer {
    margin-top: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

.info-footer p {
    margin: 8px 0;
    opacity: 0.9;
}

.info-footer small {
    opacity: 0.7;
    display: block;
    margin-top: 15px;
}

/* ==========================================
   LOGIN MESSAGE
   ========================================== */
.supremo-login-required {
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
}

.supremo-login-required h2 {
    font-size: 2em;
    color: var(--dark);
    margin-bottom: 15px;
}

.supremo-login-required p {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 1.1em;
}

.supremo-login-required .btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.supremo-login-required .btn-primary {
    background: var(--primary);
}

.supremo-login-required .btn-analise {
    background: var(--info);
}

.supremo-login-required .btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==========================================
   TOOLTIPS
   ========================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--dark);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* ==========================================
   NOTIFICAÇÕES
   ========================================== */
.notificacao {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notificacao.success {
    border-left: 5px solid var(--success);
}

.notificacao.error {
    border-left: 5px solid var(--danger);
}

.notificacao.warning {
    border-left: 5px solid var(--warning);
}

.notificacao.info {
    border-left: 5px solid var(--info);
}

.notificacao-titulo {
    font-weight: bold;
    margin-bottom: 5px;
}

.notificacao-mensagem {
    color: var(--gray);
    font-size: 0.95em;
}

.notificacao-fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.notificacao-fechar:hover {
    color: var(--dark);
}

/* ==========================================
   RESPONSIVIDADE ADICIONAL
   ========================================== */
@media (max-width: 1200px) {
    .welcome-title {
        font-size: 2.2em;
    }
    
    .patrimonio-valor {
        font-size: 2.8em;
    }
    
    .montecarlo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .welcome-header {
        padding: 25px;
    }
    
    .welcome-title {
        font-size: 1.8em;
    }
    
    .welcome-subtitle {
        font-size: 1.1em;
    }
    
    .assistant-header {
        flex-direction: column;
        text-align: center;
    }
    
    .assistant-avatar {
        margin: 0 auto;
    }
    
    .patrimonio-valor {
        font-size: 2.2em;
    }
    
    .card-ativo {
        font-size: 1.8em;
    }
    
    .alertas-titulo {
        font-size: 1.5em;
    }
    
    .montecarlo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 1.5em;
    }
    
    .stat-item {
        width: 100%;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .acoes-card {
        grid-template-columns: 1fr;
    }
    
    .patrimonio-valor {
        font-size: 1.8em;
    }
    
    .montecarlo-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================
   IMPRESSÃO
   ========================================== */
@media print {
    .btn,
    .assistant-card,
    .config-panel,
    .alertas-area,
    .quant-grid,
    .rebalance-card {
        display: none;
    }
    
    .card-investimento {
        break-inside: avoid;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .patrimonio-card {
        border: 2px solid #000;
    }
}