/* Rapportage. Zelfde tokens als bord en kaart; zie docs/03-ui.md §4. */
.crm-report {
    --surface: #ffffff;
    --surface-raised: #f8fafc;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;

    color: var(--text);
}

.dark .crm-report {
    --surface: #0f1115;
    --surface-raised: #171a21;
    --border: #272b34;
    --text: #e5e7eb;
    --text-muted: #9099ab;
    --accent: #3b82f6;
    --success: #22c55e;
}

.crm-report__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.crm-report__tiles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 20px;
}

.crm-report__tile {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
}

.crm-report__tile-label { color: var(--text-muted); font-size: 12px; }
.crm-report__tile-value { font-size: 22px; font-weight: 600; }
.crm-report__tile-change { font-size: 11px; color: var(--text-muted); }

/* Richting is niet hetzelfde als goed of slecht, dus alleen de pijl kleurt. */
.crm-report__tile-change--up { color: var(--success); }
.crm-report__tile-change--down { color: var(--danger); }

.crm-report__block { margin-bottom: 24px; }

.crm-report__block h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.crm-report__chart {
    align-items: flex-end;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    gap: 3px;
    height: 180px;
    overflow-x: auto;
    padding: 12px 12px 26px;
    position: relative;
}

.crm-report__bar {
    display: flex;
    flex: 1 0 18px;
    height: 100%;
    justify-content: center;
    position: relative;
}

.crm-report__bar-total,
.crm-report__bar-trade {
    border-radius: 2px 2px 0 0;
    bottom: 0;
    position: absolute;
    width: 100%;
}

.crm-report__bar-total { background: var(--accent); opacity: 0.28; }
.crm-report__bar-trade { background: var(--accent); opacity: 0.9; }

.crm-report__bar-label {
    bottom: -22px;
    color: var(--text-muted);
    font-size: 10px;
    position: absolute;
    white-space: nowrap;
}

.crm-report__bar:not(:nth-child(5n + 1)) .crm-report__bar-label { display: none; }

.crm-report__legend {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

.crm-report__table {
    border-collapse: collapse;
    font-size: 13px;
    width: 100%;
}

.crm-report__table th,
.crm-report__table td {
    border-bottom: 1px solid var(--border);
    padding: 6px 8px;
    text-align: left;
}

.crm-report__table th { color: var(--text-muted); font-weight: 500; }
.crm-report__num { text-align: right; }

.crm-report__empty {
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    padding: 28px;
    text-align: center;
}

.crm-report__table a {
    color: var(--accent);
    text-decoration: none;
}

.crm-report__table a:hover { text-decoration: underline; }
