/* ==========================================================================
   CSS SYSTEM - MMODROP HUB BÁN SỈ
   ========================================================================== */

/* 1. Thiết lập biến CSS và Reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Bảng màu chính thức */
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-soft: #DBEAFE;
  --bg: #F8FAFC;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --price: #F97316;
  --price-dark: #EA580C;
  --danger: #EF4444;
  --card: #ffffff;
  --success: #10B981;
  --success-soft: #D1FAE5;
  
  /* Bóng đổ bóng mờ mịn */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

/* 2. Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.brand img {
  height: 32px;
}

.top-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
}

.top-nav a:hover:not(.btn) {
  color: var(--blue);
  background: var(--blue-soft);
}

/* Hamburger button cho Mobile */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* 3. Base Layout */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 70vh;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 60px;
  background: #fff;
  font-size: 14px;
}

.site-footer div {
  margin-bottom: 10px;
}

.site-footer p {
  margin-top: 15px;
  font-size: 13px;
}

/* 4. Buttons & Controls */
.btn, button {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn:hover, button:hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background: var(--bg);
  color: var(--blue);
  border-color: var(--blue);
  box-shadow: none;
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* Form Fields */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* 5. Search Box & Form */
.search-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.search-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

/* 6. Hero Section */
.hero-section {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 32px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue-dark);
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-section p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.hero-btn {
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

/* Campaign strip banner */
.campaign-strip {
  margin: 16px 0 32px;
}

.campaign-strip img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.campaign-strip img:hover {
  transform: scale(1.005);
  box-shadow: var(--shadow-lg);
}

/* 7. Product Grid & Card */
.section-tight {
  margin-top: 10px;
}

section {
  margin: 40px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

.section-title h1, .section-title h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  position: relative;
}

.section-title h1::after, .section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

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

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-img {
  display: block;
  aspect-ratio: 1/1;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.06);
}

.product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.product-body h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.product-body h3 a {
  color: var(--text);
}

.product-body h3 a:hover {
  color: var(--blue);
}

.price {
  font-weight: 800;
  font-size: 18px;
  color: var(--price);
}

.price.big {
  font-size: 32px;
  color: var(--price-dark);
  letter-spacing: -1px;
}

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

.profit {
  font-size: 12px;
  color: var(--success);
  font-weight: 700;
  background: var(--success-soft);
  padding: 3px 8px;
  border-radius: 6px;
  width: max-content;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

.detail-link {
  font-size: 13px;
  color: var(--blue);
  font-weight: 700;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-link:hover {
  color: var(--blue-dark);
}

/* Badge styling */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.badge.best {
  background: #FFF7ED;
  color: #F97316;
  border: 1px solid #FDBA74;
}

.badge.trend {
  background: #FEF2F2;
  color: #EF4444;
  border: 1px solid #FCA5A5;
}

.badge.blue {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}

.badge.warn {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

/* 8. Các Trang Phụ (Public) */
.login-gate {
  text-align: center;
  background: #fff;
  border: 2px dashed var(--blue-soft);
  border-radius: 16px;
  padding: 32px 24px;
  margin: 30px 0;
  box-shadow: var(--shadow-sm);
}

.login-gate h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text);
}

.login-gate p {
  color: var(--muted);
  margin: 0 0 20px;
}

.login-gate .btn {
  margin: 5px;
}

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

.proof-card, .auth-card, .stat-card, .media-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.proof-card {
  transition: var(--transition);
}

.proof-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.proof-card img {
  height: 140px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.proof-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.proof-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-list details[open] {
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-md);
}

.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
  user-select: none;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* 9. Chi Tiết Sản Phẩm (Product Detail) */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.detail-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.detail-image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #f8fafc;
  transition: transform 0.5s ease;
}

.detail-image img:hover {
  transform: scale(1.02);
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-info h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

/* Grid thông tin sỉ chuyên nghiệp */
.info-grid-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 8px 0;
}

.info-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-grid-item span:first-child {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.info-grid-item span:last-child {
  font-size: 15px;
  font-weight: 700;
}

.detail-info .actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.detail-info .actions .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  border-radius: 10px;
}

/* Description block */
.description-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.description-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 14px;
}

.description-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* 10. Auth Card & Form */
.auth-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 28px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
}

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

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.auth-card .btn {
  padding: 12px;
  font-size: 15px;
  border-radius: 10px;
  margin-top: 10px;
}

/* 11. Các Table & View Admin Gốc (Đảm bảo an toàn) */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
}

.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-title, .admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  color: var(--blue);
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.check-row {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.media-card img {
  height: 130px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 500;
  border-left: 4px solid var(--blue);
}

.flash.error {
  background: #FEF2F2;
  color: #EF4444;
  border-left-color: var(--danger);
}

.flash.success {
  background: var(--success-soft);
  color: var(--success);
  border-left-color: var(--success);
}

.flash-wrap {
  margin-bottom: 15px;
}

/* 12. Media Queries (Responsive) */
@media (min-width: 1500px) {
  .product-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat-grid, .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-hamburger {
    display: block; /* Hiện Hamburger */
  }

  .top-nav {
    display: none; /* Ẩn mặc định menu */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .top-nav.active {
    display: flex; /* Hiện khi click */
  }

  .top-nav a {
    padding: 10px 14px;
    width: 100%;
    border-radius: 8px;
  }

  .site-header {
    padding: 10px 16px !important;
  }

  .page {
    padding: 12px;
  }

  .search-box {
    padding: 10px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }

  .search-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .search-form input[name="q"] {
    grid-column: span 2 !important;
    height: 36px !important;
    font-size: 13px !important;
    padding: 6px 10px !important;
  }

  .search-form select {
    height: 36px !important;
    font-size: 13px !important;
    padding: 4px 6px !important;
  }

  .search-form button {
    grid-column: span 2 !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 13.5px !important;
    padding: 0 !important;
  }

  .public-products-filter-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .public-products-filter-field:first-of-type {
    grid-column: span 2 !important;
  }

  .public-products-filter-field {
    margin-bottom: 0 !important;
  }

  .public-products-filter-field span {
    display: none !important;
  }

  .public-products-filter-field input,
  .public-products-filter-field select {
    height: 36px !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
  }

  .public-products-filter-actions {
    grid-column: span 2 !important;
    display: flex !important;
    gap: 6px !important;
    margin-top: 4px !important;
  }

  .public-products-filter-actions .btn {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 13px !important;
  }

  section {
    margin: 16px 0 !important;
  }

  .section-title {
    margin: 0 0 10px !important;
    padding-bottom: 6px !important;
  }

  .section-title h1, .section-title h2 {
    font-size: 17px !important;
  }

  .section-title h1::after, .section-title h2::after {
    bottom: -8px !important;
    width: 36px !important;
    height: 2px !important;
  }

  .section-title p.muted {
    display: none !important;
  }

  .faq-list details {
    padding: 8px 12px !important;
    margin-bottom: 6px !important;
    border-radius: 8px !important;
  }

  .faq-list summary {
    font-size: 13px !important;
  }

  .faq-list p {
    font-size: 12.5px !important;
    margin-top: 8px !important;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-body {
    padding: 10px;
  }

  .product-body h3 {
    font-size: 13px;
  }

  .price {
    font-size: 16px;
  }

  .detail-layout, .proof-grid, .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-grid, .media-grid {
    grid-template-columns: 1fr;
  }

  .section-title h1, .section-title h2 {
    font-size: 18px;
  }

  .hero-section {
    padding: 32px 16px;
  }

  .hero-section h1 {
    font-size: 24px;
  }

  .product-detail-cta-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .product-detail-cta-btn {
    width: 100% !important;
  }
}

/* Scoped styles for commercial home deal banner HOME-DEAL-P1 */
.home-deal-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  color: #fff !important;
  border-radius: 20px;
  padding: 32px !important;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
  text-align: left !important;
  position: relative;
  overflow: hidden;
}

.home-deal-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
}

.home-deal-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-deal-badge {
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  width: max-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-deal-badge.clearance {
  background: #F97316;
}

.home-deal-main h1 {
  font-size: 30px;
  font-weight: 800;
  color: #fff !important;
  margin: 0;
  line-height: 1.2;
}

.home-deal-main p {
  font-size: 14.5px;
  color: #94A3B8 !important;
  margin: 0;
}

.home-deal-primary-btn {
  background: #EF4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  border: none !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  width: max-content;
}

.home-deal-primary-btn:hover {
  background: #DC2626 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5) !important;
}

.home-deal-clearance {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-deal-clearance-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-deal-clearance h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.home-deal-clearance p {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}

.home-deal-clearance-link {
  font-size: 13.5px;
  color: #F97316;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
}

.home-deal-clearance-link:hover {
  color: #FB923C;
  transform: translateX(4px);
}

@media (max-width: 760px) {
  .home-deal-banner {
    padding: 20px !important;
  }
  .home-deal-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .home-deal-main h1 {
    font-size: 22px !important;
  }
  .home-deal-main p {
    font-size: 13px !important;
  }
  .home-deal-clearance {
    padding: 16px;
  }
  .home-deal-clearance h3 {
    font-size: 15px;
  }
}

/* Scoped styles for public products listing & details UI-P2 */
.public-products-header {
  margin-bottom: 20px !important;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.public-products-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-dark);
  margin: 0 0 4px;
}

.public-products-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.public-products-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--blue-soft);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.public-products-search-box {
  margin-bottom: 16px !important;
}

.public-products-filter-form {
  align-items: end;
}

.public-products-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.public-products-filter-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.public-products-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.public-products-grid-section {
  margin-top: 0 !important;
  margin-bottom: 24px !important;
}

.public-product-card-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

@media (max-width: 1400px) {
  .public-product-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 1024px) {
  .public-product-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 768px) {
  .public-product-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .public-product-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

.public-product-card {
  min-width: 0;
  padding: 8px;
  background: var(--card);
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.public-product-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.public-product-card-link-wrapper {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.public-product-card-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  display: block;
  position: relative;
  background: #f8fafc;
  width: 100%;
}

.public-product-card-image img {
  object-fit: cover;
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
}

.public-product-card:hover .public-product-card-image img {
  transform: scale(1.03);
}

.public-product-card-badges {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  z-index: 1;
}

.public-product-card-badges .badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}

.public-product-card-body {
  gap: 4px;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.public-product-card-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 400;
  min-height: 14px;
}

.public-product-card-meta-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-product-card-title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #334155;
}

.public-product-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.public-product-card-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
  color: #EA580C;
  font-size: 14px;
  font-weight: 700;
}

.public-product-card-original-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 10px;
  font-weight: 400;
  margin-left: 2px;
}

.public-product-card-moq {
  color: #F97316;
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  font-weight: 700;
}

.public-product-card-status {
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 600;
}

.public-product-card-profit {
  width: fit-content;
  font-size: 10px;
  color: var(--success);
  font-weight: 600;
  background: var(--success-soft);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
}

.public-products-empty-state {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.public-products-empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
}

.public-products-empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .public-products-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .public-products-header h1 {
    font-size: 24px;
  }

  .public-products-search-box {
    margin-bottom: 12px !important;
    padding: 12px !important;
  }

  .public-products-filter-actions .btn {
    flex: 1 1 140px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .public-product-card {
    padding: 6px;
    border-radius: 6px;
  }

  .public-product-card-body {
    gap: 2px;
    padding-top: 4px;
  }

  .public-product-card-title {
    font-size: 11.5px;
    min-height: 32px;
    line-height: 1.3;
  }

  .public-product-card-price {
    font-size: 13px;
  }

  .public-product-card-original-price {
    font-size: 9.5px;
  }

  .public-product-card-moq {
    font-size: 9px;
    padding: 0px 3px;
  }
}

/* ==========================================================================
   Staff UI CSS
   ========================================================================== */
.staff-head {
  background: #0F172A !important;
  color: #F8FAFC !important;
}

.staff-head .brand {
  color: #38BDF8 !important; /* Màu xanh neon nhạt chuyên nghiệp */
}

.staff-head .top-nav a {
  color: #E2E8F0 !important;
}

.staff-head .top-nav a:hover:not(.btn) {
  color: #38BDF8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

.staff-head .nav-hamburger {
  color: #F8FAFC !important;
}

.staff-dashboard-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
  border-left: 4px solid var(--blue);
  padding-left: 12px;
}

/* Thẻ Dashboard Staff nổi bật */
.staff-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.staff-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 4px solid var(--border);
  transition: var(--transition);
}

.staff-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.staff-stat-card.products { border-top-color: #3B82F6; }
.staff-stat-card.media { border-top-color: #F97316; }
.staff-stat-card.marketing { border-top-color: #10B981; }
.staff-stat-card.promotions { border-top-color: #EF4444; }

.staff-stat-card strong {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.staff-stat-card.products strong { color: #3B82F6; }
.staff-stat-card.media strong { color: #F97316; }
.staff-stat-card.marketing strong { color: #10B981; }
.staff-stat-card.promotions strong { color: #EF4444; }

.staff-stat-card span {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}

/* Khu vực Quick Actions */
.staff-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.staff-action-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.staff-action-card:hover {
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-md);
}

.staff-action-card svg {
  width: 32px;
  height: 32px;
  color: var(--blue);
}

.staff-action-card strong {
  font-size: 14px;
  color: var(--text);
}

/* Badge trạng thái sẫm màu tinh tế */
.staff-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  width: max-content;
}
.staff-badge.active { background: #D1FAE5; color: #065F46; }
.staff-badge.preview { background: #FEF3C7; color: #92400E; }
.staff-badge.lock { background: #F1F5F9; color: #475569; }

/* Bảng Todo ảo */
.staff-todo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.staff-todo-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
}

.staff-todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.staff-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.staff-todo-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.staff-todo-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  background: #F8FAFC;
  flex-shrink: 0;
}

.staff-todo-checkbox.checked svg {
  width: 12px;
  height: 12px;
  fill: var(--success);
}

.staff-todo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.staff-todo-info strong {
  font-size: 14px;
  color: var(--text);
}
.staff-todo-info.checked strong {
  text-decoration: line-through;
  color: var(--muted);
}

.staff-todo-info span {
  font-size: 12px;
  color: var(--muted);
}

/* Mockup Drag & Drop Media */
.staff-mock-uploader {
  border: 2px dashed #93C5FD;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: #EFF6FF;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
}

.staff-mock-uploader:hover {
  background: #DBEAFE;
  border-color: var(--blue);
}

.staff-mock-uploader svg {
  width: 48px;
  height: 48px;
  color: var(--blue);
  margin: 0 auto 12px;
}

.staff-mock-uploader strong {
  display: block;
  font-size: 15px;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.staff-mock-uploader p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Hộp cảnh báo Mockup an toàn */
.staff-notice-banner {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: #B45309;
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-notice-banner svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Layout danh sách Mockup */
.staff-mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.staff-mock-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-mock-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

.staff-mock-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.staff-mock-card-body strong {
  font-size: 14px;
  color: var(--text);
}

.staff-mock-card-body input {
  font-size: 12px;
  padding: 6px 10px;
  background: #F8FAFC;
  border-color: var(--border);
  cursor: text;
}

/* Timeline khuyến mãi */
.staff-promo-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.staff-promo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.staff-promo-card:hover {
  border-color: var(--blue-soft);
  transform: translateX(4px);
}

.staff-promo-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-promo-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.staff-promo-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.staff-promo-info span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 760px) {
  .staff-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .staff-quick-actions {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .staff-mock-grid {
    grid-template-columns: 1fr !important;
  }
  .staff-promo-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* CSS Helpers Bổ sung cho Staff Media & Marketing (Step 4) */
.staff-url-input {
  word-break: break-all;
  white-space: normal;
  font-family: monospace;
  font-size: 11px;
  background: #F8FAFC !important;
  border: 1px solid var(--border);
  color: #475569;
  width: 100%;
}

.staff-media-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.staff-upload-preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.staff-upload-preview-area img {
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  background: #F1F5F9;
}

/* Accordion FAQ */
.staff-faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}

.staff-faq-header {
  padding: 12px 16px;
  background: #F8FAFC;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: var(--transition);
}

.staff-faq-header:hover {
  background: #F1F5F9;
}

.staff-faq-content {
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: #fff;
}

/* Tabs */
.staff-tab-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  overflow-x: auto;
}

.staff-tab-btn {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.staff-tab-btn:hover {
  color: var(--blue);
}

.staff-tab-btn.active {
  color: var(--blue);
  background: #fff;
  border-bottom: 2px solid var(--blue);
  margin-bottom: -10px;
}

/* CSS Helpers Bổ sung cho Staff Promotions (Step 5) */
.staff-badge-active {
  background-color: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.staff-badge-upcoming {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.staff-badge-expired {
  background-color: #E2E8F0;
  color: #475569;
  border: 1px solid #CBD5E1;
}
.staff-badge-disabled {
  background-color: #F1F5F9;
  color: #94A3B8;
  border: 1px solid #E2E8F0;
}
.staff-badge-error {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* CSS Layout Cho Staff Seller Center (Step 6) */
.staff-body-reset {
  margin: 0;
  padding: 0;
  background-color: #F8FAFC;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--dark);
}

.staff-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.staff-sidebar {
  width: 260px;
  background-color: #1E293B;
  color: #F1F5F9;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

.staff-sidebar-brand-wrapper {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.staff-sidebar-brand {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.staff-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
}

.staff-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
  overflow-y: auto;
}

.staff-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #94A3B8;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.staff-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.staff-nav-item:hover {
  background-color: rgba(255,255,255,0.05);
  color: #fff;
}

.staff-nav-item.active {
  background-color: var(--blue-soft) !important;
  color: #fff !important;
}

.staff-sidebar-divider {
  height: 1px;
  background-color: rgba(255,255,255,0.08);
  margin: 12px 4px;
}

.staff-logout-item {
  color: #FCA5A5;
}
.staff-logout-item:hover {
  background-color: rgba(239,68,68,0.1);
  color: #EF4444;
}

/* Main Content Layout */
.staff-main-wrapper {
  margin-left: 260px;
  flex-grow: 1;
  min-width: 0;
}

.staff-main-content {
  padding: 30px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.staff-mobile-header {
  display: none;
}

/* Mobile responsive styles */
@media (max-width: 992px) {
  .staff-sidebar {
    transform: translateX(-100%);
  }
  .staff-sidebar.active {
    transform: translateX(0);
  }
  .staff-sidebar-close {
    display: block;
  }
  .staff-main-wrapper {
    margin-left: 0;
    padding-top: 60px;
  }
  .staff-main-content {
    padding: 20px;
  }
  .staff-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1E293B;
    color: #fff;
    padding: 0 16px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .staff-mobile-brand {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
  }
  .staff-hamburger-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
  }
  .staff-hamburger-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
}

/* ==========================================================================
   ADMIN STAFF MANAGEMENT SYSTEM (Step 6.5C Scoped UI)
   ========================================================================== */

/* Highlight active menu item in Admin top navigation */
.admin-head .top-nav a.active {
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
  font-weight: 600 !important;
}

.admin-staff-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 0;
}

.admin-staff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-staff-header-content {
  flex: 1;
  min-width: 250px;
}

.admin-staff-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px 0;
}

.admin-staff-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.admin-staff-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-staff-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.admin-staff-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-staff-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-staff-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: var(--muted);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-staff-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

.admin-staff-table tr:hover td {
  background-color: #F8FAFC;
}

.admin-staff-disabled-row {
  opacity: 0.6;
  background-color: #F8FAFC;
}

.admin-staff-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.admin-staff-badge-active {
  background: var(--success-soft);
  color: var(--success);
}

.admin-staff-badge-locked {
  background: #FEE2E2;
  color: var(--danger);
}

.admin-staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  gap: 4px;
}

.admin-staff-btn-primary {
  background: var(--blue);
  color: #fff;
}

.admin-staff-btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.admin-staff-btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.admin-staff-btn-secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
}

.admin-staff-btn-danger {
  background: #FEE2E2;
  color: var(--danger);
}

.admin-staff-btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.admin-staff-btn-success {
  background: var(--success-soft);
  color: var(--success);
}

.admin-staff-btn-success:hover {
  background: var(--success);
  color: #fff;
}

.admin-staff-form-group {
  margin-bottom: 20px;
}

.admin-staff-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.admin-staff-form-group .hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-staff-form-group .error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.admin-staff-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500 !important;
}

.admin-staff-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.admin-staff-alert {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==========================================================================
   Step UI-C2: Scoped Staff Dashboard & Marketing
   ========================================================================== */
.staff-c2-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .staff-c2-stat-grid {
    grid-template-columns: 1fr;
  }
}

.staff-c2-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}

.staff-c2-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-soft);
}

.staff-c2-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.staff-c2-card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.staff-c2-card-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.staff-c2-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.staff-c2-main-stat {
  display: flex;
  flex-direction: column;
}

.staff-c2-main-stat strong {
  font-size: 32px;
  line-height: 1.1;
  color: var(--blue-dark);
  font-weight: 800;
}

.staff-c2-main-stat span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.staff-c2-sub-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 50px;
}

.staff-c2-sub-stats.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  min-width: 160px;
}

.staff-c2-sub-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text);
}

.staff-c2-sub-item span {
  white-space: nowrap;
}

.staff-c2-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.staff-c2-dot.visible {
  background: var(--success);
}

.staff-c2-dot.hidden {
  background: var(--muted);
}

.staff-c2-dot.active {
  background: #F97316;
}

.staff-c2-section-header {
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
  margin-top: 18px;
}

.staff-c2-section-action {
  margin-left: auto;
}

/* ==========================================================================
   Step P2G: Scoped Staff Operations Dashboard
   ========================================================================== */
.staff-ops-section {
  margin-bottom: 28px;
}

.staff-ops-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.staff-ops-section-head h2,
.staff-ops-guidance h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.staff-ops-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.staff-ops-alert-grid,
.staff-ops-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.staff-ops-alert-card,
.staff-ops-status-card,
.staff-ops-guidance {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.staff-ops-alert-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-top: 4px solid var(--success);
}

.staff-ops-alert-card.needs-action {
  border-top-color: #F97316;
}

.staff-ops-alert-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.staff-ops-alert-count {
  min-width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ECFDF5;
  color: #047857;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.staff-ops-alert-card.needs-action .staff-ops-alert-count {
  background: #FFF7ED;
  color: #C2410C;
}

.staff-ops-alert-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.staff-ops-alert-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.staff-ops-alert-card a {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.staff-ops-all-ok-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.staff-ops-all-ok-banner svg {
  width: 20px;
  height: 20px;
  color: #10B981;
  flex-shrink: 0;
}

.staff-ops-status-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-ops-status-card strong {
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.staff-ops-status-card span {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}

.staff-ops-status-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.staff-ops-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-ops-guidance {
  padding: 18px;
}

.staff-ops-guidance ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

@media (max-width: 992px) {
  .staff-ops-alert-grid,
  .staff-ops-status-grid,
  .staff-ops-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .staff-ops-alert-grid,
  .staff-ops-status-grid,
  .staff-ops-actions {
    grid-template-columns: 1fr;
  }

  .staff-ops-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==========================================================================
   Step UI-C3: Scoped Staff Product Form collapsible details
   ========================================================================== */
.staff-c3-advanced-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin: 0;
  overflow: hidden;
  transition: var(--transition);
}

.staff-c3-advanced-details[open] {
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-md);
}

.staff-c3-advanced-summary {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  transition: var(--transition);
}

.staff-c3-advanced-summary:hover {
  background: #F1F5F9;
  color: var(--blue);
}

.staff-c3-advanced-details[open] .staff-c3-advanced-summary {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.staff-c3-advanced-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.staff-c3-arrow {
  font-size: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.staff-c3-advanced-details[open] .staff-c3-arrow {
  transform: rotate(180deg);
  color: var(--blue);
}

/* ==========================================================================
   Step UI-C3B: Scoped Admin Product Form collapsible details
   ========================================================================== */
.admin-product-c3b-advanced-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin: 0;
  overflow: hidden;
  transition: var(--transition);
}

.admin-product-c3b-advanced-details[open] {
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-md);
}

.admin-product-c3b-advanced-summary {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  transition: var(--transition);
}

.admin-product-c3b-advanced-summary:hover {
  background: #F1F5F9;
  color: var(--blue);
}

.admin-product-c3b-advanced-summary:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 3px;
}

.admin-product-c3b-advanced-details[open] .admin-product-c3b-advanced-summary {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.admin-product-c3b-advanced-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-product-c3b-arrow {
  font-size: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.admin-product-c3b-advanced-details[open] .admin-product-c3b-arrow {
  transform: rotate(180deg);
  color: var(--blue);
}

/* ==========================================================================
   DEAL-UI-P1: Home Banner & Deal Styles
   ========================================================================== */
.home-banner-campaign-section {
  margin: 16px 0 24px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.home-banner-campaign-link {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
}

.home-banner-campaign-link:hover {
  opacity: 0.95;
}

.home-banner-campaign-picture {
  display: block;
  width: 100%;
}

.home-banner-campaign-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.home-banner-campaign-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0) 100%);
  padding: 24px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 60%;
}

.home-banner-campaign-content {
  max-width: 600px;
}

.home-banner-campaign-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-banner-campaign-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  color: #ffffff;
}

.home-banner-campaign-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Text-only Fallback Banner style */
.home-banner-campaign-fallback {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  padding: 16px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed var(--blue);
  color: var(--text);
  transition: var(--transition);
}

.home-banner-campaign-fallback:hover {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.home-banner-campaign-fallback-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-banner-campaign-fallback-content .home-banner-campaign-badge {
  background: var(--blue);
  margin-bottom: 0;
}

.home-banner-campaign-fallback .home-banner-campaign-title {
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
  margin: 0;
}

.home-banner-campaign-fallback .home-banner-campaign-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  text-shadow: none;
}

.home-banner-campaign-btn {
  background: var(--blue);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Deal Card Specifics */
.deal-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.badge.deal-badge-flash {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

.badge.deal-badge-clearance {
  background: #FFEDD5;
  color: #EA580C;
  border: 1px solid #FDBA74;
}

.deal-card-qty-row {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.deal-card-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.deal-card-countdown.ended {
  background: #f1f5f9;
  color: var(--muted);
}

.deal-card-countdown-label {
  color: inherit;
  font-weight: 600;
}

.deal-card-note-box {
  background: #F8FAFC;
  border-left: 3px solid var(--border);
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--muted);
  border-radius: 0 4px 4px 0;
  margin-top: 6px;
  font-style: italic;
  line-height: 1.3;
}

.deal-card-note-box.clearance-note {
  background: #FFFBEB;
  border-left-color: #F59E0B;
  color: #B45309;
}

.deal-card-cta-row {
  margin-top: auto;
  padding-top: 10px;
}

.deal-card-cta-btn {
  width: 100%;
  text-align: center;
  font-size: 13px;
  padding: 8px 14px;
}

/* Deals Listing Page empty states and headers */
.deals-empty-state {
  background: #ffffff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0;
}

/* Staff Forms WTForms Errors */
.form-field-error-msg {
  display: block;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

/* MEDIA-PICKER-P2C: scoped staff banner and media picker styles */
.staff-banner-form-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.staff-banner-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  min-width: 0;
}

.staff-banner-field label,
.staff-banner-upload-fallback label > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.staff-required {
  color: var(--danger);
}

.staff-banner-media-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.staff-banner-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.staff-banner-section-heading p,
.staff-banner-upload-fallback p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.staff-media-picker-field {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.staff-media-picker-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 13px;
}

.staff-media-picker-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-media-picker-field-body {
  min-width: 0;
}

.staff-media-picker-field-body strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
}

.staff-media-picker-path {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.staff-media-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.staff-banner-upload-fallback {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.staff-banner-upload-fallback summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.staff-banner-upload-fallback .form-grid {
  margin-top: 12px;
}

.staff-banner-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.staff-banner-active-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.staff-banner-active-field input {
  width: auto;
}

.staff-banner-active-field label {
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.staff-banner-form-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.staff-media-picker-open {
  overflow: hidden;
}

.staff-media-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.staff-media-picker-modal[hidden] {
  display: none;
}

.staff-media-picker-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: default;
}

.staff-media-picker-backdrop:hover {
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.staff-media-picker-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.staff-media-picker-dialog:focus-visible {
  outline: 3px solid var(--blue-soft);
  outline-offset: 2px;
}

.staff-media-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.staff-media-picker-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
}

.staff-media-picker-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.staff-media-picker-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
}

.staff-media-picker-close:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: none;
}

.staff-media-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.staff-media-picker-search {
  min-width: 0;
}

.staff-media-picker-search span {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.staff-media-picker-help,
.staff-media-picker-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.staff-media-picker-status {
  min-height: 18px;
}

.staff-media-picker-status.is-error {
  color: var(--danger);
  font-weight: 600;
}

.staff-media-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.staff-media-picker-item {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.staff-media-picker-item:hover,
.staff-media-picker-item:focus-visible {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue-dark);
  box-shadow: none;
  outline: none;
}

.staff-media-picker-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background: #e2e8f0;
}

.staff-media-picker-item span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-media-picker-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .staff-media-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .staff-banner-form-panel {
    padding: 16px;
  }

  .staff-media-picker-field {
    grid-template-columns: 1fr;
  }

  .staff-media-picker-preview {
    max-width: 280px;
  }

  .staff-media-picker-actions,
  .staff-banner-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-media-picker-actions .btn,
  .staff-banner-form-actions .btn {
    min-height: 44px;
    width: 100%;
  }

  .staff-banner-settings-grid,
  .staff-media-picker-toolbar {
    grid-template-columns: 1fr;
  }

  .staff-media-picker-modal {
    padding: 10px;
  }

  .staff-media-picker-dialog {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .staff-media-picker-toolbar .btn,
  .staff-media-picker-search input {
    min-height: 44px;
    width: 100%;
    font-size: 16px;
  }

  .staff-media-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


