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

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

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

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

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

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

.hub-report-card__meta,
.beto-report-card__meta {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-table);
}

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

.hub-report-card__title--large,
.beto-report-card__title--large {
    font-size: var(--hub-text-card-title);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text);
}

.hub-report-card__value--large,
.beto-report-card__value--large {
    color: var(--hub-primary);
    font-size: var(--hub-text-card-title);
    font-weight: var(--hub-weight-bold)
}

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

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

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

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

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

.hub-report-card__actions--divided,
.beto-report-card__actions--divided {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px dashed var(--hub-border);
}

.hub-report-actions-divider,
.beto-report-actions-divider {
    padding-top: 12px;
    border-top: 1px solid var(--hub-border);
}

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

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

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

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

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

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

.hub-report-panel__title,
.beto-report-panel__title {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

.hub-report-custom-costs__title,
.beto-report-custom-costs__title {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

.hub-report-cost-row input,
.beto-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(--space-s);
    font: inherit;
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-light);
    outline: none;
}

.hub-report-cost-row input:focus,
.beto-report-cost-row input:focus {
    border-color: var(--hub-primary);
    box-shadow: 0 0 0 3px rgba(203, 123, 55, 0.16);
}

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

.hub-report-cost-row__remove,
.beto-report-cost-row__remove {
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
}

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

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

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

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