

.brand small,
.eyebrow,
.enquiry-meta,
.admin-table span,
.mini-row span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.detail-copy h1,
.admin-page-head h1 {
  margin: 8px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  font-weight: 500;
  line-height: 0.95;
}

.hero p,
.contact-section p,
.detail-copy p,
.login-card p,
.admin-card p {
  color: #4f4943;
  line-height: 1.65;
}

.hero-actions,
.hero-metrics,
.card-actions,
.filters,
.price-line,
.admin-page-head,
.row-actions,
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Edge collapse button floating on right middle edge of side panel */
.admin-edge-toggle {
  position: fixed;
  top: 50%;
  left: 290px;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--gold, #b8860b);
  border-radius: 50%;
  background: #171513;
  color: var(--gold, #b8860b);
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: left 240ms cubic-bezier(0.4, 0, 0.2, 1), background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.admin-edge-toggle:hover {
  background: var(--gold, #b8860b);
  border-color: var(--gold, #b8860b);
  color: #171513;
  transform: translate(-50%, -50%) scale(1.12);
}

.admin-edge-toggle svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-edge-toggle .icon-hamburger,
.admin-edge-toggle .icon-cross {
  display: none;
}

.admin-shell.admin-sidebar-collapsed .admin-edge-toggle {
  left: 72px;
}

.admin-shell.admin-sidebar-collapsed .admin-edge-toggle .icon-chevron {
  transform: rotate(180deg);
}

.admin-sidebar-backdrop {
  display: none;
}

.admin-topbar {
  display: none;
}

/* Logout row with danger icon button on the right */
.admin-logout-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logout-row .logout-btn {
  margin: 0;
}

/* Responsive sidebar states
   The sidebar is position:fixed (not sticky/grid-tracked) so page scroll can
   never move or detach it — only .admin-main scrolls. --admin-sidebar-w drives
   both the sidebar's width and .admin-main's matching margin-left/gutter. */
.admin-shell {
  --admin-sidebar-w: 300px;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
}

.admin-shell.admin-sidebar-collapsed {
  --admin-sidebar-w: 72px;
}

.admin-shell.admin-sidebar-collapsed .admin-sidebar {
  padding: 16px 10px;
}

.admin-shell.admin-sidebar-collapsed .admin-sidebar .brand-text,
.admin-shell.admin-sidebar-collapsed .admin-menu a span,
.admin-shell.admin-sidebar-collapsed .admin-menu-heading,
.admin-shell.admin-sidebar-collapsed .logout-btn {
  display: none;
}

.admin-shell.admin-sidebar-collapsed .admin-menu a {
  text-align: center;
  padding: 10px 6px;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  width: var(--admin-sidebar-w);
  height: 100vh;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--line);
  background: #171513;
  color: white;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: visible;
  box-sizing: border-box;
  transition: width 240ms ease, padding 240ms ease;
}

.admin-brand small,
.admin-sidebar .brand small {
  color: #d6c8b8;
}

.admin-brand-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-sidebar-toggle {
  display: none;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8eedf;
  cursor: pointer;
}

.admin-sidebar-toggle svg {
  display: none;
  width: 20px;
  height: 20px;
}

.admin-sidebar-toggle .icon-cross {
  display: block;
}

.admin-shell.admin-sidebar-collapsed .admin-sidebar-toggle .icon-cross {
  display: none;
}

.admin-shell.admin-sidebar-collapsed .admin-sidebar-toggle .icon-hamburger {
  display: block;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.admin-menu a {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 11px 12px 11px 16px;
  color: #f8eedf;
  font-size: 0.92rem;
  line-height: 1.25;
  overflow: hidden;
  transition: all 180ms ease;
}

.admin-menu-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-menu-pair a {
  flex: 1 1 100px;
}

.admin-shell.admin-sidebar-collapsed .admin-menu-pair {
  flex-direction: column;
}

.admin-shell.admin-sidebar-collapsed .admin-menu-pair a {
  flex: 1 1 auto;
}

.admin-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-menu-group {
  display: flex;
  flex-direction: column;
}

.admin-menu-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 9px 8px;
  color: rgba(248, 238, 223, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.admin-menu-group-toggle span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-menu-group-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 238, 223, 0.9);
}

.admin-menu-group-chevron {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  transition: transform 200ms ease;
}

.admin-menu-group.is-open .admin-menu-group-chevron {
  transform: rotate(180deg);
}

.admin-menu-group-items {
  display: grid;
  grid-template-rows: 0fr;
  min-width: 0;
  overflow: hidden;
  transition: grid-template-rows 220ms ease;
}

.admin-menu-group.is-open .admin-menu-group-items {
  grid-template-rows: 1fr;
}

.admin-menu-group-items-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  min-height: 0;
  padding: 2px 0 4px 14px;
}

.admin-menu-group-items a {
  padding: 8px 12px;
  font-size: 0.86rem;
  text-align: left;
}

.admin-menu-group-items[inert] {
  visibility: hidden;
  pointer-events: none;
}

.admin-shell.admin-sidebar-collapsed .admin-menu-group-toggle span,
.admin-shell.admin-sidebar-collapsed .admin-menu-group-chevron {
  display: none;
}

.admin-sidebar form {
  margin-top: auto;
}

.admin-sidebar .secondary-btn {
  border-color: rgba(255, 255, 255, 0.32);
  color: white;
}

.admin-main {
  min-width: 0;
  margin-left: var(--admin-sidebar-w);
  padding: clamp(18px, 3vw, 36px);
  transition: margin-left 240ms ease;
}

.admin-page-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(217, 208, 193, 0.72);
}

.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.admin-page-head h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.admin-page-head .primary-btn,
.admin-page-head .secondary-btn,
.admin-page-head .danger-btn {
  flex: 0 0 auto;
  margin-top: 8px;
}

.metric-grid,
.admin-two-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.metric-grid article,
.admin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(22, 17, 9, 0.05);
  overflow-wrap: anywhere;
}

.metric-grid article {
  overflow: hidden;
}

.metric-grid article strong {
  display: block;
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-grid article span {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

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

/* Analytics report cards show compact previews; cards with longer feeds link to dedicated
   report pages where admin-analytics.js auto-loads more rows while scrolling. */
.analytics-grid .admin-card .analytics-card-body {
  max-height: 360px;
  overflow-y: auto;
}

.analytics-open-report {
  margin-top: 12px;
}

.analytics-feed-card {
  display: grid;
  gap: 14px;
}

.analytics-detail-list {
  display: grid;
  gap: 10px;
}

.analytics-auto-load {
  display: grid;
  min-height: 54px;
  place-items: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(22, 17, 9, 0.05);
}

.product-management-panel .admin-table-wrap {
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
}

/* Redesigned Admin Filter Section */
.admin-filters-redesigned {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.admin-filters-redesigned .admin-filter-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border-bottom: 1px solid rgba(217, 208, 193, 0.6);
  padding-bottom: 14px;
  text-align: left;
}

.admin-filters-redesigned .admin-filter-head > div {
  min-width: 0;
  margin-right: auto;
  text-align: left;
}

.admin-filter-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-filter-search-full {
  width: 100%;
  min-height: 44px;
}

.admin-filter-search-full input {
  min-height: 40px;
}

.admin-search-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.admin-search-price-row .filter-search,
.admin-search-price-row .price-range-row {
  width: 100%;
  min-width: 0;
}

.admin-price-slider-row {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  margin: 0;
}

.admin-stock-price-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

.analytics-date-inputs .admin-date-box {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--admin-hairline, #e2d9cc);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  color: var(--ink);
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

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

.admin-filter-grid .field-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-select-box,
.admin-date-box {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 0 12px;
  font-size: 0.92rem;
  color: var(--ink);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.admin-filter-grid .date-picker {
  width: 100%;
}

.admin-filter-grid .date-picker-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 0 12px;
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.admin-product-filter-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, auto);
  gap: 14px;
  align-items: end;
  width: 100%;
}

.admin-product-filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  min-width: 0;
}

.admin-product-filter-fields .filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.admin-product-filter-fields .field-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-filter-checkboxes {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.admin-record-filters {
  gap: 14px;
}

.admin-record-filter-primary,
.admin-record-filter-secondary,
.admin-record-filter-grid {
  display: grid;
  width: 100%;
  gap: 12px;
}

.admin-record-filter-primary {
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.4fr);
  align-items: end;
}

.admin-record-filter-secondary {
  grid-template-columns: repeat(2, minmax(180px, 240px)) minmax(180px, 1fr);
  align-items: end;
}

.admin-record-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.admin-record-filters .filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.admin-record-filters .field-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-record-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.admin-record-filter-actions .primary-btn,
.admin-record-filter-actions .secondary-btn {
  min-height: 44px;
}

@media (max-width: 900px) {
  .admin-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-search-price-row {
    grid-template-columns: 1fr;
  }

  /* The price slider's own internal 3-column layout (label | slider | value) needs
     ~400px minimum, so it must compact at the same breakpoint the outer row stacks
     at — otherwise it still overflows sideways between 641-900px. */
  .admin-search-price-row .price-range-row {
    grid-template-columns: 1fr auto;
  }

  .admin-search-price-row .price-range-slider {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .admin-search-price-row .price-range-label {
    border-right: 0;
    padding-right: 0;
  }

  .admin-search-price-row .price-range-value {
    border-left: 0;
    padding-left: 0;
  }

  .admin-product-filter-row {
    grid-template-columns: 1fr;
  }

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

  .admin-product-filter-row .admin-filter-checkboxes {
    justify-content: flex-start;
  }

  .admin-record-filter-primary,
  .admin-record-filter-secondary,
  .admin-record-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-record-filter-actions {
    justify-content: flex-start;
  }

  .admin-stock-price-row {
    grid-template-columns: 1fr;
  }
}

/* At very narrow widths even the 2-column "1fr auto" fallback above (label | value on one line)
   is too tight for a nowrap price value like "₹870–₹1,900" and clips it — stack label/slider/value
   into full-width lines instead, matching the public /shop price slider's own 420px fix. */
@media (max-width: 420px) {
  .admin-search-price-row .price-range-row {
    grid-template-columns: 1fr;
  }

  .admin-search-price-row .price-range-label,
  .admin-search-price-row .price-range-value {
    white-space: normal;
    border: 0;
    padding: 0;
  }

  .admin-search-price-row .price-range-slider {
    grid-column: auto;
    grid-row: auto;
  }
}

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

  .admin-filters-redesigned .admin-filter-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-filter-top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .stock-filter-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filter-checkboxes .inline-check {
    width: 100%;
  }

  .admin-product-filter-fields {
    grid-template-columns: 1fr;
  }

  .admin-record-filter-primary,
  .admin-record-filter-secondary,
  .admin-record-filter-grid {
    grid-template-columns: 1fr;
  }

  .admin-record-filter-actions,
  .admin-record-filter-actions .primary-btn,
  .admin-record-filter-actions .secondary-btn {
    width: 100%;
  }

  .fuzzy-search-chip {
    display: none;
  }
}

.admin-status-strip .kpi-tile {
  color: inherit;
  text-decoration: none;
}

.admin-status-strip .kpi-tile strong {
  font-size: clamp(0.75rem, 12cqi, 1.35rem);
  white-space: nowrap;
}

.admin-status-strip .kpi-revenue strong {
  font-size: clamp(0.72rem, 11cqi, 1.25rem);
}

.admin-status-strip .kpi-tile.active {
  border-color: color-mix(in srgb, var(--green) 42%, var(--admin-hairline, var(--line)));
  background: color-mix(in srgb, var(--green) 9%, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent);
}

.admin-filter-close,
.admin-filter-backdrop {
  display: none;
}

.admin-filter-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--ink));
  border-radius: 999px;
  background: var(--ink);
  color: #fff8eb;
  box-shadow: 0 18px 38px rgba(25, 20, 13, 0.28);
}

.admin-filter-fab svg {
  width: 25px;
  height: 25px;
}

.admin-filter-close {
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--admin-hairline, var(--line));
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}

.admin-filter-close svg {
  width: 18px;
  height: 18px;
}

.admin-tabs-in-filter {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--admin-hairline, var(--line));
  border-radius: 0;
  background: transparent;
}

.admin-tabs-in-filter a {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.admin-tabs-in-filter a.active {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--green);
}

.admin-filter-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.admin-filter-status-actions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--admin-hairline, var(--line));
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.admin-filter-status-actions a.active {
  border-color: color-mix(in srgb, var(--green) 42%, var(--admin-hairline, var(--line)));
  background: color-mix(in srgb, var(--green) 10%, #fff);
}

.admin-filter-status-actions strong {
  font-size: 1.05rem;
}

.admin-filter-status-actions span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

html.admin-filter-open,
body.admin-filter-open {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

body.admin-filter-open .admin-edge-toggle {
  opacity: 0;
  pointer-events: none;
}

.admin-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 16, 19, 0.44);
}

.admin-filter-backdrop[hidden] {
  display: none;
}

.admin-mobile-filter-panel {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 85;
  display: flex;
  width: min(100%, 760px);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 18px;
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -22px 48px rgba(25, 20, 13, 0.28);
  transform: translate(-50%, 105%);
  transition: transform 220ms ease;
  -webkit-overflow-scrolling: touch;
}

.admin-mobile-filter-panel.is-open {
  transform: translate(-50%, 0);
}

.admin-mobile-filter-panel .admin-filter-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  flex-direction: row;
  align-items: center;
  width: calc(100% + 36px);
  margin: -18px -18px 0;
  padding: 18px;
  background: var(--admin-panel);
}

.admin-mobile-filter-panel .admin-filter-head > div {
  min-width: 0;
}

.admin-mobile-filter-panel .admin-product-filter-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.admin-mobile-filter-panel .admin-record-presets {
  width: 100%;
  margin: 0;
  padding: 0;
}

.admin-mobile-filter-panel .admin-record-presets .preset-pills {
  gap: 6px;
}

.admin-mobile-filter-panel .admin-search-price-row {
  grid-template-columns: 1fr;
}

.admin-mobile-filter-panel .price-range-row.admin-price-slider-row {
  grid-template-columns: auto minmax(120px, 1fr) minmax(0, auto);
  overflow: hidden;
}

.admin-mobile-filter-panel .price-range-slider {
  min-width: 0;
}

.admin-mobile-filter-panel .price-range-value {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-mobile-filter-panel .admin-product-filter-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-mobile-filter-panel .admin-filter-checkboxes {
  justify-content: flex-start;
}

.admin-mobile-filter-panel .admin-filter-checkboxes .inline-check {
  flex: 0 1 auto;
  min-width: 160px;
}

.admin-filter-close {
  display: grid;
  flex: 0 0 auto;
}

body:has(.admin-mobile-filter-panel) .admin-main > .admin-tabs {
  display: none;
}

body:has(.admin-mobile-filter-panel) .admin-mobile-filter-panel .admin-tabs-in-filter {
  display: flex;
}

body:has(.admin-mobile-filter-panel) .admin-mobile-filter-panel.admin-mobile-filter-panel .admin-tabs-in-filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-height: 50px;
  margin: 0;
  padding: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--admin-hairline, var(--line));
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.7);
  scrollbar-width: none;
}

body:has(.admin-mobile-filter-panel) .admin-mobile-filter-panel.admin-mobile-filter-panel .admin-tabs-in-filter::-webkit-scrollbar {
  display: none;
}

body:has(.admin-mobile-filter-panel) .admin-mobile-filter-panel.admin-mobile-filter-panel .admin-tabs-in-filter a {
  display: inline-flex;
  flex: 1 0 max-content;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
}

body:has(.admin-mobile-filter-panel) .admin-mobile-filter-panel.admin-mobile-filter-panel .admin-tabs-in-filter a.active {
  background: var(--ink);
  color: var(--ink);
  color: #fff8eb;
  box-shadow: 0 6px 14px rgba(25, 20, 13, 0.12);
}

@media (max-width: 760px) {
  .admin-mobile-filter-panel .price-range-row.admin-price-slider-row {
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
  }

  .admin-mobile-filter-panel .price-range-slider {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-mobile-filter-panel .price-range-label,
  .admin-mobile-filter-panel .price-range-value {
    border: 0;
    padding: 0;
  }

  .admin-mobile-filter-panel .admin-product-filter-fields {
    grid-template-columns: 1fr;
  }

  .admin-mobile-filter-panel .admin-filter-checkboxes .inline-check {
    width: 100%;
  }

  .admin-status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-status-strip .kpi-tile {
    min-height: 72px;
    padding: 10px;
  }
}

.admin-filter-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(217, 208, 193, 0.78);
  padding-bottom: 12px;
}

.admin-filter-head strong {
  display: block;
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 500;
}

.admin-filter-head > span {
  max-width: 38ch;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: right;
}

.admin-filters > input,
.admin-filters > select,
.admin-filters > label,
.admin-filters > .filter-search {
  grid-column: span 3;
}

.admin-filters > .admin-filter-search,
.admin-filters > input[name="search"] {
  grid-column: span 6;
}

.admin-filters > .price-range-row {
  grid-column: 1 / -1;
}

.admin-filters > .primary-btn,
.admin-filters > .secondary-btn,
.admin-filters > .danger-btn {
  grid-column: span 2;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.admin-filters > .admin-filter-export {
  grid-column: span 3;
}

.admin-filters .inline-check {
  min-width: 0;
  justify-content: space-between;
}

.admin-filters .price-range-row {
  background: rgba(255, 253, 248, 0.78);
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.68);
}

.admin-tabs a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  padding: 9px 12px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.admin-tabs a.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

@media (max-width: 1080px) {
  .metric-grid,
  .form-grid.four,
  .collection-grid,
  .budget-grid,
  .process-grid,
  .spotlight-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalogue-head,
  .product-detail-page {
    grid-template-columns: 1fr;
  }

  .detail-media img {
    min-height: 420px;
  }

  .admin-shell {
    --admin-sidebar-w: 260px;
  }

  .admin-edge-toggle {
    left: 260px;
  }

  .admin-filters input[name="search"],
  .admin-filters .admin-filter-search,
  .admin-filters .price-range-row {
    grid-column: 1 / -1;
  }

  .admin-filters > input,
  .admin-filters > select,
  .admin-filters > label,
  .admin-filters > .filter-search {
    grid-column: span 6;
  }

  .activity-feed,
  .analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-shell {
    position: relative;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-sidebar-toggle {
    display: grid;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 270px;
    height: 100vh;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.4);
    transform: translateX(0);
    transition: transform 260ms ease;
  }

  .admin-shell.admin-sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 240ms ease;
  }

  .admin-shell.admin-sidebar-collapsed .admin-sidebar-backdrop {
    opacity: 0;
    pointer-events: none;
  }

  /* The floating circular edge-toggle is a desktop-only affordance (it sits on the sidebar's own
     edge, which is off-screen on mobile when collapsed) — mobile gets a proper fixed navbar
     instead, with the toggle and brand together, always reachable regardless of sidebar state. */
  .admin-edge-toggle {
    display: none !important;
  }

  /* On mobile the sidebar's own header row only has two items once open (the close toggle and
     the brand) — center them as a group instead of space-between's wide left/right split. */
  .admin-brand-row {
    justify-content: center;
    gap: 14px;
  }

  .admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 94;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #171513;
  }

  .admin-topbar-toggle {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8eedf;
    cursor: pointer;
  }

  .admin-topbar-toggle svg {
    display: none;
    width: 19px;
    height: 19px;
  }

  /* Default (no .admin-sidebar-collapsed) means the sidebar is open on mobile, so the button
     shows a cross to close it; collapsed means closed, so it shows a hamburger to open it. */
  .admin-topbar-toggle .icon-cross {
    display: block;
  }

  .admin-shell.admin-sidebar-collapsed .admin-topbar-toggle .icon-cross {
    display: none;
  }

  .admin-shell.admin-sidebar-collapsed .admin-topbar-toggle .icon-hamburger {
    display: block;
  }

  .admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-left: auto;
    color: #f8eedf;
  }

  .admin-topbar-brand .brand-mark {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
    background: var(--gold, #b8860b);
    color: #171513;
  }

  .admin-topbar-brand strong {
    overflow: hidden;
    font-size: 0.94rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }


  .admin-main,
  body:has(.admin-shell) .admin-main {
    padding-top: 70px;
  }

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

  .admin-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    flex-basis: auto;
  }

  .filter-actions {
    margin-left: 0;
  }

  .filter-actions .primary-btn,
  .filter-actions .secondary-btn {
    flex: 1;
  }

  .filters-row select {
    flex-basis: auto;
  }

  .hero,
  .contact-section,
  .enquiry-panel,
  .admin-two-col,
  .enquiry-card,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .detail-media img,
  .detail-media-empty {
    min-height: 280px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 18vw, 6rem);
  }

  .commerce-band,
  .metric-grid,
  .form-grid,
  .form-grid.four,
  .compact,
  .image-url-row,
  .variant-row,
  .process-grid,
  .spotlight-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

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

  .product-grid[data-shop-view="list"] .product-image {
    flex-basis: 96px;
    width: 96px;
  }

  .product-grid[data-shop-view="compact"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .product-body {
    padding: 12px;
    gap: 8px;
  }

  .product-card h3 {
    font-size: 0.98rem;
  }

  .add-to-cart-btn {
    padding: 10px;
    font-size: 0.82rem;
  }

  .collection-grid,
  .budget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .collection-card strong {
    font-size: 0.96rem;
  }

  .collection-card div {
    padding: 10px;
  }

  .compact textarea,
  .compact button,
  .compact .whatsapp-btn {
    grid-column: auto;
  }

  .selected-summary,
  .enquiry-form {
    grid-column: auto;
  }

  .cart-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .admin-brand-row {
    align-items: flex-start;
  }

  .admin-main {
    padding: 70px 16px 16px;
  }

  .admin-page-head .primary-btn,
  .admin-page-head .secondary-btn,
  .admin-page-head .danger-btn {
    width: 100%;
  }

  .admin-filters {
    grid-template-columns: 1fr;
    padding: 12px;
  }

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

  .admin-filter-head > span {
    max-width: none;
    text-align: left;
  }

  .admin-filters > input,
  .admin-filters > select,
  .admin-filters > label,
  .admin-filters > .filter-search,
  .admin-filters input[name="search"],
  .admin-filters .admin-filter-search,
  .admin-filters .price-range-row {
    grid-column: auto;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .admin-tabs a {
    flex: 0 0 auto;
  }

  .record-box-toggle {
    flex-wrap: wrap;
  }

  .record-box-grid,
  .activity-feed,
  .analytics-metrics {
    /* minmax(0, 1fr), not a bare 1fr — a plain 1fr track still has an implicit "auto" minimum
       (its content's min-content size), so a wide child (e.g. the line-items table) kept
       stretching this grid, and the whole page, past the viewport on phones. */
    grid-template-columns: minmax(0, 1fr);
  }

  .record-box-side,
  .collection-product-list {
    min-width: 0;
  }

  .custom-order-item-row,
  .variant-row {
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .inline-status-form {
    flex-wrap: wrap;
  }
}

body:has(.admin-shell) {
  background: #eef2f6;
}

body:has(.admin-shell) .admin-sidebar {
  background: #171513;
  border-right: none;
  padding: 16px 12px;
  transition: width 180ms ease, padding 180ms ease;
}

body:has(.admin-shell) .admin-sidebar-toggle {
  order: -1;
  border-radius: var(--admin-radius-sm);
  transition: background 140ms ease, border-color 140ms ease;
}

body:has(.admin-shell) .admin-sidebar-toggle:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

body:has(.admin-shell) .admin-sidebar-collapsed .admin-sidebar {
  gap: 14px;
  padding-inline: 10px;
}

body:has(.admin-shell) .admin-sidebar-collapsed .admin-brand-row {
  justify-content: center;
}

body:has(.admin-shell) .admin-sidebar-collapsed .admin-brand,
body:has(.admin-shell) .admin-sidebar-collapsed .tooltip-anchor,
body:has(.admin-shell) .admin-sidebar-collapsed .admin-sidebar form {
  display: none;
}

body:has(.admin-shell) .admin-sidebar-collapsed .admin-menu {
  display: none;
}

body:has(.admin-shell) .admin-menu a {
  border: 1px solid transparent;
  border-radius: var(--admin-radius-sm);
  transition: background 150ms ease, transform 150ms ease;
}

/* Dashboard / View Site sit outside any group box, so without their own border they read as
   plain text instead of clickable buttons — give them a faint visible outline like the rest
   of the menu had before the transparent-border redesign. */
body:has(.admin-shell) .admin-menu-pair a {
  border-color: rgba(255, 255, 255, 0.14);
}

body:has(.admin-shell) .admin-menu-pair a:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

body:has(.admin-shell) .admin-menu a:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.07);
}

body:has(.admin-shell) .admin-menu a.is-active,
body:has(.admin-shell) .admin-menu a[aria-current="page"] {
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(212, 175, 55, 0.38);
  color: #fff4d1;
  font-weight: 600;
  box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.12), 0 2px 8px rgba(0, 0, 0, 0.18);
}

body:has(.admin-shell) .admin-menu a.is-active::before,
body:has(.admin-shell) .admin-menu a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  background: #d4af37;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

body:has(.admin-shell) .admin-menu a.is-active:hover,
body:has(.admin-shell) .admin-menu a[aria-current="page"]:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateX(2px);
}

body:has(.admin-shell) .admin-main {
  padding: clamp(14px, 2vw, 28px) clamp(14px, 2.4vw, 32px) 44px;
}

@media (max-width: 760px) {
  /* Must come after the unconditional rule above (same selector, so source order decides the
     tie) — otherwise it resets padding-top and the fixed mobile navbar covers the page heading. */
  body:has(.admin-shell) .admin-main {
    padding-top: 70px;
  }
}

body:has(.admin-shell) .admin-page-head {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-hairline);
}

@media (max-width: 760px) {
  /* Must come after the unconditional rule above (same selector, so source order decides the
     tie) — otherwise align-items:center re-centers the heading block on mobile. */
  body:has(.admin-shell) .admin-page-head {
    align-items: flex-start;
  }
}

body:has(.admin-shell) .admin-page-head h1 {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
}

body:has(.admin-shell) .admin-page-head .eyebrow {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

body:has(.admin-shell) h2 {
  font-size: 1.15rem;
}

/* Buttons — softer, rounder, calmer shadows than the storefront pill style */
body:has(.admin-shell) .primary-btn,
body:has(.admin-shell) .secondary-btn,
body:has(.admin-shell) .danger-btn {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

body:has(.admin-shell) .secondary-btn {
  border-color: var(--admin-hairline);
  background: #fff;
  color: var(--ink);
}

body:has(.admin-shell) .secondary-btn:hover {
  background: #fff;
  border-color: color-mix(in srgb, var(--ink) 30%, var(--line));
}

body:has(.admin-shell) .primary-btn:hover,
body:has(.admin-shell) .secondary-btn:hover,
body:has(.admin-shell) .danger-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--admin-shadow-md);
}

body:has(.admin-shell) .danger-icon-btn {
  border-radius: var(--admin-radius-sm);
}

/* Cards / metrics — flat surfaces, hairline instead of a heavy border */
body:has(.admin-shell) .metric-grid article,
body:has(.admin-shell) .admin-card,
body:has(.admin-shell) .admin-table-wrap {
  border: 1px solid var(--admin-hairline);
  border-radius: var(--admin-radius);
  background: var(--admin-card);
  box-shadow: var(--admin-shadow-sm);
}

body:has(.admin-shell) .metric-grid,
body:has(.admin-shell) .admin-two-col {
  gap: 12px;
  margin-bottom: 14px;
}

body:has(.admin-shell) .metric-grid article,
body:has(.admin-shell) .admin-card {
  padding: 14px;
}

body:has(.admin-shell) .admin-card.settings-bar {
  padding: 0;
}

body:has(.admin-shell) .metric-grid article {
  transition: box-shadow 160ms ease, transform 160ms ease;
}

body:has(.admin-shell) .metric-grid article:hover {
  box-shadow: var(--admin-shadow-md);
  transform: translateY(-2px);
}

/* Filters — same flat surface as the table below it, divided by one hairline
   rather than its own boxed panel */
body:has(.admin-shell) .admin-filters {
  border-bottom: 1px solid var(--admin-hairline);
  background: var(--admin-panel);
}

body:has(.admin-shell) .admin-filter-head {
  border-bottom: 1px solid var(--admin-hairline);
  justify-content: flex-start;
  text-align: left;
}

body:has(.admin-shell) .admin-filter-head > div {
  margin-right: auto;
  text-align: left;
}

body:has(.admin-shell) .admin-filters-redesigned > .admin-filter-head {
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start !important;
  text-align: left !important;
}

body:has(.admin-shell) .admin-filters-redesigned > .admin-filter-head > div {
  width: 100%;
  margin: 0 auto 0 0 !important;
  text-align: left !important;
}

body:has(.admin-shell) .admin-filters-redesigned > .admin-filter-head .eyebrow,
body:has(.admin-shell) .admin-filters-redesigned > .admin-filter-head strong {
  display: block;
  text-align: left !important;
}

body:has(.admin-shell) .admin-filter-head strong {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
}

body:has(.admin-shell) .admin-filters > input,
body:has(.admin-shell) .admin-filters > select,
body:has(.admin-shell) .filter-search {
  border-radius: 8px;
  border-color: var(--admin-hairline);
  background: #fff;
}

body:has(.admin-shell) .filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--admin-hairline);
  padding: 0 12px;
}

body:has(.admin-shell) .filter-search input {
  border: none;
  background: none;
  min-height: 38px;
  padding: 0;
}

body:has(.admin-shell) .filter-search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

body:has(.admin-shell) .inline-check {
  border: 1px solid var(--admin-hairline);
  border-radius: 8px;
  background: #fff;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

/* Trello-card styling for permission checkboxes: a flat pill becomes a tappable tile that lifts
   on hover and lights up with a colored border + tint once checked, so scanning a role's access
   list reads at a glance instead of squinting at tiny checkmarks. */
.checkbox-grid .inline-check {
  position: relative;
  min-height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--admin-hairline, var(--line));
  background: #fff;
  padding: 12px 14px;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 16, 12, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.checkbox-grid .inline-check:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(20, 16, 12, 0.1);
  transform: translateY(-1px);
}

.checkbox-grid .inline-check:has(input:checked) {
  border-color: var(--green);
  background: rgba(35, 110, 99, 0.08);
  color: var(--green);
}

.checkbox-grid .inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}

/* Compact single-line "label + input + button" row (staff Role/Password quick-edit) — a plain
   full-width .contact-form label made these feel like a whole separate form for a one-field
   change, so this caps the input at a sane width instead of stretching edge to edge. */
form.compact-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.compact-inline-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  min-width: 68px;
}

.compact-inline-input {
  flex: 1 1 180px;
  max-width: 260px;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
}

.compact-inline-form button {
  flex: 0 0 auto;
}

@media (max-width: 420px) {
  .compact-inline-input {
    max-width: none;
    flex-basis: 100%;
  }

  .compact-inline-form button {
    flex: 1 1 100%;
  }
}

.role-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 4px;
}

.role-name-field {
  flex: 1 1 220px;
  min-width: 0;
}

.role-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .role-card-head {
    align-items: stretch;
  }

  .role-card-actions {
    flex-basis: 100%;
  }

  .role-card-actions .primary-btn,
  .role-card-actions .danger-btn {
    flex: 1 1 0;
  }
}

body:has(.admin-shell) .date-picker {
  flex: 1 1 auto;
}

body:has(.admin-shell) .date-picker-button {
  min-height: 44px;
  border-color: var(--admin-hairline);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font-size: 0.9rem;
}

body:has(.admin-shell) .admin-record-filters .date-picker,
body:has(.admin-shell) .admin-record-filters .date-picker-button {
  width: 100%;
}

body:has(.admin-shell) .date-picker-menu {
  border-color: var(--admin-hairline);
  border-radius: var(--admin-radius);
  background: #fff;
  box-shadow: var(--admin-shadow-lg);
}

body:has(.admin-shell) .date-picker-day.is-selected {
  background: var(--ink);
}

body:has(.admin-shell) .date-picker-day.is-range {
  background: color-mix(in srgb, var(--gold) 15%, white);
}

body:has(.admin-shell) .date-picker-day.is-range-start,
body:has(.admin-shell) .date-picker-day.is-range-end {
  background: var(--ink);
  color: #fff;
}

body:has(.admin-shell) .date-picker-foot {
  border-top-color: var(--admin-hairline);
}

body:has(.admin-shell) .date-picker-foot button,
body:has(.admin-shell) .date-picker-nav,
body:has(.admin-shell) .date-picker-day {
  border-radius: 8px;
}

/* Tables — no cell borders except row dividers, quiet header, hover highlight */
body:has(.admin-shell) .admin-table {
  min-width: 100%;
}

body:has(.admin-shell) .admin-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--admin-hairline);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

body:has(.admin-shell) .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-hairline);
}

body:has(.admin-shell) .admin-table tbody tr {
  transition: background 120ms ease;
}

body:has(.admin-shell) .admin-table tbody tr:hover {
  background: color-mix(in srgb, var(--gold) 5%, transparent);
}

body:has(.admin-shell) .admin-table tbody tr:last-child td {
  border-bottom: none;
}

body:has(.admin-shell) .collection-thumb,
body:has(.admin-shell) .product-cell img,
body:has(.admin-shell) .image-missing {
  border-radius: var(--admin-radius-sm);
}

body:has(.admin-shell) .product-cell {
  padding: 6px;
  border-radius: var(--admin-radius-sm);
}

body:has(.admin-shell) .product-dialog::backdrop {
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(2px);
}

body:has(.admin-shell) label {
  font-weight: 600;
  font-size: 0.76rem;
}

/* Products admin: compact grid "rows" (not a real <table>, so nothing here is bound to a
   fixed min-width the way a table's columns are — it reflows/stacks freely at any width). */
body:has(.admin-shell) .product-management-panel {
  overflow: hidden;
}

body:has(.admin-shell) .admin-icon-action {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-hairline);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

body:has(.admin-shell) .admin-icon-action svg {
  display: block;
  width: 16px;
  height: 16px;
}

body:has(.admin-shell) .admin-icon-action:hover {
  border-color: color-mix(in srgb, var(--green) 32%, var(--admin-hairline));
  background: color-mix(in srgb, var(--green) 7%, white);
  color: var(--green);
  transform: translateY(-1px);
}

body:has(.admin-shell) .danger-action {
  color: var(--danger);
}

body:has(.admin-shell) .danger-action:hover {
  border-color: rgba(182, 64, 64, 0.28);
  background: rgba(182, 64, 64, 0.08);
  color: var(--danger);
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--admin-hairline, var(--line));
  font-size: 0.84rem;
  color: var(--muted);
}

.admin-pagination-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

body:has(.admin-shell) .collection-chip {
  display: inline-flex;
  max-width: 180px;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--admin-hairline);
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(.admin-shell) .product-admin-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  border-top: 1px solid var(--admin-hairline);
  padding-top: 16px;
}

body:has(.admin-shell) .product-admin-detail section {
  min-width: 0;
}

body:has(.admin-shell) .product-admin-detail dl {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

body:has(.admin-shell) .product-admin-detail dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(25, 20, 13, 0.06);
  padding-bottom: 7px;
}

body:has(.admin-shell) .product-admin-detail dt {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

body:has(.admin-shell) .product-admin-detail dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

body:has(.admin-shell) .admin-filters {
  padding: 18px;
}

body:has(.admin-shell) .admin-filters > .primary-btn,
body:has(.admin-shell) .admin-filters > .secondary-btn {
  min-height: 40px;
}

body:has(.admin-shell) .admin-filters .price-range-row {
  border-color: var(--admin-hairline);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

body:has(.admin-shell) .price-range-slider::before {
  background: color-mix(in srgb, var(--line) 76%, white);
}

body:has(.admin-shell) .price-range-fill {
  background: linear-gradient(90deg, var(--green), var(--gold));
}

body:has(.admin-shell) .price-range-thumb {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 5px 14px rgba(25, 20, 13, 0.18);
}

body:has(.admin-shell) .price-range-thumb:hover {
  border-color: var(--gold);
}

body:has(.admin-shell) .enquiry-line-product {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

body:has(.admin-shell) .enquiry-line-product img,
body:has(.admin-shell) .enquiry-line-image-empty {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--admin-hairline);
  border-radius: var(--admin-radius-sm);
  background: #fff;
  object-fit: cover;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

body:has(.admin-shell) .enquiry-line-product strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-cart-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  width: 100%;
}

.saved-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.saved-cart-item img {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #e9dfcf;
}

.saved-cart-item span {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.saved-cart-item strong,
.saved-cart-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .saved-carts-table,
  .saved-carts-table thead,
  .saved-carts-table tbody,
  .saved-carts-table th,
  .saved-carts-table td,
  .saved-carts-table tr {
    display: block;
  }

  .saved-carts-table {
    min-width: 0;
    width: 100%;
  }

  .saved-carts-table thead {
    display: none;
  }

  .saved-carts-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    background: rgba(255, 253, 248, 0.6);
  }

  .saved-carts-table tr:last-child {
    margin-bottom: 0;
  }

  .saved-carts-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .saved-carts-table tr td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .saved-carts-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  .saved-cart-items {
    min-width: 0;
  }

  .saved-cart-item strong,
  .saved-cart-item small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 520px) {
  body:has(.admin-shell) .admin-page-head .primary-btn,
  body:has(.admin-shell) .admin-page-head .secondary-btn {
    width: 100%;
  }

  body:has(.admin-shell) .admin-filters {
    gap: 10px;
    padding: 12px;
  }

  .product-cell-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .product-cell-summary img,
  .product-cell-summary .image-missing {
    width: 86px;
    height: 86px;
    aspect-ratio: 1 / 1;
    object-fit: fill;
  }

  .product-cell-summary .product-cell-text {
    align-items: center;
  }

  body:has(.admin-shell) .product-admin-detail dl {
    grid-template-columns: 1fr;
  }

  body:has(.admin-shell) .product-admin-detail dl div {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  body:has(.admin-shell) .product-admin-detail dd {
    text-align: left;
  }
}
