﻿:root {
  --bg: #0a0f17;
  --panel: #101925;
  --panel-2: #0c141f;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef4ff;
  --muted: #90a2bb;
  --blue: #4f8cff;
  --green: #46d870;
  --violet: #b06cff;
  --red: #ff6d7a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 20%),
    radial-gradient(circle at bottom right, rgba(176, 108, 255, 0.1), transparent 18%),
    linear-gradient(180deg, #09111a 0%, #0a0f17 100%);
}

.dashboard-shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 12px auto 24px;
  display: grid;
  gap: 14px;
}

.topbar,
.panel,
.kpi-card {
  background: linear-gradient(180deg, rgba(16, 25, 37, 0.98), rgba(12, 20, 31, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 24;
  background: linear-gradient(180deg, rgba(16, 25, 37, 0.99), rgba(12, 20, 31, 0.99));
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-controls {
  justify-content: flex-end;
}

.tab-seo .topbar {
  flex-wrap: nowrap;
  gap: 6px;
}

.tab-seo .topbar-group {
  flex-wrap: nowrap;
  gap: 6px;
}

.tab-seo .topbar-controls .multi-select {
  min-width: 112px;
}

.tab-seo .topbar-controls .multi-select-trigger,
.tab-seo .topbar-controls select {
  padding: 6px 7px;
  font-size: 12px;
}

.tab-seo .topbar-controls select {
  min-width: 96px;
}

.tab-seo .tab-button {
  padding: 8px 12px;
  font-size: 12px;
}

.tab-seo .topbar-controls {
  gap: 6px;
  flex-wrap: nowrap;
}

.tab-seo .topbar-controls .inline-control {
  min-width: 0;
}

.tab-seo .topbar-controls #creatorControl .multi-select,
.tab-seo .topbar-controls #releaseMonthControl .multi-select {
  min-width: 108px;
}

.tab-portfolio .topbar {
  flex-wrap: nowrap;
  gap: 6px;
}

.tab-portfolio .topbar-group {
  flex-wrap: nowrap;
  gap: 6px;
}

.tab-portfolio .topbar-controls {
  gap: 6px;
  flex-wrap: nowrap;
}

.tab-portfolio .tab-button {
  padding: 8px 12px;
  font-size: 12px;
}

.tab-portfolio .topbar-controls .multi-select {
  min-width: 104px;
}

.tab-portfolio .topbar-controls .multi-select-trigger,
.tab-portfolio .topbar-controls select {
  padding: 6px 8px;
  font-size: 12px;
}

.tab-portfolio .topbar-controls select {
  min-width: 92px;
}

.inline-control {
  display: block;
}

.multi-control {
  position: relative;
}

.multi-select {
  position: relative;
  min-width: 150px;
}

.multi-select-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 19, 0.95);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.multi-select.open .multi-select-trigger {
  border-color: rgba(79, 140, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.08);
}

.multi-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-caret {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 260px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 12, 19, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  display: none;
  z-index: 80;
}

.multi-select.open .multi-select-menu {
  display: block;
}

.multi-select-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.multi-select-action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.multi-select-options {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.multi-select-option {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: center;
  color: #dce7f8;
  font-size: 13px;
  cursor: pointer;
}

.multi-select-option input {
  width: 14px;
  height: 14px;
  accent-color: #4f8cff;
  margin: 0;
}

.tab-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(18, 29, 43, 0.98), rgba(10, 16, 25, 0.98));
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(79, 140, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.18);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tab-button:hover,
.tab-button:focus {
  border-color: rgba(79, 140, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(79, 140, 255, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.22);
  outline: none;
}

.tab-button.active {
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.22), rgba(79, 140, 255, 0.1));
  border-color: rgba(79, 140, 255, 0.32);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

select {
  min-width: 110px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 19, 0.95);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}

input[type="date"] {
  min-width: 132px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 19, 0.95);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}

.refresh-wrap {
  position: relative;
}

.refresh-button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 7px 11px;
  background: linear-gradient(135deg, #f4874c, #d85e24);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hover-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(7, 12, 19, 0.98);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 5;
}

.hover-tooltip strong {
  color: var(--text);
}

.refresh-wrap:hover .hover-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  isolation: isolate;
  position: static;
  top: auto;
  z-index: auto;
  padding: 6px 0 8px;
  background: transparent;
  backdrop-filter: none;
}

.kpi-strip--unstuck {
  position: static;
  top: auto;
  z-index: auto;
  padding: 4px 0 6px;
  background: transparent;
  backdrop-filter: none;
}

.kpi-strip--hidden {
  display: none;
}

.kpi-card {
  border-radius: 18px;
  padding: 10px 14px 8px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  background:
    radial-gradient(circle at 14% 10%, rgba(102, 158, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(26, 41, 62, 0.98), rgba(14, 25, 39, 0.98));
  border-color: rgba(110, 151, 255, 0.18);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  position: relative;
  z-index: 2;
}

.kpi-card:hover {
  z-index: 30;
}

.kpi-card--wide {
  grid-column: span 2;
}

.kpi-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 8px;
  transform: translateY(-1px);
}

.kpi-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 0;
  align-items: start;
}

.kpi-split--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.kpi-solo {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.kpi-block {
  position: relative;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
}

.kpi-block--with-top-meta {
  padding-top: 26px;
}

.kpi-block--with-secondary-meta {
  padding-top: 24px;
}

.kpi-block + .kpi-block {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi-split--quad .kpi-block + .kpi-block {
  padding-left: 10px;
}

.kpi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.seo-plan-row {
  margin-top: 10px;
}

.kpi-card--seo {
  min-height: 74px;
  padding: 8px 12px 6px;
}

.seo-kpi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 32px;
}

.seo-kpi-value {
  color: #eef4ff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.seo-kpi-deltas {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seo-kpi-deltas--amazon {
  gap: 14px;
}

.seo-kpi-delta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 48px;
}

.seo-kpi-deltas--amazon .seo-kpi-delta-block {
  align-items: center;
  min-width: 54px;
}

.seo-kpi-delta-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
}

.seo-kpi-delta-block .delta-stack--kpi {
  position: static !important;
  top: auto !important;
  right: auto !important;
  font-size: 17px;
  gap: 4px;
  white-space: nowrap;
  align-self: flex-end;
  margin-top: 0;
  line-height: 1;
}

.seo-kpi-delta-block .delta-stack--kpi .delta-arrow {
  font-size: 13px;
}

.seo-kpi-delta-block .delta-stack--kpi .delta {
  position: static;
}

.seo-kpi-static-value {
  color: #eef4ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.seo-kpi-deltas--amazon .seo-kpi-static-value,
.seo-kpi-deltas--amazon .delta-stack--kpi {
  font-size: 17px;
  justify-content: center;
  text-align: center;
}

.seo-kpi-release {
  color: #eef4ff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.seo-kpi-row--sites {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: relative;
}

.seo-kpi-sites-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.seo-kpi-sites-block--right {
  align-items: flex-end;
}

.seo-kpi-value--secondary {
  font-size: 22px;
}

.seo-kpi-sites-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
  position: relative;
}

.seo-kpi-sites-head::after,
.seo-kpi-row--sites::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.seo-kpi-sites-head-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
}

.seo-kpi-sites-head-label--right {
  text-align: right;
}

.kpi-caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.kpi-caption--stacked {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.05;
}

.kpi-caption-main {
  color: #dce7f8;
}

.kpi-caption-sub {
  color: var(--muted);
  font-size: 10px;
}

.kpi-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.02;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.kpi-value--small {
  font-size: 1.12rem;
}

.kpi-context {
  color: var(--muted);
  font-size: 12px;
}

.kpi-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: none;
  min-width: 220px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(7, 12, 19, 0.98);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  z-index: 20;
}

.kpi-block:hover .kpi-tooltip {
  opacity: 1;
}

.kpi-tooltip-row + .kpi-tooltip-row {
  margin-top: 6px;
}

.kpi-tooltip-label {
  display: block;
  color: #90a2bb;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.kpi-tooltip-value {
  color: #eef4ff;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
}

.kpi-metric-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-top: 10px;
  min-width: 0;
  width: 100%;
}

.kpi-block--with-top-meta .kpi-metric-row {
  margin-top: 14px;
}

.kpi-block--with-secondary-meta .kpi-metric-row {
  margin-top: 14px;
}

.kpi-card .delta {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-top: 0;
  white-space: nowrap;
  flex-shrink: 0;
  position: absolute;
  top: 18px;
  right: 0;
}

.kpi-card .delta-stack--kpi {
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
  position: absolute;
  top: 18px;
  right: 0;
}

.kpi-card .delta-stack--kpi .delta-arrow {
  font-size: 9px;
}

.kpi-delta-combo {
  position: absolute;
  top: 18px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.kpi-delta-combo .delta-stack {
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.kpi-delta-combo .delta-arrow {
  font-size: 9px;
}

.kpi-delta-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  line-height: 1;
}

.plan-completion-meta {
  position: absolute;
  top: 4px;
  right: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.plan-completion-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.plan-completion-label {
  color: #8fa2bd;
  font-size: 10px;
  line-height: 1;
}

.plan-completion-value {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.plan-completion-value.positive {
  color: var(--green);
}

.plan-completion-value.negative {
  color: var(--red);
}

.plan-completion-value.neutral {
  color: var(--muted);
}

.plan-completion-meta--under-delta {
  top: 28px;
  gap: 4px;
}

.kpi-split--quad .delta {
  font-size: 11px;
}

.kpi-split--quad .kpi-block + .kpi-block {
  padding-left: 8px;
}

.kpi-split--quad .kpi-caption {
  font-size: 10px;
}

.delta.positive {
  color: var(--green);
}

.kpi-card .delta.negative,
.delta-stack.negative {
  color: var(--red);
}

.kpi-card .delta.neutral,
.delta-stack.neutral {
  color: var(--muted);
}

.kpi-card .delta.positive,
.delta-stack.positive {
  color: var(--green);
}

.kpi-strip--copy {
  grid-template-columns: 0.94fr 0.94fr 0.94fr 0.94fr 1.24fr;
  gap: 8px;
}

.kpi-copy-card {
  min-height: 108px;
  border-radius: 18px;
  padding: 0;
  border: 1px solid rgba(110, 151, 255, 0.18);
  background:
    radial-gradient(circle at 14% 10%, rgba(102, 158, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(26, 41, 62, 0.98), rgba(14, 25, 39, 0.98));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.kpi-copy-card--forecast {
  display: flex;
  flex-direction: column;
}

.kpi-copy-row {
  padding: 7px 12px 6px;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "title title title"
    "main meta meta";
  align-items: end;
  column-gap: 12px;
  position: relative;
}

.kpi-copy-row + .kpi-copy-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi-copy-title {
  grid-area: title;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.1;
  margin-bottom: 2px;
}

.kpi-copy-main {
  grid-area: main;
  color: #f2f7ff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0;
  align-self: center;
}

.kpi-copy-main--sub {
  font-size: 17px;
}

.kpi-copy-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  align-self: center;
  margin-top: -2px;
}

.kpi-copy-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.kpi-copy-meta-label {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.kpi-copy-meta .delta-stack {
  position: static;
  font-size: 12px;
  font-weight: 700;
  gap: 3px;
}

.kpi-copy-forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpi-copy-forecast-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-copy-forecast-item strong {
  color: #f2f7ff;
  font-size: 14px;
  line-height: 1.1;
}

.kpi-copy-forecast-item .kpi-copy-forecast-gap {
  font-size: 13px;
}

.kpi-copy-forecast-item strong.positive {
  color: var(--green);
}

.kpi-copy-forecast-item strong.negative {
  color: var(--red);
}

.kpi-copy-forecast-item strong.neutral {
  color: var(--muted);
}

.kpi-copy-row--forecast {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
}

.table-head-tip {
  display: inline-block;
  cursor: help;
}

.table-head-tip br {
  content: "";
}

.kpi-copy-tooltip {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.tab-summary .content-grid {
  gap: 10px;
  align-items: start;
}

.tab-summary .column-stack {
  gap: 10px;
  grid-template-rows: auto auto;
  align-self: start;
  align-content: start;
}

.tab-summary .content-grid > .table-panel {
  display: flex;
  flex-direction: column;
}

.tab-summary .panel {
  padding: 12px;
}

.tab-summary .panel-head {
  margin-bottom: 8px;
}

.tab-summary .table-panel .table-wrap {
  flex: 1 1 auto;
  max-height: none;
}

.tab-summary .donut-wrap {
  margin-top: -4px;
  padding-top: 0;
  gap: 4px;
}

.tab-summary .donut-panel {
  padding-top: 8px;
  padding-bottom: 10px;
  align-self: start;
}

.tab-summary .donut-panel .donut-area {
  min-height: 0;
  height: auto;
}

.tab-summary .donut-panel .panel-head {
  display: none;
}

.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-stats-card {
  min-height: 148px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 12px 12px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 28px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.summary-stats-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 42%);
  pointer-events: none;
}

.summary-stats-card--neutral {
  background:
    radial-gradient(circle at 50% 18%, rgba(109, 158, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(27, 46, 74, 0.98), rgba(18, 31, 49, 0.98));
}

.summary-stats-card--green {
  background:
    radial-gradient(circle at 50% 18%, rgba(70, 216, 112, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(15, 88, 48, 0.96), rgba(10, 63, 35, 0.98));
}

.summary-stats-card--violet {
  background:
    radial-gradient(circle at 50% 18%, rgba(176, 108, 255, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(74, 49, 123, 0.96), rgba(50, 31, 87, 0.98));
}

.summary-stats-card--teal {
  background:
    radial-gradient(circle at 50% 18%, rgba(83, 214, 209, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(17, 95, 107, 0.96), rgba(11, 68, 77, 0.98));
}

.summary-stats-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 6px rgba(255, 255, 255, 0.03);
}

.summary-stats-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.summary-stats-title {
  color: rgba(238, 244, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-stats-value {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.summary-stats-caption {
  color: rgba(238, 244, 255, 0.8);
  font-size: 11px;
  line-height: 1.3;
  max-width: 120px;
}

.tab-summary .donut-card {
  grid-template-columns: 170px 1fr;
  gap: 10px;
}

.tab-summary .donut-card svg {
  max-width: 170px;
}

.tab-seo .content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.tab-seo .content-grid > .table-panel {
  order: 3;
}

.tab-seo .column-stack {
  display: block;
  width: 100%;
  max-width: 100%;
  grid-column: 1;
  grid-row: auto;
  order: 2;
}

.tab-seo .donut-panel {
  margin-top: 0;
  order: 2;
}

.tab-seo .donut-panel .panel-head {
  display: none;
}

.tab-seo .seo-trend-panel {
  grid-column: 1;
  grid-row: auto;
  order: 1;
}

.tab-seo .seo-trend-panel.full-span {
  grid-column: 1;
}

.tab-seo .seo-trend-panel .chart-area {
  min-height: 270px;
}

.tab-seo .donut-wrap {
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.tab-amazon .content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.tab-amazon .kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tab-amazon .content-grid > .table-panel {
  display: block;
  order: 4;
  overflow: hidden;
}

.tab-amazon .column-stack {
  display: block;
  width: 100%;
  max-width: 100%;
  order: 2;
}

.tab-amazon .amazon-funnel-panel {
  grid-column: 1;
  order: 3;
}

.tab-amazon .donut-panel {
  margin-top: 0;
  order: 2;
}

.tab-amazon .donut-panel .panel-head {
  display: none;
}

.tab-amazon .amazon-trend-panel {
  grid-column: 1;
  order: 1;
}

.tab-amazon .amazon-trend-panel.full-span {
  grid-column: 1;
}

.tab-amazon .seo-kpi-deltas--amazon {
  gap: 12px;
}

.tab-amazon .seo-kpi-deltas--amazon .seo-kpi-delta-block {
  min-width: 64px;
  align-items: flex-end;
}

.tab-amazon .seo-kpi-deltas--amazon .seo-kpi-delta-label,
.tab-amazon .seo-kpi-deltas--amazon .seo-kpi-static-value,
.tab-amazon .seo-kpi-deltas--amazon .delta-stack--kpi {
  font-size: 13px;
  text-align: right;
}

.tab-amazon .amazon-trend-panel .chart-area {
  min-height: 270px;
}

.tab-amazon .amazon-trend-panel .chart-meta {
  top: auto;
  right: 10px;
  bottom: -54px;
}

.tab-amazon .amazon-funnel-panel .chart-area {
  min-height: 156px;
}

.tab-amazon .amazon-funnel-panel .panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tab-amazon .content-grid > .table-panel .panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.tab-amazon .content-grid > .table-panel .panel-head > :first-child {
  flex: 0 0 auto;
  min-width: auto;
}

.tab-amazon .content-grid > .table-panel .panel-head > .panel-actions {
  flex: 1 1 auto;
  min-width: 0;
}

.tab-amazon #brandTable.table-wrap {
  max-height: 560px;
  overflow: auto;
}

.tab-amazon .donut-wrap {
  grid-template-columns: 1.02fr 1fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.tab-portfolio .content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.tab-portfolio .column-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  max-width: 100%;
}

.tab-portfolio .content-grid > .table-panel,
.tab-portfolio .column-stack,
.tab-portfolio .full-span {
  order: initial;
}

.tab-portfolio .full-span {
  grid-column: span 1;
}

.tab-portfolio .portfolio-release-panel,
.tab-portfolio .portfolio-gsc-panel,
.tab-portfolio .portfolio-amazon-clicks-panel,
.tab-portfolio .portfolio-ctr-panel,
.tab-portfolio .portfolio-orders-panel,
.tab-portfolio .portfolio-commission-panel {
  grid-column: span 1;
  min-height: 28vh !important;
  height: 28vh !important;
  max-height: 28vh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
}

.tab-portfolio .portfolio-release-panel {
  grid-column: span 1;
  min-height: 28vh !important;
  height: 28vh !important;
  max-height: 28vh !important;
  overflow: visible;
}

.tab-portfolio .portfolio-commission-panel {
  grid-column: span 1;
}

.tab-portfolio .panel-actions {
  display: none;
}

.tab-portfolio .table-wrap,
.tab-portfolio .chart-area,
.tab-portfolio .donut-area {
  max-height: none;
  min-height: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  display: block;
  align-items: initial;
}

.tab-portfolio #brandTable.table-wrap,
.tab-portfolio #marketTable.table-wrap {
  overflow: visible !important;
  max-height: none !important;
  height: 100% !important;
  min-height: 0 !important;
  padding-bottom: 18px;
}

.tab-portfolio .portfolio-release-panel .chart-area,
.tab-portfolio .portfolio-gsc-panel .chart-area,
.tab-portfolio .portfolio-amazon-clicks-panel .chart-area,
.tab-portfolio .portfolio-ctr-panel .chart-area,
.tab-portfolio .portfolio-orders-panel .chart-area,
.tab-portfolio .portfolio-commission-panel .chart-area {
  min-height: calc(28vh - 56px) !important;
  height: calc(28vh - 56px) !important;
  max-height: calc(28vh - 56px) !important;
  flex: 1 1 auto;
  padding-bottom: 18px;
  box-sizing: border-box;
}

.tab-portfolio .portfolio-release-panel .portfolio-chart,
.tab-portfolio .portfolio-gsc-panel .portfolio-chart,
.tab-portfolio .portfolio-amazon-clicks-panel .portfolio-chart,
.tab-portfolio .portfolio-ctr-panel .portfolio-chart,
.tab-portfolio .portfolio-orders-panel .portfolio-chart,
.tab-portfolio .portfolio-commission-panel .portfolio-chart {
  min-height: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
}

.tab-portfolio .portfolio-release-panel .portfolio-chart-grid,
.tab-portfolio .portfolio-gsc-panel .portfolio-chart-grid,
.tab-portfolio .portfolio-amazon-clicks-panel .portfolio-chart-grid,
.tab-portfolio .portfolio-ctr-panel .portfolio-chart-grid,
.tab-portfolio .portfolio-orders-panel .portfolio-chart-grid,
.tab-portfolio .portfolio-commission-panel .portfolio-chart-grid {
  min-height: 100% !important;
  height: 100% !important;
}

.tab-amazon .donut-title,
.tab-amazon .country-bars-card .donut-title {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
}

.tab-amazon .country-bars-card {
  gap: 8px;
  align-content: start;
}

.tab-amazon .country-bars-list {
  gap: 9px;
}

.tab-amazon .country-bars-row {
  grid-template-columns: 54px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
}

.tab-amazon .country-bars-track {
  height: 12px;
  width: 100%;
  max-width: none;
}

.tab-amazon .donut-card {
  grid-template-columns: 146px 1fr;
  gap: 10px;
  align-items: start;
}

.tab-amazon .donut-card > div:first-child {
  display: grid;
  align-content: start;
}

.tab-amazon .donut-card svg {
  width: 146px;
  height: 146px;
}

.tab-amazon .device-legend {
  gap: 9px;
  align-content: start;
  padding-top: 34px;
}

.tab-amazon .device-legend-item {
  gap: 8px;
}

.tab-amazon .country-bars-metrics {
  min-width: 96px;
  justify-content: flex-end;
}

.tab-seo .donut-wrap--seo {
  grid-template-columns: 1fr 0.92fr 0.92fr 1fr;
  gap: 18px;
  align-items: start;
}

.tab-seo .donut-title {
  min-height: 32px;
  display: flex;
  align-items: flex-start;
  padding-top: 0;
  margin-bottom: 4px;
}

.tab-seo .donut-card {
  grid-template-columns: 172px 1fr;
  justify-items: stretch;
  align-items: center;
  gap: 12px;
}

.tab-seo .device-legend {
  justify-items: start;
  align-content: center;
  gap: 8px;
  margin-top: 0;
}

.tab-seo .country-bars-row {
  grid-template-columns: 62px 164px auto;
  gap: 8px;
  justify-content: start;
}

.tab-seo .country-bars-track {
  height: 12px;
  max-width: 164px;
}

.tab-seo .country-bars-card--country {
  justify-self: start;
}

.tab-seo .country-bars-card--site-age {
  justify-self: end;
}

.tab-seo .country-bars-card--site-age .country-bars-row {
  grid-template-columns: 88px 154px auto;
}

.tab-seo .country-bars-card--site-age .country-bars-label {
  white-space: nowrap;
}

.tab-seo .country-bars-card--weekday {
  justify-self: end;
}

.tab-seo .country-bars-card--weekday .country-bars-list {
  justify-items: end;
}

.tab-seo .country-bars-card--weekday .country-bars-row {
  grid-template-columns: 42px 154px auto;
}

.tab-seo .country-bars-card--weekday .country-bars-track {
  max-width: 154px;
}

.tab-seo .country-bars-card {
  gap: 8px;
}

.tab-seo .country-bars-list {
  gap: 8px;
}

.tab-seo .donut-card svg {
  max-width: 168px;
}

.tab-seo .donut-card:nth-child(3) svg {
  max-width: 154px;
}

.tab-seo .donut-card .device-legend-main {
  justify-content: flex-start;
}

.tab-seo .donut-card .device-legend-item {
  grid-template-columns: 10px 1fr;
  gap: 7px;
}

.tab-seo #brandTable table {
  font-size: 12.5px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.tab-seo #brandTable table th,
.tab-seo #brandTable table td {
  padding-left: 5px;
  padding-right: 5px;
}

.tab-seo #brandTable table th {
  line-height: 1.05;
}

.tab-seo #brandTable .table-date--yesterday {
  background: rgba(84, 138, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(84, 138, 255, 0.24);
  color: #f4f8ff;
}

.tab-seo #brandTable .yesterday-col {
  background: rgba(84, 138, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(84, 138, 255, 0.18);
  color: #f4f8ff;
}

.tab-seo #brandTable table th:nth-last-child(-n + 5),
.tab-seo #brandTable table td:nth-last-child(-n + 5) {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}

.tab-seo #brandTable[data-metric="ctr"] table th:nth-last-child(-n + 3),
.tab-seo #brandTable[data-metric="ctr"] table td:nth-last-child(-n + 3) {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}

.tab-seo #brandTable table th:nth-child(n + 3):nth-last-child(n + 6),
.tab-seo #brandTable table td:nth-child(n + 3):nth-last-child(n + 6) {
  width: 33px;
  min-width: 33px;
  max-width: 33px;
}

.tab-seo #brandTable[data-metric="impressions"] table th:nth-child(n + 3):nth-last-child(n + 6),
.tab-seo #brandTable[data-metric="impressions"] table td:nth-child(n + 3):nth-last-child(n + 6) {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
}

.tab-seo #brandTable table td:nth-last-child(5) {
  background: rgba(79, 140, 255, 0.08);
}

.table-head-nowrap {
  display: inline-block;
  white-space: nowrap;
}

.table-zero {
  display: inline-block;
  width: 100%;
  text-align: center;
  color: #8fa3be;
}

.tab-seo #brandTable table th:nth-child(2),
.tab-seo #brandTable table td:nth-child(2) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}

.tab-seo #brandTable table th:nth-child(1),
.tab-seo #brandTable table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 13;
  background: #162232;
}

.tab-seo #brandTable table th:nth-child(2),
.tab-seo #brandTable table td:nth-child(2) {
  position: sticky;
  left: 34px;
  z-index: 13;
  background: #162232;
}

.tab-seo #brandTable .table-brand {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-seo #brandTable table thead th:nth-child(1),
.tab-seo #brandTable table thead th:nth-child(2) {
  z-index: 16;
  background: #1b2738;
}

.tab-seo #brandTable table .total-row td:nth-child(1),
.tab-seo #brandTable table .total-row td:nth-child(2) {
  z-index: 15;
  background: #172233;
}


.tab-seo #brandTable table td.is-col-hover {
  background: rgba(255, 255, 255, 0.06);
}

.tab-seo #brandTable table th.is-col-hover,
.tab-seo #brandTable table .total-row td.is-col-hover {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.06);
}

.tab-seo #brandTable table thead th {
  z-index: 30;
  background: #1b2738;
  box-shadow: none !important;
  position: sticky;
  isolation: isolate;
  overflow: hidden;
}

.tab-seo #brandTable table thead th::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #1b2738;
  z-index: -1;
}

.tab-seo #brandTable table .total-row td {
  z-index: 24;
  background: #172233;
  position: sticky;
  isolation: isolate;
  overflow: hidden;
}

.tab-seo #brandTable table .total-row td::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #172233;
  z-index: -1;
}

.tab-seo #brandTable table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.tab-seo #brandTable table tbody tr:hover td.is-col-hover {
  background: rgba(255, 255, 255, 0.08);
}

.tab-seo #brandTable[data-metric="impressions"] .total-row td {
  font-size: 11px;
}

.tab-amazon #brandTable .amazon-tail-start {
  border-left: 1px solid rgba(143, 162, 189, 0.22);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.02);
}

.tab-amazon #brandTable thead .amazon-tail-col,
.tab-amazon #brandTable thead .amazon-tail-start {
  background: linear-gradient(180deg, rgba(28, 41, 59, 0.98), rgba(18, 29, 43, 0.98));
}

.tab-seo .donut-wrap {
  padding-top: 0;
}

.amazon-placeholder {
  padding: 18px 20px;
}

.floating-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  min-width: 200px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(7, 12, 19, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 120ms ease;
}

.floating-tooltip.visible {
  opacity: 1;
}

.portfolio-chart {
  display: grid;
  gap: 10px;
  position: relative;
  height: 100%;
}

.portfolio-metric-chart {
  padding-top: 30px;
}

.portfolio-metric-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.portfolio-axis-label {
  fill: #7fa0cc;
  font-size: 12px;
  font-weight: 600;
  text-anchor: end;
}

.portfolio-x-axis-label {
  fill: #8fa2bd;
  font-size: 13px;
  font-weight: 400;
  text-anchor: middle;
  text-transform: lowercase;
}

.portfolio-value-label {
  fill: #eef4ff;
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
}

.portfolio-line-marker {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.8;
}

.portfolio-line-marker-inner {
  fill: rgba(7, 12, 19, 0.95);
}

.portfolio-metric-bar {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.portfolio-line-labels {
  margin-top: 10px;
}

.portfolio-line-labels span {
  color: #8fa2bd;
  font-size: 12px;
  font-weight: 400;
  text-transform: lowercase;
}

.portfolio-chart-shell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.portfolio-chart-meta {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.portfolio-chart-grid {
  display: block;
  min-height: 236px;
  height: 100%;
  padding-top: 58px;
  padding-inline: 10px;
  padding-bottom: 24px;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-chart-plot {
  position: relative;
  width: 100%;
}

.portfolio-chart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.portfolio-chart-series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 6px;
  align-items: end;
  height: 100%;
}

.portfolio-chart-column {
  display: grid;
  gap: 8px;
  align-items: end;
  min-width: 0;
  overflow: visible;
}

.portfolio-chart-track {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.portfolio-chart-yaxis {
  display: grid;
  align-content: stretch;
  height: 100%;
  min-height: 236px;
  padding-bottom: 24px;
}

.portfolio-chart-yaxis span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #92a7c5;
  font-size: 10px;
  font-weight: 600;
}

.portfolio-chart-bar {
  width: 100%;
  border: 0;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--portfolio-bar) 100%, white 12%), color-mix(in srgb, var(--portfolio-bar) 64%, black 18%));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--portfolio-bar) 22%, transparent);
  cursor: pointer;
}

.portfolio-chart-grid--line {
  gap: 0;
}

.portfolio-chart-line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.portfolio-chart-area {
  fill: color-mix(in srgb, var(--portfolio-chart-color) 20%, transparent);
}

.portfolio-chart-line {
  fill: none;
  stroke: var(--portfolio-chart-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--portfolio-chart-color) 18%, transparent));
}

.portfolio-chart-trend {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.portfolio-chart-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #eef4ff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.portfolio-chart-value--line {
  font-size: 10px;
  bottom: auto;
}

.portfolio-chart-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: var(--portfolio-bar);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--portfolio-bar) 28%, transparent);
  cursor: pointer;
}

.portfolio-chart-label {
  color: #8fa2bd;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  padding-top: 2px;
}

.tab-portfolio .portfolio-release-panel,
.tab-portfolio .portfolio-gsc-panel,
.tab-portfolio .portfolio-amazon-clicks-panel,
.tab-portfolio .portfolio-ctr-panel,
.tab-portfolio .portfolio-orders-panel,
.tab-portfolio .portfolio-commission-panel {
  grid-column: span 1;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: #b6c5d9;
  font-size: 12px;
  line-height: 1.2;
}

.portfolio-tooltip-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #eef4ff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.portfolio-tooltip-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #c8d6ec;
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  gap: 14px;
  align-items: stretch;
}

.local-sync-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.local-sync-panel {
  min-height: 320px;
}

.local-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.local-sync-actions .mode-button {
  border: 0;
  background: linear-gradient(135deg, #f4874c, #d85e24);
  color: #fff;
  box-shadow: 0 10px 24px rgba(216, 94, 36, 0.22);
}

.local-sync-actions .mode-button:hover,
.local-sync-actions .mode-button:focus {
  border: 0;
  background: linear-gradient(135deg, #f79a63, #de6933);
  color: #fff;
}

.local-sync-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 19, 0.82);
  padding: 14px;
  min-height: 180px;
  color: #dbe7f9;
}

.local-sync-status-card {
  display: grid;
  gap: 10px;
}

.local-sync-status-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.local-sync-status-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.local-sync-status-meta {
  color: var(--muted);
  font-size: 12px;
}

.local-sync-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.local-sync-status-badge--idle {
  background: rgba(144, 162, 187, 0.12);
  color: #b8c6da;
}

.local-sync-status-badge--running {
  background: rgba(79, 140, 255, 0.16);
  color: #8eb7ff;
}

.local-sync-status-badge--success {
  background: rgba(70, 216, 112, 0.14);
  color: #7ce69a;
}

.local-sync-status-badge--error {
  background: rgba(255, 109, 122, 0.16);
  color: #ff98a2;
}

.local-sync-status-text {
  color: #dbe7f9;
  line-height: 1.5;
}

.local-sync-script-list {
  display: grid;
  gap: 8px;
}

.local-sync-script-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.local-sync-script-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.local-sync-script-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.full-span {
  grid-column: 1 / -1;
}

.column-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 0;
}

.panel {
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.panel-head {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.panel h2 {
  margin: 6px 0 0;
  font-size: 1.1rem;
}

.chart-area {
  min-height: 170px;
}

.chart-area.compact {
  min-height: 220px;
}

.chart-grid {
  display: grid;
  align-items: end;
  grid-auto-flow: column;
  grid-auto-columns: minmax(14px, 1fr);
  gap: 8px;
  height: 100%;
}

.line-chart {
  position: relative;
  height: 100%;
  min-height: 170px;
  padding-top: 30px;
}

.line-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.metric-bar {
  opacity: 0.92;
}

.line-grid line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.line-path-current {
  fill: none;
  stroke: #4fe07a;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-markers-current circle {
  stroke-width: 0;
}

.line-value-labels text {
  fill: rgba(232, 243, 255, 0.92);
  font-size: 8px;
  font-weight: 400;
  text-anchor: middle;
}

.dual-line-value-label {
  fill: rgba(232, 243, 255, 0.82);
  font-size: 8px;
  font-weight: 400;
  text-anchor: middle;
}

.chart-tooltip {
  position: absolute;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 12, 19, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  color: #dbe7f8;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 5;
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip-row + .chart-tooltip-row {
  margin-top: 6px;
}

.chart-tooltip-label {
  display: block;
  color: #8fa2bd;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.chart-tooltip-value {
  color: #eef4ff;
  font-weight: 700;
}

.chart-tooltip-delta-line {
  display: block;
}

.chart-tooltip-delta-positive {
  color: #46d870;
}

.chart-tooltip-delta-negative {
  color: #ff6d7a;
}

.chart-tooltip-delta-neutral {
  color: #90a2bb;
}

.chart-guide-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-highlight-point {
  stroke: rgba(7, 12, 19, 0.95);
  stroke-width: 1.8;
}

.chart-highlight-point--previous {
  fill: #7f8796;
}

.chart-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
  position: absolute;
  top: -32px;
  right: 10px;
  z-index: 2;
}

.chart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 12, 19, 0.58);
  color: #c8d6ec;
  font-size: 11px;
}

.chart-pill strong {
  color: #eef4ff;
  font-weight: 700;
}

.line-path-previous {
  fill: none;
  stroke: #7f8796;
  stroke-width: 1.8;
  stroke-dasharray: 7 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-path-plan {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.line-path-plan--dotted {
  stroke-dasharray: 1 5;
}

.line-path-area {
  pointer-events: none;
}

.line-labels {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 2px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.line-labels span {
  white-space: nowrap;
}

.tab-seo .line-labels {
  gap: 0;
  font-size: 10px;
  letter-spacing: 0;
}

.tab-seo .line-chart {
  min-height: 178px;
}

.tab-seo .panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-seo .seo-trend-panel .chart-meta {
  top: auto;
  right: 10px;
  bottom: -54px;
}

.line-labels span {
  white-space: nowrap;
}

.multi-line-chart .legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.multi-line-chart .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c8d6ec;
  font-size: 11px;
}

.multi-line-chart .legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 999px;
}

.multi-line-chart .line-a {
  fill: none;
  stroke: #4fe07a;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.multi-line-chart .line-b {
  fill: none;
  stroke: #53a7ff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.multi-line-chart .line-c {
  fill: none;
  stroke: #f2ce00;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.multi-line-markers circle {
  stroke: none;
}

.multi-line-value-labels text {
  fill: rgba(232, 243, 255, 0.82);
  font-size: 8px;
  font-weight: 400;
  text-anchor: middle;
}

.multi-line-value-label--a {
  fill: rgba(106, 233, 143, 0.92);
}

.multi-line-value-label--b {
  fill: rgba(113, 181, 255, 0.92);
}

.multi-line-value-label--c {
  fill: rgba(242, 206, 0, 0.95);
}

.chart-guide-line {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

.chart-bar-wrap {
  display: grid;
  gap: 8px;
  align-items: end;
}

.chart-bar {
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #61a0ff, rgba(79, 140, 255, 0.35));
  box-shadow: 0 10px 26px rgba(79, 140, 255, 0.14);
}

.chart-bar.amazon {
  background: linear-gradient(180deg, #54df85, rgba(70, 216, 112, 0.34));
  box-shadow: 0 10px 26px rgba(70, 216, 112, 0.14);
}

.chart-label {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.table-wrap {
  overflow: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(7, 12, 19, 0.7), rgba(7, 12, 19, 0.92));
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 84, 107, 0.9) transparent;
}

.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(66, 84, 107, 0.88);
  border-radius: 999px;
  border: 0;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amazon-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.amazon-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.amazon-table-filters .inline-control {
  min-width: 150px;
  max-width: 190px;
}

.amazon-table-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.amazon-funnel-month-control select {
  min-width: 118px;
}

.amazon-funnel-market-control .multi-select {
  min-width: 138px;
}

.amazon-funnel-block--amazon-performance {
  margin-bottom: 0;
}

.tab-amazon .amazon-funnel-panel .conversion-funnel {
  padding: 2px 4px 0;
}

.tab-amazon .amazon-funnel-panel .conversion-stage {
  min-height: 104px;
  padding: 12px 10px;
  gap: 8px;
}

.tab-amazon .amazon-funnel-panel .conversion-stage-value {
  font-size: 18px;
}

.tab-amazon .amazon-funnel-panel .conversion-step-arrow {
  font-size: 28px;
}

.mode-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 19, 0.8);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mode-button.active {
  color: var(--text);
  border-color: rgba(79, 140, 255, 0.24);
  background: rgba(79, 140, 255, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  color: #c7d7ef;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background:
    linear-gradient(180deg, rgba(28, 41, 59, 0.98), rgba(18, 29, 43, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  height: 38px;
  text-align: center;
}

td {
  font-size: 12px;
  color: #dce7f8;
  line-height: 1.15;
  height: 30px;
  vertical-align: middle;
}

td strong {
  color: white;
}

 tbody tr:hover {
  background: rgba(79, 140, 255, 0.05);
 }

 .total-row {
  background:
    linear-gradient(180deg, rgba(24, 38, 55, 0.95), rgba(16, 27, 41, 0.95));
 }

.total-row td {
  font-weight: 700;
  color: #eef4ff;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 38px;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(24, 38, 55, 0.98), rgba(16, 27, 41, 0.98));
}

 .row-index {
  display: inline-flex;
  min-width: 18px;
  justify-content: center;
  color: #9fb1cb;
  font-weight: 700;
 }

.table-brand {
  color: #f3f7ff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.table-date {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.table-date-day {
  color: #eef4ff;
  font-size: 12px;
  font-weight: 700;
}

.table-date-month {
  color: #93a6c3;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.delta-stack {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  position: static;
  font-size: 11px;
  font-weight: 700;
}

.delta-arrow {
  font-size: 10px;
  line-height: 1;
}

.table-panel {
  padding-bottom: 12px;
}

 .table-panel .panel-head {
  margin-bottom: 10px;
 }

.table-panel .table-wrap {
  max-height: 640px;
}

#brandTable.table-wrap {
  max-width: 100%;
}

#marketTable.table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

#brandTable table th:nth-child(2),
#brandTable table td:nth-child(2) {
  width: 92px;
}

#brandTable table th:nth-child(n + 3):nth-child(-n + 9),
#brandTable table td:nth-child(n + 3):nth-child(-n + 9) {
  width: 36px;
  text-align: center;
}

#brandTable table th:nth-last-child(3),
#brandTable table td:nth-last-child(3) {
  width: 56px;
}

#brandTable table th:nth-last-child(4),
#brandTable table td:nth-last-child(4) {
  width: 48px;
  text-align: center;
}

#brandTable table th:nth-last-child(2),
#brandTable table td:nth-last-child(2) {
  width: 66px;
}

#brandTable table th:last-child,
#brandTable table td:last-child {
  width: 56px;
}

#marketTable table th:nth-child(2),
#marketTable table td:nth-child(2) {
  width: 62px;
}

#marketTable table th:nth-child(n + 3):nth-child(-n + 9),
#marketTable table td:nth-child(n + 3):nth-child(-n + 9) {
  width: 39px;
  text-align: center;
}

#marketTable table th:nth-last-child(6),
#marketTable table td:nth-last-child(6) {
  width: 44px;
  text-align: center;
}

#marketTable table th:nth-last-child(5),
#marketTable table td:nth-last-child(5) {
  width: 52px;
  text-align: center;
}

#marketTable table th:nth-last-child(4),
#marketTable table td:nth-last-child(4) {
  width: 58px;
  text-align: center;
}

#marketTable table th:nth-last-child(3),
#marketTable table td:nth-last-child(3) {
  width: 58px;
  text-align: center;
}

#marketTable table th:nth-last-child(2),
#marketTable table td:nth-last-child(2) {
  width: 60px;
  text-align: center;
}

#marketTable table th:last-child,
#marketTable table td:last-child {
  width: 48px;
  text-align: center;
}

.market-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.market-flag {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
  flex-shrink: 0;
}

.market-flag.us {
  position: relative;
  background: linear-gradient(180deg, #b22234 0 14%, #fff 14% 28%, #b22234 28% 42%, #fff 42% 56%, #b22234 56% 70%, #fff 70% 84%, #b22234 84% 100%);
  overflow: hidden;
}
.market-flag.us::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 42%;
  height: 54%;
  background: #264f9e;
}
.market-flag.de { background: linear-gradient(180deg, #111 0 33.33%, #d00 33.33% 66.66%, #f2ce00 66.66% 100%); }
.market-flag.uk {
  position: relative;
  background:
    linear-gradient(0deg, transparent 44%, #cf2635 44% 56%, transparent 56%),
    linear-gradient(90deg, transparent 42%, #cf2635 42% 58%, transparent 58%),
    linear-gradient(135deg, transparent 46%, #fff 46% 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, #fff 46% 54%, transparent 54%),
    #1d4d9c;
  overflow: hidden;
}
.market-flag.fr { background: linear-gradient(90deg, #1f4aa8 0 33.33%, #fff 33.33% 66.66%, #e43d30 66.66% 100%); }
.market-flag.it { background: linear-gradient(90deg, #1f9a52 0 33.33%, #fff 33.33% 66.66%, #d93b2f 66.66% 100%); }
.market-flag.es { background: linear-gradient(180deg, #c22828 0 25%, #f1cb26 25% 75%, #c22828 75% 100%); }
.market-flag.ca {
  position: relative;
  background: linear-gradient(90deg, #d23832 0 24%, #fff 24% 76%, #d23832 76% 100%);
}
.market-flag.ca::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 3px;
  height: 6px;
  background: #d23832;
  transform: translateX(-50%);
  clip-path: polygon(50% 0%, 70% 28%, 100% 40%, 76% 58%, 82% 100%, 50% 76%, 18% 100%, 24% 58%, 0% 40%, 30% 28%);
}
.market-flag.nl { background: linear-gradient(180deg, #ae1c28 0 33.33%, #fff 33.33% 66.66%, #21468b 66.66% 100%); }
.market-flag.other,
.market-flag.others {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.22) 0 18%, transparent 18%),
    radial-gradient(circle at 70% 65%, rgba(255,255,255,0.14) 0 14%, transparent 14%),
    linear-gradient(180deg, #4f8cff 0 52%, #3bb673 52% 100%);
}
.market-flag.other::before,
.market-flag.others::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

th:first-child,
td:first-child {
  width: 34px;
  text-align: center;
}

th:nth-child(2),
td:nth-child(2) {
  width: 98px;
}

th:nth-last-child(-n + 3) {
  white-space: normal;
  min-width: 70px;
  line-height: 1.15;
}

th:nth-child(n + 3):nth-child(-n + 9),
td:nth-child(n + 3):nth-child(-n + 9) {
  width: 38px;
  text-align: center;
}

th:nth-last-child(-n + 3),
td:nth-last-child(-n + 3) {
  text-align: center;
}

th:nth-last-child(3),
td:nth-last-child(3) {
  width: 82px;
}

th:nth-last-child(2),
td:nth-last-child(2) {
  width: 88px;
}

th:last-child,
td:last-child {
  width: 96px;
}

.donut-area {
  min-height: 240px;
  height: 100%;
  display: flex;
  align-items: flex-start;
}

.donut-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  width: 100%;
  padding-top: 8px;
}

.donut-panel {
  min-height: 0;
}

.seo-funnel {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 100%;
  padding: 8px 6px;
}

.conversion-funnel {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  padding: 8px 4px 0;
}

.conversion-funnel--simple {
  grid-template-rows: 1fr;
}

.conversion-funnel--embedded {
  min-height: auto;
  padding-top: 0;
}

.conversion-funnel-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.conversion-stage {
  min-height: 138px;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.conversion-stage--muted {
  background: linear-gradient(180deg, rgba(68, 82, 101, 0.92), rgba(45, 56, 72, 0.92));
}

.conversion-stage--blue {
  background: linear-gradient(180deg, rgba(60, 117, 201, 0.96), rgba(37, 83, 154, 0.96));
}

.conversion-stage--yellow {
  background: linear-gradient(180deg, rgba(166, 132, 24, 0.96), rgba(133, 101, 16, 0.96));
}

.conversion-stage--orange {
  background: linear-gradient(180deg, rgba(183, 92, 30, 0.96), rgba(147, 70, 19, 0.96));
}

.conversion-stage--green {
  background: linear-gradient(180deg, rgba(31, 118, 58, 0.96), rgba(19, 91, 44, 0.96));
}

.conversion-stage--olive {
  background: linear-gradient(180deg, rgba(74, 121, 49, 0.96), rgba(54, 99, 35, 0.96));
}

.conversion-stage-label {
  color: rgba(245, 250, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.conversion-stage-value {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.conversion-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.conversion-step-arrow {
  color: #d9e6f8;
  font-size: 34px;
  line-height: 1;
}

.conversion-step-metric-label {
  color: #dce7f8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.conversion-step-metric-value {
  color: #f3f8ff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.conversion-funnel-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  padding-bottom: 0;
  margin-bottom: -6px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  text-align: center;
}

.conversion-funnel-footer-label {
  color: #eef4ff;
  font-size: 15px;
  font-weight: 700;
}

.conversion-funnel-footer-value {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.amazon-funnel-block {
  margin-bottom: 16px;
}

.amazon-funnel-title {
  margin-bottom: 10px;
  color: #8fb6ef;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.seo-funnel-stage {
  display: flex;
  justify-content: center;
}

.seo-funnel-bar {
  width: var(--funnel-width);
  min-height: 74px;
  padding: 14px 18px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1.35fr auto auto;
  align-items: center;
  gap: 14px;
  color: #eef4ff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    linear-gradient(90deg, color-mix(in srgb, var(--funnel-color) 24%, rgba(22, 34, 48, 0.96)) 0%, rgba(13, 22, 33, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.seo-funnel-stage-label {
  color: #dce7f8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.seo-funnel-stage-value {
  color: #f6fbff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.seo-funnel-stage-percent {
  justify-self: end;
  color: color-mix(in srgb, var(--funnel-color) 82%, white 18%);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.donut-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.country-bars-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

.country-bars-list {
  display: grid;
  gap: 10px;
}

.country-bars-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 10px;
}

.bars-hover-target {
  cursor: default;
}

.country-bars-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eef4ff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.country-bars-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
}

.country-bars-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bar-fill-start, rgba(95, 149, 255, 0.95)), var(--bar-fill-end, rgba(113, 168, 255, 0.85)));
  box-shadow: 0 0 10px rgba(83, 167, 255, 0.15);
}

.country-bars-metrics {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  white-space: nowrap;
}

.country-bars-share {
  color: #eef4ff;
  font-size: 12px;
  font-weight: 700;
}

.country-bars-value {
  color: #90a2bb;
  font-size: 12px;
  font-weight: 600;
}

.donut-card svg {
  width: 100%;
  max-width: 170px;
  height: auto;
  justify-self: center;
}

.donut-center {
  font-size: 12px;
  fill: #90a2bb;
  text-anchor: middle;
}

.donut-center-value {
  font-size: 19px;
  font-weight: 800;
  fill: #eef4ff;
  text-anchor: middle;
}

.device-legend {
  display: grid;
  gap: 8px;
  align-content: center;
  width: 100%;
  max-width: 100%;
  padding-top: 0;
  margin-left: 0;
}

.device-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.device-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.device-legend-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.device-legend-label {
  color: #dbe7f8;
  font-weight: 600;
}

.device-legend-label--market {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-legend-metrics {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  margin-left: 4px;
}

.donut-title {
  margin: 0 0 8px;
  color: #c8d6ec;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}


.device-legend-value {
  color: #eef4ff;
  font-weight: 700;
}

.device-legend-share {
  color: #a8bad4;
  font-weight: 600;
}

@media (max-width: 1240px) {
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card--wide {
    grid-column: span 2;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .panel-large {
    grid-row: span 1;
  }
}

@media (max-width: 760px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .kpi-card--wide {
    grid-column: span 1;
  }

  .kpi-split--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 10px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-controls {
    justify-content: flex-start;
  }
}

.table-date--yesterday {
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(84, 138, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(84, 138, 255, 0.18);
}

.yesterday-col {
  display: inline-block;
  min-width: 100%;
  padding: 5px 0;
  border-radius: 4px;
  background: rgba(84, 138, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(84, 138, 255, 0.14);
  color: #f4f8ff;
  font-weight: 700;
}


.tab-amazon .amazon-structure-wrap > * {
  align-self: start;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-amazon .amazon-structure-wrap > * .donut-title {
  min-height: 30px;
  display: flex;
  align-items: flex-start;
}

.tab-amazon .amazon-structure-wrap > *:first-child {
  padding-left: 0;
  border-left: 0;
}

.tab-amazon .country-bars-card--market-rate .country-bars-track {
  width: 100%;
  max-width: none;
}

.tab-amazon .country-bars-card--market-rate .country-bars-fill {
  min-width: 0;
}

.tab-amazon .country-bars-card--market-rate .country-bars-metrics {
  min-width: 84px;
}

.tab-amazon .country-bars-card--market-rate .country-bars-row {
  grid-template-columns: 54px minmax(190px, 1fr) 84px;
}


.tab-amazon .amazon-structure-wrap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.tab-amazon .amazon-structure-wrap .donut-title {
  min-height: 30px;
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tab-amazon .amazon-clicks-bars .country-bars-list {
  gap: 10px;
}

.tab-amazon .amazon-clicks-bars .country-bars-row {
  grid-template-columns: 44px minmax(0, 1fr) 110px;
  gap: 10px;
}

.tab-amazon .amazon-clicks-bars .country-bars-track {
  width: 100%;
  max-width: none;
}

.tab-amazon .amazon-clicks-bars .country-bars-metrics {
  min-width: 110px;
  justify-content: flex-start;
  gap: 4px;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-list {
  gap: 10px;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-row {
  grid-template-columns: 44px minmax(0, 1fr) 50px;
  gap: 4px;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-track {
  width: 100%;
  max-width: none;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-metrics {
  min-width: 50px;
  width: 50px;
  justify-content: flex-start;
  gap: 0;
}

.tab-amazon .amazon-funnel-panel .conversion-funnel {
  padding: 2px 4px 0;
}

.tab-amazon .amazon-funnel-panel .conversion-stage {
  min-height: 96px;
  padding: 10px 10px;
  gap: 6px;
}

.tab-amazon .amazon-funnel-panel .conversion-stage-value {
  font-size: 18px;
}

.tab-amazon .amazon-funnel-panel .conversion-step-arrow {
  font-size: 28px;
}

.tab-amazon .amazon-funnel-panel .conversion-funnel-footer {
  padding-top: 10px;
  margin-bottom: 0;
}

.tab-amazon .amazon-funnel-panel .conversion-funnel-footer-label {
  font-size: 14px;
}

.tab-amazon .amazon-funnel-panel .conversion-funnel-footer-value {
  font-size: 16px;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-share {
  min-width: 0;
}

.tab-amazon .amazon-commission-rate-bars .country-bars-value {
  color: #7f93b0;
}
