.admin-header {
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 5%;
  flex-wrap: wrap;
}
.admin-brand {
  font-family: Georgia, serif;
  font-size: 30px;
  text-decoration: none;
  margin-right: auto;
}
.admin-brand b {
  color: var(--gold);
  font-weight: 400;
}
.admin-brand small {
  display: block;
  font:
    8px Arial,
    sans-serif;
  letter-spacing: 2px;
  margin-top: 5px;
}
.admin-header > a:last-of-type {
  font-size: 12px;
}
.admin-main {
  max-width: 1260px;
  padding: 28px 5%;
  margin: auto;
}
.prototype-note {
  background: #eee6d3;
  color: #665223;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 22px;
}
.auth-card {
  background: white;
  max-width: 460px;
  margin: 40px auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 32px;
  margin: 14px 0;
}
.auth-card p {
  font-size: 13px;
  color: var(--muted);
}
form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  background: white;
  border: 1px solid #cdd3c9;
  border-radius: 6px;
  font-weight: 400;
  color: var(--ink);
}
#auth-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}
#user-form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.user-item .item-copy h3 {
  overflow-wrap: anywhere;
}
.text-button {
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  text-decoration: underline;
  padding: 6px;
}
.help {
  font-size: 11px !important;
  margin-top: 16px !important;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 30px 0;
}
.admin-title h1 {
  font-size: 40px;
  margin: 6px 0;
}
.admin-title p {
  font-size: 13px;
  color: var(--muted);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 25px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 20px;
}
.stat strong {
  display: block;
  font-size: 30px;
  color: var(--brand);
  margin-top: 8px;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.admin-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 32px 0 22px;
}
.admin-tabs button {
  padding: 14px 0;
  background: none;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  font-size: 13px;
}
.admin-tabs button[aria-pressed="true"] {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 700;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar > label {
  flex: 1;
  min-width: 150px;
}
.toolbar > button {
  margin-left: auto;
}
.item-list {
  display: grid;
  gap: 10px;
}
.admin-item {
  background: white;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
}
.item-copy {
  flex: 1;
  min-width: 160px;
}
.item-copy h3 {
  font-size: 15px;
}
.item-copy p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.item-actions button {
  padding: 8px;
  font-size: 11px;
  background: #eef0e9;
  color: var(--brand);
  border-radius: 5px;
}
.item-actions button.danger {
  color: #943e2e;
  background: #f8eae5;
}
.status {
  font-size: 10px;
  background: #e6efe5;
  color: #356534;
  border-radius: 30px;
  padding: 5px 9px;
}
.status.inactive {
  background: #eee9e4;
  color: #7c6352;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: min(740px, 94vw);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 24px 90px #0003;
}
dialog::backdrop {
  background: #102b25aa;
}
dialog h2 {
  font-size: 28px;
}
dialog p {
  margin: 12px 0;
  font-size: 13px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-grid .checkbox-label {
  flex-direction: row;
  align-items: center;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 26px;
}
.image-preview {
  width: 130px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
}
.field-help {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.form-section {
  grid-column: 1/-1;
  font-family: Georgia, serif;
  font-size: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.admin-item button:disabled {
  cursor: default;
  opacity: 0.3;
}
.admin-header {
  background: #050505;
}
.admin-header .brand-logo {
  position: relative;
  display: block;
  width: 166px;
  height: 70px;
  overflow: hidden;
  background: #000;
}
.admin-header .brand-logo img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 332px;
  height: auto;
  max-width: none;
}
.button.secondary,
.item-actions button {
  background: #eee7d9;
}
.status {
  background: #efe1b8;
  color: #58400e;
}
.message {
  background: #f0e5c8;
  color: #49391b;
}
.admin-tabs button[aria-pressed="true"] {
  border-color: #ad8122;
}
.prototype-note {
  background: #eee6d3;
}
@media (min-width: 650px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 650px) {
  .admin-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-header {
    gap: 14px;
  }
  .admin-header > a:last-of-type {
    font-size: 10px;
  }
  .auth-card {
    padding: 25px;
  }
  .item-actions {
    width: 100%;
  }
  .toolbar > button {
    width: 100%;
  }
}
