/* The manager's screen. Same tokens as the public site, but flatter and
   denser: this is a working surface, not a page to be impressed by. */

.admin-body {
  background: #f7fbfc;
}

.admin-nav {
  margin-inline-start: auto;
}

.admin-who {
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-head {
  padding-bottom: clamp(16px, 2vw, 28px);
}

.admin-blocked {
  max-width: 520px;
  margin-bottom: 80px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.tab {
  min-height: 44px;
  padding: 9px 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.tab:hover {
  color: var(--teal-deep);
}

.tab[aria-selected="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.admin-status {
  min-height: 1.6em;
  margin: 16px 0 0;
  font-size: 0.94rem;
  color: var(--teal-deep);
}

.admin-status.is-error {
  color: #a3314f;
}

.panel {
  padding-block: 24px 80px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  position: sticky;
  top: 90px;
}

.admin-form h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.admin-form label,
.checks legend,
.member-search span {
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-deep);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  width: 100%;
}

.admin-form textarea {
  min-height: auto;
  resize: vertical;
  line-height: 1.6;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: var(--teal);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-pair label {
  display: block;
}

.checks {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.checks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}

.checks input {
  width: auto;
  min-height: auto;
  accent-color: var(--teal);
}

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

.admin-list-wrap h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.admin-count {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.member-search {
  display: block;
  margin: 0;
}

.subhead {
  margin: 36px 0 6px;
  font-size: 1.1rem;
}

.member-search input {
  width: min(320px, 100%);
  min-height: 46px;
  margin-top: 6px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.admin-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.admin-row-main {
  flex: 1 1 260px;
  min-width: 0;
}

.admin-row-title {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-row-meta {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal-deep);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.row-button:hover {
  border-color: var(--teal);
  background: var(--mist);
}

.row-button.danger {
  color: #a3314f;
  border-color: rgba(163, 49, 79, 0.35);
}

.row-button.danger:hover {
  background: #fdeef2;
  border-color: #a3314f;
}

.status-tag {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-tag.published {
  background: rgba(106, 163, 67, 0.16);
  color: #3f6627;
}

.status-tag.draft {
  background: rgba(6, 90, 111, 0.1);
  color: var(--teal-deep);
}

.category-editor {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.category-row input {
  min-height: 44px;
  padding: 9px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  width: 100%;
}

.category-row input:focus {
  border-color: var(--teal);
}

.category-actions {
  display: flex;
  gap: 6px;
}

.empty-row {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--mist);
}

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

  .admin-form {
    position: static;
  }

  .category-row {
    grid-template-columns: 1fr;
  }
}
