/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
  background: #f4f6f9;
  font-family: system-ui;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-toggler {
  border-color: #dbe2ea;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}

.navbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-toggle {
  border: none;
  background: none;
  color: #2563eb;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.navbar-search:hover .search-form,
.navbar-search:focus-within .search-form {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-form input {
  border: none;
  outline: none;
  width: 100%;
}

@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
  }

  .navbar .navbar-nav {
    gap: 6px;
  }

  .navbar-search {
    width: 100%;
  }

  .search-toggle {
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px;
    border: 1px solid #dbe2ea;
    padding-left: 12px;
  }

  .search-form {
    position: static;
    width: 100%;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-radius: 8px;
  }
}

/* ============================================
   SEARCH BOX
   ============================================ */

.search-box {
  background: white;
  padding: 10px;
  border-radius: 12px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: 90px 0;
  background: linear-gradient(120deg, #2563eb, #3b82f6);
  color: white;
}

/* ============================================
   AD CARDS
   ============================================ */

.ad-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
}

.ad-label {
  font-size: 12px;
  color: #999;
  position: absolute;
  bottom: 10px;
  right: 15px;
}

.landing-ad-card {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.45;
}

.landing-ad-image-wrap {
  width: 100%;
  max-width: 280px;
}

.landing-ad-image {
  width: 100%;
  max-width: 280px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
}

.landing-ad-title-link {
  color: #111827;
  text-decoration: none;
}

.landing-ad-card:hover .landing-ad-title-link,
a.landing-ad-title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.landing-ad-card p {
  color: #4b5563;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.card-link-wrap {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link-wrap:hover,
.card-link-wrap:focus {
  color: inherit;
  text-decoration: none;
}

.card-link-wrap .card {
  cursor: pointer;
}

/* ============================================
   BUSINESS CARDS
   ============================================ */

.business-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 350px;
  transition: transform 0.3s ease;
}

.business-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.business-banner {
  height: 250px;
  object-fit: cover;
}

.business-logo-img {
  max-width: 100%;
  height: auto;
}

.business-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.business-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-img {
  height: 200px;
  object-fit: cover;
  padding: 10px;
}

.product-page {
  padding: 30px 0;
}

.product-page .price {
  font-size: 24px;
  font-weight: 600;
  color: #2563eb;
  margin: 15px 0;
}

.product-page .description {
  color: #666;
  margin: 15px 0;
  line-height: 1.6;
}

.add-to-cart-form {
  margin: 20px 0;
}

.business-info {
  padding: 15px;
  background: #f9f9f9;
  border-radius: 10px;
}

.related-products {
  padding: 30px 0;
}

/* ============================================
   BUSINESS GRID (All Businesses Page)
   ============================================ */

.businesses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 40px 0;
}

@media (max-width: 1024px) {
  .businesses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .businesses-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.business-item {
  width: 100%;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 40px 0;
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.product-item {
  width: 100%;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
  padding: 40px 0;
  background: linear-gradient(120deg, #2563eb, #3b82f6);
  color: white;
}

.page-header h1 {
  margin-bottom: 0;
}

.page-header .lead {
  margin-bottom: 0;
}

/* ============================================
   LOADING SPINNER & END MESSAGE
   ============================================ */

.loading-spinner {
  text-align: center;
  padding: 40px;
  display: none;
}

.loading-spinner.active {
  display: block;
}

.spinner-border {
  color: #2563eb;
}

.end-message {
  text-align: center;
  padding: 40px;
  color: #999;
  display: none;
}

.end-message.active {
  display: block;
}

/* ============================================
   CONTAINERS
   ============================================ */

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1200px) {
  .container,
  .container-fluid {
    width: 75vw;
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   BRAND SECTION
   ============================================ */

.brand-section {
  background: white;
  padding: 80px 0;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: #111;
  color: white;
  padding: 40px;
  margin-top: 60px;
  text-align: center;
}

.footer {
  background: #111;
  color: white;
  padding: 40px;
}

/* ============================================
   RATINGS
   ============================================ */

.rating i {
  color: #fbbf24;
}

/* ============================================
   BUSINESS PROFILE
   ============================================ */

.business-profile {
  background: #f9f9f9;
  padding: 0;
}

.business-profile .description {
  color: #666;
  line-height: 1.6;
}

/* ============================================
   CARD BODY FLEX
   ============================================ */

.card-body {
  padding: 15px;
  /* display: flex; */
  flex-direction: column;
  justify-content: space-between;
}

.business-show-shell {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.business-show-brand {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.business-show-header {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f7;
}

.business-show-logo {
  max-height: 140px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.14);
}

.rating-stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

.rating-stars.small {
  font-size: 0.9rem;
}

.review-card {
  background: #f8fafc;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  max-height: 960px;
  overflow: auto;
}

.review-item {
  border-top: 1px solid #e7edf5;
  padding-top: 14px;
  margin-top: 14px;
}

.review-item:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.share-url-wrap {
  display: flex;
  gap: 8px;
  width: min(100%, 560px);
}

.share-url-wrap input {
  min-width: 240px;
}

@media (max-width: 768px) {
  .business-show-brand {
    height: 180px;
  }

  .review-card {
    max-height: unset;
  }

  .share-url-wrap {
    width: 100%;
  }
}

.business-enquiry-form textarea {
  resize: vertical;
}

.message-list-scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e9edf4;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.message-list-scroll.archived {
  max-height: 220px;
}

.conversation-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
}

.conversation-link:hover {
  background: #f3f7ff;
  border-color: #d9e5ff;
}

.conversation-link.active {
  background: #eaf2ff;
  border-color: #bdd3ff;
}

.messages-thread {
  background: #f7f9fd;
  border: 1px solid #e9eef7;
  border-radius: 12px;
  padding: 14px;
  max-height: 460px;
  overflow: auto;
}

.msg-row {
  display: flex;
  margin-bottom: 10px;
}

.msg-row.mine {
  justify-content: flex-end;
}

.msg-row.theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 80%;
  background: #ffffff;
  border: 1px solid #dce6f8;
  border-radius: 12px;
  padding: 10px;
}

.msg-row.mine .msg-bubble {
  background: #e8f1ff;
  border-color: #c8dcff;
}

.msg-bubble pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.95rem;
}

.nav-latest-message {
  display: block;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.conversation-preview {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */

.pd-page {
  background: #f5f7fb;
  min-height: 100vh;
  padding-bottom: 60px;
}

.pd-breadcrumb {
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  padding: 10px 0;
}

.pd-breadcrumb .breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.pd-breadcrumb .breadcrumb-item a {
  color: #2563eb;
  text-decoration: none;
}

.pd-breadcrumb .breadcrumb-item.active {
  color: #6b7280;
}

.pd-main {
  padding-top: 36px;
  padding-bottom: 20px;
}

/* Image Frame */
.pd-image-frame {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #c0c8d8;
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  padding: 40px;
  text-align: center;
}

/* Seller badge */
.pd-seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f5ff;
  border: 1px solid #dce8ff;
  border-radius: 50px;
  padding: 5px 14px 5px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background 0.2s;
}

.pd-seller-badge:hover {
  background: #dce8ff;
  color: #1d4ed8;
}

.pd-seller-badge-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.pd-seller-badge-icon {
  width: 24px;
  height: 24px;
  background: #2563eb;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
}

.pd-seller-badge-location {
  color: #6b7280;
  font-weight: 400;
  font-size: 0.78rem;
}

/* Title & Price */
.pd-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 14px;
}

.pd-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

/* Stock badge */
.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.pd-stock.in-stock {
  background: #dcfce7;
  color: #16a34a;
}

.pd-stock.out-of-stock {
  background: #fee2e2;
  color: #dc2626;
}

.pd-stock-qty {
  font-weight: 400;
  opacity: 0.8;
}

/* Description */
.pd-description {
  color: #4b5563;
  line-height: 1.7;
  font-size: 1rem;
  margin-top: 14px;
}

.pd-divider {
  height: 1px;
  background: #e9eef6;
  margin: 20px 0;
}

/* Owner alert */
.pd-owner-alert {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  padding: 14px 18px;
  font-size: 0.9rem;
}

/* Quantity Stepper */
.pd-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pd-qty-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}

.pd-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
}

.pd-qty-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #374151;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-qty-btn:hover:not(:disabled) {
  background: #e5e7eb;
}

.pd-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pd-qty-val {
  width: 48px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #111827;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  line-height: 40px;
  display: inline-block;
}

/* Order Summary Mini Card */
.pd-summary {
  background: #f8faff;
  border: 1px solid #dde8ff;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.pd-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 6px;
}

.pd-summary-row:last-child {
  margin-bottom: 0;
}

.pd-summary-divider {
  height: 1px;
  background: #dde8ff;
  margin: 10px 0;
}

.pd-summary-total {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
}

/* Note input */
.pd-note-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.pd-note-input {
  border-radius: 10px;
  border-color: #d1d5db;
  font-size: 0.9rem;
  resize: vertical;
}

.pd-note-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Order Now Button */
.pd-btn-order {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 24px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.pd-btn-order:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

.pd-btn-order:active {
  transform: translateY(0);
}

.pd-cta-hint {
  font-size: 0.78rem;
  color: #6b7280;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}

.pd-cta-wrap {
  display: flex;
  flex-direction: column;
}

/* External site button */
.pd-btn-external {
  border-radius: 10px;
  font-size: 0.9rem;
  padding: 10px 16px;
  color: #374151;
  border-color: #d1d5db;
}

.pd-btn-external:hover {
  background: #f3f4f6;
}

/* Sold By Card */
.pd-sold-by {
  background: #ffffff;
  border: 1px solid #e9eef6;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.pd-sold-by-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.pd-sold-by-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.pd-sold-by-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.pd-sold-by-name {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
  text-decoration: none;
}

.pd-sold-by-name:hover {
  color: #2563eb;
}

.pd-sold-by-loc {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

.pd-sold-by-desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.55;
  margin-top: 12px;
  margin-bottom: 12px;
}

.pd-btn-visit-store {
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 8px;
  border-color: #2563eb;
  color: #2563eb;
  font-weight: 600;
}

.pd-btn-visit-store:hover {
  background: #2563eb;
  color: #fff;
}

/* Related Products */
.pd-related {
  border-top: 1px solid #e5e7eb;
}

.pd-related-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
}

.pd-related-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pd-related-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pd-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.pd-related-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.pd-related-empty {
  width: 100%;
  height: 160px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 2rem;
}

.pd-related-body {
  padding: 12px 14px;
}

.pd-related-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-related-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .pd-title {
    font-size: 1.5rem;
  }

  .pd-price {
    font-size: 1.75rem;
  }

  .pd-image-frame {
    aspect-ratio: 4 / 3;
  }
}

/* ============================================
   SITE ADMIN PANEL
   ============================================ */

.sa-wrapper {
  display: flex;
  min-height: calc(100vh - 78px);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 26%),
    linear-gradient(180deg, #f7fbfc 0%, #edf4f7 100%);
}

.sa-sidebar {
  width: 276px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #10212d 0%, #0f172a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 14px 0 30px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 78px);
}

.sa-sidebar-logo {
  padding: 26px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sa-sidebar-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

.sa-sidebar-logo-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sa-sidebar-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
}

.sa-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sa-sidebar-meta {
  padding: 16px 22px 12px;
}

.sa-sidebar-meta-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 12px 14px;
}

.sa-sidebar-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.sa-sidebar-meta-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
}

.sa-nav {
  flex: 1;
  padding: 10px 12px 14px;
}

.sa-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sa-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
  transform: translateX(2px);
  text-decoration: none;
}

.sa-nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(37, 99, 235, 0.18));
  box-shadow: inset 0 0 0 1px rgba(148, 197, 255, 0.18);
}

.sa-nav-item i {
  width: 18px;
  text-align: center;
}

.sa-nav-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 12px 10px;
}

.sa-sidebar-footer {
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sa-main {
  flex: 1;
  overflow: auto;
  padding: 28px 30px 36px;
}

.sa-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.sa-page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #10212d;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.1;
}

.sa-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dff8f3 0%, #dbeafe 100%);
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.06);
}

.sa-subtitle {
  color: #5b6b79;
  font-size: 0.96rem;
  max-width: 760px;
  margin: 8px 0 0;
}

.sa-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sa-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 18px;
  margin-bottom: 22px;
}

.sa-hero-card {
  background: linear-gradient(135deg, #10212d 0%, #13364c 58%, #0f766e 100%);
  color: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 45px rgba(16, 33, 45, 0.18);
}

.sa-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.86);
  margin-bottom: 16px;
}

.sa-hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 10px;
}

.sa-hero-copy {
  max-width: 620px;
  color: rgba(255,255,255,0.82);
  font-size: 0.96rem;
  margin-bottom: 20px;
}

.sa-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sa-kpi-tile {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
}

.sa-kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.66);
  margin-bottom: 6px;
}

.sa-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.sa-action-stack {
  display: grid;
  gap: 12px;
}

.sa-card,
.sa-stat-card,
.sa-summary-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(216, 228, 235, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.sa-stat-card {
  padding: 20px 22px;
  height: 100%;
}

.sa-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 14px;
}

.sa-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #10212d;
  line-height: 1;
}

.sa-stat-label {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sa-stat-note {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.86rem;
}

.sa-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #ebf1f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(250,252,255,0.96) 0%, rgba(245,249,251,0.96) 100%);
}

.sa-card-title {
  font-weight: 800;
  font-size: 1rem;
  color: #10212d;
  margin: 0;
}

.sa-card-subtitle {
  color: #64748b;
  font-size: 0.84rem;
  margin-top: 4px;
}

.sa-card-body {
  padding: 22px;
}

.sa-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfd 100%);
  border: 1px solid #dfe9ee;
  border-radius: 16px;
  padding: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #22313f;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sa-quick-link:hover {
  color: #0f766e;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #bfe5dc;
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.08);
}

.sa-quick-link i:first-child {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e6faf5;
  color: #0f766e;
}

.sa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.sa-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sa-search-input,
.sa-filter-select {
  border: 1px solid #d9e4ea;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 0.9rem;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sa-search-input {
  min-width: 220px;
}

.sa-search-input:focus,
.sa-filter-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.sa-filter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-filter-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 700;
}

.sa-pending-section {
  border: 1px solid #f7ddad;
  background: linear-gradient(180deg, #fff8e7 0%, #fff5dc 100%);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.08);
}

.sa-pending-title {
  font-weight: 800;
  color: #92400e;
  font-size: 0.96rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.sa-table th {
  background: #f7fbfc;
  color: #64748b;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 13px 16px;
  border-bottom: 1px solid #e6edf1;
  white-space: nowrap;
}

.sa-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef3f6;
  color: #334155;
  vertical-align: middle;
  background: rgba(255,255,255,0.72);
}

.sa-table tr:last-child td {
  border-bottom: none;
}

.sa-table tr:hover td {
  background: #f9fcfd;
}

.sa-row-title {
  font-weight: 700;
  color: #10212d;
}

.sa-row-meta {
  color: #64748b;
  font-size: 0.82rem;
  margin-top: 3px;
}

.sa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.sa-badge-active     { background: #dcfce7; color: #15803d; }
.sa-badge-blocked    { background: #fee2e2; color: #b91c1c; }
.sa-badge-restricted { background: #fef3c7; color: #b45309; }
.sa-badge-pending    { background: #ffedd5; color: #c2410c; }
.sa-badge-approved   { background: #dcfce7; color: #15803d; }
.sa-badge-rejected   { background: #fee2e2; color: #b91c1c; }
.sa-badge-admin      { background: #ede9fe; color: #6d28d9; }
.sa-badge-business   { background: #dbeafe; color: #1d4ed8; }
.sa-badge-customer   { background: #e0f2fe; color: #0369a1; }
.sa-badge-reset      { background: #fff7ed; color: #c2410c; }

.sa-action-btn {
  border: none;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.sa-action-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  filter: brightness(0.98);
}

.sa-btn-edit    { color: #1d4ed8; background: #e8f0ff; }
.sa-btn-block   { color: #b91c1c; background: #ffe7e7; }
.sa-btn-unblock { color: #15803d; background: #e4fbe7; }
.sa-btn-warn    { color: #b45309; background: #fff1d6; }
.sa-btn-approve { color: #15803d; background: #dff8eb; }
.sa-btn-reject  { color: #b91c1c; background: #ffe6e6; }
.sa-btn-delete  { color: #b91c1c; background: #ffe3e3; }
.sa-btn-view    { color: #0f766e; background: #ddfbf3; }
.sa-btn-reset   { color: #c2410c; background: #fff0e2; }

.sa-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.sa-summary-card {
  padding: 16px 18px;
}

.sa-summary-label {
  color: #64748b;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 8px;
}

.sa-summary-value {
  color: #10212d;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.sa-summary-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

.sa-info-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8aa0ad;
  font-weight: 800;
  margin-bottom: 5px;
}

.sa-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sa-detail-card {
  padding: 16px;
  border-radius: 16px;
  background: #f9fcfd;
  border: 1px solid #e6eef2;
}

.sa-description-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: #f9fcfd;
  border: 1px solid #e6eef2;
}

.sa-empty {
  text-align: center;
  color: #64748b;
  padding: 34px 18px;
}

.sa-empty i {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 10px;
  opacity: 0.32;
}

.sa-inline-image {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e6eef2;
}

.sa-user-link {
  color: #0f766e;
  text-decoration: none;
  font-weight: 700;
}

.sa-user-link:hover {
  text-decoration: underline;
}

@media (max-width: 1199px) {
  .sa-overview-grid,
  .sa-summary-grid,
  .sa-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .sa-wrapper {
    flex-direction: column;
  }

  .sa-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }

  .sa-main {
    padding: 20px 16px 28px;
  }

  .sa-header {
    flex-direction: column;
  }

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

  .sa-overview-grid,
  .sa-summary-grid,
  .sa-detail-grid,
  .sa-kpi-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sa-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sa-nav-item {
    flex: 1 1 150px;
    justify-content: center;
  }

  .sa-card-header,
  .sa-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .sa-search-input,
  .sa-filter-select {
    width: 100%;
  }

  .sa-page-title {
    font-size: 1.45rem;
  }
}

/* ============================================
   SITE ADMIN — THEME SETTINGS PAGE
   ============================================ */

.sa-theme-section {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.sa-theme-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #10212d;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f3f6;
}
