/* Incident Reports dashboard (on top of the portal's main/forms/tables/portal CSS). */

.admin-user-info a { margin-right: var(--spacing-sm); }

.filter-actions { justify-content: flex-end; }

#reportsTable td { vertical-align: top; }
#reportsTable .small { font-size: 0.8125rem; }
#reportsTable tr.clickable-row { cursor: pointer; }
#reportsTable tr.clickable-row:hover { background: #f1f5fa; }
#reportsTable .btn { white-space: normal; max-width: 11rem; line-height: 1.25; }
#reportsTable .btn:disabled { background: #e9ecef; color: var(--text-muted); border-color: var(--border-color); cursor: default; }

.when-done { font-size: 0.8125rem; color: var(--text-muted); margin-top: var(--spacing-xs); }

.status-badge.gloa-only { background: #eee8fb; color: #4b3a99; }

.history { margin: 0; padding-left: 1.25rem; font-size: 0.875rem; }
.history li { margin-bottom: var(--spacing-xs); }

/* GHSA MIS copy box */
.mis-table { width: 100%; border-collapse: collapse; margin-bottom: var(--spacing-md); }
.mis-table th,
.mis-table td { padding: 0.375rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; font-size: 0.9375rem; }
.mis-table th { width: 34%; color: var(--text-muted); font-weight: 600; }
/* Long values (the description) wrap, so the Copy button stays in view (tables.css sets nowrap) */
.mis-table td { white-space: normal; overflow-wrap: anywhere; }
.mis-table td:last-child { width: 1%; white-space: nowrap; }
.mis-people th { width: auto; }
.mis-people td:last-child { width: auto; white-space: normal; }
.mis-heading { font-size: 1rem; color: var(--primary-color); margin: var(--spacing-md) 0 var(--spacing-sm); }

.btn-link { background: none; border: none; padding: 0; color: var(--secondary-color); cursor: pointer; font-size: 0.8125rem; text-decoration: underline; }

@media (max-width: 768px) {
  .mis-table th { width: auto; }
}

/* The shared tables.css keeps cells on one line; this table has long team and
   school names, so let them wrap and keep the table inside the page. */
#reportsTable th,
#reportsTable td { white-space: normal; }
#reportsTable td.nowrap { white-space: nowrap; }
#reportsTable td:nth-child(2) { min-width: 11rem; }

/* Phones and narrow windows: one card per report, each value labelled. */
@media (max-width: 900px) {
  #reportsTable thead { display: none; }
  #reportsTable, #reportsTable tbody, #reportsTable tr, #reportsTable td { display: block; width: 100%; }
  #reportsTable tr.clickable-row { padding: var(--spacing-sm) 0; }
  #reportsTable td { padding: 0.25rem var(--spacing-md); }
  #reportsTable td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
  #reportsTable .btn { max-width: none; }
}

@media (max-width: 600px) {
  .admin-user-info { flex-wrap: wrap; gap: var(--spacing-sm); }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-sm); }
  .filter-group, .filter-group select, .filter-group input { width: 100%; min-width: 0; }
  .filter-group:has(#fType), .filter-group:has(#fSearch), .filter-actions { grid-column: 1 / -1; }
}

/* AI-Generated Feedback in the report details (read-only) */

/* Reports table: smaller header text */
#reportsTable th { font-size: 0.875rem; }

/* Status column: the action button sits under the status badge */
.status-action { margin-top: var(--spacing-xs); }
.status-action .btn { white-space: nowrap; }
#reportsTable td[data-label="Status"] { min-width: 11rem; }
