/* ==========================================
   Hub Reports — Fechamentos e Relatórios
   Tokens: var(--hub-*) como fonte da verdade
   ========================================== */

/* --- .hub-report-card / .hub-report-card (Cards de Relatório) --- */
.hub-report-list {
    display: grid;
    gap: var(--hub-space-xs);
}

.hub-report-card {
    display: grid;
    gap: var(--hub-space-xs);
    padding: var(--hub-space-s);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-surface);
}

.hub-report-card--row {
    align-items: stretch;
}

.hub-report-card--dashed {
    border-style: dashed;
}

.hub-report-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hub-space-s);
}

.hub-report-card__meta {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}

.hub-report-card__right {
    margin-left: auto;
}

.hub-report-card__title--large {
    font-size: var(--hub-text-heading-sm);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text);
}

.hub-report-card__value--large {
    color: var(--hub-primary);
    font-size: var(--hub-text-heading-sm);
    font-weight: var(--hub-weight-bold)
}

.hub-report-card__draft-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) max-content;
    gap: var(--hub-space-xs);
    align-items: end;
    justify-content: start;
}

.hub-report-card__draft-input {
    width: 100%;
}

.hub-report-form-group__field {
    margin: 0;
}

.hub-report-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hub-space-xs);
    align-items: center;
}

.hub-report-card__actions .hub-button {
    flex: 0 0 auto;
    width: auto;
}

.hub-report-card__actions--divided {
    padding-top: var(--hub-space-3);
    margin-top: var(--hub-space-1);
    border-top: 1px dashed var(--hub-border);
}

.hub-report-actions-divider {
    padding-top: var(--hub-space-3);
    border-top: 1px solid var(--hub-border);
}

/* --- .hub-report-action--small / .hub-report-action--small (Ações) --- */
.hub-report-action--small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hub-space-2);
    text-decoration: none;
    line-height: 1;
    padding: 0 var(--hub-space-3);
    min-height: 32px; /* Herda/aproxima de .hub-button--compact */
}

/* --- .hub-report-cost-row / .hub-report-cost-row --- */
.hub-report-cost-row__value {
    margin-left: auto;
}

.hub-report-table__td-value {
    font-weight: var(--hub-weight-bold)
}

/* --- .hub-report-config-toggle / .hub-report-config-toggle --- */
.hub-report-config-toggle {
    display: flex;
    align-items: center;
    gap: var(--hub-space-2);
    cursor: pointer;
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    margin-bottom: var(--hub-space-2);
}

/* --- .hub-report-card__badges (Espaçamento de Badges no Relatório) --- */
.hub-report-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hub-space-xs);
    margin-top: var(--hub-space-1);
}

.hub-report-panel {
    display: grid;
    gap: var(--hub-space-s);
    padding: var(--hub-space-s);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-surface-raised);
}

.hub-report-panel__title {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-report-config-list {
    display: grid;
    gap: var(--hub-space-xs);
}

/* --- Auditoria interna do fechamento --- */
.hub-report-custom-costs {
    display: grid;
    gap: var(--hub-space-xs);
    padding-top: var(--hub-space-s);
    border-top: 1px solid var(--hub-border);
}

.hub-report-custom-costs__title {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-report-custom-costs__list {
    display: grid;
    gap: var(--hub-space-xs);
}

.hub-report-cost-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px) max-content;
    gap: var(--hub-space-xs);
    align-items: center;
}

.hub-report-cost-row input {
    width: 100%;
    min-height: var(--hub-control-height);
    border: 1px solid var(--hub-border-strong);
    border-radius: var(--hub-radius);
    background: var(--hub-input-bg);
    color: var(--hub-text);
    padding: 0 var(--hub-space-s);
    font: inherit;
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-light);
    outline: none;
}

.hub-report-cost-row input:focus {
    border-color: var(--hub-primary);
    box-shadow: var(--hub-shadow-focus);
}

.hub-report-cost-row__value {
    margin-left: 0;
}

.hub-report-cost-row__remove {
    min-width: 32px;
    min-height: 32px;
    padding: var(--hub-space-1) var(--hub-space-2);
}

.hub-report-custom-costs__add-btn {
    justify-self: start;
    width: auto;
}

.hub-report-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--hub-space-xs) var(--hub-space-s);
    padding: var(--hub-space-3) var(--hub-space-s);
    border: 1px solid rgba(var(--hub-primary-rgb), 0.28);
    border-radius: var(--hub-radius);
    background: rgba(var(--hub-primary-rgb), 0.055);
}

.hub-report-total__label {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-medium);
}

.hub-report-total__value {
    color: var(--hub-primary-hover);
    font-size: var(--hub-text-heading);
    font-weight: var(--hub-weight-bold)
}
