html.dark-theme .palette-podcasteria {
  --background: #151515;
  --foreground: #f7f4ee;
  --card: #202020;
  --card-foreground: #f7f4ee;
  --popover: #202020;
  --popover-foreground: #f7f4ee;
  --primary: #f7f4ee;
  --primary-foreground: #212121;
  --secondary: #292929;
  --secondary-foreground: #f7f4ee;
  --muted: #292929;
  --muted-foreground: #b9b4ac;
  --accent: #3a2117;
  --accent-foreground: #fff;
  --border: rgb(255 255 255 / 12%);
  --input: rgb(255 255 255 / 14%);
  --ink: #f7f4ee;
  --paper: #151515;
  --warm-white: #202020;
  --graphite: #b9b4ac;
  --palette-text-muted: #b9b4ac;
  --palette-page: #151515;
  --palette-card: #202020;
}
.dark-theme .palette-shell input,
.dark-theme .palette-shell textarea { color: var(--ink) !important; }
.dark-theme .palette-shell input::placeholder,
.dark-theme .palette-shell textarea::placeholder { color: var(--palette-text-muted) !important; opacity: .78; }
.dark-theme .palette-shell [class~="text-[#212121]"],
.dark-theme .palette-shell [class~="text-[#212121]/55"],
.dark-theme .palette-shell [class~="text-[#212121]/60"],
.dark-theme .palette-shell [class~="text-[#212121]/75"],
.dark-theme .palette-shell [class~="text-[#101D42]/30"],
.dark-theme .palette-shell [class~="text-[#101D42]/35"],
.dark-theme .palette-shell [class~="text-[#101D42]/50"],
.dark-theme .palette-shell [class~="text-[#273043]/45"],
.dark-theme .palette-shell [class~="text-[#273043]/55"],
.dark-theme .palette-shell [class~="text-[#273043]/65"],
.dark-theme .palette-shell [class~="text-[#273043]/75"],
.dark-theme .palette-shell [class~="text-[#34322d]"],
.dark-theme .palette-shell [class~="text-[#777771]"],
.dark-theme .palette-shell [class~="text-[#888881]"] { color: var(--ink) !important; }
.dark-theme .palette-shell [class~="text-[#606778]/60"],
.dark-theme .palette-shell [class~="text-[#606778]/70"],
.dark-theme .palette-shell [class~="text-[#858481]"] { color: var(--palette-text-muted) !important; }
.dark-theme .palette-shell [data-slot="dialog-content"],
.dark-theme .palette-shell [data-slot="sheet-content"],
.dark-theme .palette-shell [data-slot="popover-content"],
.dark-theme .palette-shell [data-slot="select-content"],
.dark-theme .palette-shell [data-slot="dropdown-menu-content"] { border-color: rgb(255 255 255 / 12%) !important; background: var(--palette-card) !important; color: var(--ink) !important; }
/* Header controls: keep the compact outline treatment readable in dark mode. */
.dark-theme .palette-shell div:has(> button[aria-pressed]) {
  border-color: var(--border) !important;
  background: transparent !important;
}
.dark-theme .palette-shell button[aria-pressed="false"] {
  color: var(--palette-text-muted) !important;
}
.dark-theme .palette-shell button[aria-pressed="false"]:hover {
  color: var(--ink) !important;
}
.dark-theme .palette-shell button[aria-label="Ativar modo claro"],
.dark-theme .palette-shell button[aria-label="Enable light mode"],
.dark-theme .palette-shell button[aria-label="Atualizar dados"],
.dark-theme .palette-shell button[aria-label="Refresh data"] {
  border-color: var(--border) !important;
  background: transparent !important;
  color: var(--ink) !important;
}

/* Demographic panels should use the same transparent, outlined treatment as the other cards. */
.dark-theme .palette-shell [class~="bg-white/40"] {
  border-color: var(--border) !important;
  background: transparent !important;
}

/* Calendar cells with deliveries used light-theme border tokens that disappeared on dark surfaces. */
.dark-theme .palette-shell [class~="border-[#101D42]/15"],
.dark-theme .palette-shell [class~="border-[#101D42]/10"],
.dark-theme .palette-shell [class~="border-[#101D42]/[.07]"] {
  border-color: rgb(255 255 255 / 14%) !important;
}
.dark-theme .palette-shell .recharts-cartesian-axis-tick text,
.dark-theme .palette-shell .recharts-legend-item-text,
.dark-theme .palette-shell .recharts-text { fill: var(--palette-text-muted) !important; color: var(--palette-text-muted) !important; }
.dark-theme .palette-shell .audience-extreme-worst,
.dark-theme .palette-shell .audience-extreme-worst [class~="text-[#212121]"] {
  color: var(--ink) !important;
}
.dark-theme .palette-shell .audience-extreme-worst [class~="text-[#212121]/55"],
.dark-theme .palette-shell .audience-extreme-worst [class~="text-[#212121]/60"],
.dark-theme .palette-shell .audience-extreme-worst [class~="text-[#212121]/75"] {
  color: var(--palette-text-muted) !important;
}
