:root {
  --platform-ink: #1c1915;
}

.admin-header {
  background: #1c1915;
  color: #fffcf7;
  padding: 1rem 1.25rem 0.75rem;
}

.admin-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.admin-brand {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0.04em;
}

.admin-header h1 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-tabs {
  max-width: 1100px;
  margin: 0.85rem auto 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-tabs select {
  min-width: 12rem;
  padding: 0.4rem 0.55rem;
}

.admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.admin-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.admin-panel h2 {
  margin: 0 0 0.75rem;
}

.menu-links {
  padding-left: 1.2rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line, #d9d1c3);
  border-radius: 12px;
  background: #fffcf7;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #ece6db;
  vertical-align: middle;
}

.data-table th {
  background: #f4f1ea;
  font-weight: 600;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 12rem;
}

.action-chooser {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 16rem;
}

.action-chooser-select {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  color: #1c1915;
  background: #fff;
  border: 1px solid #c9bfb0;
  border-radius: 8px;
}

.action-chooser-select--danger {
  border-color: #d4a5a5;
  color: #8b2e2e;
}

.action-chooser-go {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  color: #fffcf7;
  background: #1c1915;
  border: 1px solid #1c1915;
  border-radius: 8px;
  cursor: pointer;
}

.action-chooser-go:hover,
.action-chooser-go:focus-visible {
  background: #3a3530;
  border-color: #3a3530;
}

.btn-secondary,
button.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

.admin-header .btn-secondary {
  color: #fffcf7;
  border-color: #8a8378;
}

.btn-tiny {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #c9bfb0;
  background: #fff;
  cursor: pointer;
}

.btn-tiny.danger {
  color: #8b2e2e;
  border-color: #d4a5a5;
}

.stack-form {
  display: grid;
  gap: 0.65rem;
  max-width: 36rem;
}

.stack-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  padding: 0.45rem 0.55rem;
  border: 1px solid #c9bfb0;
  border-radius: 8px;
  font: inherit;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 21, 0.45);
}

.admin-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fffcf7;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.admin-modal-head h3 {
  margin: 0;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.admin-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.display-pair-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
  max-height: min(50vh, 22rem);
  overflow: auto;
}

.display-pair-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c9bfb0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.display-pair-option:hover,
.display-pair-option:focus-visible {
  border-color: #1c1915;
  outline: 2px solid #c9bfb0;
  outline-offset: 1px;
}

.display-pair-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.display-pair-option--demo {
  border-color: #2c4a3e;
  background: #f2f7f4;
}

.display-pair-option-title {
  font-weight: 700;
}

.display-pair-option-sub {
  font-size: 0.9rem;
  color: #5c564c;
}

.display-pair-option-meta {
  font-size: 0.8rem;
  color: #7a7266;
}

#display-pair-code {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c9bfb0;
  border-radius: 8px;
  font: inherit;
  letter-spacing: 0.12em;
}

.muted {
  color: #5c564c;
}
