:root {
  --bg-gradient: radial-gradient(circle at top, #fefefe 0%, #f4f7fb 55%, #edf2f8 100%);
  --panel-bg: #ffffff;
  --panel-bg-alt: #f8fafc;
  --border-soft: #dfe6f3;
  --border-panel: #e0e0e0;
  --text-dark: #0a1a2b;
  --text-body: #333;
  --text-muted: #5c6c82;
  --text-label: #4B5866;
  --accent-teal: #0c8eaf;
  --accent-teal-dark: #0A7095;
  --accent-yellow: #f4c43c;
  --filter-bg: #061224;
  --card-bg: #9DC6D5;
  --card-border: #ddd;
  --card-value: #0A7095;
  --table-header-bg: #f5f5f5;
  --shadow-soft: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --loading-overlay: rgba(255, 255, 255, 0.55);
  --pct-positive: #2e7d32;
  --pct-negative: #c62828;
  --dropdown-bg: white;
  --dropdown-hover: #f0f0f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-gradient: radial-gradient(circle at top, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    --panel-bg: #1e293b;
    --panel-bg-alt: #1a2332;
    --border-soft: #334155;
    --border-panel: #334155;
    --text-dark: #e2e8f0;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --text-label: #94a3b8;
    --accent-teal: #38bdf8;
    --accent-teal-dark: #0ea5e9;
    --accent-yellow: #fbbf24;
    --filter-bg: #0f172a;
    --card-bg: #1e3a4a;
    --card-border: #334155;
    --card-value: #38bdf8;
    --table-header-bg: #253347;
    --shadow-soft: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --loading-overlay: rgba(30, 41, 59, 0.7);
    --pct-positive: #4ade80;
    --pct-negative: #f87171;
    --dropdown-bg: #1e293b;
    --dropdown-hover: #334155;
  }

  .filters-column {
    background: #0f172a !important;
    border-color: #334155 !important;
  }

  .compare-filters-column {
    background: rgba(255, 203, 5, 0.08) !important;
  }

  .compare-filters-column .filter-group {
    background: rgba(255, 203, 5, 0.05) !important;
  }
}

* {
  box-sizing: border-box;
}


body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-dark);
}

.dashboard-wrapper {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}

.helper-bar {
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel-bg-alt);
  overflow: visible;
}

.helper-summary {
  cursor: pointer;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.helper-summary::-webkit-details-marker {
  display: none;
}

.helper-summary::before {
  content: "ℹ";
  font-size: 1rem;
  color: var(--accent-teal);
}

details.helper-bar[open] .helper-summary {
  border-bottom: 1px solid var(--border-soft);
}

.helper-body {
  padding: 16px;
}

.helper-text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.helper-caveat {
  margin-top: 12px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-left: 3px solid #FFCB05;
  background: rgba(255, 203, 5, 0.08);
  border-radius: 4px;
  font-size: 0.82rem;
}

.helper-metrics-list {
  margin: 8px 0;
  padding-left: 20px;
  list-style: disc;
}

.helper-metrics-list li {
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 4px;
}

.header-title-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  height: 50px;
  width: auto;
  background: white;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-teal-dark);
  margin: 0;
}

.header-title p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.header-meta {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.main-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.dashboard-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-grid {
  flex: 1;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto 320px 320px auto;
  grid-template-areas:
    "filters-display filters-display filters-display"
    "kpi table map"
    "cpc spend impressions"
    "top-ad top-ad top-ad";
  position: relative;
  min-height: 656px;
}


.grid-item {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  position: relative;
}

.item-kpi {
  grid-area: kpi;
}

.item-table {
  grid-area: table;
  overflow: hidden;
}

.item-map {
  grid-area: map;
}


.item-cpc {
  grid-area: cpc;
}

.item-spend {
  grid-area: spend;
}

.item-impressions {
  grid-area: impressions;
}

/* ── Top Performing Ad Panel ── */
.panel.item-top-ad {
  grid-area: top-ad;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Override .panel overflow on all wrappers inside the top-ad panel */
.panel.item-top-ad > div,
.panel.item-top-ad > div > div,
.panel.item-top-ad > div > div > div {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.top-ad-body {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.creative-container {
  flex: 1;
  min-width: 0;
}

.creative-iframe {
  display: block;
  width: 100%;
  height: 680px;
  border: none;
  border-radius: 8px;
  background: var(--panel-bg-alt);
}

.creative-preview {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.creative-preview iframe {
  display: block;
  width: 100%;
  height: 900px;
  border: none;
  border-radius: 6px;
}

.creative-fallback {
  margin-top: 8px;
  font-size: 0.85rem;
  text-align: center;
}

.creative-fallback a {
  color: var(--accent-teal);
}

.creative-text-panel {
  padding: 16px;
  background: var(--panel-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  max-height: 400px;
  overflow-y: auto;
}

.creative-text-content {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dark);
  white-space: pre-wrap;
  margin: 0;
}

.creative-empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 24px;
}

.top-ad-stats {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.top-ad-stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-ad-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-ad-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-label);
  font-weight: 600;
}

.top-ad-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.top-ad-stat-states {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-body);
}

.panel-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-label);
  margin-bottom: 12px;
  flex-shrink: 0;
  font-weight: 600;
}

.summary-panel {
  overflow-y: auto;
}

.table-panel {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 0;
  max-height: 100%;
}

.chart-panel > div:last-child,
.item-map > div:last-child {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chart-panel .dash-graph,
.item-map .dash-graph {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chart-panel .dash-graph > div,
.item-map .dash-graph > div {
  height: 100% !important;
  overflow: hidden;
}

.content-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel-bg);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-panel);
  box-shadow: 0 2px 8px var(--shadow-soft);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.expand-button {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #0A7095;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.expand-button:hover {
  opacity: 1;
}

.panel-expanded {
  position: relative !important;
  grid-area: unset !important;
  grid-row: 2 / 4 !important;
  grid-column: 1 / -1 !important;
  width: auto !important;
  height: auto !important;
  z-index: 9999 !important;
  margin: 0 !important;
  border-radius: 8px !important;
  overflow: auto !important;
}

.no-results-banner {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  background: var(--panel-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--border-panel);
}

.filters-display {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--panel-bg);
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  line-height: 1.5;
}

.item-filters-display {
  grid-area: filters-display;
}

.filter-display-section {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.filter-display-label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.filter-display-label-main {
  color: #4A90D9;
}

.filter-display-label-compare {
  color: #FFCB05;
}

.filter-display-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 6px 0;
}

.summary-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
}

.summary-card {
  background: var(--card-bg);
  color: var(--text-body);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-hover);
}

.summary-row-compare {
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* Editorial KPI compare layout — two columns (Main / Compare) with a subtle
   vertical divider; label above each pair so the numbers can breathe. */
.kpi-compare {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 2px 0;
}

.kpi-compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.kpi-chip {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1;
}

.kpi-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.kpi-chip-main {
  color: #0A7095;
  background: rgba(10, 112, 149, 0.12);
}

.kpi-chip-compare {
  color: #9a7a00;
  background: rgba(255, 203, 5, 0.22);
}

.kpi-compare-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-compare-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-compare-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
}

.kpi-compare-pair {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: baseline;
  gap: 12px;
  position: relative;
}

.kpi-compare-pair::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  height: 70%;
  align-self: center;
  background: var(--border-soft);
  opacity: 0.6;
}

.kpi-compare-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-compare-val-main {
  color: #0A7095;
  text-align: left;
  grid-column: 1;
}

.kpi-compare-val-compare {
  color: #8B6914;
  text-align: right;
  grid-column: 3;
}

@media (prefers-color-scheme: dark) {
  .kpi-compare-val-main {
    color: #38bdf8;
  }
  .kpi-compare-val-compare {
    color: #fbbf24;
  }
  .kpi-chip-main {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
  }
  .kpi-chip-compare {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.18);
  }
}

.map-tile-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.map-tile {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-tile .dash-graph {
  flex: 1;
  min-height: 0;
}

.map-tile .dash-graph > div {
  height: 100% !important;
}

.compare-state-table {
  table-layout: fixed;
  width: 100%;
}

.compare-state-table th,
.compare-state-table td {
  font-size: 0.7rem;
  padding: 3px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-state-table .pct-positive {
  color: var(--pct-positive);
  font-weight: 600;
}

.compare-state-table .pct-negative {
  color: var(--pct-negative);
  font-weight: 600;
}

.summary-card h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-label);
  line-height: 1.3;
}

.summary-card .value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.1;
  color: var(--card-value);
  word-break: break-word;
  overflow-wrap: break-word;
}

.map-table-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.table-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: fixed;
}

.table-panel th,
.table-panel td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-panel th:first-child,
.table-panel td:first-child {
  width: 35%;
}

.table-panel th:nth-child(2),
.table-panel td:nth-child(2),
.table-panel th:nth-child(3),
.table-panel td:nth-child(3),
.table-panel th:nth-child(4),
.table-panel td:nth-child(4) {
  width: 21.66%;
}

.table-panel .state-table-ads th:first-child,
.table-panel .state-table-ads td:first-child {
  width: 50%;
}

.table-panel .state-table-ads th:nth-child(2),
.table-panel .state-table-ads td:nth-child(2),
.table-panel .state-table-ads th:nth-child(3),
.table-panel .state-table-ads td:nth-child(3) {
  width: 25%;
}

.table-panel .state-table-ads th {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
  vertical-align: bottom;
}

.table-panel th {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: var(--text-label);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  z-index: 1;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.filters-column {
  background: white;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-panel);
  box-shadow: 0 2px 8px var(--shadow-soft);
  width: 320px;
  flex-shrink: 0;
  position: relative;
  z-index: 10000;
}

.filter-group {
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group-0 {
  background: #1a1a2e;
  color: white;
  border: 2px solid #FFCB05;
}

.filter-group-0 .filter-control label {
  color: #FFCB05;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-group-1 {
  background: #4B5866;
  color: white;
}

.filter-group-1 .filter-control label {
  color: white;
}

.filter-group-2 {
  background: #0A7095;
  color: white;
}

.filter-group-2 .filter-control label {
  color: white;
}

.filter-group-3 {
  background: #9DC6D5;
  color: #333;
}

.filter-group-3 .filter-control label {
  color: #333;
}

.filters-column h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.filter-control {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0;
}

.filter-control-slider {
  padding-bottom: 4px;
}

.filter-control-slider .rc-slider {
  margin: 8px 0 18px;
}


.filter-control-slider .rc-slider-mark-text {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

.slider-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.slider-display {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.filter-control-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}

.filter-control-checkbox label {
  cursor: pointer;
  font-size: 0.75rem !important;
  margin-bottom: 0;
}

.filter-checkbox .form-check-input,
.filter-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #FFCB05;
}

/* Force DateRangePickerInput to be compact and HORIZONTAL */
.filter-control .DateRangePickerInput {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 2px 4px !important;
  width: 100% !important;
}

.filter-control .DateInput {
  min-height: 26px !important;
  max-height: 26px !important;
  flex: 1 !important;
  width: auto !important;
}

.filter-control .DateInput_input {
  padding: 3px 4px !important;
  font-size: 0.7rem !important;
  height: 26px !important;
  line-height: 1 !important;
  border: none !important;
}

.filter-control .DateRangePickerInput_arrow {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.filter-control .DateRangePickerInput_arrow_svg {
  width: 8px !important;
  height: 8px !important;
}

.filter-control label {
  font-size: 0.7rem;
  font-weight: 500;
}

.filter-control .Select-control,
.filter-control input,
.filter-control .Select {
  border-radius: 10px;
  font-size: 0.75rem !important;
  background: white !important;
  color: #333 !important;
}

.filter-control .Select__control,
.filter-control .Select__control--is-focused,
.filter-control .Select__control--menu-is-open {
  border-radius: 10px;
  font-size: 0.75rem !important;
  background: white !important;
  color: #333 !important;
  border-color: #d9e2ef !important;
  min-height: 34px;
  box-shadow: none !important;
}

.filter-control .Select-value-label,
.filter-control .Select-placeholder,
.filter-control .Select-input input {
  font-size: 0.75rem !important;
  color: #333 !important;
}

.filter-control .Select__single-value,
.filter-control .Select__placeholder,
.filter-control .Select__input-container {
  font-size: 0.75rem !important;
  color: #333 !important;
}

.filter-control .Select-menu-outer {
  background: white !important;
  color: #333 !important;
}

.filter-control .Select__menu,
.filter-control .Select__menu-list {
  background: white !important;
  color: #333 !important;
}

.filter-control .Select-option {
  color: #333 !important;
  background: white !important;
}

.filter-control .Select__option,
.filter-control .Select__option--is-focused {
  color: #333 !important;
  background: #f0f0f0 !important;
}

.filter-control .Select-option:hover {
  background: #f0f0f0 !important;
}

/* Dash 4 dropdown class overrides */
.dash-dropdown {
  background: white !important;
  color: #333 !important;
}
.dash-dropdown-value,
.dash-dropdown-placeholder,
.dash-dropdown-value-item {
  color: #333 !important;
  background: white !important;
  font-size: 0.75rem !important;
}
.dash-dropdown-content {
  background: white !important;
  color: #333 !important;
}
.dash-dropdown-option {
  color: #333 !important;
  background: white !important;
}
.dash-dropdown-option:hover {
  background: #f0f0f0 !important;
  color: #333 !important;
}
.dash-dropdown-search {
  color: #333 !important;
  background: white !important;
}

.apply-button,
.compare-button {
  width: 100%;
  padding: 10px;
  border: 1px solid #003057;
  color: #003057;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.apply-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.apply-row > .apply-button,
.apply-row > .clear-button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.apply-button {
  background: #0A7095;
  color: #fff;
}

.apply-button:hover {
  background: #085a75;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(10, 112, 149, 0.3);
}

.clear-button {
  width: 100%;
  padding: 10px;
  border: 1px solid #003057;
  color: #003057;
  background: transparent;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.clear-button:hover {
  background: rgba(0, 48, 87, 0.08);
  transform: translateY(-1px);
}

.clear-button:active {
  transform: translateY(1px);
}

.dashboard-loading > .dash-loading-overlay {
  background: var(--loading-overlay) !important;
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.dashboard-loading > .dash-loading-overlay .dash-loading-spinner {
  border-top-color: #0A7095;
  border-right-color: #0A7095;
}

.compare-button {
  background: #FFCB05;
  color: #333;
  border: none;
}

.compare-button:hover {
  background: #e6b804;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 203, 5, 0.3);
}

.filters-container {
  position: relative;
  width: 320px;
  flex-shrink: 0;
}

.compare-filters-column {
  position: absolute;
  top: 86px;
  left: calc(100% + 12px);
  width: 320px;
  z-index: 10000;
  background: rgba(255, 203, 5, 0.15);
  border: 1px solid #FFCB05;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-filters-column .filter-group {
  background: rgba(255, 203, 5, 0.18);
  margin-top: 6px;
  margin-bottom: 6px;
}

.compare-filters-column .filter-group .filter-control label {
  color: var(--text-body) !important;
}

.compare-filters-column .rc-slider-mark-text,
.compare-filters-column .slider-display {
  color: var(--text-body) !important;
}

.compare-filters-column .apply-button {
  background: #FFCB05;
  color: #333;
  border-color: #e6b804;
}

.apply-button:active,
.compare-button:active {
  transform: translateY(1px);
}

.compare-section {
  margin-top: 24px;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 16px;
}

/* Side-by-side compare container */
#compare-container {
  width: 100%;
}

#compare-container > div {
  flex: 1;
  min-width: 0;
}

.compare-wrapper {
  margin-top: 0;
}

@media (max-width: 1100px) {
  #compare-container[style*="flex"] {
    flex-direction: column !important;
  }
}

.compare-panel-content {
  padding: 32px;
  border-radius: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(6, 18, 36, 0.08);
}

.compare-panel-content h3 {
  margin-top: 0;
}

@media (max-width: 1400px) {
  .dashboard-grid {
    gap: 16px;
  }
}

@media (max-width: 1200px) {
  .main-layout {
    flex-direction: column;
  }

  .filters-container {
    position: static;
    width: 100%;
    order: -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .filters-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    position: static;
    order: -1;
  }

  .compare-filters-column {
    position: static;
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, auto);
    grid-template-areas:
      "filters-display"
      "kpi"
      "table"
      "map"
      "cpc"
      "spend"
      "impressions"
      "top-ad";
  }
}
