* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

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

.card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.audit-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.timeline-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.events-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.audit-toggle {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.audit-toggle:hover {
  background: #f1f5f9;
  color: #475569;
}

.timeline-toggle {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.timeline-toggle:hover {
  background: #f1f5f9;
  color: #475569;
}

.events-toggle {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.events-toggle:hover {
  background: #f1f5f9;
  color: #475569;
}

.audit-section.audit-collapsed .audit-panel {
  display: none;
}

.events-section.events-collapsed .events-panel {
  display: none;
}

.timeline-section.timeline-collapsed .timeline-panel {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
}

.summary-card h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
}

.summary-card p {
  margin: 0;
  font-size: 13px;
  color: #1f2937;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px 12px;
}

label {
  font-size: 13px;
  font-weight: 600;
}

input,
select,
button {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 400px;
  margin-top: 8px;
}

.inline-checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.timeline-controls {
  max-width: 420px;
}

.inline-checkbox input {
  width: auto;
  margin: 0;
}

button {
  background: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  vertical-align: top;
  text-align: left;
  font-size: 13px;
}

th {
  background: #f9fafb;
}

#meta {
  font-size: 13px;
  color: #4b5563;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.panel-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #f9fafb;
}

.panel-card h3 {
  margin-top: 0;
}

.resource-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 0;
}

.resource-item:last-child {
  border-bottom: none;
}

.resource-item p {
  margin: 4px 0;
}

pre {
  white-space: pre-wrap;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
}

@media (max-width: 800px) {
  .filters,
  .panel-grid,
  .actions {
    grid-template-columns: 1fr;
  }
}
