/* ── Audit Log Page ───────────────────────────────────────────────────────── */

.audit-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.audit-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.audit-input,
.audit-select {
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 7px 12px;
  background: #fff;
  color: #1f2937;
}

.audit-input  { min-width: 220px; }
.audit-select { min-width: 160px; }

.audit-input:focus,
.audit-select:focus { outline: none; border-color: #667eea; }

.audit-loading,
.audit-empty,
.audit-error {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 0.9rem;
}
.audit-error { color: #dc2626; }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 0.85rem;
}

.audit-table th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.audit-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.audit-table tbody tr:last-child td { border-bottom: none; }
.audit-table tbody tr:hover td { background: #f9fafb; }

.audit-table a { color: #4f46e5; text-decoration: none; }
.audit-table a:hover { text-decoration: underline; }

.audit-ts   { white-space: nowrap; color: #6b7280; }
.audit-note { color: #6b7280; max-width: 300px; }

/* Event type badges */
.audit-event {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  background: #f3f4f6;
  color: #374151;
}

.ev-onboarded  { background: #ede9fe; color: #6d28d9; }
.ev-completed  { background: #d1fae5; color: #065f46; }
.ev-started    { background: #dbeafe; color: #1d4ed8; }
.ev-reopened   { background: #f3f4f6; color: #6b7280; }
.ev-reprint    { background: #fee2e2; color: #b91c1c; }
.ev-status     { background: #fef3c7; color: #b45309; }
.ev-date       { background: #fef3c7; color: #b45309; }
.ev-note       { background: #f3f4f6; color: #9ca3af; }

.audit-load-more {
  font-family: inherit;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 24px;
  cursor: pointer;
  color: #4b5563;
}
.audit-load-more:hover { background: #f9fafb; }
