:root {
    /* Paleta Dark Blue */
    --bg-body: #0f172a;       /* Azul muito escuro (quase preto) */
    --bg-card: #1e293b;       /* Azul ardósia escuro */
    --bg-card-hover: #334155;
    --text-main: #f1f5f9;     /* Branco gelo */
    --text-muted: #94a3b8;    /* Cinza azulado */
    --border-color: #334155;
    
    --primary: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gold: #ffd700;

    /* Tabela Dados Detalhados dos Analistas*/
    --ruim: #db2727;
    --regular: #e8b007;
    --bom: #2574f5;
    --otimo: #17a34a;
    --excelente: #21c45d;

    /* Cores de Fundo das Colunas (Transparência para Dark Mode) */
    --bg-col-ruim: rgba(239, 68, 68, 0.15);
    --bg-col-regular: rgba(234, 179, 8, 0.15);
    --bg-col-bom: rgba(8, 113, 234, 0.15);
    --bg-col-excelente: rgba(59, 246, 106, 0.15);
    --bg-col-otimo: rgba(16, 185, 129, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- Header Full Width --- */
header {
    background-color: var(--bg-card);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 20px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* --- Layout Grid Principal --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr; /* Coluna lateral fixa + resto fluido */
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 70px);
}

@media (max-width: 1000px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Empilha em telas menores */
    }
}

/* --- Coluna Esquerda: Destaque e KPIs --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card Destaque */
.highlight-card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--gold);
    padding: 50px 25px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

*.crown-icon {
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 10px;
}*

.highlight-title {
    color: var(--gold);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: bold;
}

.analyst-avatar {
    width: 150px;
    height: 150px;
    background-color: var(--bg-card-hover);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-muted);
    border: 2px solid var(--primary);
}

.highlight-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.highlight-stat {
    font-size: 32px;
    font-weight: 700;
    color: var(--success);
}

.highlight-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* KPIs Pequenos */
.kpi-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.kpi-card {
    background-color: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-info h4 { margin: 0; font-size: 12px; color: var(--text-muted); text-transform: uppercase; }
.kpi-info div { font-size: 24px; font-weight: bold; margin-top: 5px; }
.kpi-icon { color: var(--bg-card-hover); font-size: 30px; }


/* --- Coluna Direita: Gráficos e Tabela --- */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

/* novos graficos  */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Duas colunas iguais */
    gap: 20px; /* Espaço entre os gráficos */
    margin-top: 20px;
}

.chart-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
}

.chart-card h3 {
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 410px; /* Altura fixa para alinhar */
    width: 100%;
}

/* Responsividade: Em celulares, fica um embaixo do outro */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Tabela --- */
.table-section {
    background-color: var(--bg-card);
    border-radius: 8px 8px 0 0;
    overflow: hidden; /* Arredondar cantos */
}

.table-header-title {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
    white-space: nowrap;
}

th {
    background-color: rgba(0,0,0,0.3);
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 15px;
    text-align: center;
    border: 1.5px solid var(--border-color);
}

th:first-child { text-align: center; }

td {
    padding: 12px 15px;
    text-align: center;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

td:first-child {
    text-align: center;
    font-weight: 500;
    color: var(--primary);
}

/* --- Cores de Fundo das Colunas Específicas --- */
/* Ruim (Coluna 4) */
td:nth-child(3) { background-color: var(--bg-col-ruim); }
/* Regular (Coluna 5) */
td:nth-child(4) { background-color: var(--bg-col-regular); }
/* Bom (Coluna 6) */
td:nth-child(5) { background-color: var(--bg-col-bom); }
/* Ótimo (Coluna 7) */
td:nth-child(6) { background-color: var(--bg-col-otimo); }
/* Excelente (Coluna 8) */
td:nth-child(7) { background-color: var(--bg-col-excelente); }

/* Cores na tabela */
.text-success { color: var(--success); font-weight: bold; font-size: 20px;}
.text-danger { color: var(--danger); font-weight: bold; font-size: 20px;}
.bar-container { display: flex; align-items: center; justify-content: center; gap: 5px;}