body {
  padding: 28px 0 60px;
}

.admin {
  padding-top: 10px;
}

.admin__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.admin__back {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.admin__back:hover {
  color: var(--title);
}

.admin__title h1 {
  margin: 0 0 6px;
  text-align: center;
}

.admin__actions {
  display: flex;
  justify-content: flex-end;
}

.admin__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.admin__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin__card--wide {
  grid-column: 1 / -1;
}

.admin-form {
  max-width: 520px;
}

.admin-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.admin-list {
  margin-top: 10px;
}

.admin-list__items {
  display: grid;
  gap: 10px;
}

.admin-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
  padding: 12px;
  display: grid;
  gap: 10px;
}

html[data-theme="dark"] .admin-item {
  background: rgba(255, 255, 255, 0.06);
}

.admin-item--empty {
  border-style: dashed;
  border-color: rgba(169, 105, 79, 0.38);
  background: rgba(194, 132, 102, 0.10);
}

.admin-item--filled {
  border-color: rgba(107, 127, 115, 0.38);
}

html[data-theme="dark"] .admin-item--empty {
  background: rgba(216, 154, 124, 0.10);
  border-color: rgba(216, 154, 124, 0.34);
}

html[data-theme="dark"] .admin-item--filled {
  border-color: rgba(150, 173, 159, 0.32);
}

.field--empty input,
.field--empty textarea {
  border-color: rgba(169, 105, 79, 0.40);
  background: rgba(194, 132, 102, 0.10);
}

.field--filled input,
.field--filled textarea {
  border-color: rgba(107, 127, 115, 0.38);
}

html[data-theme="dark"] .field--empty input,
html[data-theme="dark"] .field--empty textarea {
  background: rgba(216, 154, 124, 0.12);
  border-color: rgba(216, 154, 124, 0.34);
}

html[data-theme="dark"] .field--filled input,
html[data-theme="dark"] .field--filled textarea {
  border-color: rgba(150, 173, 159, 0.30);
}

.admin-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 10px;
}

.admin-sections {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.admin-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

html[data-theme="dark"] .admin-details {
  background: rgba(0, 0, 0, 0.18);
}

.admin-details__summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--title);
  background: rgba(31, 29, 25, 0.03);
  list-style: none;
}

.admin-details__summary::-webkit-details-marker {
  display: none;
}

.admin-details[open] > .admin-details__summary {
  border-bottom: 1px solid var(--border);
}

.admin-details__body {
  padding: 12px 14px 14px;
}

.admin-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-cols--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-details--json .admin-json {
  min-height: 240px;
}

.admin-item__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.admin-item__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-item__remove {
  white-space: nowrap;
}

.admin-preview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 12px;
  display: none;
}

.admin-json {
  width: 100%;
  min-height: 340px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(248, 244, 239, 0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
}

html[data-theme="dark"] .admin-json {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-text {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(248, 244, 239, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

html[data-theme="dark"] .admin-text {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .admin-table-wrap {
  background: rgba(0, 0, 0, 0.25);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: left;
  z-index: 1;
}

.admin-select {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-solid);
  font-size: 13px;
}

@media (max-width: 920px) {
  .admin__head {
    grid-template-columns: 1fr;
  }
  .admin__title h1 {
    text-align: left;
  }
  .admin__actions {
    justify-content: flex-start;
  }
  .admin__grid {
    grid-template-columns: 1fr;
  }
}

