:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f4;
  color: #18211d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(720px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 48px 0;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9dfd5;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(24, 33, 29, 0.08);
  padding: clamp(24px, 5vw, 48px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #49705b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  color: #33443b;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid #b9c5ba;
  border-radius: 8px;
  background: #fbfcfa;
  color: #18211d;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(75, 130, 92, 0.22);
  border-color: #49705b;
}

button,
.button-link {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f6f50;
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

button.secondary {
  background: #e8ede7;
  color: #203329;
}

button.danger {
  background: #a13b2d;
  color: #ffffff;
}

button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.batch-actions {
  margin-top: 16px;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.message {
  min-height: 24px;
  margin-top: 18px;
  color: #52615a;
}

.message[data-tone="error"] {
  color: #a13b2d;
}

.message[data-tone="success"] {
  color: #1f6f50;
}

.result {
  margin-top: 22px;
  border-top: 1px solid #d9dfd5;
  padding-top: 22px;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
}

dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
}

dt {
  color: #5c6b63;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hash-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-shell {
  width: min(1120px, calc(100vw - 32px));
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.section-header p {
  margin: 0;
  color: #5c6b63;
}

.message.compact {
  margin: 8px 0 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

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

th {
  color: #44564d;
  font-weight: 800;
  background: #f6f8f5;
}

td {
  overflow-wrap: anywhere;
}

td a {
  color: #1f6f50;
  font-weight: 750;
}

.row-check {
  width: 18px;
  min-height: 18px;
  accent-color: #1f6f50;
}

.switch {
  width: 48px;
  height: 28px;
  display: inline-flex;
  position: relative;
}

.switch input {
  opacity: 0;
  width: 0;
  min-height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #b9c5ba;
  cursor: pointer;
  transition: background 0.16s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 33, 29, 0.22);
  transition: transform 0.16s ease;
}

.switch input:checked + .switch-slider {
  background: #1f6f50;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.status-ok {
  color: #1f6f50;
  font-weight: 750;
}

.status-muted {
  color: #6a746e;
}

.copy-dialog {
  width: min(620px, calc(100vw - 32px));
  border: 1px solid #d9dfd5;
  border-radius: 8px;
  padding: 24px;
  color: #18211d;
  background: #ffffff;
  box-shadow: 0 20px 80px rgba(24, 33, 29, 0.2);
}

.copy-dialog::backdrop {
  background: rgba(24, 33, 29, 0.32);
}

.copy-dialog form {
  display: grid;
  gap: 14px;
}

.copy-dialog textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.dialog-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

@media (max-width: 560px) {
  .input-row,
  dl > div {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .section-header,
  .dialog-header {
    display: grid;
  }
}
