:root {
  --admin-sidebar-width: 200px;
  --admin-bg: #f4f6f9;
  --admin-sidebar: #111827;
  --admin-accent: #0d6efd;
}

html, body {
  height: 100%;
}

.admin-body {
  background: var(--admin-bg);
  margin: 0;
}

.guest-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, #dbeafe, transparent 45%),
    var(--admin-bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.admin-sidebar {
  width: var(--admin-sidebar-width);
  min-height: 100vh;
  background: var(--admin-sidebar);
  color: #fff;
  flex-shrink: 0;
}

.sidebar-link {
  color: rgba(255, 255, 255, 0.75);
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 0.65rem 0.85rem;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  background: rgba(13, 110, 253, 0.35);
}

.admin-topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.admin-content {
  background: var(--admin-bg);
}

.dash-card {
  transition: transform .12s ease, box-shadow .12s ease;
}

.dash-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 .5rem 1rem rgba(17, 24, 39, .08) !important;
}

.dash-card .h3 {
  letter-spacing: -0.02em;
}

/* Bootstrap 5.1 的 .badge 默认白色字；浅色底会看不清，统一用可读色 */
.status-pill {
  display: inline-block;
  padding: 0.28em 0.55em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 0.25rem;
  white-space: nowrap;
  vertical-align: baseline;
}

.status-pill-success {
  background: #d1e7dd;
  color: #0f5132 !important;
}

.status-pill-warning {
  background: #fff3cd;
  color: #664d03 !important;
}

.status-pill-danger {
  background: #f8d7da;
  color: #842029 !important;
}

.status-pill-muted {
  background: #e9ecef;
  color: #495057 !important;
}

.status-pill-dark {
  background: #212529;
  color: #fff !important;
}

/* 兼容仍在用 Bootstrap badge / text-bg-* 的页面，强制可读对比度 */
.admin-content .badge.bg-warning,
.admin-content .badge.bg-warning.text-dark,
.admin-content .badge.text-bg-warning {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}

.admin-content .badge.bg-success,
.admin-content .badge.text-bg-success {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.admin-content .badge.bg-danger,
.admin-content .badge.text-bg-danger {
  background-color: #f8d7da !important;
  color: #842029 !important;
}

.admin-content .badge.bg-secondary,
.admin-content .badge.bg-light,
.admin-content .badge.text-bg-secondary,
.admin-content .badge.text-bg-light {
  background-color: #e9ecef !important;
  color: #495057 !important;
}

.admin-content .badge.text-bg-dark,
.admin-content .badge.bg-dark {
  background-color: #212529 !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    min-height: auto;
  }
}
