/* ==========================================================================
   Base e Estilos Compartilhados (Importado de style.css)
   ========================================================================== */

/* Paleta de cores principal do site */
:root {
    --primary-color: #3a6ea5;
    --secondary-color: #6a9bd8;
    --accent: #64b5f6;
    --success: #138a18; /* Verde mais forte para relatórios */
    --warning: #ffb74d;
    --danger: #d53e3e;  /* Vermelho mais forte para relatórios */
    --purple: #ba68c8;
    
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e3eaf3;
    
    --text-primary: #2c3e50;
    --text-secondary: #5d7a9a;
    --border-color: #c1d1e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0; /* Removido para dar controle às seções internas */
}

/* Cabeçalho e Navegação */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 24px;
    color: white;
    font-weight: 600;
    margin: 0;
}

nav {
    display: flex;
    gap: 10px;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

nav a.active {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

/* Títulos de Seção */
h2, h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

h2:after, h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--accent), var(--secondary-color));
    border-radius: 3px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}
h3:after {
    width: 40px;
    height: 2px;
}

/* Botões */
.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--secondary-color));
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #66bb6a);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #f44336);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* ==========================================================================
   Estilos Específicos da Página de Relatórios
   ========================================================================== */

/* Seção de Filtros */
.filter-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.filter-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.filter-form .control-group {
    flex-grow: 1;
}

.filter-form label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.filter-form select {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.filter-form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
    outline: none;
}

/* Seletor de Simulações */
.simulation-selector, .simulation-info, .performance-summary,
.comparison-section, .charts-section, .trades-table, .empty-state {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.simulation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.simulation-card {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.simulation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.simulation-card.active {
    border-color: var(--accent);
    background-color: var(--bg-tertiary);
    box-shadow: 0 5px 15px rgba(100, 181, 246, 0.2);
}

.simulation-card strong {
    color: var(--primary-color);
}

.simulation-card small {
    color: var(--text-secondary);
}

.strategy-badge {
    background-color: var(--purple);
    color: white;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    align-self: flex-start;
}

/* Detalhes da Simulação */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.info-item {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--accent);
}

.info-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}

.info-item strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.simulation-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Resumo de Performance */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.summary-card {
    background-color: var(--bg-primary);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.metric:last-child {
    border-bottom: none;
}

/* Tabelas */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.comparison-table, .trades-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.comparison-table th, .trades-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td, .trades-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:last-child td, .trades-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover, .trades-table tr:hover {
    background-color: var(--bg-tertiary);
}

.best-performer {
    background-color: rgba(129, 199, 132, 0.15);
    border-left: 3px solid var(--success);
}

/* Badges e Cores de Status */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-long {
    background-color: rgba(19, 138, 24, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-short {
    background-color: rgba(213, 62, 62, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.positive {
    color: var(--success);
    font-weight: 600;
}

.negative {
    color: var(--danger);
    font-weight: 600;
}

/* Gráfico */
.chart-container {
    height: 400px;
}

/* Estado Vazio */
.empty-state {
    padding: 40px;
    text-align: center;
}

.empty-state ul {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
    padding-left: 0;
    list-style: none;
}

.empty-state li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.empty-state li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}
