:root {
  --bg: #ffffff;
  --surface: #f6faf4;
  --surface-2: #eef7ea;
  --ink: #123327;
  --muted: #5f6f66;
  --accent: #2f8f5b;
  --accent-dark: #17613d;
  --gold: #d9a441;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #8a6114;
  --warning-soft: #fff9eb;
  --success-soft: #eaf7ee;
  --line: rgba(18, 51, 39, 0.12);
  --shadow: 0 24px 80px rgba(23, 97, 61, 0.14);
  --radius: 24px;
  --ease: cubic-bezier(.2,.9,.2,1);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(47, 143, 91, 0.13), transparent 30%),
    radial-gradient(circle at 86% 6%, rgba(217, 164, 65, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf5 52%, #ffffff 100%);
  font-family: "Inter", Arial, sans-serif;
}

button,
a,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button.nav-item {
  border: 0;
  background: transparent;
  text-align: left;
}

.platform-tabs[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  transition: grid-template-columns 220ms var(--ease);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

.sidebar-head {
  display: grid;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 16px 48px rgba(18, 51, 39, 0.08);
}

.brand img {
  width: min(180px, 100%);
  height: auto;
  display: block;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.sidebar-toggle:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
}

body.sidebar-collapsed .brand {
  padding: 12px;
}

body.sidebar-collapsed .brand img {
  width: 48px;
}

body.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(180deg);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 800;
  padding: 14px 16px;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent-dark);
  background: var(--surface-2);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

body.sidebar-collapsed .sidebar-label {
  display: none;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 12px;
}

.route-hidden {
  display: none !important;
}

.support-kicker,
.eyebrow,
.section-kicker {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lead,
.metric-card small,
.funnel-step small {
  color: var(--muted);
}

.dashboard {
  width: 100%;
  padding: 32px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar,
.filter-panel,
.source-health-panel,
.hero-panel,
.overview-visual-grid,
.metrics-visual-panel,
.metric-grid,
.monthly-goal-panel,
.coupon-panel,
.content-grid {
  max-width: 1360px;
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  min-width: 0;
}

.topbar > div {
  min-width: 0;
}

.topbar *,
.filter-panel *,
.source-health-panel *,
.hero-panel *,
.monthly-goal-panel *,
.metric-card *,
.panel * {
  max-width: 100%;
}

h1,
h2 {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.9rem);
  line-height: 1;
}

.lead {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.6;
}

.top-actions,
.period-selector,
.custom-range {
  display: flex;
  gap: 12px;
}

.top-actions {
  white-space: nowrap;
}

.primary-button,
.ghost-button,
.filter-chip {
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 13px 18px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 18px 40px rgba(23, 97, 61, 0.24);
}

.primary-button[disabled],
.ghost-button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.ghost-button {
  color: var(--accent-dark);
  border: 1px solid var(--line);
  background: #fff;
}

.ghost-button.small {
  padding: 10px 14px;
}

.primary-button:hover,
.ghost-button:hover,
.nav-item:hover,
.filter-chip:hover {
  transform: translateY(-2px);
}

.filter-panel {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(180px, 1fr) minmax(260px, auto);
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  padding: 16px;
  box-shadow: 0 16px 60px rgba(18, 51, 39, 0.08);
}

.filter-panel.is-fixed {
  position: fixed;
  top: 14px;
  left: var(--filter-left);
  width: var(--filter-width);
  max-width: none;
  margin: 0;
  z-index: 100;
  box-shadow: 0 22px 70px rgba(18, 51, 39, 0.16);
}

.filter-panel-spacer {
  display: none;
  max-width: 1360px;
  margin-inline: auto;
  margin-bottom: 22px;
}

.filter-panel-spacer.is-active {
  display: block;
}

.platform-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 250, 244, 0.82);
  padding: 6px;
}

.platform-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  padding: 10px 14px;
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.platform-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 12px 28px rgba(23, 97, 61, 0.18);
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-panel strong {
  display: block;
  margin-top: 5px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.4rem;
}

.filter-panel span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.filter-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(280px, 1fr);
  align-items: end;
  gap: 10px;
}

.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 10px 14px;
}

.filter-chip.active {
  border-color: rgba(47, 143, 91, 0.26);
  background: var(--surface-2);
  color: var(--accent-dark);
}

.period-selector {
  display: grid;
  gap: 8px;
  max-width: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.period-selector select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 900;
  padding: 10px 44px 10px 14px;
}

.period-stepper {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 5px;
}

.period-stepper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.period-stepper-button:hover:not(:disabled) {
  color: var(--accent-dark);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.period-stepper-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.period-stepper-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-align: center;
}

.period-stepper-display strong {
  display: block;
  margin: 0;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-calendar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  color: var(--accent-dark);
}

.period-calendar-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.custom-range {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: end;
}

.custom-range.is-hidden {
  display: none;
}

.custom-range label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.custom-range input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  padding: 8px 12px;
}

.source-health-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px 20px;
  box-shadow: 0 16px 50px rgba(18, 51, 39, 0.07);
}

.source-health-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.source-health-header span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.source-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.source-health-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px 14px;
}

.source-health-item strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.2;
}

.source-health-item span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.source-health-item::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.source-health-item.is-warning::before,
.source-health-item.is-loading::before,
.source-health-item.is-idle::before {
  background: var(--warning);
}

.source-health-item.is-error::before {
  background: #bd3b31;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 12%, rgba(217, 164, 65, 0.24), transparent 32%),
    linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  padding: 34px;
  box-shadow: 0 30px 90px rgba(23, 97, 61, 0.22);
}

.hero-panel[hidden] {
  display: none;
}

.hero-panel > div {
  min-width: 0;
}

.hero-panel .section-kicker {
  color: #bfe7c7;
}

.hero-panel h2 {
  margin-top: 8px;
  max-width: 760px;
  font-size: clamp(1.85rem, 3.2vw, 2.85rem);
  line-height: 1.04;
}

.hero-panel p:last-child {
  margin: 14px 0 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 14px;
  min-width: 0;
}

.hero-submetrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
  margin-top: 20px;
}

.hero-submetrics article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  padding: 12px;
}

.hero-submetrics span {
  color: rgba(255,255,255,0.72);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-submetrics strong {
  color: #fff;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.goal-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 176px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, rgba(23, 97, 61, 0.92) 69%, transparent 70%),
    conic-gradient(#fff 0 var(--roas-progress, 46%), rgba(255,255,255,0.24) var(--roas-progress, 46%) 100%);
  flex: 0 0 auto;
  text-align: center;
}

.goal-ring span {
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(2.45rem, 4vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.goal-ring small {
  color: #dff2df;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-ratio-card {
  display: grid;
  align-content: center;
  gap: 7px;
  width: min(100%, 276px);
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08)),
    rgba(255,255,255,0.12);
  padding: 18px 20px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.hero-ratio-card[hidden] {
  display: none;
}

.hero-ratio-card span,
.hero-ratio-card small {
  color: rgba(255,255,255,0.76);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.18;
  text-transform: uppercase;
}

.hero-ratio-card span {
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.02em;
}

.hero-ratio-card strong {
  color: #fff;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(2rem, 3vw, 2.55rem);
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.hero-ratio-card em {
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.82);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.planne-result-panel {
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  margin-top: -6px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #9f781f, #d8a640 54%, #8b6819);
  box-shadow: 0 24px 70px rgba(142, 104, 25, 0.22);
}

.planne-result-panel .section-kicker {
  color: #fff4c7;
}

.planne-result-panel p:last-child {
  color: rgba(255, 255, 255, 0.86);
}

.planne-source-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  background: rgba(18, 51, 39, 0.2);
  color: #fff;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 900;
}

.planne-result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.planne-result-metrics article {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  background: rgba(255,255,255,0.13);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.planne-result-metrics span {
  color: rgba(255,255,255,0.78);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.planne-result-metrics strong {
  color: #fff;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.28rem, 2.2vw, 1.72rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.planne-result-metrics .planne-total-card {
  border-color: rgba(18, 51, 39, 0.28);
  background:
    linear-gradient(135deg, rgba(18, 51, 39, 0.72), rgba(23, 97, 61, 0.58)),
    rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 36px rgba(18, 51, 39, 0.16);
}

.planne-result-metrics .planne-total-card span {
  color: rgba(255,255,255,0.84);
}

.planne-result-metrics .planne-total-card strong {
  color: #fff;
}

.overview-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.mini-chart-panel,
.platform-panel {
  min-height: 330px;
}

.summary-chart {
  display: grid;
  gap: 12px;
  min-height: 240px;
}

.summary-chart > span,
.platform-breakdown > span {
  display: grid;
  place-items: center;
  min-height: 190px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.summary-chart svg {
  width: 100%;
  min-height: 250px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 10%, rgba(47, 143, 91, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(238, 247, 234, 0.88), rgba(255,255,255,0.95));
  overflow: visible;
}

.chart-grid-line {
  fill: none;
  stroke: rgba(18, 51, 39, 0.12);
  stroke-width: 2;
}

.chart-area {
  fill: url(#summaryRevenueFill);
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-line-revenue {
  stroke: url(#summaryRevenueStroke);
}

.chart-line-spent {
  stroke: rgba(217, 164, 65, 0.88);
  stroke-dasharray: 7 7;
  stroke-width: 3;
}

.chart-point {
  color: var(--ink);
  outline: none;
}

.chart-point circle {
  fill: #fff;
  stroke: var(--accent-dark);
  stroke-width: 4;
  transition: r 160ms var(--ease), fill 160ms var(--ease), stroke 160ms var(--ease);
}

.chart-point-day circle {
  stroke: #185c3c;
  fill: #fff;
}

.chart-point:hover circle,
.chart-point:focus circle {
  r: 8;
  fill: #185c3c;
  stroke: #fff;
}

.chart-point:hover circle {
  filter: drop-shadow(0 8px 16px rgba(18, 51, 39, 0.16));
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 160ms var(--ease);
}

.chart-point:hover .chart-tooltip,
.chart-point:focus .chart-tooltip {
  opacity: 1;
}

.chart-tooltip rect {
  fill: rgba(18, 51, 39, 0.96);
  stroke: rgba(255,255,255,0.22);
}

.chart-tooltip text {
  fill: #fff;
  font-size: 10px;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-revenue {
  background: var(--accent-dark);
}

.legend-spent {
  background: var(--gold);
}

.chart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 16px;
  background: var(--surface);
  padding: 12px 14px;
}

.chart-summary span,
.chart-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.chart-summary strong {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.15rem;
}

.chart-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 12px;
}

.chart-summary-grid article {
  display: grid;
  gap: 4px;
}

.chart-summary-grid article span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-summary-grid article strong {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.04rem;
}

.chart-summary-grid small {
  justify-self: end;
  text-align: right;
}

.chart-legend-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.sales-daily-chart .chart-summary-grid article,
.chart-summary-grid article {
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(18, 51, 39, 0.06);
}

.platform-breakdown {
  display: grid;
  gap: 12px;
}

.platform-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
}

.platform-row:hover {
  border-color: rgba(47, 143, 91, 0.32);
  background: #fff;
  transform: translateY(-2px);
}

.platform-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-row strong {
  font-family: "Manrope", Arial, sans-serif;
}

.platform-row span,
.platform-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.platform-bar {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: rgba(18, 51, 39, 0.09);
}

.platform-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}

.sales-daily-card {
  border-color: rgba(29, 107, 82, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(29, 107, 82, 0.12), transparent 34%),
    rgba(255,255,255,0.95);
}

.sales-daily-heading {
  align-items: flex-start;
}

.sales-daily-heading span {
  max-width: 300px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.sales-daily-chart {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sales-daily-chart svg {
  width: 100%;
  min-height: 230px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgba(29, 107, 82, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(239, 249, 243, 0.9), rgba(255,255,255,0.96));
  overflow: visible;
}

.sales-line-point {
  color: var(--ink);
  outline: none;
  cursor: pointer;
  pointer-events: all;
}

.sales-line-point .sales-line-hit {
  fill: rgba(255,255,255,0.01);
  stroke: none;
}

.sales-line {
  fill: none;
  stroke: url(#salesLineStroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 10px 18px rgba(29, 107, 82, 0.16));
}

.sales-line-area {
  fill: url(#salesLineFill);
}

.sales-line-point circle {
  fill: #fff;
  stroke: #1d6b52;
  stroke-width: 4;
  transition: r 160ms var(--ease), fill 160ms var(--ease), stroke 160ms var(--ease);
}

.sales-line-point:hover circle,
.sales-line-point:focus circle {
  r: 8;
  fill: #1d6b52;
  stroke: #fff;
}

.sales-line-point:hover .sales-line-hit,
.sales-line-point:focus .sales-line-hit {
  fill: rgba(255,255,255,0.01);
}

.sales-axis-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
}

.sales-daily-legend {
  justify-content: flex-start;
}

.sales-chart-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.sales-daily-chart .chart-tooltip rect {
  fill: rgba(18, 51, 39, 0.96);
}

.metrics-visual-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 143, 91, 0.1), transparent 34%),
    rgba(255,255,255,0.9);
  box-shadow: 0 16px 60px rgba(18, 51, 39, 0.08);
  margin-bottom: 16px;
  padding: 22px;
}

.metrics-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metrics-visual-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.metrics-visual-card:hover {
  border-color: rgba(47, 143, 91, 0.3);
  box-shadow: 0 18px 54px rgba(18, 51, 39, 0.1);
  transform: translateY(-2px);
}

.metrics-visual-head {
  display: grid;
  gap: 7px;
}

.metrics-visual-head span,
.metrics-visual-bar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metrics-visual-head strong {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.28rem, 2.2vw, 1.7rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metrics-visual-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.metrics-visual-bars {
  display: grid;
  gap: 12px;
}

.metrics-visual-bar {
  display: grid;
  gap: 7px;
}

.metrics-visual-bar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metrics-visual-bar strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
}

.metrics-visual-bar i {
  overflow: hidden;
  display: block;
  height: 9px;
  border-radius: 999px;
  background: rgba(18, 51, 39, 0.09);
}

.metrics-visual-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.secondary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 16px 60px rgba(18, 51, 39, 0.08);
}

.metric-card {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 112px;
  min-width: 0;
  padding: 20px;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.metric-card:hover,
.panel:hover {
  border-color: rgba(47, 143, 91, 0.28);
  box-shadow: 0 22px 70px rgba(18, 51, 39, 0.12);
  transform: translateY(-2px);
}

.metric-card.highlight {
  background:
    radial-gradient(circle at 90% 0%, rgba(217, 164, 65, 0.14), transparent 34%),
    #fff;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.metric-card strong {
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-result {
  background:
    radial-gradient(circle at 92% 0%, rgba(47, 143, 91, 0.15), transparent 34%),
    #fff;
}

.metric-efficiency {
  background:
    radial-gradient(circle at 92% 0%, rgba(217, 164, 65, 0.16), transparent 34%),
    #fff;
}

.metric-traffic {
  background:
    radial-gradient(circle at 92% 0%, rgba(38, 112, 130, 0.12), transparent 34%),
    #fff;
}

.metric-quality {
  background:
    radial-gradient(circle at 92% 0%, rgba(47, 143, 91, 0.1), transparent 34%),
    var(--surface);
}

.monthly-goal-panel {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas:
    "intro intro"
    "goal-form goal-progress"
    "planne-copy planne-progress"
    "planne-form planne-progress";
  column-gap: 28px;
  row-gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  border: 1px solid rgba(217, 164, 65, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(217, 164, 65, 0.13), transparent 34%),
    rgba(255,255,255,0.9);
  box-shadow: 0 16px 60px rgba(18, 51, 39, 0.08);
  padding: 22px;
}

.planne-copy {
  grid-area: planne-copy;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.planne-form {
  width: 100%;
}

.planne-contingency {
  grid-area: planne-form;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  padding: 12px 14px;
}

.planne-contingency summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.planne-contingency > p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.planne-contingency .planne-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.planne-api-updated {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.planne-summary-card {
  grid-area: planne-progress;
  align-self: stretch;
  border: 1px solid rgba(47, 143, 91, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 143, 91, 0.1), transparent 34%),
    var(--surface);
}

.monthly-goal-panel > * {
  min-width: 0;
}

.monthly-goal-panel.is-disabled {
  border-color: var(--line);
}

.monthly-panel-intro {
  grid-area: intro;
  grid-column: auto;
}

.monthly-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.monthly-panel-heading > div {
  min-width: 0;
}

.monthly-reference-control {
  display: grid;
  flex: 0 0 min(260px, 34%);
  gap: 7px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.monthly-reference-control select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(47, 143, 91, 0.28);
  border-radius: 14px;
  color: var(--accent-dark);
  background: #fff;
  font: inherit;
  padding: 10px 38px 10px 12px;
}

.monthly-reference-control select:disabled {
  cursor: wait;
  opacity: 0.7;
}

.goal-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.goal-copy h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.goal-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.goal-form {
  display: grid;
  align-content: center;
  gap: 12px;
}

.monthly-goal-panel > .goal-form:not(.planne-form) {
  grid-area: goal-form;
}

.goal-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.goal-form label span {
  color: var(--accent-dark);
}

.goal-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  padding: 12px 14px;
}

.goal-form input:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.goal-progress-card {
  display: grid;
  align-content: center;
  gap: 14px;
  border-radius: 20px;
  background: var(--surface);
  padding: 16px;
}

.monthly-goal-panel > .goal-progress-card:not(.planne-summary-card) {
  grid-area: goal-progress;
}

.goal-progress-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.goal-progress-top span,
.goal-summary-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.goal-progress-top strong {
  color: var(--accent-dark);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
  text-align: right;
}

.goal-progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(18, 51, 39, 0.1);
}

.goal-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--gold));
  transition: width 280ms var(--ease);
}

.goal-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 10px;
}

.goal-summary-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.76);
  padding: 10px;
}

.goal-summary-grid strong {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.96rem;
  line-height: 1;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.panel {
  padding: 24px;
  min-width: 0;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.panel-large {
  grid-column: span 2;
}

#funil {
  grid-column: 1 / -1;
}

#campanhas {
  grid-column: 1 / -1;
}

#criativos {
  grid-column: 1 / -1;
}

.coupon-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 164, 65, 0.12), transparent 30%),
    rgba(255,255,255,0.92);
  padding: 24px;
  box-shadow: 0 18px 60px rgba(18, 51, 39, 0.08);
}

.coupon-heading {
  margin-bottom: 0;
}

.coupon-heading > div {
  min-width: 0;
}

.coupon-heading h2,
.coupon-heading p {
  overflow-wrap: anywhere;
}

.coupon-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.coupon-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.coupon-kpi-grid article {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 112px;
  border: 1px solid rgba(47, 143, 91, 0.14);
  border-radius: 18px;
  background: var(--surface);
  padding: 15px;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.coupon-kpi-grid article:nth-child(2),
.coupon-kpi-grid article:nth-child(4) {
  background: rgba(255, 247, 225, 0.82);
}

.coupon-kpi-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 91, 0.34);
  background: #fff;
}

.coupon-kpi-grid span,
.coupon-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
}

.coupon-kpi-grid strong {
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.coupon-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 240px);
  gap: 12px;
}

.coupon-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.coupon-toolbar input,
.coupon-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  padding: 10px 12px;
}

.coupon-list {
  display: grid;
  gap: 10px;
}

.coupon-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(5, minmax(94px, 0.72fr)) minmax(130px, 0.9fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.coupon-row:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 91, 0.35);
  box-shadow: 0 14px 34px rgba(18, 51, 39, 0.08);
}

.coupon-identity,
.coupon-metric,
.coupon-usage {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  border-radius: 13px;
  background: var(--surface);
  padding: 10px;
}

.coupon-identity {
  background: rgba(238, 247, 234, 0.74);
}

.coupon-identity strong,
.coupon-metric strong,
.coupon-usage strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.coupon-identity small,
.coupon-usage small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.coupon-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(47, 143, 91, 0.12);
  color: var(--accent-dark);
  padding: 5px 8px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coupon-status.is-expired,
.coupon-status.is-archived,
.coupon-status.is-inactive {
  background: rgba(189, 59, 49, 0.1);
  color: #8f2e27;
}

.coupon-status.is-scheduled {
  background: rgba(217, 164, 65, 0.16);
  color: #7a5714;
}

.coupon-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface);
  padding: 28px;
  font-weight: 900;
  text-align: center;
}

.origin-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 108, 132, 0.12), transparent 30%),
    rgba(255,255,255,0.94);
}

.origin-kpi-grid article:nth-child(2),
.origin-kpi-grid article:nth-child(5) {
  background: rgba(232, 244, 247, 0.82);
}

.origin-chart-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(45, 108, 132, 0.18);
  border-radius: 20px;
  background: rgba(247, 251, 252, 0.92);
  padding: 18px;
}

.origin-chart-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.origin-chart-heading h3 {
  margin-top: 5px;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1.25rem;
}

.origin-chart-heading > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.origin-chart,
.origin-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.origin-bar-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.origin-rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #245c70;
  background: rgba(45, 108, 132, 0.12);
  font-size: 0.72rem;
  font-weight: 900;
}

.origin-bar-content {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.origin-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.origin-bar-label strong,
.origin-bar-label span {
  overflow-wrap: anywhere;
}

.origin-bar-label strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.origin-bar-label span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
}

.origin-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 108, 132, 0.1);
}

.origin-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d6b52, #3c96a9);
  transition: width 320ms var(--ease), filter 180ms var(--ease);
}

.origin-bar-row:hover .origin-bar-track span {
  filter: brightness(1.12);
}

.origin-toolbar {
  grid-template-columns: minmax(240px, 520px);
}

.origin-row {
  display: grid;
  grid-template-columns: 30px minmax(190px, 1.45fr) repeat(4, minmax(110px, 0.8fr));
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.origin-row:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 108, 132, 0.35);
  box-shadow: 0 14px 34px rgba(18, 51, 39, 0.08);
}

.origin-row > .origin-rank {
  align-self: center;
}

.origin-identity {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  border-radius: 13px;
  background: rgba(232, 244, 247, 0.74);
  padding: 10px;
}

.origin-identity strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.origin-identity small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sales-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 126, 114, 0.13), transparent 32%),
    rgba(255,255,255,0.95);
}

.sales-kpi-grid article:nth-child(2),
.sales-kpi-grid article:nth-child(5) {
  background: rgba(229, 247, 242, 0.88);
}

.sales-ranking-card {
  border-color: rgba(34, 126, 114, 0.2);
  background: rgba(245, 251, 249, 0.94);
}

.sales-ranking-heading {
  align-items: center;
}

.sales-ranking-heading label {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.sales-ranking-heading select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  padding: 8px 34px 8px 11px;
}

button.sales-ranking-row {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  padding: 5px;
  text-align: left;
  cursor: pointer;
  border-radius: 13px;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

button.sales-ranking-row:hover,
button.sales-ranking-row:focus-visible,
button.sales-ranking-row.is-active {
  background: rgba(34, 126, 114, 0.09);
  transform: translateX(3px);
  outline: none;
}

button.sales-ranking-row.is-active .origin-rank {
  color: #fff;
  background: var(--accent-dark);
}

.sales-filter-clear {
  width: fit-content;
  border: 1px solid rgba(34, 126, 114, 0.24);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(34, 126, 114, 0.08);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.sales-toolbar {
  align-items: end;
}

.sales-result-count {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 10px 12px;
}

.sales-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.sales-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.sales-table th,
.sales-table td {
  border-bottom: 1px solid rgba(18, 51, 39, 0.09);
  padding: 11px 9px;
  text-align: left;
  vertical-align: middle;
}

.sales-table th {
  color: var(--muted);
  background: rgba(238, 247, 234, 0.62);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sales-row {
  transition: background 160ms var(--ease);
}

.sales-row:hover {
  background: rgba(238, 247, 234, 0.48);
}

.sales-code {
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

.sales-expand {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(34, 126, 114, 0.2);
  border-radius: 9px;
  color: var(--accent-dark);
  background: rgba(34, 126, 114, 0.08);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.sales-detail-row td {
  background: rgba(245, 251, 249, 0.95);
  padding: 14px;
}

.sales-utm-details {
  display: grid;
  gap: 10px;
}

.sales-utm-details > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-utm-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(34, 126, 114, 0.16);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  padding: 7px 10px;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.sales-utm-chip strong {
  color: var(--accent-dark);
  font-size: 0.62rem;
}

.sales-utm-chip.is-empty {
  opacity: 0.58;
}

.sales-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.sales-pagination button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-dark);
  background: #fff;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.sales-pagination button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.sales-pagination span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-header.compact {
  margin-bottom: 18px;
}

.panel-header h2 {
  margin-top: 6px;
  font-size: 1.55rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.funnel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
}

.funnel-step {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 180px;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(238, 247, 234, 0.9));
  padding: 22px 18px;
  min-width: 0;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%, 24px 50%);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.funnel-step:hover {
  background: linear-gradient(135deg, #fff, rgba(234, 247, 238, 0.95));
  transform: translateY(-2px);
}

.funnel-step:first-child {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
  background:
    linear-gradient(135deg, rgba(23, 97, 61, 0.12), rgba(238, 247, 234, 0.95));
}

.funnel-step.is-hidden {
  display: none;
}

.funnel-step span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.funnel-step strong {
  align-self: end;
  color: var(--accent-dark);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1;
  white-space: nowrap;
}

.funnel-step small {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.funnel-step small span {
  color: var(--muted);
}

.funnel-step small em {
  color: var(--warning);
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  max-width: 320px;
  text-align: left;
  white-space: normal;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  font-weight: 800;
}

.campaign-name {
  display: grid;
  gap: 4px;
}

.campaign-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-dark);
  font-size: 0.66rem;
  font-weight: 900;
  padding: 5px 8px;
}

.source-badge {
  border: 1px solid rgba(217, 164, 65, 0.28);
  background: rgba(217, 164, 65, 0.12);
  color: #7a5413;
}

.campaign-name small {
  color: var(--muted);
  font-weight: 800;
}

.creative-grid {
  display: grid;
  gap: 12px;
}

.creative-list {
  grid-template-columns: 1fr;
}

.creative-state {
  grid-column: 1 / -1;
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
  padding: 18px;
}

.creative-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(18, 51, 39, 0.08);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.creative-card:hover {
  border-color: rgba(47, 143, 91, 0.3);
  box-shadow: 0 20px 60px rgba(18, 51, 39, 0.12);
  transform: translateY(-2px);
}

.creative-media {
  display: grid;
  place-items: center;
  min-height: 100%;
  background: var(--surface);
}

.creative-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
}

.creative-placeholder {
  color: var(--muted);
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.creative-body {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 0.78fr) minmax(320px, 1.35fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
}

.creative-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.creative-copy span,
.creative-body > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.creative-body h3 {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.creative-id-box {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px dashed rgba(47, 143, 91, 0.26);
  border-radius: 14px;
  background: rgba(238, 247, 234, 0.62);
  padding: 9px;
}

.creative-id-box > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.creative-id-box div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.creative-id-box strong {
  min-width: 0;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-id-box small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.copy-id-button {
  min-width: 0;
  border: 1px solid rgba(47, 143, 91, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 10px;
  transition: background 180ms var(--ease), color 180ms var(--ease);
  white-space: nowrap;
}

.copy-id-button:hover {
  background: var(--accent-dark);
  color: #fff;
}

.creative-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(74px, 1fr));
  gap: 8px;
  margin: 0;
}

.creative-metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 14px;
  background: var(--surface);
  padding: 8px;
}

.creative-metrics dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.creative-metrics dd {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.creative-actions {
  display: flex;
  justify-content: flex-end;
}

.creative-link {
  width: fit-content;
}

.creative-link-unavailable {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .metric-grid,
  .secondary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-goal-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "intro intro"
      "goal-form planne-form"
      "goal-progress goal-progress"
      "planne-copy planne-copy"
      "planne-progress planne-progress";
  }

  .monthly-panel-heading {
    display: grid;
    gap: 14px;
  }

  .monthly-reference-control {
    width: 100%;
  }

  .goal-progress-card,
  .planne-summary-card {
    grid-column: 1 / -1;
  }

  .funnel {
    grid-template-columns: 1fr;
  }

  .funnel-step {
    min-height: auto;
  }

  .funnel-step::after {
    top: auto;
    right: auto;
    bottom: -8px;
    left: 28px;
    width: 2px;
    height: 16px;
  }

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

@media (max-width: 1120px) {
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-summary {
    align-items: flex-start;
  }

  .overview-visual-grid,
  .planne-result-panel {
    grid-template-columns: 1fr;
  }

  .creative-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .chart-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-summary-grid small {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .sales-daily-heading {
    align-items: flex-start;
  }

  .sales-daily-heading span {
    text-align: left;
    max-width: none;
  }

  .creative-body {
    grid-template-columns: 1fr;
  }

  .creative-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .metrics-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .coupon-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .coupon-identity {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .brand img {
    width: 138px;
  }

  .nav-list {
    grid-template-columns: repeat(9, minmax(110px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-toggle {
    display: none;
  }

  body.sidebar-collapsed .sidebar-label {
    display: inline;
  }

  body.sidebar-collapsed .brand img {
    width: 138px;
  }

  .nav-item {
    text-align: center;
    white-space: nowrap;
  }

  .topbar,
  .overview-visual-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .goal-ring {
    width: 164px;
    justify-self: center;
  }

  .hero-metrics {
    justify-content: center;
  }

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

  .panel-large {
    grid-column: span 2;
  }

  #funil {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  body {
    background:
      radial-gradient(circle at 20% 0%, rgba(47, 143, 91, 0.12), transparent 32%),
      linear-gradient(180deg, #ffffff 0%, #f8fbf5 100%);
  }

  .dashboard,
  .sidebar {
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }

  .app-shell,
  .dashboard {
    display: block;
    overflow-x: hidden;
  }

  .sidebar {
    gap: 14px;
  }

  .brand {
    border-radius: 18px;
    justify-content: center;
  }

  .brand img {
    width: 124px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.84);
    padding: 10px 12px;
    font-size: 0.86rem;
  }

  .topbar {
    gap: 16px;
    margin-bottom: 16px;
  }

  h1 {
    margin-top: 0;
    font-size: clamp(1.9rem, 10.5vw, 2.65rem);
    line-height: 1;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
  }

  .lead {
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.48;
  }

  .top-actions,
  .filter-summary,
  .source-health-header,
  .period-selector,
  .custom-range {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .period-selector,
  .period-selector select,
  .custom-range label,
  .custom-range input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .primary-button,
  .ghost-button {
    justify-content: center;
    padding: 12px 16px;
  }

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

  .source-health-item {
    padding: 11px 12px;
  }

  .hero-panel,
  .panel,
  .metric-card,
  .filter-panel,
  .metrics-visual-panel,
  .source-health-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    padding: 16px;
  }

  .topbar,
  .filter-panel,
  .source-health-panel,
  .coupon-panel,
  .hero-panel,
  .overview-visual-grid,
  .metrics-visual-panel,
  .metric-grid,
  .monthly-goal-panel,
  .content-grid {
    width: 100%;
    margin-inline: 0;
  }

  .coupon-panel,
  .origin-chart-card,
  .origin-list,
  .origin-row,
  .origin-identity,
  .origin-bar-content {
    min-width: 0;
    max-width: 100%;
  }

  .coupon-kpi-grid,
  .coupon-toolbar {
    grid-template-columns: 1fr;
  }

  .coupon-panel {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    overflow: hidden;
  }

  .coupon-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .coupon-heading > div {
    width: 100%;
    max-width: 100%;
  }

  .coupon-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .origin-row {
    grid-template-columns: 30px repeat(2, minmax(0, 1fr));
  }

  .origin-identity {
    grid-column: 2 / -1;
  }

  .origin-row .coupon-metric:first-of-type {
    grid-column: 2;
  }

  .coupon-identity,
  .coupon-usage {
    grid-column: 1 / -1;
  }

  .filter-panel {
    margin-bottom: 16px;
  }

  .filter-panel.is-fixed {
    top: 8px;
  }

  .platform-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    border-radius: 18px;
  }

  .platform-tab {
    min-width: 0;
    padding: 10px 8px;
    font-size: 0.82rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .filter-panel strong {
    font-size: 1.2rem;
  }

  .filter-panel span {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .filter-body {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
  }

  .period-stepper {
    width: 100%;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .period-stepper-button {
    width: 36px;
    height: 36px;
  }

  .period-stepper-display strong {
    font-size: 0.9rem;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 16px;
    overflow: visible;
  }

  .hero-panel h2 {
    font-size: clamp(1.42rem, 7vw, 1.9rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .hero-panel p:last-child {
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .goal-ring {
    width: 148px;
    gap: 7px;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    width: 100%;
  }

  .hero-ratio-card {
    width: 100%;
    border-radius: 18px;
    padding: 14px 12px;
    text-align: center;
  }

  .hero-ratio-card span,
  .hero-ratio-card small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .hero-ratio-card strong {
    font-size: 1.95rem;
    line-height: 1;
  }

  .hero-ratio-card em {
    font-size: 0.66rem;
    line-height: 1.15;
    white-space: normal;
  }

  .hero-submetrics {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .summary-chart svg {
    min-height: 170px;
  }

  .sales-daily-chart svg {
    min-height: 200px;
  }

  .chart-summary,
  .platform-row > div:first-child {
    display: grid;
    justify-items: start;
  }

  .chart-summary-grid {
    grid-template-columns: 1fr;
  }

  .chart-summary-grid small {
    grid-column: auto;
  }

  .planne-result-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .planne-result-metrics article {
    border-radius: 16px;
    padding: 14px;
  }

  .planne-result-metrics strong {
    font-size: 1.45rem;
  }

  .metrics-visual-panel {
    border-radius: 18px;
    padding: 16px;
  }

  .metrics-visual-grid {
    grid-template-columns: 1fr;
  }

  .goal-ring span {
    font-size: 2.55rem;
  }

  .goal-ring small {
    font-size: 0.8rem;
  }

  .metric-grid,
  .secondary-metrics,
  .monthly-goal-panel,
  .content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

  .monthly-goal-panel {
    width: 100%;
    max-width: 100%;
    grid-template-areas:
      "intro"
      "goal-form"
      "goal-progress"
      "planne-copy"
      "planne-form"
      "planne-progress";
    padding: 16px;
    overflow: hidden;
  }

  .goal-copy h2 {
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
    line-height: 1.12;
  }

  .goal-copy p:last-child {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .goal-form {
    align-content: start;
  }

  .planne-copy,
  .planne-contingency {
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .goal-progress-card {
    grid-column: auto;
    border-radius: 16px;
    padding: 14px;
  }

  .goal-progress-top {
    display: grid;
    gap: 8px;
  }

  .goal-progress-top strong {
    text-align: left;
  }

  .goal-summary-grid {
    grid-template-columns: 1fr;
  }

  .goal-summary-grid strong {
    white-space: normal;
  }

  .goal-summary-grid div,
  .goal-progress-card,
  .planne-summary-card {
    width: 100%;
    max-width: 100%;
  }

  .metric-card {
    gap: 10px;
    min-height: 112px;
    padding: 16px;
  }

  .metric-card span {
    font-size: 0.82rem;
  }

  .metric-card strong {
    font-size: clamp(1.45rem, 8vw, 1.7rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .metric-card small {
    line-height: 1.35;
  }

  .panel-header {
    display: block;
    margin-bottom: 18px;
  }

  .panel-header h2 {
    font-size: 1.35rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .panel-header .pill {
    margin-top: 10px;
  }

  .panel-large {
    grid-column: auto;
  }

  #funil {
    grid-column: auto;
  }

  .funnel {
    gap: 10px;
    overflow: visible;
    background: transparent;
  }

  .funnel-step {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    min-height: auto;
    border-radius: 18px;
    clip-path: none;
    padding: 14px;
  }

  .funnel-step span,
  .funnel-step small {
    min-width: 0;
  }

  .funnel-step strong {
    grid-row: span 2;
    font-size: 1.5rem;
    text-align: right;
  }

  .funnel-step::after {
    display: none;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    padding: 12px;
  }

  td,
  td:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    max-width: none;
    border-bottom: 1px solid rgba(18, 51, 39, 0.08);
    padding: 10px 0;
    text-align: right;
    white-space: normal;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    flex: 0 0 92px;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
  }

  td:first-child {
    display: block;
    text-align: left;
  }

  td:first-child::before {
    display: block;
    margin-bottom: 8px;
  }

  .campaign-name strong {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .campaign-title {
    display: grid;
    justify-items: start;
  }

  .creative-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .creative-card {
    grid-template-columns: 86px minmax(0, 1fr);
    border-radius: 16px;
  }

  .creative-media,
  .creative-media img {
    min-height: 100%;
    height: 100%;
  }

  .creative-body {
    grid-template-columns: 1fr;
    padding: 14px;
    min-width: 0;
  }

  .creative-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creative-id-box div {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .creative-id-box strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .copy-id-button,
  .creative-link,
  .creative-link-unavailable {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

}

@media (max-width: 430px) {
  .dashboard,
  .sidebar {
    padding: 8px;
  }

  h1 {
    font-size: clamp(1.7rem, 10vw, 2.18rem);
  }

  .lead {
    font-size: 0.84rem;
    line-height: 1.42;
    overflow-wrap: anywhere;
  }

  .hero-panel,
  .panel,
  .metric-card,
  .filter-panel,
  .source-health-panel,
  .coupon-panel,
  .monthly-goal-panel {
    border-radius: 16px;
    padding: 12px;
  }

  .coupon-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .coupon-panel > * {
    width: 100%;
    min-width: 0;
    max-width: calc(100vw - 40px);
  }

  .coupon-heading h2,
  .coupon-heading p {
    max-width: calc(100vw - 40px);
    white-space: normal;
  }

  .platform-tabs {
    gap: 4px;
    padding: 4px;
  }

  .platform-tab {
    padding: 9px 5px;
    font-size: 0.76rem;
  }

  .period-stepper {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    padding: 4px;
  }

  .period-stepper-button {
    width: 32px;
    height: 32px;
  }

  .period-stepper-display {
    gap: 7px;
  }

  .period-stepper-display strong {
    font-size: 0.82rem;
  }

  .source-health-header span {
    overflow-wrap: anywhere;
  }

  .hero-panel h2 {
    font-size: clamp(1.04rem, 5.7vw, 1.26rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    word-break: break-word;
  }

  .hero-panel p:last-child {
    font-size: 0.74rem;
    line-height: 1.42;
    word-break: break-word;
  }

  .goal-ring {
    width: 132px;
  }

  .sales-daily-chart svg {
    min-height: 180px;
  }

  .chart-summary-grid {
    grid-template-columns: 1fr;
  }

  .chart-summary-grid small {
    grid-column: auto;
  }

  .hero-ratio-card {
    width: 100%;
  }

  .hero-ratio-card strong {
    font-size: 1.7rem;
  }

  .hero-ratio-card span,
  .hero-ratio-card small {
    font-size: 0.64rem;
  }

  .hero-ratio-card em {
    font-size: 0.62rem;
    padding: 6px 8px;
  }

  .goal-ring span {
    font-size: 2.1rem;
  }

  .goal-copy h2,
  .panel-header h2 {
    font-size: 1.22rem;
    letter-spacing: -0.02em;
  }

  .metric-card strong,
  .goal-progress-top strong {
    font-size: 1.34rem;
  }

  .metric-card {
    min-height: 104px;
  }

  .goal-summary-grid strong {
    font-size: 0.95rem;
  }

  .funnel-step {
    grid-template-columns: 1fr;
  }

  .funnel-step strong {
    grid-row: auto;
    text-align: left;
    white-space: normal;
  }

  td,
  td:first-child {
    display: grid;
    grid-template-columns: 1fr;
    text-align: left;
  }

  td::before {
    flex-basis: auto;
  }

  .creative-body {
    padding: 12px;
  }

  .creative-metrics {
    grid-template-columns: 1fr;
  }

  .coupon-row {
    grid-template-columns: 1fr;
  }

  .origin-chart-heading,
  .origin-bar-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .origin-bar-label {
    gap: 3px;
  }

  .origin-bar-label span {
    text-align: left;
  }

  .origin-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .origin-identity,
  .origin-row .coupon-metric,
  .origin-row .coupon-metric:first-of-type {
    grid-column: 2;
  }

  .coupon-identity,
  .coupon-usage {
    grid-column: auto;
  }

  .copy-id-button,
  .creative-link,
  .creative-link-unavailable {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .creative-id-box {
    padding: 9px;
  }

  .creative-metrics div {
    padding: 9px;
  }
}

@media (max-width: 760px) {
  .sales-panel .coupon-heading,
  .sales-panel .coupon-heading > div,
  .sales-panel .coupon-heading h2,
  .sales-panel .coupon-heading p {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sales-panel .coupon-heading h2 {
    font-size: 1.18rem;
    line-height: 1.18;
  }

  .sales-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-kpi-grid article {
    min-height: 98px;
  }

  .sales-ranking-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-ranking-heading label,
  .sales-filter-clear {
    width: 100%;
  }

  .sales-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .sales-table,
  .sales-table tbody {
    display: block;
    min-width: 0;
  }

  .sales-table thead {
    display: none;
  }

  .sales-table .sales-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 10px;
  }

  .sales-table .sales-row td {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 0;
    border-radius: 10px;
    background: var(--surface);
    padding: 9px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .sales-table .sales-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-table .sales-row td:first-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    background: transparent;
    padding: 0;
  }

  .sales-table .sales-row td:first-child::before {
    display: none;
  }

  .sales-detail-row,
  .sales-detail-row td {
    display: block;
    width: 100%;
  }

  .sales-detail-row td {
    margin: -5px 0 12px;
    border: 1px solid rgba(34, 126, 114, 0.16);
    border-radius: 14px;
  }

  .sales-utm-details > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sales-utm-chip {
    width: 100%;
    border-radius: 11px;
  }
}

@media (max-width: 430px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-kpi-grid article {
    min-height: 92px;
    padding: 11px;
  }

  .sales-kpi-grid strong {
    font-size: 1.12rem;
  }

  .sales-table .sales-row {
    grid-template-columns: 1fr;
  }

  .sales-table .sales-row td:first-child {
    grid-column: auto;
  }

  .sales-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-pagination span {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    background: #fff;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar,
  .top-actions,
  .filter-body {
    display: none !important;
  }

  .dashboard {
    padding: 0;
    width: 281mm;
    max-width: 281mm;
    margin: 0 auto;
  }

  .topbar,
  .filter-panel,
  .source-health-panel,
  .hero-panel,
  .metric-grid,
  .monthly-goal-panel,
  .coupon-panel,
  .content-grid {
    max-width: none;
  }

  .topbar {
    display: block;
    margin-bottom: 8px;
  }

  h1 {
    font-size: 1.85rem;
    line-height: 1;
  }

  .lead {
    max-width: none;
    margin-top: 6px;
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .filter-panel {
    margin-bottom: 8px;
    padding: 8px 12px;
    box-shadow: none;
  }

  .filter-panel strong {
    font-size: 1rem;
  }

  .filter-panel span {
    font-size: 0.7rem;
  }

  .source-health-panel {
    gap: 6px;
    margin-bottom: 8px;
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: none;
  }

  .source-health-header {
    align-items: center;
  }

  .source-health-header span,
  .source-health-item span {
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .source-health-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .source-health-item {
    border-radius: 10px;
    padding: 6px 7px;
  }

  .source-health-item strong {
    font-size: 0.6rem;
  }

  .hero-panel,
  .metric-card,
  .panel {
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 8px;
    border-radius: 18px;
    padding: 14px 16px;
  }

  .hero-panel h2 {
    max-width: none;
    font-size: 1.55rem;
  }

  .hero-panel p:last-child {
    margin-top: 8px;
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .goal-ring {
    width: 104px;
    gap: 5px;
  }

  .hero-metrics {
    gap: 8px;
  }

  .hero-ratio-card {
    width: 104px;
    border-radius: 14px;
    padding: 9px;
  }

  .hero-ratio-card span,
  .hero-ratio-card small {
    font-size: 0.5rem;
    line-height: 1.15;
  }

  .hero-ratio-card strong {
    font-size: 1rem;
  }

  .goal-ring span {
    font-size: 1.75rem;
  }

  .goal-ring small {
    font-size: 0.62rem;
  }

  .metric-grid,
  .secondary-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 6px;
  }

  .monthly-goal-panel {
    grid-template-columns: 1.05fr 0.95fr 1fr;
    grid-template-areas:
      "intro intro intro"
      "goal-form goal-progress goal-progress"
      "planne-copy planne-form planne-progress";
    gap: 6px;
    margin-bottom: 6px;
    border-radius: 14px;
    padding: 9px 10px;
    box-shadow: none;
  }

  .coupon-toolbar,
  .coupon-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .coupon-toolbar {
    grid-template-columns: 1fr 140px;
  }

  .coupon-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
    break-inside: avoid;
  }

  .origin-row {
    grid-template-columns: 24px minmax(130px, 1.3fr) repeat(4, minmax(80px, 0.8fr));
    gap: 5px;
    padding: 7px;
    break-inside: avoid;
  }

  .origin-rank {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 0.56rem;
  }

  .origin-chart-card {
    gap: 8px;
    border-radius: 12px;
    padding: 9px;
    break-inside: avoid;
  }

  .origin-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
  }

  .origin-bar-label strong,
  .origin-bar-label span {
    font-size: 0.56rem;
  }

  .coupon-identity {
    grid-column: span 2;
  }

  .coupon-kpi-grid article,
  .coupon-identity,
  .origin-identity,
  .coupon-metric,
  .coupon-usage {
    min-height: auto;
    border-radius: 9px;
    padding: 7px;
  }

  .monthly-panel-heading {
    align-items: center;
    gap: 10px;
  }

  .monthly-reference-control {
    flex-basis: 145px;
    gap: 2px;
    font-size: 0.52rem;
  }

  .monthly-reference-control select {
    min-height: 28px;
    border-radius: 8px;
    font-size: 0.58rem;
    padding: 4px 22px 4px 6px;
  }

  .goal-progress-card,
  .planne-summary-card {
    grid-column: auto;
  }

  .goal-copy {
    gap: 4px;
  }

  .goal-copy h2 {
    font-size: 0.95rem;
  }

  .goal-copy p:last-child,
  .goal-form label {
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .goal-form {
    gap: 5px;
  }

  .planne-copy,
  .planne-form {
    padding-top: 6px;
  }

  .goal-form input {
    min-height: 28px;
    border-radius: 9px;
    font-size: 0.62rem;
    padding: 5px 7px;
  }

  .goal-form .primary-button {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.58rem;
  }

  .goal-progress-card {
    gap: 6px;
    border-radius: 10px;
    padding: 7px;
  }

  .goal-progress-top strong {
    font-size: 1.05rem;
  }

  .goal-progress-top span,
  .goal-summary-grid span {
    font-size: 0.52rem;
  }

  .goal-progress-track {
    height: 7px;
  }

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

  .goal-summary-grid div {
    border-radius: 8px;
    padding: 5px;
  }

  .goal-summary-grid strong {
    font-size: 0.62rem;
    white-space: normal;
  }

  .metric-card,
  .panel {
    border-radius: 14px;
    padding: 9px 10px;
  }

  .metric-card {
    gap: 4px;
    min-height: 58px;
  }

  .metric-card span {
    font-size: 0.62rem;
  }

  .metric-card strong {
    font-size: 1rem;
    line-height: 1.05;
  }

  .metric-card small {
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .panel-large {
    grid-column: 1 / -1;
  }

  #funil {
    grid-column: 1 / -1;
  }

  .panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .panel-header h2 {
    margin-top: 2px;
    font-size: 1rem;
  }

  .section-kicker {
    font-size: 0.56rem;
  }

  .pill {
    padding: 5px 8px;
    font-size: 0.56rem;
  }

  .funnel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .funnel-step {
    min-height: 72px;
    border-radius: 12px;
    padding: 8px;
  }

  .funnel-step::after {
    display: none;
  }

  .funnel-step span {
    font-size: 0.55rem;
  }

  .funnel-step strong {
    font-size: 1.05rem;
  }

  .funnel-step small {
    font-size: 0.54rem;
    line-height: 1.15;
  }

  table {
    min-width: 0;
    font-size: 0.6rem;
    table-layout: fixed;
  }

  th,
  td {
    padding: 5px 4px;
    line-height: 1.2;
  }

  th:first-child,
  td:first-child {
    width: 42%;
    max-width: none;
  }

  .campaign-name {
    gap: 2px;
  }

  .campaign-name small {
    font-size: 0.52rem;
    line-height: 1.15;
  }

  .creative-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .creative-card {
    border-radius: 12px;
    box-shadow: none;
  }

  .creative-media,
  .creative-media img {
    min-height: 76px;
    height: 76px;
  }

  .creative-body {
    gap: 5px;
    padding: 8px;
  }

  .creative-body > span {
    font-size: 0.5rem;
  }

  .creative-body h3 {
    font-size: 0.66rem;
  }

  .creative-id-box {
    gap: 3px;
    border-radius: 8px;
    padding: 5px;
  }

  .creative-id-box > span,
  .copy-id-button {
    font-size: 0.48rem;
  }

  .creative-id-box strong {
    font-size: 0.58rem;
  }

  .creative-id-box small {
    font-size: 0.5rem;
    line-height: 1.15;
  }

  .copy-id-button {
    display: none;
  }

  .creative-metrics {
    gap: 4px;
  }

  .creative-metrics div {
    border-radius: 8px;
    padding: 5px;
  }

  .creative-metrics dt {
    font-size: 0.48rem;
  }

  .creative-metrics dd {
    font-size: 0.62rem;
  }

  .creative-link,
  .creative-link-unavailable {
    display: none;
  }

  .sales-ranking-card,
  .sales-table-wrap,
  .sales-table .sales-row {
    break-inside: avoid;
  }

  .sales-table-wrap {
    overflow: visible;
  }

  .sales-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 0.47rem;
  }

  .sales-table th,
  .sales-table td {
    padding: 4px 3px;
  }

  .sales-table th:first-child,
  .sales-table td:first-child {
    width: 24px;
  }

  .sales-expand,
  .sales-pagination,
  .sales-toolbar,
  .sales-filter-clear {
    display: none;
  }

  .sales-detail-row {
    display: none;
  }

}
