html,
body {
  min-height: 100%;
}

body {
  background: #f5f7f6;
  color: #1f2933;
}

a {
  color: inherit;
}

.page-main {
  min-height: calc(100vh - 128px);
}

.navbar .nav-link.active,
.profile-menu .active {
  font-weight: 600;
}

.navbar-search {
  min-width: 220px;
}

.navbar-search .form-control {
  min-width: 0;
}

.navbar-search .btn {
  flex-shrink: 0;
  min-width: 3.5rem;
  white-space: nowrap;
}

.home-hero {
  background: linear-gradient(135deg, #eef8f1 0%, #f7fbff 55%, #fff8ed 100%);
  border-bottom: 1px solid #e5e7eb;
}

.hero-search .form-control,
.hero-search .btn {
  min-height: 52px;
}

.notice-panel,
.section-panel,
.auth-page .card,
.goods-card,
.admin-login-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.notice-panel,
.section-panel {
  padding: 24px;
}

.notice-content {
  white-space: pre-line;
}

.fixed-category-name {
  font-weight: 600;
}

.category-tile {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  color: #1f2933;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.category-tile small {
  color: #697586;
}

.category-tile:hover,
.goods-card:hover {
  border-color: #9fd5b3;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

.goods-card {
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.goods-thumb-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f6;
}

.goods-thumb,
.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-image {
  max-height: 520px;
  border-radius: 8px;
  background: #eef2f6;
  border: 1px solid #e5e7eb;
}

.price {
  color: #d9480f;
  font-size: 1.08rem;
}

.empty-state {
  padding: 32px;
  color: #697586;
  background: #f8faf9;
  border: 1px dashed #cbd5df;
  border-radius: 8px;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f3f6f8;
}

.stat-card,
.admin-stat {
  min-height: 104px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.stat-card strong,
.admin-stat strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  color: #198754;
}

.stat-card span,
.admin-stat span {
  color: #697586;
  font-size: 0.9rem;
}

.admin-stat.danger strong {
  color: #dc3545;
}

.profile-menu {
  position: sticky;
  top: 84px;
}

.profile-menu .list-group-item {
  border-color: #e5e7eb;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.admin-body,
.admin-login-body {
  background: #eef2f4;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px minmax(0, 1fr);
}

.admin-sidebar {
  padding: 24px 16px;
  color: #f8fafc;
  background: #243447;
}

.admin-brand {
  display: block;
  margin-bottom: 24px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav a {
  padding: 10px 12px;
  color: #d9e2ec;
  text-decoration: none;
  border-radius: 8px;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.admin-content {
  padding: 24px;
}

.admin-table th {
  white-space: nowrap;
  color: #52616f;
  font-weight: 600;
}

.admin-edit-row {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfcfd;
}

.admin-edit-row + .admin-edit-row {
  margin-top: 12px;
}

.report-form {
  display: grid;
  min-width: 260px;
  gap: 8px;
}

.status-select {
  min-width: 96px;
}

.admin-login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  width: min(100%, 420px);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
}

.admin-login-mark {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 14px;
  background: #198754;
}

.auth-page {
  min-height: calc(100vh - 148px);
}

@media (max-width: 991.98px) {
  .navbar-search {
    width: 100%;
    min-width: 0;
    margin-bottom: 0.75rem;
  }

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

  .admin-sidebar {
    position: static;
    padding: 16px;
  }

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

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-content,
  .notice-panel,
  .section-panel {
    padding: 18px;
  }
}

@media (max-width: 575.98px) {
  .admin-nav {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 16px 12px;
  }

  .section-panel,
  .notice-panel {
    padding: 16px;
  }

  .hero-search .input-group {
    display: grid;
    gap: 10px;
  }

  .hero-search .btn,
  .hero-search .form-control {
    width: 100%;
    border-radius: 0.5rem !important;
  }
}