:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111827;
  background: #f3f4f6;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #111827;
  color: #fff;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  padding: 14px;
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  min-height: calc(100vh - 96px);
}

.panel-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #374151;
}

input,
select,
button {
  font: inherit;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
}

button {
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

button.secondary {
  background: #fff;
  color: #111827;
  border-color: #d1d5db;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.list-meta {
  margin: 4px 0 8px;
}

.table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 340px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  padding: 8px;
  vertical-align: top;
}

thead {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
}

tr.issue-row {
  cursor: pointer;
}

tr.issue-row:hover {
  background: #f9fafb;
}

tr.issue-row.active {
  background: #eff6ff;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.none {
  background: #f3f4f6;
  color: #4b5563;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
}

.page-size-control select {
  padding: 5px 8px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-card section {
  margin-top: 12px;
}

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

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.issue-meta-grid {
  gap: 6px;
}

.summary-card p,
.summary-card li {
  font-size: 14px;
  line-height: 1.5;
}

.summary-card ul {
  margin: 0;
  padding-left: 18px;
}

.muted {
  color: #6b7280;
  font-size: 12px;
}

.error {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px;
  margin: 8px 0;
}

.info {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px;
  margin: 8px 0;
  font-size: 13px;
}

.loading {
  color: #2563eb;
  margin: 8px 0;
}

.hidden {
  display: none;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }

  .table-wrap {
    max-height: 400px;
  }
}
