.plagscanx-app-overlay .psx-report-heading[hidden],
.plagscanx-app-overlay .psx-report-heading [hidden] { display: none !important; }
.psx-report-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 24px 32px 8px; flex: 0 0 auto; color: var(--psx-text); background: var(--psx-card, #fff); }
.psx-report-title-display, .psx-report-title-editor { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plagscanx-app-overlay .psx-report-title { font: inherit; font-size: 24px; font-weight: 600; line-height: 1.3; margin: 0; overflow-wrap: anywhere; letter-spacing: 0; }
.plagscanx-app-overlay .psx-report-title-input { min-width: 0; width: 100%; font: inherit; font-size: 20px; padding: 7px 10px; border: 1px solid var(--psx-border, #e4e4e7); border-radius: 6px; background: var(--psx-card, #fff); color: var(--psx-text); }
.plagscanx-app-overlay .psx-report-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--psx-text-muted, #71717a); cursor: pointer; list-style: none; }
.plagscanx-app-overlay .psx-report-icon:hover { color: var(--psx-text); background: var(--psx-muted, #f4f4f5); }
.psx-report-heading .psx-report-icon:focus-visible, .psx-report-heading .psx-report-title-input:focus-visible, .psx-report-row button:focus-visible { outline: 2px solid var(--psx-primary); outline-offset: 2px; }
.psx-report-heading .psx-icon, .psx-report-row .psx-icon { width: 18px; height: 18px; flex-shrink: 0; }
.psx-report-save-status { margin: 0; font-size: 12px; color: var(--psx-text-muted); }
.psx-report-save-status:empty { display: none; }
.psx-report-title-error { grid-column: 1 / -1; color: var(--psx-danger, #b91c1c); font-size: 14px; margin: 0; }
#view-history { container: reports / inline-size; }
.plagscanx-app-overlay .psx-reports-page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 40px 48px; color: var(--psx-text, #18181b); }
.psx-reports-page [hidden] { display: none !important; }
.psx-reports-collection { --psx-report-table-border: #e4e4e7; border: 1px solid var(--psx-report-table-border); border-radius: 20px; background: var(--psx-card, #fff); }
.psx-reports-mobile-select { display: none; }
.psx-reports-access { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; font-size: 13px; }
.psx-reports-access p { margin: 0; max-width: 70ch; color: var(--psx-muted-foreground, #52525b); }
.psx-reports-access .psx-unlock-report { margin-inline-start: auto; }
.psx-reports-toolbar { --psx-reports-control-height: 40px; --psx-reports-control-radius: 999px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--psx-report-table-border); }
.psx-reports-toolbar .psx-collection-search { max-width: 340px; height: var(--psx-reports-control-height); min-height: var(--psx-reports-control-height); border-radius: var(--psx-reports-control-radius); }
.plagscanx-app-overlay .psx-reports-toolbar .psx-collection-search input { height: calc(var(--psx-reports-control-height) - 2px); }
.plagscanx-app-overlay .psx-reports-page .psx-reports-toolbar select { height: var(--psx-reports-control-height); min-height: var(--psx-reports-control-height); padding-block: 0; border-radius: var(--psx-reports-control-radius); }
#psx-reports-count { margin-inline-start: auto; color: var(--psx-muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.psx-collection-search { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 240px; max-width: 360px; min-height: 40px; border: 1px solid var(--psx-border, #e4e4e7); border-radius: 999px; padding: 0 14px; background: var(--psx-card, #fff); }
.plagscanx-app-overlay .psx-collection-search input { min-width: 0; width: 100%; height: 38px; padding: 0; background: transparent; color: var(--psx-text); border: 0; border-radius: 0; font: inherit; font-size: 14px; box-shadow: none; }
.psx-collection-search:focus-within { outline: 2px solid var(--psx-primary); outline-offset: 2px; }
.psx-collection-search .psx-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--psx-muted-foreground, #52525b); }
.plagscanx-app-overlay .psx-reports-page select { width: auto; max-width: 100%; min-height: 40px; padding: 6px 30px 6px 12px; font: inherit; font-size: 13px; color: var(--psx-text); border: 1px solid var(--psx-border); border-radius: 6px; background-color: var(--psx-card, #fff); }
.psx-reports-bulk { display: flex; gap: 6px; align-items: center; margin-inline-start: auto; font-size: 13px; }
.psx-reports-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--psx-text); font-size: 14px; }
.psx-reports-table th { text-align: start; padding: 12px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--psx-muted, #f4f4f5); color: var(--psx-muted-foreground, #52525b); border-color: var(--psx-report-table-border); border-bottom: 1px solid var(--psx-report-table-border); }
.psx-reports-table td { height: 64px; padding: 12px; border-color: var(--psx-report-table-border); border-bottom: 1px solid var(--psx-report-table-border); vertical-align: middle; }
.psx-reports-table th:nth-child(1) { width: 52px; }
.psx-reports-table th:nth-child(2) { width: auto; }
.psx-reports-table th:nth-child(3) { width: 14%; }
.psx-reports-table th:nth-child(4) { width: 24%; }
.psx-reports-table th:nth-child(5) { width: 20%; }
.psx-reports-table th:nth-child(6) { width: 84px; }
.psx-reports-table th:first-child, .psx-reports-table td:first-child { padding-inline-start: 20px; }
.psx-reports-table th:last-child, .psx-reports-table td:last-child { padding-inline-end: 20px; text-align: end; }
.psx-report-row:hover, .psx-report-row.is-selected { background: var(--psx-muted, #f4f4f5); }
.psx-report-row.is-selected { background: color-mix(in srgb, var(--psx-primary) 7%, var(--psx-card, #fff)); }
.plagscanx-app-overlay .psx-report-open { border: 0; padding: 0; background: transparent; color: var(--psx-text); font: inherit; font-weight: 500; text-align: start; overflow-wrap: anywhere; cursor: pointer; }
.psx-report-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.psx-report-name-content { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; column-gap: 10px; min-width: 0; }
.psx-report-name-content > .psx-icon { width: 16px; height: 16px; color: var(--psx-muted-foreground); }
.psx-report-name-content .psx-report-open { display: block; min-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.psx-report-row.is-locked .psx-report-open { color: var(--psx-muted-foreground); }
.psx-report-name-content .psx-report-row-id { grid-column: 2; }
.psx-report-row-id { display: block; margin-top: 4px; font-size: 12px; color: var(--psx-muted-foreground, #52525b); overflow-wrap: anywhere; }
.psx-report-type, .psx-report-date { font-size: 13px; line-height: 1.5; color: var(--psx-muted-foreground, #52525b); overflow-wrap: anywhere; }
.psx-report-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.psx-report-badge { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 8px; border-radius: 6px; color: #3f3f46; background: #f4f4f5; font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.psx-report-badge strong { font-size: 13px; font-weight: 600; }
.psx-report-badge.is-low { color: #28623a; background: #edf7ef; }
.psx-report-badge.is-mixed { color: #77570a; background: #fbf5dc; }
.psx-report-badge.is-likely { color: #9a411a; background: #fff0e6; }
.psx-report-badge.is-high { color: #a52b28; background: #fbeceb; }
.psx-reports-table .psx-report-badge { min-width: 0; max-width: 100%; padding: 3px 8px; gap: 4px; }
.psx-reports-table .psx-report-badge > span { min-width: 0; overflow-wrap: anywhere; }
.psx-reports-table .psx-report-badge strong { min-width: 0; overflow-wrap: anywhere; white-space: nowrap; font-size: inherit; }
.plagscanx-app-overlay .psx-report-unlock { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--psx-border); border-radius: 6px; background: var(--psx-card); color: var(--psx-text); font: inherit; font-size: 12px; cursor: pointer; }
.psx-report-selection input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--psx-primary); }
.psx-report-selection input { margin: 0; vertical-align: middle; }
.psx-reports-table .psx-report-unlock { border-radius: 999px; padding: 5px 10px; line-height: 1.4; }
.psx-reports-table .psx-report-unlock .psx-icon { width: 13px; height: 13px; }
.psx-report-actions-menu { position: relative; }
.psx-report-actions-menu > summary { margin-inline-start: auto; }
.psx-report-actions-menu summary::-webkit-details-marker { display: none; }
.psx-report-actions-menu[open] { z-index: 5; }
.psx-report-actions-list { position: absolute; inset-inline-end: 0; top: 40px; width: 200px; max-width: calc(100vw - 48px); padding: 6px; background: var(--psx-card, #fff); border: 1px solid var(--psx-report-table-border); border-radius: 8px; text-align: start; overflow-y: auto; }
.psx-report-actions-menu.is-upward .psx-report-actions-list { top: auto; bottom: 40px; }
.plagscanx-app-overlay .psx-report-actions-list button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; min-height: 38px; margin: 0; padding: 8px 10px; border: 0; background: transparent; color: var(--psx-text); font: inherit; font-size: 13px; border-radius: 4px; text-align: start; cursor: pointer; }
.plagscanx-app-overlay .psx-report-actions-list button .psx-icon { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.plagscanx-app-overlay .psx-report-actions-list button:hover { background: var(--psx-muted); }
.plagscanx-app-overlay .psx-report-actions-list .delete-scan { color: #a52b28; }
.psx-report-actions-list button + .delete-scan { border-top: 1px solid var(--psx-report-table-border); margin-top: 6px; border-radius: 0 0 4px 4px; }
.psx-report-inline-editor { display: flex; flex-wrap: wrap; gap: 4px; }
.psx-report-inline-editor input { min-width: 0; flex: 1 1 120px; padding: 7px; font: inherit; border: 1px solid var(--psx-border); background: var(--psx-card); color: var(--psx-text); border-radius: 4px; }
.psx-report-inline-editor .psx-report-title-error { flex-basis: 100%; }
.psx-reports-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 20px; border-color: var(--psx-report-table-border); font-size: 13px; color: var(--psx-muted-foreground, #52525b); }
.psx-reports-pagination label { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; }
.psx-reports-page-controls, #psx-reports-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.psx-reports-page-controls { margin-inline-start: auto; }
.plagscanx-app-overlay .psx-reports-pagination select { min-height: 34px; border-radius: 10px; }
.plagscanx-app-overlay .psx-reports-page-controls button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 34px; width: auto; height: 34px; padding: 0 8px; border: 1px solid var(--psx-border); border-radius: 999px; background: var(--psx-card); color: var(--psx-text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.plagscanx-app-overlay .psx-reports-page-controls button:hover { background: var(--psx-muted); }
.plagscanx-app-overlay .psx-reports-page-controls button[aria-current="page"] { background: var(--psx-primary); color: #fff; border-color: var(--psx-primary); }
.psx-reports-collection .psx-inline-state { margin: 0; padding: 32px 20px; font-size: 14px; color: var(--psx-muted-foreground); }
.psx-reports-collection .psx-reports-retry { margin: 0 20px 24px; }
.psx-reports-page button:focus-visible, .psx-reports-page summary:focus-visible, .psx-reports-page select:focus-visible, .psx-reports-page input:focus-visible { outline: 2px solid var(--psx-primary); outline-offset: 2px; }
.psx-reports-page button:disabled { color: var(--psx-muted-foreground); opacity: .6; cursor: not-allowed; }
@container reports (max-width: 900px) {
    .psx-reports-mobile-select { display: flex; align-items: center; gap: 8px; font-size: 13px; }
    .psx-reports-mobile-select input { width: 17px; height: 17px; accent-color: var(--psx-primary); }
    #psx-reports-select-all { visibility: hidden; }
    .plagscanx-app-overlay .psx-reports-page { padding: 20px; }
    .psx-reports-table, .psx-reports-table tbody { display: block; }
    .psx-reports-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .psx-reports-table tr { display: grid; grid-template-columns: 24px minmax(0, 1fr) 40px; gap: 8px 12px; padding: 16px 20px; border-bottom: 1px solid var(--psx-report-table-border); }
    .psx-reports-table td, .psx-reports-table td:first-child, .psx-reports-table td:last-child { height: auto; padding: 0; border: 0; min-width: 0; text-align: start; }
    .psx-report-name-content .psx-report-open { white-space: normal; overflow-wrap: anywhere; }
    .psx-reports-table .psx-report-selection { grid-column: 1; grid-row: 1; padding-top: 3px; }
    .psx-reports-table .psx-report-name { grid-column: 2; grid-row: 1; }
    .psx-reports-table .psx-report-type { grid-column: 2; }
    .psx-reports-table .psx-report-result, .psx-reports-table .psx-report-date { grid-column: 2 / -1; }
    .psx-reports-table .psx-report-actions-cell { grid-column: 3; grid-row: 1; }
    .psx-report-actions-menu summary.psx-report-icon { width: 40px; height: 40px; }
    .psx-reports-toolbar .psx-collection-search { max-width: none; }
}
@container reports (max-width: 480px) {
    .plagscanx-app-overlay .psx-reports-page { padding: 16px; }
    .psx-collection-search { max-width: none; flex-basis: 100%; }
    .psx-reports-toolbar select { flex: 1 1 160px; min-width: 0; }
    .psx-reports-mobile-select { flex-basis: 100%; }
    .psx-reports-bulk { margin-inline-start: 0; }
    #psx-reports-count { margin-inline-start: 0; }
    .psx-reports-toolbar, .psx-reports-pagination { padding: 16px; }
    .psx-reports-table tr { grid-template-columns: 20px minmax(0, 1fr) 36px; gap: 8px; padding: 16px; }
    .psx-reports-table .psx-report-actions-menu summary.psx-report-icon { width: 36px; height: 36px; }
    .psx-report-name-content { display: block; }
    .psx-report-name-content > .psx-icon { display: none; }
    .psx-reports-page-controls { margin-inline-start: 0; }
}
@media (max-width: 680px) {
    .psx-report-heading { padding: 20px 16px 8px; gap: 8px; }
    .plagscanx-app-overlay .psx-report-title { font-size: 20px; }
    .plagscanx-app-overlay .psx-report-title-input { font-size: 16px; }
}
