.admin-shell {
  width: min(1380px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(53, 35, 18, 0.16);
}

.admin-header h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  letter-spacing: 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-identity {
  font-weight: 700;
}

.admin-back-link {
  color: var(--accent-2);
  font-weight: 700;
}

.admin-status {
  min-height: 1.4rem;
  margin: 14px 0;
  color: var(--muted);
}

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

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid rgba(53, 35, 18, 0.14);
}

.admin-stats > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 20px;
}

.admin-stats > div + div {
  border-left: 1px solid rgba(53, 35, 18, 0.14);
}

.admin-stats strong {
  font-size: 2rem;
  line-height: 1;
}

.admin-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 18px 0;
}

.admin-tabs {
  display: flex;
  border: 1px solid rgba(53, 35, 18, 0.18);
  border-radius: 6px;
  overflow: hidden;
}

.admin-tab {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.admin-tab.is-active {
  background: var(--accent);
  color: #fffaf3;
}

.admin-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(53, 35, 18, 0.2);
  border-radius: 6px;
  background: #fffaf3;
  color: var(--text);
  font: inherit;
}

.admin-table-wrap {
  overflow-x: auto;
  border-block: 1px solid rgba(53, 35, 18, 0.16);
  background: rgba(255, 250, 243, 0.7);
}

.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.admin-table-wrap th,
.admin-table-wrap td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(53, 35, 18, 0.1);
  text-align: left;
  vertical-align: middle;
}

.admin-table-wrap th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table-wrap select {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(53, 35, 18, 0.18);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

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

.admin-row-actions button {
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: none;
}

.admin-delete {
  background: #963c34;
}

.admin-empty {
  padding: 30px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 720px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header h1 {
    font-size: 1.7rem;
  }

  .admin-header-actions {
    justify-content: flex-start;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-stats > div + div {
    border-left: 0;
    border-top: 1px solid rgba(53, 35, 18, 0.14);
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    width: max-content;
  }
}