:root {
  /* Nuggy Brand Colors - Correct Version */
  --primary-green: #006644; /* Deep forest green */
  --deep-forest: #1e5631; /* Darker green variant */
  --highlight-lime: #eeaf00; /* Yellow accent */
  --warm-cream: #fffdf6; /* Background color */
  --graphite-ink: #222222; /* Primary text */
  --graphite-70: rgba(34, 34, 34, 0.7);
  --graphite-20: rgba(34, 34, 34, 0.2);
  --graphite-10: rgba(34, 34, 34, 0.1);
  --primary-green-20: rgba(0, 102, 68, 0.2);
  --primary-green-10: rgba(0, 102, 68, 0.1);

  /* Legacy mappings */
  --color-primary: var(--primary-green);
  --color-deep-forest: var(--deep-forest);
  --color-highlight: var(--highlight-lime);
  --color-bg: var(--warm-cream);
  --color-text: var(--graphite-ink);
  --color-muted: var(--graphite-70);
  --color-light: var(--graphite-70);
  --color-border: var(--graphite-10);
  --color-success: var(--primary-green);
  --color-danger: #d32f2f; /* Material red for errors/warnings */

  /* Animation */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
 * No horizontal page scroll: clip at the root, avoid 100vw (scrollbar gutter),
 * and contain the dashboard shell. Inner regions (tables) may use overflow-x: auto.
 */
html {
  overflow-x: clip;
  max-width: 100%;
  scrollbar-gutter: stable;
}

body {
  overflow-x: clip;
  max-width: 100%;
  font-family:
    "Urbanist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--warm-cream);
  color: var(--graphite-ink);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

.container {
  max-width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Dashboard Layout */
body.dashboard-app {
  background-color: var(--warm-cream);
  overflow-x: clip;
}

.dashboard-layout {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 20px 0 0;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: clip;
}

.dashboard-sidebar {
  width: 248px;
  min-width: 248px;
  flex: 0 0 248px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  transition:
    width 0.28s var(--ease-out),
    flex-basis 0.28s var(--ease-out),
    min-width 0.28s var(--ease-out);
  z-index: 100;
}

.dashboard-sidebar-inner {
  height: 100%;
  min-height: 0;
  background: #ffffff;
  border: 1px solid rgba(34, 34, 34, 0.14);
  border-left: none;
  border-radius: 0 28px 28px 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
  padding: 16px 10px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  transition:
    border-radius 0.28s var(--ease-out),
    padding 0.28s var(--ease-out);
}

.dashboard-sidebar-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #6b6b6b;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s var(--ease-out);
}

.dashboard-sidebar-toggle:hover {
  color: var(--primary-green);
}

.sidebar-toggle-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sidebar-toggle-line {
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  display: block;
}

.sidebar-toggle-expanded,
.sidebar-toggle-collapsed {
  display: none;
}

.dashboard-sidebar-brand {
  padding: 44px 12px 0;
  transition: padding 0.28s var(--ease-out);
}

.dashboard-sidebar-logo {
  width: 128px;
  max-width: 100%;
  height: auto;
  transition: width 0.28s var(--ease-out);
}

.dashboard-sidebar-email {
  margin-top: 10px;
  color: #5f5f5f;
  font-family: Urbanist, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    opacity 0.28s var(--ease-out),
    width 0.28s var(--ease-out),
    max-width 0.28s var(--ease-out);
}

.dashboard-sidebar-nav {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: margin-top 0.28s var(--ease-out);
}

.dashboard-sidebar-nav-item {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #6a6a6a;
  text-decoration: none;
  font-family: Urbanist, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  transition:
    background-color 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    min-height 0.28s var(--ease-out),
    padding 0.28s var(--ease-out),
    width 0.28s var(--ease-out),
    border-radius 0.28s var(--ease-out);
}

.dashboard-sidebar-nav-item:hover {
  background: rgba(30, 86, 49, 0.08);
  color: #1e5631;
}

.dashboard-sidebar-nav-item.active {
  background: #c6cfcb;
  color: #1e5631;
}

.dashboard-sidebar-nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.72;
}

.dashboard-sidebar-nav-item.active .dashboard-sidebar-nav-icon {
  opacity: 1;
}

.dashboard-sidebar-nav-label {
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 10px;
  transition:
    opacity 0.28s var(--ease-out),
    width 0.28s var(--ease-out),
    max-width 0.28s var(--ease-out),
    padding 0.28s var(--ease-out),
    margin 0.28s var(--ease-out);
}

.dashboard-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-sidebar-time {
  text-align: center;
  color: #666666;
  font-family: Urbanist, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
  transition:
    opacity 0.28s var(--ease-out),
    width 0.28s var(--ease-out),
    max-width 0.28s var(--ease-out);
}

.dashboard-sidebar-notification {
  position: relative;
  padding: 14px 16px 16px;
  border: 1px solid rgba(30, 86, 49, 0.65);
  border-radius: 20px;
  background: #edf5ef;
  box-shadow: 0 8px 20px rgba(30, 86, 49, 0.08);
  color: var(--color-text);
}

.dashboard-sidebar-notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dashboard-sidebar-notification-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-green);
  color: white;
  font-family: Urbanist, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.dashboard-sidebar-notification-dismiss {
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.dashboard-sidebar-notification-dismiss:hover {
  color: var(--color-text);
}

.dashboard-sidebar-notification-dismiss:disabled {
  opacity: 0.5;
  cursor: default;
}

.dashboard-sidebar-notification-title {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-family: Urbanist, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.dashboard-sidebar-notification-list {
  margin: 0 0 14px 18px;
  padding: 0;
  color: var(--color-muted);
  font-family: Urbanist, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-sidebar-notification-list li + li {
  margin-top: 4px;
}

.dashboard-sidebar-notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.dashboard-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 12px 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Full width of main area (viewport minus sidebar) */
.dashboard-main .container {
  max-width: none;
  width: 100%;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar {
  width: 88px;
  min-width: 88px;
  flex-basis: 88px;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-brand {
  padding: 44px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-logo {
  width: 56px;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-email,
body.dashboard-sidebar-collapsed .dashboard-sidebar-time,
body.dashboard-sidebar-collapsed .dashboard-sidebar-nav-label {
  opacity: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  padding: 0;
  margin: 0;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-nav {
  margin-top: 34px;
  align-items: center;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-nav-item {
  width: 54px;
  min-height: 54px;
  border-radius: 14px;
  justify-content: center;
  padding: 0;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-notification {
  display: none;
}

body.dashboard-sidebar-collapsed .dashboard-sidebar-toggle {
  left: 10px;
  right: auto;
}

body.dashboard-sidebar-collapsed .sidebar-toggle-icon {
  display: flex;
}

@media (max-width: 1320px) {
  .dashboard-layout {
    gap: 14px;
    padding: 0 14px 0 0;
  }

  .dashboard-sidebar {
    width: 220px;
    min-width: 220px;
    flex-basis: 220px;
  }

  .dashboard-sidebar-nav-item {
    font-size: 15px;
  }

  .dashboard-sidebar-time {
    font-size: 24px;
  }
}

/* Large viewports: fix sidebar to viewport left so it doesn't break on ultra-wide */
@media (min-width: 1681px) {
  .dashboard-layout {
    max-width: none;
    padding-left: 248px;
    padding-right: 20px;
  }

  .dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 248px;
    min-width: 248px;
    flex: none;
    height: 100vh;
  }

  body.dashboard-sidebar-collapsed .dashboard-layout {
    padding-left: 88px;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar {
    width: 88px;
    min-width: 88px;
  }
}

@media (max-width: 1024px) {
  .dashboard-layout {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    margin: 0 auto;
    /* Space for fixed mobile menu button (top-left) */
    padding: calc(56px + env(safe-area-inset-top, 0px)) 12px 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .dashboard-main {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-sidebar {
    width: 100%;
    max-width: 560px;
    flex-basis: auto;
    position: relative;
    z-index: 400;
    height: 0;
    min-height: 0;
    margin: 0 auto;
    overflow: visible;
    pointer-events: none;
  }

  .dashboard-sidebar-inner {
    height: 0;
    min-height: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    pointer-events: none;
  }

  /* Top-left menu icon only — fixed so it stays visible while scrolling */
  .dashboard-sidebar-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: fixed;
    top: max(8px, env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    z-index: 412;
    margin: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    pointer-events: auto;
  }

  .dashboard-mobile-menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(0, 102, 68, 0.08);
    color: var(--primary-green);
    cursor: pointer;
    transition:
      background-color 0.2s var(--ease-out),
      transform 0.15s ease;
  }

  .dashboard-mobile-menu-btn:hover {
    background: rgba(0, 102, 68, 0.14);
  }

  .dashboard-mobile-menu-btn:active {
    transform: scale(0.96);
  }

  .dashboard-mobile-menu-btn__line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
  }

  body.dashboard-mobile-menu-open .dashboard-mobile-menu-btn {
    background: rgba(0, 102, 68, 0.18);
  }

  /* Slide-out panel: navigation + brand — fixed; no dimmed overlay behind it */
  .dashboard-sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    max-width: 100%;
    z-index: 410;
    display: flex;
    flex-direction: column;
    padding: 16px 14px 20px;
    /* Below fixed hamburger (44px) at top: max(8px, safe-area) */
    padding-top: calc(max(8px, env(safe-area-inset-top, 0px)) + 44px + 12px);
    background: #ffffff;
    border-right: 1px solid rgba(34, 34, 34, 0.12);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease-out);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }

  body.dashboard-mobile-menu-open .dashboard-sidebar-panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  .dashboard-sidebar-brand {
    padding: 0 4px 0;
  }

  .dashboard-sidebar-logo {
    width: 120px;
  }

  .dashboard-sidebar-email {
    font-size: 14px;
  }

  .dashboard-sidebar-nav {
    margin-top: 12px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .dashboard-sidebar-nav-item {
    min-height: 48px;
    font-size: 15px;
    border-radius: 12px;
    flex: none;
    width: 100%;
  }

  .dashboard-sidebar-time {
    text-align: left;
    font-size: 15px;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-notification {
    display: block;
  }

  .dashboard-sidebar-toggle {
    display: none;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar {
    width: 100%;
    max-width: 560px;
    flex-basis: auto;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-brand {
    align-items: flex-start;
    padding: 8px 4px 0;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-logo {
    width: 120px;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-email,
  body.dashboard-sidebar-collapsed .dashboard-sidebar-time,
  body.dashboard-sidebar-collapsed .dashboard-sidebar-nav-label {
    opacity: 1;
    width: auto;
    max-width: none;
    pointer-events: auto;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-nav {
    margin-top: 12px;
    align-items: stretch;
  }

  body.dashboard-sidebar-collapsed .dashboard-sidebar-nav-item {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 10px 14px;
  }
}

/* Desktop: hide mobile chrome */
@media (min-width: 1025px) {
  .dashboard-sidebar-mobile-topbar {
    display: none;
  }

  .dashboard-sidebar-panel {
    position: static;
    transform: none !important;
    width: auto;
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    z-index: auto;
  }
}

/* Main Content */
.main-content {
  padding: 24px 0; /* Using 8px grid: 3 * 8 = 24px */
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-header {
  margin-bottom: 2rem;
}

h1 {
  font-family: Inter, sans-serif;
  line-height: 1.2;
  font-size: 48px;
  font-weight: 800;
}

h2,
h3,
h4,
h5,
h6 {
  font-family: Urbanist, sans-serif;
  line-height: 1.2;
}

h2 {
  font-size: 32px;
  font-weight: 800;
}

h3 {
  font-size: 24px;
  font-weight: 700;
}

h4 {
  font-size: 20px;
  font-weight: 700;
}

h5 {
  font-size: 16px;
  font-weight: 700;
}

h6 {
  font-size: 14px;
  font-weight: 700;
}

.dashboard-header h1 {
  color: var(--color-primary);
}

.dashboard-header h2 {
  font-family: Inter, sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.text-muted {
  font-family: Urbanist, sans-serif;
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.6;
}

caption,
small,
.caption {
  font-family: Urbanist, sans-serif;
  font-size: 13px;
  color: var(--color-muted);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: linear-gradient(145deg, #ffffff 0%, #fafbf9 100%);
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 102, 68, 0.08);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.25s var(--ease-out);
  animation: fadeInScale 0.4s var(--ease-out) backwards;
}

.metric-card:nth-child(1) {
  animation-delay: 0.05s;
  border-left: 3px solid var(--primary-green);
}
.metric-card:nth-child(2) {
  animation-delay: 0.1s;
  border-left: 3px solid rgba(232, 163, 13, 0.5);
}
.metric-card:nth-child(3) {
  animation-delay: 0.15s;
  border-left: 3px solid rgba(0, 102, 68, 0.5);
}
.metric-card:nth-child(4) {
  animation-delay: 0.2s;
  border-left: 3px solid rgba(13, 31, 232, 0.5);
}

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

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 102, 68, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 102, 68, 0.15);
}

.metric-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.metric-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--graphite-70);
}

.metric-period {
  font-size: 0.6875rem;
  color: var(--graphite-70);
  opacity: 0.8;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.metric-number {
  font-family: Urbanist, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-green);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.metric-change.positive {
  color: var(--color-success);
}

.metric-change.negative {
  color: var(--color-danger);
}

.metric-subtitle {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-left: 0.25rem;
}

/* Inventory Gauge */
.inventory-gauge {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.gauge-fill {
  height: 100%;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

/* Competitor Pricing */
.competitor-pricing-section {
  background: white;
  padding: 24px; /* Using 8px grid: 3 * 8 = 24px */
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 24px; /* Using 8px grid: 3 * 8 = 24px */
  transition: all 0.3s var(--ease-out);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.competitor-pricing-section h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-deep-forest);
}

.competitor-feed {
  max-height: 300px;
  overflow-y: auto;
}

.quote-item:last-child {
  border-bottom: none;
}

.quote-product {
  font-weight: 500;
}

.quote-price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  font-family: "IBM Plex Mono", monospace;
}

.quote-time {
  font-size: 0.875rem;
  color: var(--color-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.data-table td:first-child {
  vertical-align: middle;
}

.price-current {
  font-weight: 600;
  color: var(--color-primary);
  font-family: "IBM Plex Mono", monospace;
}

.margin {
  font-weight: 500;
}

.margin.positive {
  color: var(--color-success);
}

.inventory-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.025em;
}

.inventory-badge.ok {
  background-color: var(--primary-green-10);
  color: var(--primary-green);
}

.inventory-badge.low {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--color-danger);
}

/* Buttons */
.btn {
  font-family: Urbanist, sans-serif;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-green);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 68, 0.3);
  background: var(--deep-forest);
}

.btn-outline {
  background: transparent;
  color: var(--primary-green); /* Keep text green by default */
  border: 2px solid var(--graphite-10); /* Gray outline by default */
  box-shadow: none; /* No shadow by default */
}

.btn-outline:hover {
  background: var(--primary-green-10);
  border-color: var(--graphite-70); /* Darker gray on hover */
  color: var(--deep-forest);
  transform: translateY(-2px); /* Lift effect */
  box-shadow: var(--shadow-md); /* Add shadow on hover */
}

/* Specific styling for dispensary buttons */
.dispensary-button-item.active {
  border-color: var(--primary-green); /* Green outline for active */
  box-shadow: 0 0 0 2px var(--primary-green-20); /* Subtle glow */
}

.dispensary-button-item.active:hover {
  border-color: var(--deep-forest); /* Darker green on hover for active */
  box-shadow: 0 4px 12px rgba(0, 102, 68, 0.3); /* Stronger shadow for active on hover */
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 14px;
}

.tutorial-activate-btn {
  min-width: 180px;
}

/* Sections */
#dashboard,
#rules {
  display: none;
}

#dashboard.active,
#rules.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  animation: fadeInUp 0.5s var(--ease-out);
}

.section-header h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  animation: fadeInUp 0.5s var(--ease-out);
}

.section-header--filters {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.section-header--filters .filter-controls {
  width: 100%;
}

@media (min-width: 1180px) {
  .section-header--filters .filter-controls {
    flex-wrap: nowrap;
  }
}

.recommendations-header {
  margin-bottom: 1rem;
}

.recommendations-header-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .recommendations-header-row .btn {
    width: 100%;
    justify-content: center;
  }
}

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

/* Rules Grid */
.rules-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.rule-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.rule-header h4 {
  margin: 0;
  color: var(--color-primary);
}

.rule-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.025em;
}

.rule-status.active {
  background-color: var(--primary-green-10);
  color: var(--primary-green);
}

.rule-status.inactive {
  background-color: var(--graphite-10);
  color: var(--color-muted);
}

.rule-content p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.rule-content p strong {
  color: var(--color-text);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-dropdown {
  position: relative;
  flex: 0 1 220px;
  min-width: 220px;
}

.filter-select {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: white;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text);
}

.filter-select--trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.filter-dropdown.is-open .filter-select--trigger {
  border-color: rgba(0, 102, 68, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 102, 68, 0.08);
}

.filter-dropdown.has-selection .filter-select-label {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-caret {
  flex: 0 0 auto;
  color: var(--color-muted);
  transition: transform 0.2s;
}

.filter-dropdown.is-open .filter-caret {
  transform: rotate(180deg);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 240px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 20;
}

.filter-dropdown.is-open .filter-menu {
  display: block;
}

.filter-menu-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.filter-menu-actions[hidden] {
  display: none;
}

.filter-action {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  cursor: pointer;
}

.filter-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
}

.filter-option-label {
  min-width: 0;
}

.filter-option-empty {
  padding: 0.25rem 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: white;
  font-size: 0.875rem;
  width: 250px;
  font-family: inherit;
}

.filter-controls .search-input {
  flex: 1 1 280px;
  min-width: 260px;
  max-width: 360px;
  width: auto;
}

@media (max-width: 900px) {
  .filter-dropdown {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 180px;
  }

  .filter-controls .search-input {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .filter-dropdown {
    flex-basis: 100%;
    min-width: 0;
  }

  .filter-menu {
    min-width: 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 24px; /* Using 8px grid: 3 * 8 = 24px */
  color: var(--color-muted);
  font-style: italic;
}

/* Recommendations Section */
.recommendations-section {
  background: white;
  padding: 24px; /* Using 8px grid: 3 * 8 = 24px */
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 24px; /* Using 8px grid: 3 * 8 = 24px */
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.recommendations-section h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-deep-forest);
}

.recommendations-section td small {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.recommendations-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.competitor-loading-banner {
  text-align: center;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--color-muted, #666);
  background: var(--color-surface-alt, #f8f9fa);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 6px;
  margin-top: 8px;
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pagination-summary {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-btn {
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-primary);
  border-radius: 6px;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-green-10);
  border-color: var(--primary-green);
}

.pagination-btn.active {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.price-suggestion {
  color: var(--color-accent);
  font-weight: 600;
}

.impact-negative {
  color: #d32f2f;
  font-weight: 600;
}

.impact-positive {
  color: var(--color-success);
}

.impact-neutral {
  color: var(--color-muted);
}

/* Enterprise recommendations table: blocky grid + alternating rows */
.recommendations-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(70vh, 600px);
  overflow-y: auto;
  overflow-x: hidden;
}

#recommendations-table.table,
#pricing-table.table,
.recommendations-section .data-table {
  width: 100%;
  font-size: 0.9375rem;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  table-layout: fixed;
}

#pricing-table.table thead tr {
  background: rgba(0, 0, 0, 0.04);
}

/* Sticky header: keep column names visible when scrolling (same as recommendations table) */
#pricing-table.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 2px 0 0 var(--color-border);
}

#pricing-table.table th.table-head {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 14px 1rem;
  border-top: none;
  border-right: none;
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  vertical-align: middle;
}

#pricing-table.table th.table-head:first-child {
  border-left: none;
}

#pricing-table.table th.table-head:last-child {
  border-right: none;
}

/* Header wrap (same as recommendations table) */
#pricing-table.table th.table-head {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
  min-width: 0;
}

@media (max-width: 1100px) {
  #pricing-table.table th.table-head {
    padding: 10px 0.5rem;
  }
}

#pricing-table.table tbody tr:nth-child(odd) {
  background: #fff;
}

#pricing-table.table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

#pricing-table.table .table-cell {
  padding: 14px 1rem;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid var(--color-border);
  border-left: none;
  vertical-align: middle;
}

#pricing-table.table .table-cell:first-child {
  border-left: none;
}

#pricing-table.table .table-cell:last-child {
  border-right: none;
}

#pricing-table.table .table-cell--num {
  text-align: left;
}

#pricing-table.table .table-cell--stacked {
  line-height: 1.4;
}

#pricing-table.table .pricing-table-detail-primary {
  font-weight: 600;
  color: var(--color-text);
}

#pricing-table.table .pricing-table-detail-secondary {
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

#pricing-table.table .pricing-table-detail-secondary--muted {
  color: #999;
}

/* Column widths: headers fit first (wrap), then Product gets most space */
#recommendations-table.table th.table-head:nth-child(1),
#recommendations-table.table .table-cell:nth-child(1) {
  width: 15%;
}
#recommendations-table.table th.table-head:nth-child(2),
#recommendations-table.table th.table-head:nth-child(3),
#recommendations-table.table th.table-head:nth-child(4),
#recommendations-table.table th.table-head:nth-child(5),
#recommendations-table.table th.table-head:nth-child(6),
#recommendations-table.table th.table-head:nth-child(7),
#recommendations-table.table .table-cell:nth-child(2),
#recommendations-table.table .table-cell:nth-child(3),
#recommendations-table.table .table-cell:nth-child(4),
#recommendations-table.table .table-cell:nth-child(5),
#recommendations-table.table .table-cell:nth-child(6),
#recommendations-table.table .table-cell:nth-child(7),
#recommendations-table.table th.table-head:nth-child(8),
#recommendations-table.table td.recommendations-actions {
  width: 10%;
}

#recommendations-table.table thead tr {
  background: rgba(0, 0, 0, 0.04);
}

/* Sticky header: keep column names visible when scrolling */
#recommendations-table.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 2px 0 0 var(--color-border);
}

.table-head,
#recommendations-table th.table-head {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 14px 1rem;
  border-top: none;
  border-right: none;
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  vertical-align: middle;
}

/* Front page: headers always wrap so they fit in the column first */
#recommendations-table.table th.table-head {
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  min-width: 0;
}

#recommendations-table.table th.table-head:first-child {
  border-left: none;
}

#recommendations-table.table th.table-head:last-child {
  border-right: none;
}

@media (max-width: 1100px) {
  #recommendations-table.table th.table-head {
    padding: 10px 0.5rem;
  }
}

/* Alternating row colors */
#recommendations-table.table tbody tr:nth-child(odd) {
  background: #fff;
}

#recommendations-table.table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

#recommendations-table .table-cell {
  padding: 14px 1rem;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid var(--color-border);
  border-left: none;
  vertical-align: middle;
}

#recommendations-table.table .table-cell:first-child {
  border-left: none;
}

#recommendations-table.table .table-cell:last-child {
  border-right: none;
}

#recommendations-table .table-cell--product {
  text-align: left;
}

.rec-product-trigger {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.rec-product-trigger:focus-visible {
  outline: 2px solid rgba(44, 95, 74, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

#recommendations-table tbody tr:hover .rec-product-name,
.rec-product-trigger:hover .rec-product-name,
.rec-product-trigger:focus-visible .rec-product-name {
  color: var(--deep-forest);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.rec-product-name {
  font-weight: 600;
  color: var(--color-text);
}

.rec-product-meta {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 2px;
}

#recommendations-table .table-cell--num,
#recommendations-table .table-cell--profit {
  text-align: left;
}

#recommendations-table td.recommendations-actions {
  text-align: left;
}

.delta-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-right: 8px;
}

.delta-pill--down {
  background: rgba(40, 167, 69, 0.12);
  color: #1e7e34;
}

.delta-pill--up {
  background: rgba(253, 126, 20, 0.15);
  color: #e65100;
}

.delta-pill--neutral {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-muted);
}

.rec-suggested-price {
  font-weight: 600;
  color: var(--color-text);
}

.table-cell--profit-positive {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 600;
}

.table-cell--profit-negative {
  background: #ffebee;
  color: #b71c1c;
  font-weight: 600;
}

.table-cell--profit-neutral {
  background: #fff8e1;
  color: #e65100;
  font-weight: 600;
}

/* Units Sold column tint (same as profit) */
.table-cell--units-positive {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 600;
}

.table-cell--units-negative {
  background: #ffebee;
  color: #b71c1c;
  font-weight: 600;
}

.table-cell--units-neutral {
  background: #fff8e1;
  color: #e65100;
  font-weight: 600;
}

#recommendations-table .table-cell--units {
  text-align: left;
  vertical-align: middle;
}

/* Action buttons: tick and cross */
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.action-btn--approve {
  background-color: #28a745;
  color: white;
}

.action-btn--approve:hover:not(:disabled) {
  background-color: #218838;
}

.action-btn--deny {
  background-color: #dc3545;
  color: white;
}

.action-btn--deny:hover:not(:disabled) {
  background-color: #c82333;
}

.action-btn svg {
  flex-shrink: 0;
}

.price-direction {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.025em;
}

.price-up {
  background-color: var(--color-highlight);
  color: var(--color-deep-forest);
}

.price-down {
  background-color: var(--primary-green-10);
  color: var(--primary-green);
}

/* Chart Section */
.chart-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.chart-section h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.chart-container {
  height: 300px;
  position: relative;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
  text-align: center;
}

.summary-card h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.summary-product {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.summary-metric {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Products Table Wrapper — card style; scrolling is on inner .recommendations-table-wrap */
.products-table-wrapper {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.025em;
}

.status-badge.optimal {
  background-color: var(--primary-green-10);
  color: var(--primary-green);
}

.status-badge.warning {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--color-danger);
}

/* Help Tooltips */
.help-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  background-color: var(--primary-green-10);
  color: var(--primary-green);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

button.help-tooltip {
  border: 0;
  padding: 0;
  appearance: none;
}

.help-tooltip:hover {
  background-color: var(--highlight-lime);
  color: var(--deep-forest);
  transform: scale(1.1);
}

.help-tooltip:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
  background-color: var(--highlight-lime);
  color: var(--deep-forest);
}

/* Tooltip content */
.help-tooltip::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 12px;
  font-weight: normal;
  white-space: normal;
  width: 250px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  line-height: 1.4;
  text-align: left;
}

/* Adjust tooltip position for table headers */
.data-table th .help-tooltip::after {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 8px;
}

.data-table th .help-tooltip::before {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: -5px;
  border-top-color: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.9);
}

.help-tooltip:hover::after {
  opacity: 1;
}

/* Arrow for tooltip */
.help-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.help-tooltip:hover::before {
  opacity: 1;
}

.help-tooltip[aria-controls]::after,
.help-tooltip[aria-controls]::before {
  display: none;
}

.help-tooltip-popover[hidden] {
  display: none;
}

.help-tooltip-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1000;
  width: min(320px, calc(100dvw - 48px));
  max-width: calc(100dvw - 24px);
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.help-tooltip-popover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 14px;
  border: 5px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.92);
}

h3 {
  display: inline-flex;
  align-items: center;
}

.data-table th {
  text-align: left;
  padding: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}

.data-table th .help-tooltip {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  margin-top: 0;
}

/* Sortable column styles */
.data-table th.sortable {
  position: relative;
  cursor: default;
}

.data-table th.sortable .sort-indicator {
  display: inline-block;
  margin-left: 6px;
  font-size: 1em;
  font-weight: 600;
  color: var(--color-text);
  opacity: 0.85;
  transition: all 0.2s var(--ease-out);
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.data-table th.sortable .sort-indicator:hover {
  opacity: 1;
  background-color: var(--primary-green-10);
}

.data-table th.sortable .sort-indicator:active {
  background-color: var(--primary-green-20);
}

/* Competitor pricing styling */
.competitor-item {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

/* Price trend indicators */
.price-trend {
  font-size: 0.8rem;
  margin-left: 0.5rem;
  font-weight: bold;
}

.price-trend.trend-up {
  color: var(--color-danger);
}

.price-trend.trend-down {
  color: var(--color-success);
}

.price-trend.trend-stable {
  color: var(--color-muted);
}

.competitor-item:hover {
  background-color: rgba(0, 102, 68, 0.02);
}

.competitor-item:last-child {
  border-bottom: none;
}

.competitor-product {
  font-weight: 500;
}

.competitor-store {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Driver.js onboarding theme */
.driver-popover {
  border-radius: 10px;
  border: 1px solid var(--graphite-10);
  box-shadow: var(--shadow-lg);
}

.driver-popover-title {
  color: var(--color-primary);
  font-family: Urbanist, sans-serif;
  font-weight: 700;
}

.driver-popover-description {
  color: var(--color-text);
  font-family: Urbanist, sans-serif;
}

.driver-popover-progress-text {
  color: var(--color-muted);
}

.driver-popover-footer button {
  border-radius: 8px;
  border: 1px solid var(--graphite-20);
  font-family: Urbanist, sans-serif;
  font-weight: 600;
}

.driver-popover-footer .driver-popover-next-btn {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #fff;
  text-shadow: none;
}

.driver-popover-footer .driver-popover-prev-btn {
  color: var(--color-primary);
}
.competitor-price {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
  text-align: right;
}

.competitor-price.higher {
  color: var(--color-danger);
}

.competitor-price.lower {
  color: var(--color-success);
}

.competitor-price.same {
  color: var(--color-primary);
}

.price-diff {
  font-size: 0.75rem;
  font-weight: normal;
  margin-left: 0.25rem;
}

.competitor-time {
  font-size: 0.875rem;
  color: var(--color-light);
  text-align: right;
}

/* Product Links */
.product-link {
  color: var(--color-deep-forest);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s var(--ease-out);
  border-bottom: 2px solid transparent;
}

.product-link:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-highlight);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-border);
}

::-webkit-scrollbar-thumb {
  background: var(--color-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* Popup Modal Styles */
.popup-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s var(--ease-out);
}

.popup-modal.show {
  display: block;
}

.popup-content {
  position: relative;
  background-color: white;
  margin: 5% auto;
  padding: 0;
  width: min(90%, calc(100% - 24px));
  max-width: 600px;
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s var(--ease-out);
  overflow-x: hidden;
}

.popup-content--changelog {
  max-width: 720px;
}

.popup-content--recommendation {
  width: min(46vw, calc(100% - 32px));
  max-width: 700px;
  max-height: min(88vh, 920px);
  border-radius: 24px;
  overflow-y: auto;
}

.popup-content--menu-health-goals {
  max-width: 680px;
  max-height: 82vh;
  overflow-y: auto;
}

.popup-content--menu-health-goals #popup-body {
  padding: 32px 30px 30px;
}

.popup-content--recommendation .popup-close {
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--primary-green);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.popup-content--recommendation .popup-close:hover {
  color: var(--deep-forest);
  background: rgba(0, 102, 68, 0.08);
}

.popup-content--recommendation .popup-close:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

.popup-content--recommendation #popup-body {
  padding: 26px 32px 32px;
}

.popup-content--session-timeout {
  max-width: 440px;
}

.popup-modal--viewport-notice {
  z-index: 2147483000;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  box-sizing: border-box;
}

.popup-content--viewport-notice {
  width: min(420px, calc(100% - 24px));
  max-width: min(420px, calc(100% - 24px));
  margin: clamp(16px, 8vh, 72px) auto;
  overflow: hidden;
}

.popup-body--viewport-notice {
  padding: 24px 20px 20px;
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 100%;
}

.popup-modal--viewport-notice .viewport-notice {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.viewport-notice h3 {
  margin: 0;
  padding-right: 56px;
  color: var(--deep-forest);
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  line-height: 1.05;
}

.viewport-notice__copy {
  margin: 0;
  line-height: 1.55;
  color: var(--color-text);
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.viewport-notice__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.viewport-notice__actions .btn {
  width: 100%;
  min-height: 56px;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.05rem;
}

.popup-modal--viewport-notice .popup-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--graphite-20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 8px 20px rgba(26, 39, 33, 0.12);
  color: var(--graphite-70);
  font-size: 32px;
  line-height: 1;
}

.popup-modal--viewport-notice .popup-close:hover {
  color: var(--deep-forest);
  background: #ffffff;
}

.popup-modal--viewport-notice .popup-close:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

.popup-modal--session-timeout .popup-close {
  display: none;
}

.popup-close {
  position: absolute;
  right: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  font-size: 28px;
  font-weight: 500;
  color: var(--color-light);
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.popup-close:hover {
  color: var(--color-text);
}

#popup-body,
#session-timeout-body {
  padding: 40px 30px 30px;
}

.recommendation-popup {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.recommendation-popup--loading {
  min-height: 240px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.recommendation-popup__loading-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--deep-forest);
}

.recommendation-popup__loading-copy {
  max-width: 340px;
  margin-top: 8px;
  color: var(--color-muted);
}

.recommendation-popup__topbar {
  display: flex;
  justify-content: center;
  text-align: center;
}

.recommendation-popup__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 24px;
  align-items: start;
}

.recommendation-popup__eyebrow {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.recommendation-popup__hero-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.recommendation-popup__title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2rem, 2.9vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--primary-green);
  font-weight: 800;
}

.recommendation-popup__hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.recommendation-popup__hero-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.recommendation-popup__hero-value {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  line-height: 0.98;
  font-weight: 800;
  color: var(--primary-green);
}

.recommendation-popup__hero-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

.recommendation-popup__primary-action {
  width: min(100%, 320px);
  min-height: 44px;
  border: none;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--primary-green);
  box-shadow: 0 12px 24px rgba(0, 102, 68, 0.14);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.recommendation-popup__primary-action:hover:not(:disabled) {
  background: var(--deep-forest);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0, 102, 68, 0.18);
}

.recommendation-popup__primary-action:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 3px;
}

.recommendation-popup__primary-action:disabled {
  cursor: not-allowed;
  background: rgba(0, 102, 68, 0.28);
  box-shadow: none;
}

.recommendation-popup__summary-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), #f8f5ee);
  border: 1px solid rgba(34, 34, 34, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.recommendation-popup__summary-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--color-muted);
}

.recommendation-popup__summary-value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-top: 12px;
}

.recommendation-popup__summary-price {
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--primary-green);
}

.recommendation-popup__summary-subtext {
  padding-bottom: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-green);
}

.recommendation-popup__summary-notes {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.recommendation-popup__summary-note {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.recommendation-popup__sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recommendation-popup-section {
  border-top: 1px solid rgba(34, 34, 34, 0.18);
}

.recommendation-popup-section:first-child {
  border-top: none;
}

.recommendation-popup-section__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  padding: 18px 0 20px;
}

.recommendation-popup-section__summary::-webkit-details-marker {
  display: none;
}

.recommendation-popup-section[open] .recommendation-popup-section__summary {
  padding-bottom: 16px;
}

.recommendation-popup-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-green);
}

.recommendation-popup-section__chevron {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.recommendation-popup-section__chevron::before,
.recommendation-popup-section__chevron::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.2s var(--ease-out);
}

.recommendation-popup-section__chevron::before {
  left: -1px;
  transform: translateY(-50%) rotate(45deg);
}

.recommendation-popup-section__chevron::after {
  right: -1px;
  transform: translateY(-50%) rotate(-45deg);
}

.recommendation-popup-section[open] .recommendation-popup-section__chevron::before {
  transform: translateY(-50%) rotate(-45deg);
}

.recommendation-popup-section[open] .recommendation-popup-section__chevron::after {
  transform: translateY(-50%) rotate(45deg);
}

.recommendation-popup-section__body {
  padding: 0 0 20px;
}

.recommendation-popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.recommendation-popup-section--price-history .recommendation-popup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recommendation-popup-stat {
  min-width: 0;
}

.recommendation-popup-stat__label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--color-muted);
}

.recommendation-popup-stat__value {
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.recommendation-popup-stat__subtext {
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.recommendation-popup-signals {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 14px;
}

.recommendation-popup-signals__item {
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .popup-content--recommendation {
    width: min(58vw, calc(100% - 24px));
    max-width: 680px;
  }

  .recommendation-popup__header {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 250px);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .popup-content--recommendation {
    width: min(100%, calc(100% - 16px));
    margin: 8px auto;
    overflow-x: hidden;
    box-sizing: border-box;
    border-radius: 24px;
  }

  #popup-body {
    padding: 32px 20px 22px;
    overflow-x: hidden;
    box-sizing: border-box;
    max-width: 100%;
  }

  .popup-content--recommendation #popup-body {
    padding: 52px 20px 24px;
  }

  .recommendation-popup__header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .recommendation-popup__title {
    max-width: none;
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .recommendation-popup__hero-main {
    gap: 16px;
  }

  .recommendation-popup__primary-action {
    width: 100%;
    min-height: 42px;
    font-size: 0.95rem;
  }

  .recommendation-popup__summary-card {
    padding: 16px 18px;
    border-radius: 18px;
  }

  .recommendation-popup__summary-notes {
    margin-top: 10px;
  }

  .recommendation-popup-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
  }

  .recommendation-popup-section__summary {
    padding: 16px 0 18px;
  }

  .recommendation-popup-section[open] .recommendation-popup-section__summary {
    padding-bottom: 14px;
  }

  .popup-content--recommendation .popup-close {
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  .recommendation-popup {
    gap: 22px;
  }

  .recommendation-popup__eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
  }

  .recommendation-popup__hero-metrics {
    gap: 14px 24px;
  }

  .recommendation-popup__hero-metric {
    gap: 10px;
  }

  .recommendation-popup__summary-value-row {
    gap: 8px 14px;
  }

  .recommendation-popup__summary-subtext {
    padding-bottom: 0;
  }

  .recommendation-popup-section__title {
    font-size: 1rem;
  }

  .recommendation-popup-grid,
  .recommendation-popup-section--price-history .recommendation-popup-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-popup-stat__value {
    font-size: 1.85rem;
  }
}

.session-timeout-warning {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.session-timeout-warning-countdown {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

.popup-actions--session-timeout {
  margin-top: 0;
}

.popup-actions--session-timeout .btn {
  width: 100%;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

.changelog-entry {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px;
  background: #f7faf8;
}

.changelog-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.changelog-entry-title {
  margin: 0;
  color: var(--color-primary);
  font-family: Urbanist, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.changelog-entry-version {
  color: var(--color-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.changelog-entry-list {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
}

.changelog-entry-list li + li {
  margin-top: 6px;
}

.changelog-entry-actions {
  margin-top: 16px;
}

.changelog-entry-action {
  text-decoration: none;
}

.changelog-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  .dashboard-sidebar-notification {
    padding: 14px;
  }

  .changelog-entry {
    padding: 16px;
  }

  .changelog-entry-header {
    flex-direction: column;
  }
}

/* Popup specific styles */
.popup-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.popup-header h3 {
  font-family: Urbanist, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 5px;
}

.popup-header p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-green);
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.popup-actions .btn {
  min-width: 100px;
}

/* Notification Toast Styles */
.notification-toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: top 0.3s var(--ease-out);
  z-index: 2000;
}

.notification-toast.show {
  top: 30px;
}

.notification-toast.success {
  border-left: 4px solid var(--primary-green);
}

.notification-toast.error {
  border-left: 4px solid var(--color-danger);
}

.notification-icon {
  font-size: 1.2rem;
}

.notification-toast.success .notification-icon::before {
  content: "✓";
  color: var(--primary-green);
}

.notification-toast.error .notification-icon::before {
  content: "✗";
  color: var(--color-danger);
}

.notification-message {
  font-weight: 500;
  color: var(--color-text);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Rule card improvements */
.rule-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  position: relative;
  margin-bottom: 2px;
}

.rule-card:hover {
  background: var(--warm-cream);
}

.rule-card.disabled {
  opacity: 0.6;
}

.rule-card.disabled .rule-name {
  text-decoration: line-through;
}

/* SortableJS styles */
.rule-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Spotify-style rule row */
.rule-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 16px;
  min-height: 64px;
}

.rank-number {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}

.rule-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(34, 34, 34, 0.72);
}

.rule-icon .rule-type-icon,
.rule-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rule-icon--popup {
  width: 32px;
  height: 32px;
}

.rule-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.rule-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-description-compact {
  font-size: 0.875rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.drag-handle {
  cursor: grab;
  padding: 8px 6px;
}

.partner-dispensary-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.dispensary-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 300px;
}

.dispensary-button img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.dispensary-button div {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dispensary-button .dispensary-name {
  font-weight: 600;
}

.dispensary-button .dispensary-address {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.drag-handle span {
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--color-muted);
  border-radius: 1px;
  transition: all 0.2s var(--ease-out);
}

.rule-card:hover .drag-handle {
  opacity: 0.7;
}

.rule-card:hover .drag-handle span {
  background-color: var(--color-text);
}

.drag-handle:hover {
  opacity: 1;
}

.drag-handle:hover span {
  background-color: var(--primary-green);
  width: 18px;
}

.drag-handle:active {
  cursor: grabbing;
  opacity: 1;
}

.drag-handle:active span {
  background-color: var(--primary-green);
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rule-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.rule-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border);
  transition: 0.3s;
  border-radius: 24px;
}

.rule-toggle .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.rule-toggle input:checked + .slider {
  background-color: var(--primary-green);
}

.rule-toggle input:checked + .slider:before {
  transform: translateX(24px);
}

/* Styles for competitor Dashboard */

.top-section {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.top-section > * {
  flex: 1;
  min-width: 0;
}

.chart-section,
.map-container {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

#map {
  height: 400px;
  margin-bottom: 0;
}

.chart-container {
  height: 400px;
}

/* Mapbox overlay styles */
.map-overlay {
  display: none;
  font: 12px/20px sans-serif;
  padding: 10px;
  position: absolute;
  right: 0;
  top: 0;
  width: 230px;
  overflow: hidden;
  white-space: nowrap;
}

.map-overlay-inner {
  background: #ffffff;
  padding: 10px;
  border-radius: 3px;
}

.searchable-select {
  position: relative;
  display: inline-block;
  width: 250px;
}

.searchable-select input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: white;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.searchable-select select {
  width: 100%;
  box-sizing: border-box;
}

/* Custom style for the dispensary map search */
#dispensary-search {
  background-color: #f8f9fa; /* A slightly off-white background */
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  /* Allow shrinking inside flex row so the bar doesn’t overflow the viewport */
  width: min(250px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex: 1 1 200px;
}

.map-container .section-header {
  flex-wrap: wrap;
  align-items: flex-start;
  min-width: 0;
}

.map-container .section-header h3 {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

#stats-content {
  border: 1px solid var(--color-border);
  border-radius: 12px; /* Consistent with main table wrapper */
  margin-top: -1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Consistent with main table wrapper */
}

.products-table-wrapper-mini {
  max-height: 18.78rem;
  overflow-y: auto;
}

#selected-dispensary-products-table {
  width: 100%;
  border-collapse: collapse;
}

#selected-dispensary-products-table th,
#selected-dispensary-products-table td {
  padding: 0.75rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

#selected-dispensary-products-table thead {
  position: sticky;
  top: 0;
  z-index: 10; /* Ensure the entire header is above scrolling content */
}

#selected-dispensary-products-table th {
  font-weight: 500;
  font-size: 0.875rem; /* Adjusted for consistency */
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border); /* Consistent with main table */
  background-color: white;
}

#dispensary-icon-large {
  display: block;
  margin: 0 auto 20px;
  width: 138px;
  height: 69px;
  object-fit: contain;
  object-position: center;
}

#dispensary-icon-small {
  display: block;
  margin-left: 0.1rem;
  width: 100px;
  height: 50px;
  object-fit: contain;
  object-position: center;
}

#dispensary-address-small {
  font-family: Urbanist, sans-serif;
  line-height: 1.2;
  font-size: 10px;
  font-weight: normal;
}

.dispensary-details {
  display: flex;
  align-items: center;
  gap: 1rem; /* Adds some space between the icon and the text */
  margin-top: 1rem;
}

/* Menu Health */
body.menu-health-app {
  background:
    radial-gradient(
      circle at top right,
      rgba(238, 175, 0, 0.08),
      transparent 26%
    ),
    linear-gradient(180deg, #f8f5eb 0%, #fffdf6 38%, #f6f3e8 100%);
}

/* No extra vertical padding — same top rhythm as index / pricing-rules (.main-content only). */
.menu-health-page {
  padding-top: 0;
  padding-bottom: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.menu-health-store-toolbar {
  margin-bottom: 18px;
}

.menu-health-store-toolbar .filter-controls {
  width: 100%;
}

.menu-health-store-toolbar .filter-dropdown {
  flex: 0 1 280px;
  min-width: 240px;
}

.competitor-store-toolbar {
  margin-bottom: 18px;
}

.competitor-store-toolbar .filter-controls {
  width: 100%;
}

.competitor-store-toolbar .filter-dropdown {
  flex: 0 1 280px;
  min-width: 240px;
}

.menu-health-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

/* .dashboard-header normally has margin-bottom for spacing before the next block on
   index.html; inside this flex row that margin only adds empty space below the title. */
.menu-health-header .dashboard-header {
  margin-bottom: 0;
}

.menu-health-last-updated {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.menu-health-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: 20px;
  align-items: stretch;
}

.menu-health-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 102, 68, 0.14);
  border-radius: 24px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: 28px;
}

.menu-health-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.menu-health-card-header h2,
.menu-health-chart-header h3 {
  font-family: Urbanist, sans-serif;
  color: var(--deep-forest);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.menu-health-title-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.menu-health-title-with-tooltip .help-tooltip {
  margin-left: 0;
}

.menu-health-card-copy,
.menu-health-chart-header p,
.menu-health-score-copy {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.menu-health-score-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  height: 100%;
}

.menu-health-score-value {
  font-family: Urbanist, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary-green);
}

.menu-health-gauge-shell {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-health-gauge {
  width: 100%;
  max-width: 390px;
  height: auto;
}

.menu-health-gauge-arc {
  fill: none;
  stroke-width: 28;
  stroke-linecap: butt;
}

.menu-health-gauge-arc--low {
  stroke: #bce6c7;
}

.menu-health-gauge-arc--mid {
  stroke: #6cc287;
}

.menu-health-gauge-arc--high {
  stroke: #1e6933;
}

.menu-health-gauge-needle {
  fill: #1f1f1f;
  transform-origin: 130px 130px;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-health-score-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.menu-health-mini-stat {
  border-radius: 18px;
  border: 1px solid rgba(0, 102, 68, 0.12);
  background: rgba(255, 255, 255, 0.75);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-health-mini-stat strong {
  color: var(--deep-forest);
  font-size: 1.2rem;
  line-height: 1;
}

.menu-health-mini-stat small {
  color: #647067;
  font-size: 0.86rem;
}

.menu-health-card-header--actions {
  margin-bottom: 14px;
}

.menu-health-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.menu-health-signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.menu-health-signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(0, 102, 68, 0.08);
  color: var(--deep-forest);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  appearance: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.menu-health-signal-pill:hover {
  background: rgba(0, 102, 68, 0.12);
}

.menu-health-signal-pill.is-selected {
  background: rgba(0, 102, 68, 0.18);
  border-color: rgba(0, 102, 68, 0.34);
  box-shadow: 0 0 0 3px rgba(0, 102, 68, 0.1);
}

.menu-health-signal-pill strong {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  color: var(--primary-green);
}

.menu-health-signal-pill.is-clear {
  background: rgba(34, 34, 34, 0.06);
  color: #5f5f58;
  cursor: default;
}

.menu-health-filter-controls,
.menu-health-actions-controls {
  width: min(100%, 1120px);
}

.menu-health-filter-controls {
  justify-content: flex-end;
}

.menu-health-filter-controls .filter-dropdown,
.menu-health-actions-controls .filter-dropdown {
  flex: 1 1 185px;
  min-width: 185px;
}

.menu-health-filter-controls .filter-menu,
.menu-health-actions-controls .filter-menu {
  z-index: 40;
}

.menu-health-actions-controls {
  margin-bottom: 14px;
  position: relative;
  z-index: 6;
}

.menu-health-actions-controls .search-input {
  flex: 3 1 360px;
  min-width: 320px;
  max-width: none;
  width: auto;
}

.menu-health-actions-controls .filter-dropdown,
.menu-health-widget-controls .filter-dropdown {
  flex: 0 1 185px;
  min-width: 185px;
}

.menu-health-table {
  width: 100%;
  font-size: 0.9375rem;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
}

.menu-health-table-wrap {
  width: 100%;
  position: relative;
  overflow: auto;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.82);
}

.menu-health-table-wrap--actions {
  height: 460px;
}

.menu-health-table-wrap--widget {
  height: 520px;
}

.menu-health-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.menu-health-table thead tr {
  background: rgba(0, 0, 0, 0.04);
}

.menu-health-table thead th {
  background: #f5f5f5;
  color: var(--color-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 2px 0 0 var(--color-border);
  border-bottom: 2px solid var(--color-border);
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

.menu-health-table tbody td {
  padding: 14px 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.menu-health-table tbody tr:nth-child(odd) {
  background: #fff;
}

.menu-health-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.menu-health-product-cell,
.menu-health-reason-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-health-product-cell strong {
  font-size: 0.95rem;
  line-height: 1.2;
  color: #1f2937;
}

.menu-health-product-cell span,
.menu-health-product-cell small,
.menu-health-reason-cell small {
  color: #6b7280;
  line-height: 1.3;
}

.menu-health-product-cell span,
.menu-health-reason-cell span {
  font-size: 0.9rem;
}

.menu-health-product-cell small,
.menu-health-reason-cell small {
  font-size: 0.75rem;
}

.menu-health-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.menu-health-action-pill.tone-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.menu-health-action-pill.tone-warning {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.menu-health-action-pill.tone-success {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.menu-health-action-pill.tone-info {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.menu-health-action-pill.tone-neutral {
  background: rgba(107, 114, 128, 0.13);
  color: #4b5563;
}

.menu-health-widget-panel {
  margin-top: 18px;
}

.menu-health-widget-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  color: var(--deep-forest);
}

.menu-health-filter--compact {
  width: min(100%, 320px);
  flex-shrink: 0;
}

.menu-health-widget-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 102, 68, 0.08),
    rgba(255, 255, 255, 0.75)
  );
  border: 1px solid rgba(0, 102, 68, 0.12);
  margin-bottom: 18px;
}

.menu-health-widget-badge {
  min-width: 88px;
  height: 88px;
  border-radius: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e6933;
  color: #fffdf6;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.menu-health-widget-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-health-widget-copy h3 {
  display: block;
  margin: 0;
  font-family: Urbanist, sans-serif;
  color: var(--deep-forest);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.menu-health-widget-copy p {
  margin: 0;
  color: #566358;
  font-size: 0.9rem;
  line-height: 1.5;
}

.menu-health-widget-copy small {
  color: #6f7b71;
  font-size: 0.8rem;
  line-height: 1.45;
}

.menu-health-metric-note {
  margin: 0 0 14px;
  color: #5f6d61;
  font-size: 0.82rem;
  line-height: 1.5;
}

.menu-health-widget-controls {
  margin-bottom: 14px;
  width: min(100%, 1120px);
  position: relative;
  z-index: 6;
}

.menu-health-widget-controls .search-input {
  flex: 3 1 360px;
  min-width: 320px;
  max-width: none;
  width: auto;
}

.menu-health-widget-controls .filter-menu {
  z-index: 40;
}

.menu-health-analytics-card {
  margin-bottom: 18px;
}

.menu-health-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-health-filter span {
  color: #6f746b;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-health-filter select {
  appearance: none;
  border: 1px solid rgba(0, 102, 68, 0.12);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(246, 249, 246, 0.94)
  );
  padding: 14px 42px 14px 14px;
  font-family: Urbanist, sans-serif;
  font-size: 1rem;
  color: #2d3b31;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.menu-health-filter select:focus {
  outline: none;
  border-color: rgba(0, 102, 68, 0.34);
  box-shadow: 0 0 0 4px rgba(0, 102, 68, 0.08);
}

.menu-health-analytics-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.menu-health-analytics-grid > * {
  min-width: 0;
  max-width: 100%;
}

.menu-health-chart-card {
  border-radius: 22px;
  background: rgba(255, 251, 239, 0.68);
  border: 1px solid rgba(0, 102, 68, 0.08);
  padding: 22px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.menu-health-chart-shell canvas {
  max-width: 100% !important;
}

.menu-health-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.menu-health-chart-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-health-chart-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0, 102, 68, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep-forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out);
}

.menu-health-chart-icon-button svg {
  width: 20px;
  height: 20px;
}

.menu-health-chart-icon-button:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.menu-health-chart-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-health-chart-reset {
  border: 1px solid rgba(0, 102, 68, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep-forest);
  border-radius: 999px;
  padding: 8px 12px;
  font:
    600 0.82rem/1 "Urbanist",
    sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.menu-health-chart-reset:hover {
  background: rgba(255, 255, 255, 0.9);
}

.menu-health-chart-shell {
  position: relative;
  min-height: 380px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.menu-health-goal-settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-health-goal-settings .popup-header {
  padding-right: 42px;
}

.menu-health-goal-summary {
  margin: 0;
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.55;
}

.menu-health-goal-mode-field {
  display: grid;
  gap: 8px;
}

.menu-health-goal-mode-field label {
  color: #475467;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-health-goal-mode-field small {
  color: #667085;
  font-size: 0.88rem;
  line-height: 1.45;
}

.menu-health-goal-mode-select {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(0, 102, 68, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 246, 0.96));
  padding: 13px 42px 13px 14px;
  font:
    600 0.96rem/1.3 "Urbanist",
    sans-serif;
  color: #24362b;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.menu-health-goal-mode-select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.menu-health-goal-grid {
  display: grid;
  gap: 10px;
}

.menu-health-goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(0, 102, 68, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
}

.menu-health-goal-row label {
  display: block;
  color: #24362b;
  font:
    700 0.98rem/1.35 "Urbanist",
    sans-serif;
}

.menu-health-goal-row small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 0.86rem;
}

.menu-health-goal-input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font:
    600 0.98rem/1.2 "Urbanist",
    sans-serif;
  color: #24362b;
  background: #ffffff;
  text-align: right;
}

.menu-health-goal-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.menu-health-goal-input.is-invalid {
  border-color: rgba(180, 35, 24, 0.4);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.menu-health-goal-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #667085;
  font-size: 0.9rem;
}

.menu-health-goal-helper strong {
  color: var(--deep-forest);
}

.menu-health-goal-feedback {
  min-height: 22px;
  color: #667085;
  font-size: 0.92rem;
}

.menu-health-goal-feedback.is-error {
  color: #b42318;
}

.menu-health-goal-feedback.is-success {
  color: #0f766e;
}

.menu-health-goal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-health-goal-actions .btn {
  min-width: 120px;
}

.menu-health-table .empty-state {
  text-align: center;
  color: #6b7280;
  padding: 32px 16px;
}

@media (max-width: 1400px) {
  .menu-health-filter-controls,
  .menu-health-actions-controls {
    width: 100%;
  }

  .menu-health-chart-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .menu-health-widget-panel-header {
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .menu-health-hero,
  .menu-health-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .menu-health-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-health-score-stats {
    grid-template-columns: 1fr 1fr;
  }

  .menu-health-card,
  .menu-health-chart-card {
    padding: 22px;
  }

  .menu-health-actions-controls .filter-dropdown,
  .menu-health-widget-controls .filter-dropdown {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 180px;
  }

  .menu-health-actions-controls .search-input,
  .menu-health-widget-controls .search-input {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .dashboard-layout {
    padding-right: 0;
  }

  .menu-health-page {
    padding-top: 0;
    padding-bottom: 0;
  }

  .menu-health-goal-row {
    grid-template-columns: 1fr;
  }

  .menu-health-goal-input {
    text-align: left;
  }

  .menu-health-score-stats {
    grid-template-columns: 1fr;
  }

  .menu-health-widget-overview {
    grid-template-columns: 1fr;
  }

  .menu-health-widget-badge {
    width: 88px;
  }

  .menu-health-table tbody td,
  .menu-health-table thead th {
    padding: 12px;
  }

  .menu-health-actions-controls .filter-dropdown,
  .menu-health-widget-controls .filter-dropdown {
    flex-basis: 100%;
    min-width: 0;
  }

  .menu-health-card-header,
  .menu-health-card-header--actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-health-gauge-shell {
    min-height: 190px;
  }
}

/* Driver.js onboarding theme */
.driver-popover {
  border-radius: 10px;
  border: 1px solid var(--graphite-10);
  box-shadow: var(--shadow-lg);
}

.driver-popover-title {
  color: var(--color-primary);
  font-family: "Urbanist", sans-serif;
  font-weight: 700;
}

.driver-popover-description {
  color: var(--color-text);
  font-family: "Urbanist", sans-serif;
}

.driver-popover-progress-text {
  color: var(--color-muted);
}

.driver-popover-footer button {
  border-radius: 8px;
  border: 1px solid var(--graphite-20);
  font-family: "Urbanist", sans-serif;
  font-weight: 600;
}

.driver-popover-footer .driver-popover-next-btn {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #fff;
  text-shadow: none;
}

.driver-popover-footer .driver-popover-prev-btn {
  color: var(--color-primary);
}

.dashboard-onboarding-popup-focus .driver-overlay,
.dashboard-onboarding-popup-focus .driver-overlay-animated,
.dashboard-onboarding-popup-focus .driver-stage,
.dashboard-onboarding-popup-focus .driver-stage-no-animation {
  display: none !important;
  opacity: 0 !important;
}

.dashboard-onboarding-popup-focus .driver-active-element {
  box-shadow: none !important;
}

.dashboard-onboarding-popup-focus .popup-modal,
.dashboard-onboarding-popup-focus .popup-content {
  animation: none !important;
}

/* Viewport notice (mobile): must sit above Driver.js (overlay click closes tour) and support FAB */
body.dashboard-viewport-notice-open .popup-modal--viewport-notice {
  z-index: 2147483647 !important;
}

body.dashboard-viewport-notice-open .feedback-fab-group {
  z-index: 2147483600 !important;
}

body.dashboard-viewport-notice-open .popup-modal--viewport-notice,
body.dashboard-viewport-notice-open .popup-modal--viewport-notice * {
  pointer-events: auto;
}

body.dashboard-viewport-notice-open .driver-overlay,
body.dashboard-viewport-notice-open .driver-overlay-animated,
body.dashboard-viewport-notice-open .driver-stage,
body.dashboard-viewport-notice-open .driver-stage-no-animation {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.dashboard-viewport-notice-open .driver-popover {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.dashboard-viewport-notice-open .driver-active-element {
  box-shadow: none !important;
}

.driver-popover {
  z-index: 1000001 !important;
}

/* Feedback Widget */

.feedback-fab-group {
  --fab-action-width: 148px;
  --fab-action-height: 56px;
  --fab-toggle-size: 68px;
  --tawk-offset-right: 20px;
  --tawk-offset-bottom: 20px;
  --fab-toggle-bg: var(--primary-green);
  --fab-toggle-bg-hover: var(--deep-forest);
  position: fixed;
  bottom: max(var(--tawk-offset-bottom), env(safe-area-inset-bottom, 0px));
  right: max(var(--tawk-offset-right), env(safe-area-inset-right, 0px));
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: calc(100% - var(--tawk-offset-right));
  box-sizing: border-box;
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}

/* Tawk embed: keep injected root from widening the document */
#tawkchat-container {
  max-width: 100%;
  box-sizing: border-box;
}

.feedback-fab-group.hidden {
  transform: translateY(12px) scale(0.92);
  opacity: 0;
  pointer-events: none;
}

.feedback-fab-actions {
  position: absolute;
  right: 0;
  bottom: calc(var(--fab-toggle-size) + 12px);
  width: var(--fab-action-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    visibility 0.2s step-end;
}

.feedback-fab-group.expanded .feedback-fab-actions {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    visibility 0s step-start;
}

.feedback-fab-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--fab-toggle-size);
  height: var(--fab-toggle-size);
  padding: 0;
  background: var(--fab-toggle-bg);
  color: #fff;
  border: 3px solid var(--warm-cream);
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(0, 102, 68, 0.2);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.feedback-fab-toggle:hover {
  background: var(--fab-toggle-bg-hover);
  box-shadow: 0 18px 34px rgba(30, 86, 49, 0.28);
}

/* Avoid oversized browser focus ring (often reads as a second “bubble”) */
.feedback-fab-toggle:focus {
  outline: none;
}

.feedback-fab-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

.feedback-fab-toggle-icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  pointer-events: none;
  transition:
    opacity 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.feedback-fab-toggle-icon-chat {
  opacity: 1;
  transform: scale(1);
}

.feedback-fab-toggle-icon-close {
  opacity: 0;
  transform: scale(0.72) rotate(-12deg);
}

.feedback-fab-group.expanded .feedback-fab-toggle,
.feedback-fab-group.chat-open .feedback-fab-toggle {
  background: var(--fab-toggle-bg-hover);
  box-shadow: 0 18px 36px rgba(30, 86, 49, 0.28);
}

.feedback-fab-group.expanded .feedback-fab-toggle-icon-chat,
.feedback-fab-group.chat-open .feedback-fab-toggle-icon-chat {
  opacity: 0;
  transform: scale(0.7) rotate(12deg);
}

.feedback-fab-group.expanded .feedback-fab-toggle-icon-close,
.feedback-fab-group.chat-open .feedback-fab-toggle-icon-close {
  opacity: 1;
  transform: scale(1) rotate(0);
}

/* Shared style for both primary launcher pills */
.feedback-fab,
.chat-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: var(--fab-action-width);
  height: var(--fab-action-height);
  padding: 0 18px;
  background: var(--primary-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.25s var(--ease-out);
  flex-shrink: 0;
}

.feedback-fab:hover,
.chat-fab:hover {
  background: var(--deep-forest);
  box-shadow: 0 8px 24px rgba(0, 102, 68, 0.35);
}

/* Panel */

.feedback-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1001;
  width: 380px;
  max-width: min(380px, calc(100% - 48px));
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.feedback-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.feedback-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--graphite-10);
}

.feedback-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--graphite-ink);
}

.feedback-panel-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--graphite-70);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.feedback-panel-close:hover {
  color: var(--graphite-ink);
}

.feedback-panel-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

/* Fields */

.feedback-field {
  margin-bottom: 14px;
}

.feedback-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--graphite-70);
  margin-bottom: 6px;
}

.feedback-field input[type="text"],
.feedback-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--graphite-10);
  border-radius: 8px;
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
  resize: vertical;
}

.feedback-field input[type="text"]:focus,
.feedback-field textarea:focus {
  outline: none;
  border-color: var(--primary-green);
}

/* Type selector buttons */

.feedback-type-group {
  display: flex;
  gap: 6px;
}

.feedback-type-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--graphite-10);
  border-radius: 8px;
  background: transparent;
  color: var(--graphite-70);
  font-family: "Urbanist", sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.feedback-type-btn:hover {
  border-color: var(--graphite-20);
  color: var(--graphite-ink);
}

.feedback-type-btn.active {
  background: var(--primary-green-10);
  border-color: var(--primary-green);
  color: var(--primary-green);
  font-weight: 600;
}

/* Screenshot actions */

.feedback-screenshot-actions {
  display: flex;
  gap: 6px;
}

.feedback-screenshot-actions > .feedback-action-btn {
  flex: 1 1 0;
}

.feedback-action-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 6px !important;
  font-size: 12px !important;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.feedback-upload-label {
  margin-bottom: 0 !important;
  color: var(--primary-green) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2;
  cursor: pointer;
}

/* Screenshot preview */

.feedback-preview {
  position: relative;
  margin-top: 10px;
  border: 1px solid var(--graphite-10);
  border-radius: 8px;
  overflow: hidden;
}

.feedback-preview img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background: var(--warm-cream);
}

.feedback-remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}

.feedback-remove-img:hover {
  background: var(--color-danger);
}

/* Submit button */

.feedback-submit-btn {
  width: 100%;
  margin-top: 4px;
}

/* Snip overlay */

.feedback-snip-overlay {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  z-index: 10000;
  cursor: crosshair;
  background-size: 100% 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

.feedback-snip-selection {
  position: fixed;
  border: 2px solid var(--primary-green);
  background: rgba(0, 102, 68, 0.1);
  pointer-events: none;
}

/* Responsive */

@media (max-width: 480px) {
  .feedback-panel {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    right: 12px;
    bottom: 12px;
  }

  .feedback-fab-group {
    --fab-action-width: 132px;
    --fab-action-height: 52px;
    --fab-toggle-size: 60px;
    --tawk-offset-right: 12px;
    --tawk-offset-bottom: 12px;
  }

  .feedback-type-group {
    flex-direction: column;
  }
}

/* ===== MOBILE-FIRST TABLE CARD LAYOUTS ===== */

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  h2,
  .section-header h2,
  .dashboard-header h2 {
    font-size: 24px;
  }

  h3,
  .recommendations-section h3 {
    font-size: 20px;
  }

  .recommendations-section,
  .competitor-pricing-section,
  .products-table-wrapper {
    padding: 16px;
  }

  .dashboard-main {
    padding: 8px 0;
  }

  .main-content {
    padding: 16px 0;
  }

  .container {
    padding: 0 12px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .metric-card {
    padding: 1rem 1.25rem;
  }

  .metric-number {
    font-size: 1.5rem;
  }

  .metric-header h3 {
    font-size: 0.8rem;
  }

  .metric-period {
    font-size: 0.625rem;
  }

  .section-header {
    margin-bottom: 1rem;
    gap: 0.75rem;
  }

  .recommendations-header-row {
    gap: 0.5rem;
  }

  .recommendations-header-row h3 {
    font-size: 18px;
  }

  .popup-content {
    width: min(96%, calc(100% - 24px));
    margin: 2% auto;
    max-height: 96vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .popup-modal--viewport-notice .popup-content--viewport-notice {
    width: min(420px, calc(100% - 24px));
    max-width: min(420px, calc(100% - 24px));
    margin: 16px auto;
  }

  .top-section {
    flex-direction: column;
    gap: 1rem;
  }

  .map-container .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .map-container .section-header h3 {
    flex: none;
  }

  #dispensary-search {
    width: 100%;
    max-width: 100%;
    flex: none;
  }

  #map {
    height: 280px;
  }

  .chart-container {
    height: 260px;
  }

  .partner-dispensary-buttons {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .dispensary-button {
    min-width: 100%;
  }

  .notification-toast {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
  }

  .notification-toast.show {
    top: 12px;
  }

  /* --- RECOMMENDATIONS TABLE -> CARD LAYOUT --- */

  .recommendations-table-wrap {
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
  }

  #recommendations-table.table {
    table-layout: auto;
  }

  #recommendations-table.table thead {
    display: none;
  }

  #recommendations-table.table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  #recommendations-table.table tbody tr:nth-child(even) {
    background: #fff;
  }

  #recommendations-table.table .table-cell,
  #recommendations-table.table td.recommendations-actions {
    display: flex;
    flex-direction: column;
    padding: 6px 4px;
    border-bottom: none;
    width: auto !important;
    text-align: left;
  }

  #recommendations-table.table .table-cell::before,
  #recommendations-table.table td.recommendations-actions::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 2px;
  }

  #recommendations-table.table .table-cell--product {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
  }

  #recommendations-table.table .table-cell--product::before {
    display: none;
  }

  #recommendations-table.table td.recommendations-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--color-border);
  }

  #recommendations-table.table td.recommendations-actions::before {
    display: none;
  }

  #recommendations-table.table td.recommendations-actions .action-buttons {
    justify-content: flex-end;
    width: 100%;
  }

  #recommendations-table.table td.recommendations-actions .action-btn {
    width: 40px;
    height: 40px;
  }

  #recommendations-table.table .table-cell--profit,
  #recommendations-table.table .table-cell--units {
    border-radius: 6px;
    margin: 2px;
    padding: 6px 8px;
  }

  #recommendations-table.table tbody tr:only-child:has(.empty-state) {
    display: table-row;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  #recommendations-table.table tbody tr:only-child .empty-state {
    display: table-cell;
    border-bottom: none;
  }

  #recommendations-table.table tbody tr:only-child .empty-state::before {
    display: none;
  }

  #pricing-table.table tbody tr:only-child:has(.empty-state) {
    display: table-row;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  #pricing-table.table tbody tr:only-child .empty-state {
    display: table-cell;
    border-bottom: none;
  }

  #pricing-table.table tbody tr:only-child .empty-state::before {
    display: none;
  }

  .menu-health-table tbody tr:only-child:has(.empty-state) {
    display: table-row;
    border: none;
    padding: 0;
    margin: 0;
  }

  .menu-health-table tbody tr:only-child .empty-state {
    display: table-cell;
    border-bottom: none;
  }

  .menu-health-table tbody tr:only-child .empty-state::before {
    display: none;
  }

  .rec-product-name {
    font-size: 1rem;
  }

  .rec-product-meta {
    font-size: 0.75rem;
  }

  .recommendations-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 16px;
  }

  .pagination-summary {
    text-align: center;
  }

  .pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* --- COMPETITOR TABLE -> CARD LAYOUT --- */

  #pricing-table.table thead {
    display: none;
  }

  #pricing-table.table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  #pricing-table.table tbody tr:nth-child(even) {
    background: #fff;
  }

  #pricing-table.table .table-cell {
    display: flex;
    flex-direction: column;
    padding: 6px 4px;
    border-bottom: none;
    width: auto !important;
    text-align: left;
  }

  #pricing-table.table .table-cell::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 2px;
  }

  #pricing-table.table .table-cell--product {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
  }

  #pricing-table.table .table-cell--product::before {
    display: none;
  }

  /* --- MENU HEALTH TABLES -> MOBILE STACK --- */

  .menu-health-table-wrap--actions,
  .menu-health-table-wrap--widget {
    height: auto;
    max-height: 520px;
    overflow-x: auto;
  }

  .menu-health-table thead {
    display: none;
  }

  .menu-health-table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
  }

  .menu-health-table tbody tr:nth-child(even) {
    background: #fff;
  }

  .menu-health-table tbody td {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    border-bottom: none;
  }

  .menu-health-table tbody td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 2px;
  }

  .menu-health-table tbody td:empty::before {
    display: none;
  }

  .menu-health-hero {
    grid-template-columns: 1fr;
  }

  .menu-health-chart-shell {
    min-height: 280px;
  }

  .menu-health-analytics-grid {
    grid-template-columns: 1fr;
  }

  .menu-health-widget-panel-header {
    flex-direction: column;
    gap: 12px;
  }

  .menu-health-filter--compact {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-popup-grid {
    grid-template-columns: 1fr;
  }

  #recommendations-table.table tbody tr {
    grid-template-columns: 1fr;
  }

  #pricing-table.table tbody tr {
    grid-template-columns: 1fr;
  }

  .dispensary-details {
    flex-direction: column;
    text-align: center;
  }
}
