.admin-shell {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-shell--hidden {
  display: none;
}

.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 64, 0.48);
  backdrop-filter: blur(4px);
}

.admin-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid rgba(37, 63, 184, 0.12);
  box-shadow: 0 30px 80px rgba(18, 27, 64, 0.24);
  padding: 24px;
}

.admin-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.admin-card__header h2 {
  margin: 0 0 6px;
}

.admin-card__header p {
  margin: 0;
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 16px;
}

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

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.button--danger {
  border-color: rgba(220, 67, 67, 0.24);
  color: #b13a3a;
}

.theme-dark .button--danger {
  border-color: rgba(255, 120, 120, 0.28);
  color: #ff8b8b;
}

.admin-message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.admin-message--hidden {
  display: none;
}

.admin-message--error {
  background: #fff4f4;
  border: 1px solid #f2caca;
  color: #b13a3a;
}

.admin-message--success {
  background: #eefaf3;
  border: 1px solid #cdecd9;
  color: #1f7f4b;
}

.admin-hint,
.admin-meta {
  color: var(--muted);
  font-size: 13px;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 63, 184, 0.08);
}

.topbar__user-meta {
  display: grid;
  gap: 2px;
  min-width: 140px;
}

.topbar__user-meta strong {
  font-size: 14px;
}

.topbar__user-meta span {
  color: var(--muted);
  font-size: 12px;
}

.topbar__user-button {
  height: 40px;
}

.topbar__user-button--admin {
  display: none;
}

.topbar__user-button--admin.is-visible {
  display: inline-flex;
}

@media (max-width: 920px) {
  .topbar {
    flex-direction: column;
  }

  .topbar__user {
    width: 100%;
    justify-content: space-between;
  }

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