* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #1d2430;
}

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

.header h1 {
  margin: 0 0 8px;
}

.header p {
  margin: 0;
  color: #4b5563;
}

.filters {
  margin-top: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 10px 12px;
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 10px 12px;
}

.inline-control select {
  border: 1px solid #c7ced8;
  border-radius: 6px;
  padding: 4px 6px;
}

.export-actions {
  display: inline-flex;
  gap: 8px;
}

.export-actions button {
  border: 1px solid #c7ced8;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  cursor: pointer;
}

.export-actions button:hover {
  background: #f2f6fb;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 14px;
}

.kpi-card h2 {
  font-size: 14px;
  margin: 0 0 6px;
  color: #4b5563;
}

.kpi-card p {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
}

.table-wrapper {
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #eef1f5;
  font-size: 14px;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #f9fbfc;
  z-index: 1;
}

tr:hover td {
  background: #fafcff;
}

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

.pill.ok {
  color: #0f5132;
  background: #d1e7dd;
}

.pill.no {
  color: #842029;
  background: #f8d7da;
}

.pill.open {
  color: #6b7280;
  background: #eceff3;
}

.pill.reviewed {
  color: #0f5132;
  background: #d1e7dd;
}

.pill.issue {
  color: #842029;
  background: #f8d7da;
}

.muted {
  color: #6b7280;
  font-style: italic;
}

.error {
  margin-top: 12px;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  padding: 10px;
}

.id-button {
  border: none;
  background: none;
  color: #0d6efd;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.id-button:hover {
  color: #0b5ed7;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay[hidden] {
  display: none !important;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.overlay-content {
  position: relative;
  z-index: 11;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #dce1e7;
  padding: 16px;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.overlay-header h2 {
  margin: 0;
}

.close-button {
  border: 1px solid #c7ced8;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.overlay-body h3 {
  margin-bottom: 6px;
}

.overlay-content-text {
  white-space: pre-wrap;
  line-height: 1.4;
}

.review-form {
  display: grid;
  gap: 10px;
}

.review-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.review-form input,
.review-form textarea {
  border: 1px solid #c7ced8;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.status-button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-button {
  text-align: left;
  border: 1px solid #c7ced8;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  cursor: pointer;
}

.status-button:hover {
  background: #f2f6fb;
}

.status-button.is-active {
  border-color: #0d6efd;
  background: #e8f1ff;
}

.validation-message {
  margin: 0;
  padding: 8px;
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  background: #f8d7da;
  color: #842029;
  font-size: 14px;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
}

.review-actions button {
  border: 1px solid #c7ced8;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  cursor: pointer;
}
