* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  font-family: Arial, sans-serif;
  color: #e5edf5;
  background: #111827;
}

.popup {
  padding: 14px;
}

h1 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.status {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid #334155;
  font-size: 13px;
}

.toggle {
  display: grid;
  grid-template-columns: 42px 34px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.toggle span[id$="-status"] {
  width: 42px;
  text-align: right;
}

.toggle-slider {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #475569;
  transition: background 120ms ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 120ms ease;
}

.toggle input:checked ~ .toggle-slider {
  background: #22c55e;
}

.toggle input:checked ~ .toggle-slider::before {
  transform: translateX(16px);
}

.toggle input:focus-visible ~ .toggle-slider {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.toggle input:disabled ~ .toggle-slider {
  opacity: 0.65;
}

.evidence-retention {
  display: grid;
  gap: 10px;
}

.evidence-retention h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.maintenance-warning {
  padding: 8px 10px;
  border: 1px solid #3f6f56;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #bbf7d0;
  background: #14251d;
}

.maintenance-warning[hidden] {
  display: none;
}

.evidence-counts {
  display: grid;
  gap: 6px;
  margin: 0;
}

.evidence-counts div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.evidence-counts dt {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
}

.evidence-counts dd {
  margin: 0;
  min-width: 28px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.retention-status {
  min-height: 16px;
  font-size: 12px;
  line-height: 1.35;
  color: #cbd5e1;
  word-break: break-word;
}

button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #475569;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  color: #e5edf5;
  background: #1f2937;
}

button:disabled {
  cursor: default;
  opacity: 0.65;
}
