/* ==========================================================================
   HomeDirect Seller Portal - dashboard design system
   New visual layer for the seller dashboard. Self-contained and namespaced
   (.hdx-*) so it never leaks into the other seller pages, which keep using
   the existing dashboard.css / seller_home.css shell.
   ========================================================================== */

:root {
  --hdx-green: #16a34a;
  --hdx-green-dark: #15803d;
  --hdx-green-light: #dcfce7;
  --hdx-green-50: #f0fdf4;
  --hdx-blue: #2563eb;
  --hdx-blue-light: #dbeafe;
  --hdx-blue-dark: #1d4ed8;
  --hdx-orange: #f97316;
  --hdx-orange-light: #ffedd5;
  --hdx-purple: #7c3aed;
  --hdx-purple-light: #ede9fe;
  --hdx-red: #ef4444;
  --hdx-red-light: #fee2e2;

  --hdx-bg: #f4f7fb;
  --hdx-card: #ffffff;
  --hdx-border: #e8edf4;
  --hdx-border-soft: #f1f5f9;

  --hdx-ink: #0f172a;
  --hdx-ink-2: #334155;
  --hdx-muted: #64748b;
  --hdx-muted-2: #94a3b8;

  --hdx-radius: 14px;
  --hdx-radius-sm: 10px;
  --hdx-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
  --hdx-shadow-lift: 0 4px 16px rgba(15, 23, 42, 0.07);

  --hdx-sidebar-w: 220px;
  --hdx-topbar-h: 67px;
  --seller-app-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --hdx-font: var(--seller-app-font);
}

html,
body {
  font-family: var(--seller-app-font) !important;
}

body *:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"]):not(.glyphicon):not(.material-icons):not(code):not(pre):not(kbd):not(samp):not(.hdx-mono) {
  font-family: var(--seller-app-font) !important;
}

/* ---------------------------------------------------------------- layout */
body { margin: 0; }

.hdx-shell {
  display: flex;
  min-height: 100vh;
  background: var(--hdx-bg);
  font-family: var(--hdx-font);
  color: var(--hdx-ink);
  font-size: 14px;
  line-height: 1.5;
}

.hdx-shell *,
.hdx-shell *::before,
.hdx-shell *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- sidebar */
.hdx-sidebar {
  width: var(--hdx-sidebar-w);
  flex: 0 0 var(--hdx-sidebar-w);
  background: var(--hdx-card);
  border-right: 1px solid var(--hdx-border);
  position: fixed;
  top: calc(var(--hdx-topbar-h) + 2px);
  left: 0;
  height: auto;
  max-height: calc(100vh - var(--hdx-topbar-h) - 2px);
  display: flex;
  flex-direction: column;
  z-index: 60;
  overflow: hidden;
  overscroll-behavior: contain;
}
.hdx-sidebar::-webkit-scrollbar { width: 0; }

.hdx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 9px;
  background: #fff;
}
.hdx-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.hdx-brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--hdx-ink);
}
.hdx-brand-sub {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--hdx-blue);
  margin-top: 2px;
}

.hdx-nav {
  flex: 0 0 auto;
  padding: 8px 8px 4px;
}
.hdx-nav-group + .hdx-nav-group { margin-top: 10px; }
.hdx-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #000;
  padding: 0 10px 5px;
}

.hdx-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--hdx-radius-sm);
  color: var(--hdx-ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.hdx-nav a:hover { background: #f8fafc; color: var(--hdx-ink); }
.hdx-nav a:focus-visible { outline: 2px solid var(--hdx-blue); outline-offset: 1px; }

.hdx-nav a .hdx-ico { flex: 0 0 18px; opacity: 0.75; }
.hdx-nav a.is-active {
  background: var(--hdx-blue-light);
  color: var(--hdx-blue-dark);
  font-weight: 700;
}
.hdx-nav a.is-active .hdx-ico { opacity: 1; }

.hdx-nav a .hdx-dot {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hdx-red);
}

/* bottom promo card */
.hdx-grow {
  margin: 6px;
  padding: 8px 10px 9px;
  border-radius: 10px;
  background: linear-gradient(150deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid var(--hdx-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}
.hdx-grow-art {
  height: 52px;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.hdx-grow-art svg { display: block; width: 100%; height: 100%; }
.hdx-grow h4 {
  margin: 0 0 1px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--hdx-ink);
  line-height: 1.25;
}
.hdx-grow p {
  margin: 0 0 6px;
  font-size: 10px;
  color: var(--hdx-muted);
  line-height: 1.3;
}
.hdx-grow .hdx-btn { width: 100%; padding: 5px 8px; font-size: 11px; border-radius: 8px; }

/* ------------------------------------------------------------ main column */
.hdx-main {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--hdx-sidebar-w);
  margin-top: var(--hdx-topbar-h);
  display: flex;
  flex-direction: column;
}

.hdx-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--hdx-border);
}
.hdx-topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  min-height: 66px;
}

/* brand lives in the top navbar together with search + profile */
.hdx-topbar-inner .hdx-brand {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  margin-right: 2px;
  border-bottom: none;
  justify-content: flex-start;
}
.hdx-topbar-inner .hdx-brand img { width: 32px; height: 32px; }

.hdx-burger {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hdx-border);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--hdx-ink-2);
  flex: 0 0 auto;
}

.hdx-search { flex: 1 1 480px; max-width: 640px; min-width: 0; position: relative; }
.hdx-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--hdx-muted-2);
  pointer-events: none;
}
.hdx-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--hdx-ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hdx-search input::placeholder { color: var(--hdx-muted-2); }
.hdx-search input:focus {
  background: #fff;
  border-color: var(--hdx-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.hdx-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hdx-blue);
  color: #fff;
  cursor: pointer;
}
.hdx-search-btn:hover { background: var(--hdx-blue-dark); }
.hdx-search-btn svg {
  position: static;
  transform: none;
  width: 14px;
  height: 14px;
  color: inherit;
  pointer-events: auto;
}
.hdx-search input[type="search"] { padding-right: 40px; }

.hdx-topbar-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.hdx-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hdx-border);
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hdx-ink-2);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.hdx-icon-btn:hover { background: #f8fafc; color: var(--hdx-blue-dark); }
.hdx-icon-btn .hdx-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hdx-red);
  border: 1.5px solid #fff;
}

.hdx-sep {
  width: 1px;
  height: 26px;
  background: var(--hdx-border);
}

.hdx-me-wrap { position: relative; }

.hdx-me {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hdx-me-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--hdx-blue-light);
  color: var(--hdx-blue-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--hdx-border);
  overflow: hidden;
}
.hdx-me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hdx-me-text { display: flex; flex-direction: column; line-height: 1.2; }
.hdx-me-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hdx-ink);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdx-me-id { font-size: 11px; color: var(--hdx-muted); }
.hdx-me-chevron { width: 14px; height: 14px; color: var(--hdx-muted-2); }

.hdx-me-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 232px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--hdx-border);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 80;
}
.hdx-me-wrap.is-open .hdx-me-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hdx-me-menu-head {
  padding: 9px 10px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-me-menu-head strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--hdx-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdx-me-menu-head span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--hdx-muted);
}
.hdx-me-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--hdx-ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.hdx-me-menu a:hover { background: #f8fafc; color: var(--hdx-blue-dark); }
.hdx-me-menu a svg { color: var(--hdx-muted); }
.hdx-me-menu a.hdx-menu-danger { color: #b91c1c; }
.hdx-me-menu a.hdx-menu-danger svg { color: #ef4444; }

/* --------------------------------------------------------------- content */
.hdx-content { padding: 2px 2px 28px; display: flex; flex-direction: column; gap: 3px; }

.hdx-card {
  background: var(--hdx-card);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius);
  box-shadow: var(--hdx-shadow);
}
.hdx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-card-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hdx-ink);
}
.hdx-card-body { padding: 12px 14px; }
.hdx-card-head-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hdx-blue-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hdx-card-head-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- buttons */
.hdx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.hdx-btn-primary { background: var(--hdx-blue); color: #fff; }
.hdx-btn-primary:hover { filter: brightness(0.94); color: #fff; }
.hdx-btn-ghost { background: #fff; color: var(--hdx-ink-2); border-color: var(--hdx-border); }
.hdx-btn-ghost:hover { background: #f8fafc; color: var(--hdx-ink); }
.hdx-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* range dropdown */
.hdx-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--hdx-border);
  border-radius: 8px;
  background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 8px center / 11px;
  color: var(--hdx-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.hdx-select:focus { outline: 2px solid var(--hdx-blue); outline-offset: 1px; }

/* ------------------------------------------------------------------ hero */
.hdx-hero {
  position: relative;
  min-height: 150px;
  border-radius: var(--hdx-radius);
  overflow: hidden;
  border: 1px solid var(--hdx-border);
  background:
    radial-gradient(120% 140% at 8% 0%, #eff6ff 0%, #dbeafe 55%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 14px;
}
.hdx-hero-copy { position: relative; z-index: 2; min-width: 0; }
.hdx-hero-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--hdx-blue-dark);
}
.hdx-hero h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--hdx-ink);
  letter-spacing: -0.3px;
}
.hdx-hero-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--hdx-ink-2); max-width: 380px; }
.hdx-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hdx-hero-float {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--hdx-ink-2);
  line-height: 1.35;
}
.hdx-hero-float svg { color: var(--hdx-blue); flex: 0 0 auto; }

/* seller visual: uses the existing seller-home.png asset, with a CSS
   fallback block behind it so the banner still looks right if the
   image is unavailable. */
.hdx-hero-visual {
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hdx-hero-visual::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 170px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 74%, #93c5fd 0 20px, transparent 21px),
    radial-gradient(circle at 62% 62%, #60a5fa 0 26px, transparent 27px),
    radial-gradient(circle at 84% 76%, #3b82f6 0 18px, transparent 19px),
    linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  opacity: 0.75;
}
.hdx-hero-visual img {
  position: relative;
  max-width: 88%;
  max-height: 200px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hdx-hero-perks {
  position: relative;
  z-index: 3;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 168px;
}
.hdx-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e7ff;
  border-radius: 12px;
}
.hdx-perk-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #e0f2fe;
  color: #0369a1;
}
.hdx-perk-ico.b { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-perk-ico.p { background: var(--hdx-purple-light); color: var(--hdx-purple); }
.hdx-perk-txt { display: flex; flex-direction: column; line-height: 1.2; }
.hdx-perk-txt b { font-size: 13px; color: var(--hdx-ink); }
.hdx-perk-txt small { font-size: 11px; color: var(--hdx-muted); }

/* -------------------------------------------------------------- kpi cards */
.hdx-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 3px;
}
.hdx-kpi {
  background: var(--hdx-card);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius);
  box-shadow: var(--hdx-shadow);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hdx-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hdx-kpi-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
  flex: 0 0 auto;
}
.hdx-kpi-ico.b { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-kpi-ico.o { background: var(--hdx-orange-light); color: var(--hdx-orange); }
.hdx-kpi-ico.p { background: var(--hdx-purple-light); color: var(--hdx-purple); }
.hdx-kpi-ico.y { background: var(--hdx-orange-light); color: var(--hdx-orange); }
.hdx-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--hdx-muted);
}
.hdx-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--hdx-ink);
  letter-spacing: -0.4px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdx-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
}
.hdx-trend.up { color: var(--hdx-green-dark); }
.hdx-trend.down { color: var(--hdx-red); }
.hdx-trend.flat { color: var(--hdx-muted); }
.hdx-kpi-sub { font-size: 11.5px; color: var(--hdx-muted); }

/* --------------------------------------------------------- analytics row */
.hdx-row-3 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3px;
}

/* sales chart */
.hdx-chart-wrap { padding: 6px 10px 10px; }
.hdx-chart { width: 100%; height: auto; display: block; overflow: visible; }
.hdx-chart-grid { stroke: #eef2f7; stroke-width: 1; }
.hdx-chart-axis { fill: #94a3b8; font-size: 10px; font-family: var(--hdx-font); }
.hdx-chart-line { fill: none; stroke: var(--hdx-blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hdx-chart-area { fill: url(#hdxGrad); }
.hdx-chart-dot { fill: #fff; stroke: var(--hdx-blue); stroke-width: 2.5; }
.hdx-chart-empty {
  padding: 34px 10px;
  text-align: center;
  color: var(--hdx-muted-2);
  font-size: 13px;
}


/* donut */
.hdx-donut-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hdx-donut { position: relative; width: 132px; height: 132px; flex: 0 0 132px; }
.hdx-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hdx-donut-center b { font-size: 22px; font-weight: 800; color: var(--hdx-ink); line-height: 1; }
.hdx-donut-center small { font-size: 10.5px; color: var(--hdx-muted); font-weight: 600; }
.hdx-legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1 1 120px; }
.hdx-legend div { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.hdx-legend i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.hdx-legend span { color: var(--hdx-ink-2); }
.hdx-legend b { margin-left: auto; color: var(--hdx-ink); font-weight: 700; }

/* revenue */
.hdx-rev { display: flex; flex-direction: column; gap: 13px; }
.hdx-rev-row { display: flex; flex-direction: column; gap: 5px; }
.hdx-rev-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hdx-rev-label { font-size: 12.5px; color: var(--hdx-ink-2); font-weight: 600; }
.hdx-rev-amt { font-size: 13px; font-weight: 800; color: var(--hdx-ink); }
.hdx-bar { height: 7px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.hdx-bar i { display: block; height: 100%; border-radius: 999px; }

/* ----------------------------------------------------- quick actions row */
.hdx-row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3px;
}
.hdx-qa {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.hdx-qa a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-sm);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.hdx-qa a:hover {
  border-color: var(--hdx-blue);
  box-shadow: var(--hdx-shadow-lift);
  transform: translateY(-1px);
}
.hdx-qa-ico {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
}
.hdx-qa-ico.b { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-qa-ico.o { background: var(--hdx-orange-light); color: var(--hdx-orange); }
.hdx-qa-ico.p { background: var(--hdx-purple-light); color: var(--hdx-purple); }
.hdx-qa-ico.r { background: var(--hdx-red-light); color: var(--hdx-red); }
.hdx-qa span { font-size: 11.5px; font-weight: 700; color: var(--hdx-ink-2); text-align: center; line-height: 1.25; }

/* festive promo */
.hdx-promo {
  position: relative;
  overflow: hidden;
  border-radius: var(--hdx-radius);
  border: 1px solid #fed7aa;
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hdx-promo h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: #9a3412; }
.hdx-promo p { margin: 0 0 12px; font-size: 12.5px; color: #7c2d12; max-width: 260px; }
.hdx-promo-art {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 132px;
  height: 116px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 66%, #fcd34d 0 16px, transparent 17px),
    radial-gradient(circle at 62% 50%, #fb923c 0 20px, transparent 21px),
    radial-gradient(circle at 82% 70%, #f87171 0 14px, transparent 15px),
    linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
  border: 1px dashed #fdba74;
  opacity: 0.85;
}
.hdx-promo-copy { position: relative; z-index: 2; }

/* -------------------------------------------------------- bottom section */
.hdx-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: start;
}

/* tables */
.hdx-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hdx-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.hdx-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--hdx-muted);
  padding: 10px 14px;
  background: #fafbfd;
  border-bottom: 1px solid var(--hdx-border);
  white-space: nowrap;
}
.hdx-table td {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--hdx-ink-2);
  border-bottom: 1px solid var(--hdx-border-soft);
  white-space: nowrap;
}
.hdx-table tbody tr:last-child td { border-bottom: 0; }
.hdx-table tbody tr:hover { background: #fafbfd; }
.hdx-strong { font-weight: 700; color: var(--hdx-ink); }
.hdx-mono { font-variant-numeric: tabular-nums; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12.5px; }
.hdx-cell-sub { display: block; font-size: 11px; color: var(--hdx-muted); }

.hdx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.hdx-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hdx-pill-green { background: var(--hdx-green-light); color: var(--hdx-green-dark); }
.hdx-pill-blue { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-pill-orange { background: var(--hdx-orange-light); color: #c2410c; }
.hdx-pill-red { background: var(--hdx-red-light); color: #b91c1c; }
.hdx-pill-grey { background: #f1f5f9; color: var(--hdx-muted); }

.hdx-empty { padding: 30px 16px; text-align: center; color: var(--hdx-muted-2); font-size: 13px; }

/* inventory + notifications lists */
.hdx-inv { display: flex; flex-direction: column; }
.hdx-inv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-inv-row:last-child { border-bottom: 0; }
.hdx-inv-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #f1f5f9;
  color: var(--hdx-muted);
}
.hdx-inv-ico.g { background: var(--hdx-green-light); color: var(--hdx-green-dark); }
.hdx-inv-ico.o { background: var(--hdx-orange-light); color: #c2410c; }
.hdx-inv-ico.r { background: var(--hdx-red-light); color: #b91c1c; }
.hdx-inv-ico.b { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-inv-label { font-size: 12.5px; font-weight: 600; color: var(--hdx-ink-2); }
.hdx-inv-num { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--hdx-ink); }

.hdx-notes-wrap { position: relative; }
.hdx-notes {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hdx-notes::-webkit-scrollbar { display: none; }
.hdx-notes-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hdx-border);
  background: #fff;
  color: var(--hdx-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
  transition: background 0.15s ease, opacity 0.15s ease;
}
.hdx-notes-arrow:hover { background: #f8fafc; }
.hdx-notes-arrow:disabled { opacity: 0.4; cursor: default; }
.hdx-notes-arrow.prev { left: 6px; }
.hdx-notes-arrow.next { right: 6px; }
.hdx-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 0 0 245px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--hdx-border-soft);
  border-radius: var(--hdx-radius-sm);
  background: #fff;
}
.hdx-note-ico {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #f1f5f9;
  color: var(--hdx-muted);
}
.hdx-note-ico.g { background: var(--hdx-green-light); color: var(--hdx-green-dark); }
.hdx-note-ico.b { background: var(--hdx-blue-light); color: var(--hdx-blue); }
.hdx-note-ico.o { background: var(--hdx-orange-light); color: #c2410c; }
.hdx-note-ico.p { background: var(--hdx-purple-light); color: var(--hdx-purple); }
.hdx-note-ico .hdx-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hdx-red);
  border: 1.5px solid #fff;
}
.hdx-note-body { min-width: 0; flex: 1 1 auto; }
.hdx-note-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hdx-ink);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdx-note-sub {
  font-size: 11.5px;
  color: var(--hdx-muted);
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hdx-note-time { font-size: 11px; color: var(--hdx-muted-2); margin-top: 2px; }

/* messages */
.hdx-alert {
  padding: 10px 14px;
  border-radius: var(--hdx-radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.hdx-alert-success { background: var(--hdx-green-light); color: var(--hdx-green-dark); border-color: #bbf7d0; }
.hdx-alert-error { background: var(--hdx-red-light); color: #b91c1c; border-color: #fecaca; }
.hdx-alert-warning { background: var(--hdx-orange-light); color: #c2410c; border-color: #fed7aa; }
.hdx-alert-info { background: var(--hdx-blue-light); color: var(--hdx-blue); border-color: #bfdbfe; }
.hdx-alert-debug { background: #f1f5f9; color: var(--hdx-ink-2); border-color: var(--hdx-border); }

/* product manager (existing table, restyled but functionally identical) */
.hdx-pm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-pm-bar h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.hdx-pm-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 14px;
  background: #fafbfd;
  border-bottom: 1px solid var(--hdx-border-soft);
}
.hdx-pm-filters input,
.hdx-pm-filters select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hdx-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--hdx-ink-2);
  background: #fff;
  outline: none;
  min-width: 190px;
}
.hdx-pm-filters input:focus,
.hdx-pm-filters select:focus { border-color: var(--hdx-blue); }
.hdx-act { display: inline-flex; gap: 10px; align-items: center; }
.hdx-act-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--hdx-border);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--hdx-muted);
  text-decoration: none;
}
.hdx-act-btn:hover { background: #f8fafc; }
.hdx-act-btn.edit:hover { color: var(--hdx-blue); border-color: var(--hdx-blue-light); }
.hdx-act-btn.del:hover { color: var(--hdx-red); border-color: var(--hdx-red-light); }

/* kyc strip */


.hdx-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 55;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1200px) {
  .hdx-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .hdx-row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hdx-row-3 > .hdx-card:first-child { grid-column: 1 / -1; }
  .hdx-row-bottom { grid-template-columns: minmax(0, 1fr); }
  .hdx-row-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  :root { --hdx-sidebar-w: 78px; }
  .hdx-brand-text,
  .hdx-nav a span:not(.hdx-dot),
  .hdx-nav-label,
  .hdx-grow p,
  .hdx-grow h4,
  .hdx-grow .hdx-btn {
    display: none;
  }
  .hdx-brand { justify-content: center; padding: 16px 8px; }
  .hdx-nav a { justify-content: center; padding: 11px 0; }
  .hdx-grow { padding: 8px; }
  .hdx-grow-art { height: 44px; margin: 0; }
  .hdx-hero-visual { width: 38%; opacity: 0.75; }
  .hdx-hero-perks { flex-basis: 140px; }
}

@media (max-width: 820px) {
  :root { --hdx-sidebar-w: 0px; }
  .hdx-sidebar {
    width: 250px;
    flex-basis: 250px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--hdx-shadow-lift);
  }
  .hdx-sidebar.is-open { transform: translateX(0); }
  .hdx-sidebar .hdx-brand-text,
  .hdx-sidebar .hdx-nav a span:not(.hdx-dot),
  .hdx-sidebar .hdx-nav-label,
  .hdx-sidebar .hdx-grow p,
  .hdx-sidebar .hdx-grow h4,
  .hdx-sidebar .hdx-grow .hdx-btn { display: revert; }
  .hdx-sidebar .hdx-brand { justify-content: flex-start; padding: 18px 16px 16px; }
  .hdx-sidebar .hdx-nav a { justify-content: flex-start; padding: 7px 10px; }
  .hdx-sidebar .hdx-grow { padding: 10px; }
  .hdx-sidebar .hdx-grow-art { height: 52px; margin-bottom: 8px; }
  .hdx-burger { display: inline-flex; }
  .hdx-backdrop.is-open { display: block; }
  .hdx-topbar-inner { padding: 10px 16px; gap: 10px; }
  .hdx-search { flex: 1 1 auto; }
  .hdx-content { padding: 2px 2px 24px; gap: 3px; }
  .hdx-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .hdx-row-3 { grid-template-columns: minmax(0, 1fr); }
  .hdx-row-bottom { grid-template-columns: minmax(0, 1fr); }
  .hdx-hero { flex-direction: column; align-items: flex-start; padding: 16px; }
  .hdx-hero-visual { display: none; }
  .hdx-hero-perks { flex: 1 1 auto; width: 100%; margin-left: 0; margin-top: 14px; }
  .hdx-qa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hdx-kpis { grid-template-columns: minmax(0, 1fr); }
  .hdx-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdx-me-text { display: none; }
  .hdx-hero h1 { font-size: 18px; }
  .hdx-sep { display: none; }
  .hdx-donut { margin: 0 auto; }
}

@media print {
  .hdx-sidebar, .hdx-topbar, .hdx-backdrop { display: none !important; }
  .hdx-main { margin-left: 0; margin-top: 0; }
}

.hdx-brand,
.hdx-brand:hover,
.hdx-brand:focus,
.hdx-brand:active,
.hdx-brand:visited {
  text-decoration: none;
}

/* =====================================================
   FIX: SELLER SIDEBAR SHOULD NOT OVERLAP FULL-WIDTH FOOTER
   ===================================================== */

/* Desktop layout */
@media (min-width: 821px) {

    .hdx-shell {
        display: flex;
        align-items: flex-start;
        min-height: 100vh;
    }

    .hdx-sidebar {
        position: sticky;
        top: var(--hdx-topbar-h);
        margin-top: var(--hdx-topbar-h);
        height: calc(100vh - var(--hdx-topbar-h));
        max-height: none;
        align-self: flex-start;
        flex: 0 0 var(--hdx-sidebar-w);
        z-index: 40;
    }

    .hdx-main {
        margin-left: 0;
        margin-top: var(--hdx-topbar-h);
        min-width: 0;
        flex: 1 1 auto;
    }
}

/* Mobile layout - preserve the existing sidebar behavior */
@media (max-width: 820px) {

    .hdx-sidebar {
        position: fixed;
        top: var(--hdx-topbar-h);
        left: 0;
        margin-top: 0;
        height: calc(100vh - var(--hdx-topbar-h));
        max-height: none;
        z-index: 60;
    }

    .hdx-main {
        margin-left: 0;
        margin-top: var(--hdx-topbar-h);
    }
}
