/* ── STYLING FOR PRE-OWNED STORE ────────────────────── */

/* store-hero section */
.store-hero {
  padding: 8rem 2.5rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.store-hero-inner {
  position: relative;
  z-index: 10;
}

.store-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 1rem 0;
}

.store-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.75;
}

/* store-container */
.store-container {
  max-width: 1200px;
  margin: 0 auto 6rem;
  padding: 0 2.5rem;
}

/* filters-bar */
.filters-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.filters-bar input,
.filters-bar select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.filters-bar input:focus,
.filters-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

/* loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  gap: 1.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 212, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* empty state */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(18, 18, 26, 0.2);
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* products-grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

/* product-card */
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.1);
}

.product-img-wrap {
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.no-image-placeholder {
  color: var(--text-dim);
  opacity: 0.3;
}

.dto-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

 qty-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.product-body {
  padding: 1.4rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.product-retail-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.product-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-stock-row {
  margin-top: 0.15rem;
  margin-bottom: 0.6rem;
}

.product-stock {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.8;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(42, 42, 62, 0.5);
  padding-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.product-view-btn {
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap 0.2s;
}

.product-card:hover .product-view-btn {
  gap: 0.4rem;
  text-decoration: underline;
}

/* modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem;
}

.modal-image-wrap {
  aspect-ratio: 1;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-prices-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.modal-price {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.modal-retail-price {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.modal-dto-badge {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.description-section {
  margin-bottom: 2rem;
}

.section-tag-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.modal-description {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
}

/* contact box */
.contact-box {
  background: rgba(0, 212, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  padding: 1.2rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.contact-box h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.contact-box p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.modal-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

/* footer */
.footer-simple {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.footer-simple a {
  color: var(--text-dim);
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-simple a:hover {
  color: var(--accent);
}

/* utility classes */
.hidden {
  display: none !important;
}

.alert-box {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 2rem;
}

.alert-box.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* responsive details */
@media (max-width: 768px) {
  .store-hero {
    padding: 6rem 1.5rem 2rem;
  }
  
  .store-container {
    padding: 0 1.5rem;
  }
  
  .filters-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .modal-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .modal-card {
    max-height: 95vh;
  }

  /* Public Catalog 2-Column Grid Layout */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  
  .product-body {
    padding: 0.75rem !important;
  }
  
  .product-price {
    font-size: 1.05rem !important;
  }
  
  .product-retail-price {
    font-size: 0.7rem !important;
  }
  
  .product-name {
    font-size: 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }
  
  .product-desc {
    font-size: 0.72rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
  }
  
  .product-footer {
    padding-top: 0.5rem !important;
    font-size: 0.65rem !important;
  }
  
  .product-footer span:first-child {
    display: none !important; /* Hide date on mobile to fit row */
  }
  
  .dto-badge, .qty-badge {
    top: 0.4rem !important;
    font-size: 0.55rem !important;
    padding: 0.15rem 0.35rem !important;
  }

  /* Categories grid: 2 columns on mobile */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .categories-grid .category-card-body {
    padding: 0.6rem 0.8rem !important;
  }

  .categories-grid .category-card-name {
    font-size: 0.8rem !important;
  }

  .categories-grid .category-card-count {
    font-size: 0.65rem !important;
  }

  /* Dashboard Compact Horizontal List Row Layout */
  .dash-card-header {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.6rem !important;
  }
  
  .dash-card-left {
    gap: 0.75rem !important;
  }
  
  .dash-card-img-wrap {
    width: 64px !important;
    height: 64px !important;
    align-self: center !important;
    border-radius: 4px !important;
  }
  
  .dash-card-title-text {
    font-size: 0.9rem !important;
    margin: 0 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  
  .dash-card-meta {
    font-size: 0.65rem !important;
    margin-bottom: 0.15rem !important;
    gap: 0.3rem !important;
  }
  
  .dash-card-metrics {
    font-size: 0.7rem !important;
    gap: 0.4rem !important;
  }
  
  /* Hide switches only when card is NOT expanded */
  .dash-card-item:not(.expanded) .dash-card-switches {
    display: none !important;
  }
  
  .dash-card-right {
    gap: 0.4rem !important;
    justify-content: flex-end !important;
    margin-left: auto;
  }
  
  .dash-card-actions {
    gap: 0.35rem !important;
  }

  .dash-card-actions .btn-primary {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.5rem !important;
    border-radius: 4px !important;
  }
}

/* ── DASHBOARD STYLES ───────────────────────────────── */
.admin-body-bg {
  background: var(--bg);
}

.dashboard-container {
  max-width: 1200px;
  margin: 7rem auto 6rem;
  padding: 0 2.5rem;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.dash-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.dash-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 0.3rem;
  border-radius: var(--radius);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
  background: var(--border);
  color: var(--accent);
}

.dash-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.dash-search-wrap input {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: var(--radius);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}

.dash-search-wrap input:focus {
  border-color: var(--accent);
}

.dash-quick-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.dash-quick-filters select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
}

.bulk-btn {
  padding: 0.7rem 1.2rem;
}

/* table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.dash-table th,
.dash-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg3);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dash-table tbody tr {
  transition: background 0.2s;
}

.dash-table tbody tr:hover {
  background: rgba(26, 26, 38, 0.5);
}

/* row-expanded detail styling */
.expanded-row {
  background: var(--bg);
}

.expanded-container {
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.expanded-left {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.expanded-right {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.expanded-grid-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.expanded-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.expanded-input-group label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.expanded-input-group input,
.expanded-input-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

.expanded-input-group textarea {
  font-family: var(--font-body);
  font-size: 0.82rem;
  resize: vertical;
  height: 110px;
}

.expanded-input-group input:focus,
.expanded-input-group textarea:focus {
  border-color: var(--accent);
}

.checkboxes-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.checkbox-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-dim);
  user-select: none;
}

.checkbox-label-wrap input {
  cursor: pointer;
}

.checkbox-label-wrap input:checked + span {
  color: var(--text);
}

.expanded-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

/* stats tab visual elements */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stats-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.8rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.stats-card-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stats-card-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.highlight-profit .stats-card-value { color: #f87171; }
.highlight-success .stats-card-value { color: #34d399; }

.stats-table-section {
  margin-top: 2rem;
}

.stats-sec-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

/* row states badges */
.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 700;
  display: inline-block;
}

.badge.pub { background: rgba(52, 211, 153, 0.1); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.2); }
.badge.unpub { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge.sold { background: rgba(100, 116, 139, 0.1); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.2); }
.badge.nv { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

/* toast notification system */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 11000;
}

.toast {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  animation: toastSlideIn 0.25s ease forwards;
  min-width: 250px;
}

@keyframes toastSlideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 3px solid #10b981; }
.toast.info { border-left: 3px solid #3b82f6; }
.toast.error { border-left: 3px solid #ef4444; }

/* modal inner layout for small modals */
.modal-body-padding {
  padding: 2.2rem;
}

.modal-body-padding h3 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-subtitle-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.suggest-details {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.suggest-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  align-items: center;
}

.suggest-row strong.accent-color {
  color: var(--accent);
}

.modal-actions-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-actions-row button {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* row toggle icon */
.toggle-arrow {
  display: inline-block;
  transition: transform 0.2s;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.toggle-arrow.open {
  transform: rotate(90deg);
  color: var(--accent);
}

/* bulk progress */
.bulk-progress-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.bulk-progress-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  align-items: center;
}

.btn-cancel {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-cancel:hover {
  background: #ef4444;
  color: var(--bg);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
}

/* responsive adapt */
@media (max-width: 900px) {
  .dash-actions {
    grid-template-columns: 1fr;
  }
  
  .expanded-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 1.2rem;
  }
}

/* --- DASHBOARD EXPANDABLE CARDS SYSTEM --- */

.items-list-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  max-height: 820px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-behavior: smooth;
}

/* Custom scrollbar for the cards list */
.items-list-container::-webkit-scrollbar {
  width: 5px;
}
.items-list-container::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}
.items-list-container::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
.items-list-container::-webkit-scrollbar-thumb:hover {
  background: #c4b5fd;
}

.items-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg2);
  z-index: 2;
}

.custom-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: var(--accent);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}



.dash-card-item {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius);
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  flex-shrink: 0;
}

.dash-card-item.selected {
  background: rgba(167, 139, 250, 0.04) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.15);
}

.dash-card-item:hover {
  border-color: var(--accent-dim);
}

.dash-card-item.expanded {
  border-color: var(--border-hover);
  background: var(--bg3);
}

.dash-card-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dash-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.dash-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.dash-card-img-wrap {
  width: 160px;
  align-self: stretch;
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.2s;
}

.dash-card-img-wrap:hover {
  opacity: 0.85;
}

.dash-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-card-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.dash-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.dash-card-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.2rem 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.dash-card-metrics strong {
  color: var(--text);
}

.dash-card-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  justify-content: flex-end;
}

/* Switches / Checkbox Labels */
.dash-control-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  color: var(--text-dim);
}

.dash-control-label:hover {
  border-color: var(--border-hover);
  background: var(--bg2);
}

.dash-control-label.active-pub {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
}

.dash-control-label.active-sold {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.05);
}

.dash-control-label.active-nv {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.05);
}

.dash-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-icon:hover {
  background: var(--bg2);
  color: var(--text);
}

.btn-icon.rotate-180 svg {
  transform: rotate(180deg);
}

.btn-icon svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

/* Advanced Filter styles */
.filter-constructor-section {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.filter-constructor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}

.filter-constructor-header h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-constructor-actions {
  display: flex;
  gap: 1rem;
}

.btn-text {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  padding: 0;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text-danger {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #ef4444;
  cursor: pointer;
  text-transform: uppercase;
  padding: 0;
}

.btn-text-danger:hover {
  text-decoration: underline;
}

.filter-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-rule-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg);
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .filter-rule-row {
    flex-direction: row;
    align-items: center;
  }
}

.filter-rule-row select,
.filter-rule-row input[type="text"] {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  outline: none;
}

.filter-rule-row select:focus,
.filter-rule-row input[type="text"]:focus {
  border-color: var(--accent-dim);
}

.filter-rule-value-container {
  flex: 1;
  position: relative;
}

.btn-multiselect-dropdown {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 150px;
}

.btn-multiselect-dropdown svg {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  min-height: 12px !important;
  max-width: 12px !important;
  max-height: 12px !important;
  flex-shrink: 0 !important;
  margin-left: 0.5rem !important;
  display: inline-block !important;
}

.multiselect-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: var(--bg3);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  box-shadow: var(--shadow);
  width: 240px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  margin-top: 0.25rem;
}

.multiselect-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  font-size: 0.75rem;
  color: var(--text);
}

.multiselect-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.multiselect-dropdown-option input {
  cursor: pointer;
}

.btn-rule-delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.btn-rule-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ================================================
   Discount Range Filter
   ================================================ */

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 22px;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translate(18px, -50%);
  background: #fff;
}

/* Discount filter body */
.discount-filter-body {
  transition: opacity 0.2s, filter 0.2s;
}

.discount-filter-body.disabled {
  opacity: 0.38;
  pointer-events: none;
  filter: grayscale(0.6);
}

.discount-range-labels {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.discount-range-track-wrap {
  flex: 1;
}

.discount-range-badge {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  min-width: 42px;
  text-align: center;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
  white-space: nowrap;
}

/* Dual range slider */
.dual-range-wrapper {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.dual-range {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  outline: none;
  z-index: 3;
}

/* Background track */
.dual-range-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  z-index: 0;
}

.dual-range-fill {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #10b981);
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(167,139,250,0.3);
}

/* Reset native tracks to be fully transparent so they don't cover other elements */
.dual-range::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}
.dual-range::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

/* Thumb */
.dual-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  pointer-events: all;
  margin-top: -7px;
  transition: box-shadow 0.15s;
}
.dual-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(167,139,250,0.25), 0 2px 8px rgba(0,0,0,0.5);
}
.dual-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
  cursor: pointer;
  pointer-events: all;
}

/* Expanded layout for editable form */

.expanded-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0 0 0;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

@media (min-width: 992px) {
  .expanded-container {
    grid-template-columns: 1fr 2fr;
  }
}

.edit-col-image {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.edit-image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.edit-image-header span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.edit-image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (min-width: 992px) {
  .edit-image-frame {
    aspect-ratio: 1/1;
  }
}

.edit-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-col-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
}

.form-control-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

.form-control-input:focus {
  border-color: var(--accent-dim);
}

.form-control-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.form-control-textarea:focus {
  border-color: var(--accent-dim);
}

.form-actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .form-actions-row {
    flex-direction: row;
    align-items: center;
  }
}

.form-copy-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Modal and confirm classes */
.gradient-text-rose-amber {
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.modal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 2rem 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
}

.modal-input:focus {
  border-color: #f43f5e;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  pointer-events: none;
}

.btn-rose {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-rose:hover {
  opacity: 0.9;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.dash-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.dash-stats-bar strong.accent {
  color: var(--accent);
}

.dash-stats-bar strong.accent-purple {
  color: #a78bfa;
}

.dash-stats-bar strong.accent-green {
  color: #10b981;
}

.dash-stats-bar .divider {
  color: var(--border);
}

/* ── VIEW TOGGLE ─────────────────────────── */
.view-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.view-toggle-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.view-toggle-btn:not(.active):hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--text);
}

/* ── CATEGORIES GRID ─────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.12);
}

.category-card-img-wrap {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.category-card:hover .category-card-img-wrap img {
  transform: scale(1.05);
}

.category-card-body {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.category-card-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

.category-card-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── ADMIN CATEGORY CARD (Dashboard) ────── */
.category-card .category-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.category-card .btn-edit-category {
  font-size: 0.65rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.category-card .btn-edit-category:hover {
  opacity: 0.85;
}

/* ── CATEGORY IMAGE PICKER MODAL (Admin) ── */
.category-image-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.category-image-option {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}

.category-image-option:hover {
  border-color: var(--accent);
  transform: scale(1.03);
}

.category-image-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.category-image-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-image-option .check-mark {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.category-image-option.selected .check-mark {
  opacity: 1;
}

/* ── ADMIN CATEGORIES TAB ───────────────── */
.dash-categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-categories-header h2 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

/* Override grid for admin (wider cards) */
.dash-categories-grid .categories-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Category card admin version */
.dash-category-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.dash-category-card .category-card-img-wrap {
  aspect-ratio: 16/10;
  position: relative;
}

.dash-category-card .category-card-img-wrap .edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.dash-category-card:hover .category-card-img-wrap .edit-overlay {
  opacity: 1;
}

.dash-category-card .category-card-img-wrap .edit-overlay button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: transform 0.2s;
}

.dash-category-card .category-card-img-wrap .edit-overlay button:hover {
  transform: scale(1.05);
}

.dash-category-card .category-card-body {
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-category-card .category-card-name {
  font-size: 0.9rem;
  margin: 0;
}

.dash-category-card .category-card-count {
  font-size: 0.7rem;
}

/* ── HAMBURGER MENU ──────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
  transition: border-color 0.2s;
}

.nav-hamburger:hover {
  border-color: var(--accent);
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: var(--accent);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background: var(--accent);
}

/* ── MOBILE RESPONSIVE — DASHBOARD ──────────── */

/* Tablet & small screens */
@media (max-width: 1024px) {
  .dashboard-container {
    padding: 0 1.5rem;
  }

  .dash-title {
    font-size: 1.5rem;
  }

  .dash-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }

  .dash-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }

  .stats-charts-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-card-value {
    font-size: 1.5rem;
  }

  .dash-categories-grid .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .category-image-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* ── Hamburger ── */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--border);
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 150;
    display: flex;
  }

  .nav-links.nav-open {
    right: 0;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  /* ── Dashboard Container ── */
  .dashboard-container {
    margin: 5.5rem auto 4rem;
    padding: 0 1rem;
  }

  .dash-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }

  .dash-title {
    font-size: 1.3rem;
  }

  .dash-subtitle {
    font-size: 0.8rem;
  }

  .dash-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding: 0.25rem;
  }

  .tab-btn {
    font-size: 0.68rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Actions Bar ── */
  .dash-actions {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dash-quick-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .dash-quick-filters button,
  .dash-quick-filters select {
    width: 100%;
    justify-content: center;
  }

  .bulk-btn {
    width: 100%;
    text-align: center;
  }

  /* ── Stats Bar ── */
  .dash-stats-bar {
    font-size: 0.65rem;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }

  .dash-stats-bar .divider {
    display: none;
  }

  .dash-stats-bar span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  /* ── Filter Constructor ── */
  .filter-constructor-section {
    padding: 0.75rem;
  }

  .filter-constructor-header h3 {
    font-size: 0.65rem;
  }

  .filter-rule-row {
    flex-direction: column;
    gap: 0.4rem;
  }

  .filter-rule-row select,
  .filter-rule-row input[type="text"] {
    width: 100%;
    font-size: 0.7rem;
  }

  .btn-multiselect-dropdown {
    min-width: auto;
    width: 100%;
    font-size: 0.7rem;
  }

  .multiselect-dropdown-panel {
    width: 100%;
    left: 0;
  }

  /* ── Discount Filter ── */
  .discount-range-labels {
    flex-direction: column;
    gap: 0.5rem;
  }

  .discount-range-track-wrap {
    width: 100%;
  }

  .discount-range-badge {
    font-size: 0.65rem;
    min-width: 36px;
  }

  /* ── Items List ── */
  .items-list-container {
    max-height: none;
    overflow-y: visible;
  }

  .items-list-header {
    font-size: 0.65rem;
    padding: 0.4rem 0.5rem;
  }

  .items-list {
    padding: 0.4rem;
    gap: 0.4rem;
  }

  .dash-card-item {
    min-height: auto;
  }

  .dash-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dash-card-header-wrapper {
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: auto !important;
  }

  .dash-card-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .dash-card-img-wrap {
    width: 100% !important;
    height: 140px !important;
    flex-shrink: 0 !important;
    align-self: auto;
  }

  .dash-card-info {
    flex: none !important;
    padding: 0.5rem 0.75rem !important;
    min-width: 0 !important;
  }

  .dash-card-title-text {
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  .dash-card-meta {
    font-size: 0.62rem !important;
    margin-top: 0.3rem !important;
    margin-bottom: 0.3rem !important;
    gap: 0.3rem !important;
    flex-wrap: wrap !important;
  }

  .dash-card-metrics {
    font-size: 0.68rem !important;
    margin-top: 0.1rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.2rem !important;
  }

  .dash-card-right {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    padding: 0.5rem 0.75rem !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
  }

  .dash-card-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  .dash-card-actions {
    justify-content: flex-end;
  }

  .dash-control-label {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
  }

  /* ── Expanded Card ── */
  .expanded-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.75rem 0 0 0;
  }

  .expanded-grid-inputs {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .edit-image-frame {
    aspect-ratio: 16/9;
  }

  .form-group-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .form-actions-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-copy-buttons {
    flex-wrap: wrap;
  }

  .checkboxes-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* ── Stats ── */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stats-card {
    padding: 1rem;
  }

  .stats-card-value {
    font-size: 1.25rem;
  }

  .stats-card-label {
    font-size: 0.6rem;
  }

  .stats-card-desc {
    font-size: 0.68rem;
  }

  .stats-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .stats-charts-grid > div {
    padding: 1rem !important;
  }

  .stats-sec-title {
    font-size: 0.75rem;
  }

  /* ── Stats Table ── */
  .table-responsive {
    overflow-x: auto;
  }

  .dash-table {
    font-size: 0.72rem;
  }

  .dash-table th,
  .dash-table td {
    padding: 0.6rem 0.6rem;
    white-space: nowrap;
  }

  /* ── Categories ── */
  .dash-categories-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .dash-categories-header h2 {
    font-size: 1rem;
  }

  .dash-categories-grid .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .category-card-body {
    padding: 0.6rem 0.8rem;
  }

  .category-card-name {
    font-size: 0.8rem;
  }

  .category-image-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.6rem;
  }

  /* ── Config Tab ── */
  #config-tab section {
    max-width: 100% !important;
    margin: 1rem 0 !important;
    padding: 1.25rem !important;
  }

  #config-tab select {
    font-size: 0.78rem;
  }

  /* ── Bulk Progress ── */
  .bulk-progress-panel {
    padding: 0.8rem 1rem;
  }

  .bulk-progress-header {
    font-size: 0.7rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .btn-cancel {
    width: 100%;
    text-align: center;
  }

  .progress-status {
    font-size: 0.65rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .dashboard-container {
    padding: 0 0.75rem;
    margin: 5rem auto 3rem;
  }

  .dash-title {
    font-size: 1.1rem;
  }

  .tab-btn {
    font-size: 0.62rem;
    padding: 0.3rem 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .stats-card-value {
    font-size: 1.1rem;
  }

  .dash-categories-grid .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .dash-card-img-wrap {
    height: 120px !important;
  }

  .dash-card-title-text {
    font-size: 0.85rem !important;
  }

  .dash-card-info {
    padding: 0.4rem 0.6rem !important;
  }

  .dash-card-right {
    padding: 0.4rem 0.6rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .dash-card-actions {
    justify-content: flex-end !important;
  }

  .dash-table th,
  .dash-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
  }

  .form-group-row {
    grid-template-columns: 1fr;
  }

  .modal-body-padding {
    padding: 1.25rem;
  }

  .modal-card {
    max-height: 95vh;
  }

  .modal-actions-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions-row button {
    width: 100%;
    justify-content: center;
  }

  /* ── Add Item Modal ── */
  #add-item-modal .grid-cols-2,
  #add-item-modal .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  #add-item-modal [style*="grid-column: span 2"] {
    grid-column: span 1 !important;
  }

  #add-item-modal .flex-wrap {
    flex-direction: column;
  }

  #add-item-modal .flex-wrap button {
    width: 100%;
  }

  /* ── Sell Price Modal ── */
  #sell-price-modal .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* ── Item Config Modal ── */
  #item-config-modal .modal-card {
    max-width: 100% !important;
    max-height: 100vh;
    border-radius: 0;
  }

  #item-config-modal [style*="flex-shrink: 0"] {
    flex-direction: column;
    gap: 0.5rem;
  }

  #item-config-modal [style*="flex-shrink: 0"] > div {
    width: 100%;
    justify-content: center;
  }

  #item-config-modal [style*="flex-shrink: 0"] button {
    flex: 1;
  }

  /* ── AI Fields Modal ── */
  #ai-fields-modal .modal-card {
    max-width: 100% !important;
    margin: 0 0.5rem;
  }

  /* ── General Confirm Modal ── */
  #general-confirm-modal .modal-card {
    margin: 0 0.75rem;
  }

  /* ── Sell Modal ── */
  #sell-modal .modal-box {
    max-width: 100% !important;
    margin: 0 0.75rem;
  }

  /* ── Toast ── */
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    font-size: 0.72rem;
    padding: 0.7rem 1rem;
  }
}


