/* painel.css - estilos comuns a todas as visualizações */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #eef2f7 0%, #dce5ed 100%);
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Botão voltar */
.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: 0.2s;
}

.btn-voltar:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Card do gráfico */
.chart-card {
    background: white;
    border-radius: 1.8rem;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.1);
    border: 1px solid #eef2f5;
}

.chart-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f4868;
    margin-bottom: 0.25rem;
}

.chart-sub {
    color: #6082a0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 3px solid #81b5d4;
    padding-left: 0.8rem;
}

/* Layout de duas colunas */
.two-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.left-panel {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
}

.right-panel {
    flex: 2;
    min-width: 300px;
}

/* Caixa de pesquisa */
.search-box {
    margin-bottom: 1rem;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 60px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

/* Lista de itens */
.list-container {
    max-height: 550px;
    overflow-y: auto;
    border-right: 1px solid #e2edf2;
    padding-right: 1rem;
}

.item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.3rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    font-size: 0.85rem;
}

.item:hover {
    background: #eef3fc;
}

.item.selected {
    background: #e8f0fe;
    border-left: 4px solid #2a9d6e;
}

.item-rank {
    font-weight: 700;
    width: 35px;
    color: #4a627a;
}

.item-name {
    flex: 1;
    font-weight: 500;
}

.item-min {
    font-weight: 600;
    color: #e68a2e;
    width: 55px;
    text-align: right;
}

.item-max {
    font-weight: 700;
    color: #2a9d6e;
    width: 55px;
    text-align: right;
}

/* Informação de seleção */
.selection-info {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #888;
    text-align: center;
}

/* Gráfico */
canvas {
    max-height: 400px;
    width: 100%;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #2c628b;
}

/* Responsividade */
@media (max-width: 768px) {
    .two-columns {
        flex-direction: column;
    }
    .list-container {
        border-right: none;
        padding-right: 0;
        max-height: 300px;
    }
}

/* Classes para a lista de locais (correspondência com o HTML) */
.local-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.3rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    font-size: 0.85rem;
}

.local-item:hover {
    background: #eef3fc;
}

.local-item.selected {
    background: #e8f0fe;
    border-left: 4px solid #2a9d6e;
}

.local-rank {
    font-weight: 700;
    width: 35px;
    color: #4a627a;
}

.local-name {
    flex: 1;
    font-weight: 500;
}

.local-min {
    font-weight: 600;
    color: #e68a2e;
    width: 55px;
    text-align: right;
}

.local-max {
    font-weight: 700;
    color: #2a9d6e;
    width: 55px;
    text-align: right;
}

/* Classes para a lista de especialidades */
.esp-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.3rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    font-size: 0.85rem;
}

.esp-item:hover {
    background: #eef3fc;
}

.esp-item.selected {
    background: #e8f0fe;
    border-left: 4px solid #2a9d6e;
}

.esp-rank {
    font-weight: 700;
    width: 35px;
    color: #4a627a;
}

.esp-name {
    flex: 1;
    font-weight: 500;
}

.esp-count {
    font-weight: 700;
    color: #2a9d6e;
}