html,
body {
  height: 100%;
}

body.admin-body {
  background: #f7f8fa;
  color: #111111;
  display: flex;
  flex-direction: column;
}

main,
.page-main,
.admin-main {
  flex: 1 0 auto;
}

.site-logo {
  height: 68px;
  width: auto;
}

.admin-header,
.admin-footer {
  background: #fffdf9;
}

.admin-brand-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #8f79bd 0%, #6a5796 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.admin-card {
  border-color: #e3e7ec !important;
  box-shadow: 0 16px 40px rgba(19, 27, 34, 0.05);
}

.admin-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8a96;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.admin-stat-value {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #111827;
}

.admin-list-item {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  background: #fcfcfb;
}

.admin-list-link:hover {
  background: #f8f9fb;
}

.admin-user-toggle {
  text-decoration: none;
  border: 1px solid #e5e7eb;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
}

.admin-user-toggle:focus,
.admin-user-toggle:hover {
  text-decoration: none;
  color: #111827 !important;
  border-color: #d6dbe1;
  background: #f9fafb;
}

.admin-user-caret {
  font-size: 0.8rem;
  line-height: 1;
}

.admin-user-menu {
  border-radius: 1rem;
  border-color: #e5e7eb;
  padding: 0.5rem;
  min-width: 220px;
}

.admin-user-menu .dropdown-item {
  border-radius: 0.7rem;
  padding: 0.6rem 0.85rem;
}

.admin-photo-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.admin-featured-image {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.admin-delete-preview {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.admin-additional-image-thumb {
  width: 140px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.admin-drag-handle {
  cursor: grab !important;
  line-height: 1;
  padding: 0.45rem 0.55rem;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-drag-handle:hover,
.admin-drag-handle:focus {
  cursor: grab !important;
}

.admin-drag-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.admin-drag-lines span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #8c949d;
}

.admin-additional-image-row {
  cursor: grab;
  position: relative;
}

.admin-additional-image-row.is-dragging {
  opacity: 0.55;
}

.admin-additional-image-row.drop-before::before,
.admin-additional-image-row.drop-after::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #6a5796;
  border-radius: 999px;
}

.admin-additional-image-row.drop-before::before {
  top: -10px;
}

.admin-additional-image-row.drop-after::after {
  bottom: -10px;
}

.admin-inventory-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
}

.admin-inventory-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #7a8a96;
  background: #f4f6f8;
}

.admin-draft-label {
  color: #b42318;
}

.admin-help-copy strong {
  font-weight: 700;
}

.admin-main .btn,
.admin-header .btn,
.admin-footer .btn,
.admin-main .btn-dark,
.admin-main .btn-outline-dark,
.admin-main .btn-danger,
.admin-header .btn-dark,
.admin-header .btn-outline-dark,
.admin-footer .btn-dark,
.admin-footer .btn-outline-dark {
  --bs-btn-color: #495057;
  --bs-btn-bg: #f8f9fb;
  --bs-btn-border-color: #ced4da;
  --bs-btn-hover-color: #495057;
  --bs-btn-hover-bg: #e9ecef;
  --bs-btn-hover-border-color: #c4cbd3;
  --bs-btn-active-color: #495057;
  --bs-btn-active-bg: #dee2e6;
  --bs-btn-active-border-color: #c4cbd3;
}

.admin-main .btn-outline-danger {
  --bs-btn-color: #b42318;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #f1b7b2;
  --bs-btn-hover-color: #b42318;
  --bs-btn-hover-bg: #fdeaea;
  --bs-btn-hover-border-color: #e9a39c;
  --bs-btn-active-color: #b42318;
  --bs-btn-active-bg: #fbd5d2;
  --bs-btn-active-border-color: #e9a39c;
}
