/* ==========================================================================
   ScribeClin - Relatórios
   Reaproveita .fin-table/.fin-amount/.fin-empty de financeiro.css.
   ========================================================================== */

.relatorios-view { display: flex; flex-direction: column; gap: 12px; }

.rel-subtabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; width: fit-content; }
.rel-subtab {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}
.rel-subtab.active { background: var(--accent); color: var(--on-accent); }

.rel-dias-input { width: 70px; display: inline-block; }

.rel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rel-periodo { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.rel-periodo label { color: var(--text-muted); }
.rel-periodo input[type="date"] { width: auto; }

.rel-total {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.rel-total strong { color: var(--success-text); font-size: 1rem; }

/* --- Gráficos visuais dos relatórios --- */
.rel-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rel-chart-header h4 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rel-chart-header h4 i { width: 16px; height: 16px; color: var(--accent); }

.rel-bars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.rel-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rel-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.rel-bar-title {
    font-weight: 600;
    color: var(--text-main);
    text-transform: capitalize;
}
.rel-bar-val {
    font-weight: 500;
}

.rel-bar-track {
    width: 100%;
    height: 8px;
    background: var(--tint-2);
    border-radius: 999px;
    overflow: hidden;
}

.rel-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.3s ease;
}
