/**
 * RISKENTIA — superfícies padronizadas (cards, alertas, widgets, KPIs).
 * Escopo principal: .section-layout (painel, relatórios, listagens).
 */

:root {
    --ui-radius: 0.375rem;
    --ui-shadow-sm: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.06);
    --ui-shadow-md: 0 0.35rem 0.75rem rgba(15, 23, 42, 0.08);
    --ui-alert-border: 4px;
}

/* Cards dentro do painel: raio e sombra coerentes com Bootstrap shadow-sm */
.section-layout .card {
    border-radius: var(--ui-radius);
}

.section-layout .card.border-0.shadow-sm {
    box-shadow: var(--ui-shadow-sm);
}

/* Cabeçalho neutro quando não há cor de tema */
.section-layout .card.border-0.shadow-sm > .card-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-secondary):not(.bg-dark):not(.text-white) {
    background-color: var(--bs-white);
    border-bottom: 1px solid var(--bs-border-color);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Cabeçalhos coloridos: canto superior alinhado ao card */
.section-layout .card.border-0.shadow-sm > .card-header.text-white {
    border: 0;
    border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}

/* Alertas / info boxes: borda lateral + fundo suave (harmoniza com cards) */
.section-layout .alert {
    border-radius: var(--ui-radius);
    border: 0;
    border-left: var(--ui-alert-border) solid var(--bs-secondary);
    box-shadow: var(--ui-shadow-sm);
}

.section-layout .alert-primary {
    border-left-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.section-layout .alert-success {
    border-left-color: var(--bs-success);
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}

.section-layout .alert-danger {
    border-left-color: var(--bs-danger);
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.section-layout .alert-warning {
    border-left-color: var(--bs-warning);
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.section-layout .alert-info {
    border-left-color: var(--bs-info);
    background-color: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
}

.section-layout .alert-secondary {
    border-left-color: var(--bs-secondary);
    background-color: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary-text-emphasis);
}

.section-layout .alert-light {
    border-left-color: var(--bs-border-color);
    background-color: var(--bs-light);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-left-width: var(--ui-alert-border);
}

/* Blocos informativos tipo “callout” (alert-light com borda) */
.section-layout .alert-light.border {
    box-shadow: var(--ui-shadow-sm);
}

/* Títulos de secção (relatórios e blocos longos) */
.section-layout .report-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.section-layout .report-kpi-solid {
    border: 0;
    box-shadow: var(--ui-shadow-sm);
}

.section-layout .report-kpi-soft {
    border: 0;
    box-shadow: var(--ui-shadow-sm);
}

.section-layout .report-kpi-solid .icon-circle {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
}

.section-layout .report-kpi-soft .icon-circle {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.06);
}

.section-layout .report-table-card .table thead th {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Widget: título de card de dados */
.section-layout .ui-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Chart.js (maintainAspectRatio: false): altura fixa para não esticar com flex/h-100 */
.section-layout .dashboard-chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    flex-shrink: 0;
}

.section-layout .dashboard-chart-wrap.dashboard-chart-wrap--wide {
    height: 280px;
}
