/**
 * Componente: Cards & Stats
 * ─────────────────────────────────────────────────────────────────────────────
 * .card         → painel genérico branco com borda e sombra
 * .stat         → card de KPI com borda superior colorida
 * .panel-title  → cabeçalho com título e ação opcional
 * .section-head → cabeçalho de seção dentro de um card
 * .grid         → grade de 4 colunas para stats
 */

/* ── Card genérico ───────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

/* ── Card de estatística (KPI) ───────────────────────────────────────────── */

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    min-height: 116px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Cores das bordas superiores por ordem de posição */
.stat:nth-child(2) { border-top-color: var(--blue); }
.stat:nth-child(3) { border-top-color: var(--brand-yellow); }
.stat:nth-child(4) { border-top-color: var(--muted); }

.stat span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat b {
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
}

.stat small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

/* ── Grade de cards ──────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ── Panel title ─────────────────────────────────────────────────────────── */

.panel-title {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-title h2 {
    margin: 4px 0 0;
}

.panel-title strong {
    align-items: center;
    background: rgba(29,79,145,.1);
    border: 1px solid rgba(29,79,145,.2);
    border-radius: var(--radius);
    color: var(--blue);
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    min-height: 42px;
    padding: 8px 12px;
}

/* ── Section head ────────────────────────────────────────────────────────── */

.section-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
}
