/* Avaliações: componentes e medidas locais, conforme agent_design.md. */
.app-frame .assessment-history-workspace { color: #172033; }
.app-frame .assessment-history-workspace .card { margin-bottom: 0; }
.app-frame .assessment-history-workspace .section-heading { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.app-frame .assessment-history-workspace .section-heading h2 { margin: 0 0 6px; }
.app-frame .assessment-history-workspace .history-export-toolbar { display: flex; margin: 0 0 16px; }
.app-frame .assessment-history-workspace .results-longitudinal-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; align-items: end; }
.app-frame .assessment-history-workspace .filters-card .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #526079; font-weight: 600; }
.app-frame .assessment-history-workspace .filters-card .field > :is(input, select) { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #c7d1df; border-radius: 8px; background: #fff; color: #172033; font: inherit; font-weight: 400; }
.app-frame .assessment-history-workspace :is(button, .mud-button-root, a.button) { min-height: 44px; }
.app-frame .assessment-history-workspace .history-table-scroll { max-height: min(70vh, 760px); overflow: auto; isolation: isolate; border: 1px solid #c7d1df; border-radius: 10px; scrollbar-gutter: stable; }
.app-frame .assessment-history-workspace .history-table-scroll .mud-table-container { overflow: visible; max-height: none; }
.app-frame .assessment-history-workspace .history-table-scroll .dashboard-table { overflow: visible; }
.app-frame .assessment-history-workspace .history-table-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.app-frame .assessment-history-workspace .history-table-scroll thead th { position: sticky; top: 0; z-index: 2; padding: 14px 16px; background: #f6f7f9; color: #172033; font-weight: 700; white-space: nowrap; box-shadow: inset 0 -1px #c7d1df; }
.app-frame .assessment-history-workspace .history-table-scroll tbody td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid #e2e8f0; }
.app-frame .assessment-history-workspace .history-row-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: max-content; }
.app-frame .assessment-history-workspace .history-square-action { display: inline-flex; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; border-radius: 8px; }
.app-frame .assessment-history-workspace .history-square-action .mud-icon-root { width: 22px; height: 22px; }
.app-frame .assessment-history-workspace .assessment-link-summary,
.app-frame .assessment-history-workspace .participant-report-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.history-communication { margin-top: 8px; }
.history-communication > summary { display: list-item; width: fit-content; min-height: 44px; padding: 12px 10px; border: 1px solid #c7d1df; border-radius: 8px; color: #3443bd; background: #fff; cursor: pointer; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.history-communication[open] > summary { background: #f6f7f9; }
.history-communication-content { margin-top: 10px; min-width: 250px; max-width: 380px; overflow-wrap: anywhere; }
.app-frame .assessment-history-workspace :is(input, select, summary, button, a, .history-table-scroll):focus-visible { outline: 2px solid #3443bd; outline-offset: 3px; }
@media (max-width: 600px) {
    .app-frame .assessment-history-workspace .results-longitudinal-filters { grid-template-columns: 1fr; }
    .app-frame .assessment-history-workspace .section-heading { gap: 12px; }
}
@media print {
    .app-frame .assessment-history-workspace .history-table-scroll { max-height: none; overflow: visible; border: 0; }
    .app-frame .assessment-history-workspace .history-table-scroll thead th { position: static; }
    .app-frame .assessment-history-workspace .history-row-actions { display: none; }
}

/* 49: export follows the records and pagination, within the same results card. */
@media screen {
    .mdl-visual-system .app-frame.portal-workspace .assessment-history-workspace .results-card > .history-export-toolbar.history-export-footer {
        margin: 0;
        padding: 12px var(--portal-card-inset,18px);
        border-top: 1px solid var(--mdl-line);
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}
