/* MZT mobile styles — desktop layout unchanged at md+ */

html {
  font-size: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 75%;
  }
}

body.mzt-nav-open {
  overflow: hidden;
}

body.mzt-nav-open .mzt-fallback-lk {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

/* Mobile nav drawer — closed state fully hidden */
#mztNavOverlay,
.mzt-mobile-nav-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#mztNavOverlay.mzt-nav-overlay--open,
.mzt-mobile-nav-overlay.mzt-nav-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#mztNavDrawer,
.mzt-mobile-nav-drawer {
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, visibility 0.25s ease;
}

#mztNavDrawer.mzt-nav-drawer--open,
.mzt-mobile-nav-drawer.mzt-nav-drawer--open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 768px) {
  #mztNavOverlay,
  #mztNavDrawer,
  .mzt-mobile-nav-overlay,
  .mzt-mobile-nav-drawer,
  #mztNavToggle {
    display: none !important;
  }
}

/* View mode segmented toggle */
.mzt-view-mode-switch {
  position: relative;
  z-index: 60;
}

.mzt-view-mode-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #60758a;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.mzt-view-mode-btn--icon:hover {
  color: #111418;
  background: rgba(17, 20, 24, 0.06);
}

.mzt-view-mode-btn--icon:active {
  transform: scale(0.96);
}

.mzt-view-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mzt-view-mode-icon[hidden] {
  display: none !important;
}

.mzt-view-mode-btn--active {
  background: #111418 !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(17, 20, 24, 0.12);
}

html.mzt-view-transition .layout-container,
html.mzt-view-transition body > .relative {
  transition: max-width 0.3s ease, margin 0.3s ease, box-shadow 0.3s ease, font-size 0.25s ease;
}

/* Forced mobile layout (QA on desktop) */
html.mzt-force-mobile {
  font-size: 100% !important;
  background: #e5e7eb !important;
}

html.mzt-force-mobile body {
  background: #e5e7eb !important;
}

html.mzt-force-mobile .mzt-view-mode-switch {
  display: flex !important;
}

html.mzt-force-mobile #mztNavToggle {
  display: flex !important;
}

html.mzt-force-mobile header .hidden.md\:flex:not(.mzt-view-mode-switch) {
  display: none !important;
}

html.mzt-force-mobile .md\:hidden {
  display: revert !important;
}

html.mzt-force-mobile #mztNavToggle.md\:hidden {
  display: flex !important;
}

html.mzt-force-mobile .md\:px-8,
html.mzt-force-mobile .lg\:px-16,
html.mzt-force-mobile .xl\:px-40 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

html.mzt-force-mobile .md\:w-auto {
  width: 100% !important;
}

html.mzt-force-mobile .md\:ml-auto {
  margin-left: 0 !important;
}

html.mzt-force-mobile .md\:min-w-72 {
  min-width: 0 !important;
}

html.mzt-force-mobile .md\:text-\[32px\] {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}

html.mzt-force-mobile .sm\:flex-row {
  flex-direction: column !important;
}

html.mzt-force-mobile .sm\:items-center {
  align-items: stretch !important;
}

html.mzt-force-mobile #marketplaceBlocks,
html.mzt-force-mobile [class*="grid-cols"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

html.mzt-force-mobile .mzt-dashboard-kpi .mzt-metric-grid,
html.mzt-force-mobile .mzt-dashboard-kpi .mzt-metric-grid--4,
html.mzt-force-mobile .mzt-dashboard-kpi [class*="grid-cols"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html.mzt-force-mobile #mztNavOverlay,
html.mzt-force-mobile #mztNavDrawer,
html.mzt-force-mobile .mzt-mobile-nav-overlay,
html.mzt-force-mobile .mzt-mobile-nav-drawer {
  display: block !important;
}

html.mzt-force-mobile body > .relative.flex,
html.mzt-force-mobile body > .relative {
  max-width: 390px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 0 1px #dbe0e6, 0 12px 48px rgba(17, 20, 24, 0.12);
  background: #fff;
}

html.mzt-force-mobile .mzt-table-scroll {
  overflow-x: visible;
  max-width: 100%;
}

html.mzt-force-mobile .mzt-table-cards thead {
  display: none;
}

html.mzt-force-mobile .mzt-table-cards tbody tr {
  display: block;
  margin-bottom: 0.75rem;
  border: 1px solid #dbe0e6;
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: #fff;
}

html.mzt-force-mobile .mzt-table-cards tbody td {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border: none;
  text-align: right;
  white-space: normal !important;
  position: static !important;
}

html.mzt-force-mobile .mzt-table-cards tbody td::before {
  content: attr(data-label);
  font-weight: 600;
  color: #60758a;
  text-align: left;
  flex-shrink: 0;
  max-width: 50%;
}

html.mzt-force-mobile .mzt-table-cards tbody td:empty {
  display: none;
}

html.mzt-force-mobile .mzt-table-cards tbody td:first-child {
  font-weight: 600;
  color: #111418;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 0.25rem;
  padding-bottom: 0.5rem;
}

html.mzt-force-mobile .mzt-table-cards tbody td:first-child::before {
  display: none;
}

html.mzt-force-mobile a.mzt-fallback-lk {
  display: none !important;
}

html.mzt-force-mobile body::after {
  content: 'Мобильный вид';
  position: fixed;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 10000;
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  background: rgba(17, 20, 24, 0.85);
  color: #fff;
  border-radius: 0.25rem;
  pointer-events: none;
}

/* Forced desktop layout */
html.mzt-force-desktop #mztNavToggle,
html.mzt-force-desktop #mztNavOverlay,
html.mzt-force-desktop #mztNavDrawer,
html.mzt-force-desktop .mzt-mobile-nav-overlay,
html.mzt-force-desktop .mzt-mobile-nav-drawer {
  display: none !important;
}

html.mzt-force-desktop header .hidden.md\:flex {
  display: flex !important;
}

html.mzt-force-desktop .md\:hidden {
  display: none !important;
}

html.mzt-force-desktop .mzt-view-mode-switch {
  display: flex !important;
}

html.mzt-force-desktop {
  font-size: 75% !important;
}

/* Card layout for tables on mobile */
@media (max-width: 767px) {
  .mzt-table-scroll {
    overflow-x: visible;
    max-width: 100%;
  }

  .mzt-table-cards thead {
    display: none;
  }

  .mzt-table-cards tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #dbe0e6;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: #fff;
  }

  .mzt-table-cards tbody td {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border: none;
    text-align: right;
    white-space: normal !important;
    position: static !important;
  }

  .mzt-table-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #60758a;
    text-align: left;
    flex-shrink: 0;
    max-width: 50%;
  }

  .mzt-table-cards tbody td:empty {
    display: none;
  }

  .mzt-table-cards tbody td:first-child {
    font-weight: 600;
    color: #111418;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 0.25rem;
    padding-bottom: 0.5rem;
  }

  .mzt-table-cards tbody td:first-child::before {
    display: none;
  }

  /* Disable sticky headers inside ads tables on mobile */
  .ads-campaigns-table--compact thead th,
  .ads-products-table-scroll thead th {
    position: static !important;
  }

  .ads-campaigns-detail-scroll,
  .ads-products-table-scroll {
    overflow-x: visible;
    max-height: none;
  }

  /* Hide invisible fallback link on mobile */
  a[aria-label="Личный кабинет"].mzt-fallback-lk {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .mzt-table-scroll {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  header.sticky {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  #mztNavDrawer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Shared compact table pattern (sales, finance, supply) */
.mzt-compact-table thead tr,
.sales-report-table--compact thead tr,
.finance-table--compact thead tr,
.supply-table--compact thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #e5e9ef;
}

.mzt-compact-table tbody tr:nth-child(even),
.sales-report-table--compact tbody tr:nth-child(even),
.finance-table--compact tbody tr:nth-child(even),
.supply-table--compact tbody tr:nth-child(even) {
  background: #fafbfc;
}

.mzt-compact-table tbody tr:hover,
.sales-report-table--compact tbody tr:hover,
.finance-table--compact tbody tr:hover,
.supply-table--compact tbody tr:hover {
  background: #f3f6f9;
}

.sales-report-table--compact tbody td,
.finance-table--compact tbody td,
.supply-table--compact tbody td {
  font-size: 11px;
}

.sales-report-table--compact th,
.finance-table--compact th,
.supply-table--compact th {
  font-size: 11px;
}

.supply-table--compact th,
.supply-table--compact td {
  padding: 0.25rem 0.5rem;
}

.ads-toolbar-btn {
  height: 1.75rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  border-radius: 0.375rem;
  font-weight: 500;
}

.ads-toolbar-input {
  height: 1.75rem;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d0dbe7;
  background: #f8fafc;
}

.ads-toolbar-input:focus {
  outline: none;
  border-color: #078838;
}

/* Theme tokens */
:root {
  --mzt-bg: #ffffff;
  --mzt-surface: #ffffff;
  --mzt-surface-muted: #f0f2f5;
  --mzt-border: #dbe0e6;
  --mzt-text: #111418;
  --mzt-text-strong: #111418;
  --mzt-text-muted: #60758a;
  --mzt-accent: #078838;
  --mzt-btn-muted: #e5e7eb;
  --mzt-btn-muted-hover: #d1d5db;
  --mzt-input-bg: #f8fafc;
  --mzt-input-border: #d0dbe7;
  --mzt-card-border: rgba(17, 20, 24, 0.06);
  --mzt-card-shadow: 0 1px 2px rgba(17, 20, 24, 0.05), 0 4px 12px rgba(17, 20, 24, 0.04);
  --mzt-table-border: #e5e9ef;
  --mzt-table-head-bg: #f8fafc;
  --mzt-table-row-alt: #fafbfc;
  --mzt-table-row-hover: #f3f6f9;
}

.mzt-card {
  background: var(--mzt-surface);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--mzt-card-shadow);
  border: 1px solid var(--mzt-card-border);
}

.mzt-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
}

.mzt-metric-grid--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .mzt-metric-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mzt-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  text-align: center;
  min-width: 0;
}

html.mzt-theme-dark {
  color-scheme: dark;
  --mzt-bg: #1a1d21;
  --mzt-surface: #252a31;
  --mzt-surface-muted: #2f343c;
  --mzt-border: #3d4450;
  --mzt-text: #b8bcc2;
  --mzt-text-strong: #d4d7dc;
  --mzt-text-muted: #7a828a;
  --mzt-accent: #3dba5c;
  --mzt-btn-muted: #2f343c;
  --mzt-btn-muted-hover: #3d4450;
  --mzt-input-bg: #2f343c;
  --mzt-input-border: #3d4450;
  --mzt-card-border: rgba(255, 255, 255, 0.06);
  --mzt-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  --mzt-table-border: rgba(255, 255, 255, 0.07);
  --mzt-table-head-bg: #2a2f36;
  --mzt-table-row-alt: rgba(255, 255, 255, 0.02);
  --mzt-table-row-hover: rgba(255, 255, 255, 0.04);
}

html.mzt-theme-dark body,
html.mzt-theme-dark .layout-container,
html.mzt-theme-dark body > .relative {
  background-color: var(--mzt-bg) !important;
  color: var(--mzt-text);
}

html.mzt-theme-dark .bg-white,
html.mzt-theme-dark .mzt-period-modal-panel {
  background-color: var(--mzt-surface) !important;
}

html.mzt-theme-dark .bg-\[\#f0f2f5\],
html.mzt-theme-dark .bg-\[\#f8f9fb\],
html.mzt-theme-dark .bg-\[\#f8fafc\],
html.mzt-theme-dark .bg-\[\#fafbfc\],
html.mzt-theme-dark .hover\:bg-\[\#f0f2f5\]:hover {
  background-color: var(--mzt-surface-muted) !important;
}

html.mzt-theme-dark .text-\[\#111418\] {
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark h1,
html.mzt-theme-dark h2,
html.mzt-theme-dark h3,
html.mzt-theme-dark .text-2xl,
html.mzt-theme-dark .text-\[22px\],
html.mzt-theme-dark .text-\[32px\],
html.mzt-theme-dark .text-base.font-bold,
html.mzt-theme-dark .font-bold.text-\[\#111418\],
html.mzt-theme-dark .mzt-metric-cell .font-bold,
html.mzt-theme-dark .mzt-metric-cell .text-sm.font-bold {
  color: var(--mzt-text-strong) !important;
}

html.mzt-theme-dark .mzt-metric-cell .text-\[10px\],
html.mzt-theme-dark .mzt-metric-cell .text-xs {
  color: var(--mzt-text-muted) !important;
}

html.mzt-theme-dark .text-\[\#60758a\] {
  color: var(--mzt-text-muted) !important;
}

html.mzt-theme-dark .border-\[\#dbe0e6\],
html.mzt-theme-dark .border-\[\#d0dbe7\],
html.mzt-theme-dark .border-b-\[\#f0f2f5\],
html.mzt-theme-dark .border-t-\[\#dbe0e6\],
html.mzt-theme-dark .border-solid {
  border-color: var(--mzt-border) !important;
}

html.mzt-theme-dark table th,
html.mzt-theme-dark table td {
  border-color: var(--mzt-table-border) !important;
}

html.mzt-theme-dark table th {
  color: var(--mzt-text-muted) !important;
  background-color: var(--mzt-table-head-bg) !important;
}

html.mzt-theme-dark table td {
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark header,
html.mzt-theme-dark #mztNavDrawer,
html.mzt-theme-dark .mzt-mobile-nav-drawer {
  background-color: var(--mzt-surface) !important;
  border-color: var(--mzt-border) !important;
}

html.mzt-theme-dark .mzt-view-mode-switch {
  background-color: var(--mzt-surface-muted) !important;
  border-color: var(--mzt-border) !important;
}

html.mzt-theme-dark .mzt-view-mode-btn--icon {
  color: var(--mzt-text-muted);
}

html.mzt-theme-dark .mzt-view-mode-btn--icon:hover {
  color: var(--mzt-text);
  background: rgba(255, 255, 255, 0.06);
}

html.mzt-theme-dark .mzt-view-mode-btn--active {
  background: var(--mzt-text) !important;
  color: var(--mzt-bg) !important;
}

html.mzt-theme-dark input:not([type="checkbox"]):not([type="radio"]),
html.mzt-theme-dark select,
html.mzt-theme-dark textarea,
html.mzt-theme-dark .ads-toolbar-input {
  background-color: var(--mzt-input-bg) !important;
  border-color: var(--mzt-input-border) !important;
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark .ads-toolbar-input:focus,
html.mzt-theme-dark input:focus,
html.mzt-theme-dark select:focus,
html.mzt-theme-dark textarea:focus {
  border-color: var(--mzt-accent) !important;
}

html.mzt-theme-dark .bg-\[\#e5e7eb\],
html.mzt-theme-dark button.bg-\[\#e5e7eb\] {
  background-color: var(--mzt-btn-muted) !important;
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark .hover\:bg-\[\#d1d5db\]:hover,
html.mzt-theme-dark button.hover\:bg-\[\#d1d5db\]:hover {
  background-color: var(--mzt-btn-muted-hover) !important;
}

html.mzt-theme-dark .mzt-compact-table thead tr,
html.mzt-theme-dark .sales-report-table--compact thead tr,
html.mzt-theme-dark .finance-table--compact thead tr,
html.mzt-theme-dark .supply-table--compact thead tr {
  background: var(--mzt-table-head-bg) !important;
  border-bottom-color: var(--mzt-table-border) !important;
}

html.mzt-theme-dark .mzt-compact-table tbody tr:nth-child(even),
html.mzt-theme-dark .sales-report-table--compact tbody tr:nth-child(even),
html.mzt-theme-dark .finance-table--compact tbody tr:nth-child(even),
html.mzt-theme-dark .supply-table--compact tbody tr:nth-child(even) {
  background: var(--mzt-table-row-alt) !important;
}

html.mzt-theme-dark .mzt-compact-table tbody tr:hover,
html.mzt-theme-dark .sales-report-table--compact tbody tr:hover,
html.mzt-theme-dark .finance-table--compact tbody tr:hover,
html.mzt-theme-dark .supply-table--compact tbody tr:hover {
  background: var(--mzt-table-row-hover) !important;
}

html.mzt-theme-dark html.mzt-force-mobile {
  background: #121418 !important;
}

html.mzt-theme-dark html.mzt-force-mobile body {
  background: #121418 !important;
}

html.mzt-theme-dark html.mzt-force-mobile body > .relative.flex,
html.mzt-theme-dark html.mzt-force-mobile body > .relative {
  background: var(--mzt-bg) !important;
  box-shadow: 0 0 0 1px var(--mzt-card-border), 0 12px 48px rgba(0, 0, 0, 0.35);
}

html.mzt-theme-dark .mzt-period-modal {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

html.mzt-theme-dark #customPeriodCancel {
  background-color: var(--mzt-surface-muted) !important;
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark .flatpickr-calendar {
  background: var(--mzt-surface) !important;
  border-color: var(--mzt-border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

html.mzt-theme-dark .flatpickr-months .flatpickr-month,
html.mzt-theme-dark .flatpickr-current-month .flatpickr-monthDropdown-months,
html.mzt-theme-dark .flatpickr-weekdays,
html.mzt-theme-dark span.flatpickr-weekday {
  background: var(--mzt-surface) !important;
  color: var(--mzt-text) !important;
  fill: var(--mzt-text) !important;
}

html.mzt-theme-dark .flatpickr-day {
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark .flatpickr-day.prevMonthDay,
html.mzt-theme-dark .flatpickr-day.nextMonthDay {
  color: var(--mzt-text-muted) !important;
}

html.mzt-theme-dark .flatpickr-day:hover,
html.mzt-theme-dark .flatpickr-day:focus {
  background: var(--mzt-surface-muted) !important;
  border-color: var(--mzt-surface-muted) !important;
}

html.mzt-theme-dark .flatpickr-day.selected,
html.mzt-theme-dark .flatpickr-day.startRange,
html.mzt-theme-dark .flatpickr-day.endRange {
  background: var(--mzt-accent) !important;
  border-color: var(--mzt-accent) !important;
  color: #fff !important;
}

html.mzt-theme-dark .flatpickr-day.inRange {
  background: rgba(61, 186, 92, 0.2) !important;
  border-color: transparent !important;
  color: var(--mzt-text) !important;
  box-shadow: -5px 0 0 rgba(61, 186, 92, 0.2), 5px 0 0 rgba(61, 186, 92, 0.2) !important;
}

html.mzt-theme-dark .flatpickr-months .flatpickr-prev-month,
html.mzt-theme-dark .flatpickr-months .flatpickr-next-month {
  fill: var(--mzt-text) !important;
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark #cabinetSalesBars [style*="opacity:0.85"] {
  opacity: 0.95 !important;
}

/* Ads — dark theme v3 (campaigns / products tables, chips, recommendations) */
html.mzt-theme-dark .ads-campaigns-table--compact thead tr,
html.mzt-theme-dark .ads-products-table--compact thead tr {
  background: var(--mzt-table-head-bg) !important;
  border-bottom-color: var(--mzt-table-border) !important;
}

html.mzt-theme-dark .ads-campaigns-table--compact tbody tr.campaign-row:nth-child(even),
html.mzt-theme-dark .ads-products-table--compact tbody tr:nth-child(even) {
  background: var(--mzt-table-row-alt) !important;
}

html.mzt-theme-dark .ads-campaigns-table--compact tbody tr.campaign-row:hover,
html.mzt-theme-dark .ads-products-table--compact tbody tr:hover,
html.mzt-theme-dark tr.campaign-row.hover\:bg-\[\#f8f9fa\]:hover {
  background: var(--mzt-table-row-hover) !important;
}

html.mzt-theme-dark tr.bg-\[\#f0f2f5\],
html.mzt-theme-dark tr.bg-\[\#e8ecf0\] {
  background: var(--mzt-surface-muted) !important;
}

html.mzt-theme-dark tr.bg-\[\#f0f2f5\] td,
html.mzt-theme-dark tr.bg-\[\#e8ecf0\] td {
  color: var(--mzt-text-strong) !important;
}

html.mzt-theme-dark .text-\[\#374151\] {
  color: var(--mzt-text) !important;
}

html.mzt-theme-dark .text-\[\#078838\] {
  color: var(--mzt-accent) !important;
}

html.mzt-theme-dark .hover\:text-\[\#06732f\]:hover {
  color: var(--mzt-accent) !important;
  opacity: 0.9;
}

html.mzt-theme-dark .hover\:bg-green-50:hover {
  background: rgba(61, 186, 92, 0.12) !important;
}

html.mzt-theme-dark .ads-rating-chip--excellent {
  background: rgba(61, 186, 92, 0.15) !important;
  color: #8fd4a4 !important;
  border-color: rgba(61, 186, 92, 0.35) !important;
}

html.mzt-theme-dark .ads-rating-chip--good {
  background: var(--mzt-surface-muted) !important;
  color: var(--mzt-text) !important;
  border-color: var(--mzt-border) !important;
}

html.mzt-theme-dark .ads-rating-chip--fair {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #d4b86a !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
}

html.mzt-theme-dark .ads-rating-chip--attention {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #e8a0ad !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}

html.mzt-theme-dark .border-\[\#e5e9ef\] {
  border-color: var(--mzt-border) !important;
}

/* Index hero gradient fallback */
html.mzt-theme-dark .from-\[\#f8f8f8\].to-\[\#efefef\] {
  background: var(--mzt-surface) !important;
  background-image: none !important;
}

html.mzt-theme-dark .text-\[\#4b5563\] {
  color: var(--mzt-text-muted) !important;
}

/* Brand logo in dark mode */
html.mzt-theme-dark #mztBrandLink.mzt-brand .size-4,
html.mzt-theme-dark #mztBrandLink.mzt-brand svg {
  color: var(--mzt-accent);
}

html.mzt-theme-dark #mztBrandLink.mzt-brand h2 {
  color: var(--mzt-text-strong) !important;
}
