:root {
  --ink: #0d0d0d;
  --ink-soft: #1f1f1f;
  --gray-20: #f2f2f2;
  --gray-30: #dddddd;
  --gray-40: #c6c6c6;
  --gray-50: #b1b1b1;
  --gray-60: #999999;
  --gray-70: #686868;
  --line: #d2d2d2;
  --surface: #ffffff;
  --accent: #444444;
  --success: #4e4e4e;
  --alert: #2a2a2a;
  --shadow: 0 14px 28px rgba(16, 16, 16, 0.1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Arial", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8f8f8 0%, #ececec 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: -1;
}

.dashboard-shell {
  width: min(1280px, 94vw);
  margin: 0 auto;
  padding: 1.4rem 0 1rem;
}

.hero {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-height: 74px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  background: #fff;
  border-radius: 8px;
}

.logo {
  width: 220px;
  max-width: 72vw;
  display: block;
  height: auto;
}

.hero-status {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: #111;
  font-size: 0.78rem;
}

.hero-status strong,
.hero-status span {
  background: #fff;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
}

.client-logout {
  margin-top: 0.75rem;
  border: 1px solid #666;
  border-radius: 8px;
  padding: 0.52rem 0.8rem;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: #cdcdcd;
}

h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 700;
}

h1 span {
  color: #f2f2f2;
}

.subtitle {
  margin: 0;
  max-width: 78ch;
  color: #dddddd;
}

.control-bar {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.control-item {
  min-width: 180px;
}

label {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
  color: #4a4a4a;
}

.segmented {
  display: inline-flex;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: #f7f7f7;
  padding: 0.2rem;
  border-radius: 999px;
}

.segment {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 0.86rem;
  cursor: pointer;
  color: #363636;
  font: inherit;
}

.segment.active {
  background: var(--ink);
  color: #fff;
}

select {
  min-width: 130px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  font: inherit;
}

.scope-summary {
  margin: 0.8rem 0 0;
  color: #555;
  font-size: 0.92rem;
}

.cards-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.78rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.section-title {
  margin: 1.25rem 0 0.5rem;
}

.section-title h2 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.18rem;
}

.section-title p:last-child {
  margin: 0;
  color: #666;
  font-size: 0.88rem;
}

.annual-highlight,
.monthly-highlight {
  margin-top: 1rem;
  padding: 1.05rem;
  background: #111;
  color: #fff;
  border: 1px solid #252525;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.monthly-highlight {
  background: #222;
}

.highlight-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.highlight-heading h2 {
  margin: 0.12rem 0 0.25rem;
  font-size: 1.25rem;
}

.highlight-caption {
  margin: 0;
  color: #c9c9c9;
  font-size: 0.86rem;
}

.annual-highlight .eyebrow,
.monthly-highlight .eyebrow {
  color: #a7a7a7;
}

.data-freshness {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  border: 1px solid #555;
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  color: #d8d8d8;
  font-size: 0.76rem;
  white-space: nowrap;
}

.freshness-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.annual-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1rem;
}

.annual-total {
  padding: 0.75rem;
  background: #fff;
  color: #111;
  border-radius: 10px;
}

.annual-total span,
.annual-total small {
  display: block;
  color: #666;
  font-size: 0.78rem;
}

.annual-total strong {
  display: block;
  margin: 0.22rem 0;
  font-size: 1.45rem;
}

.annual-chart-wrap,
.breakdown-chart {
  margin-top: 0.85rem;
  padding: 0.7rem;
  background: #fff;
  border-radius: 10px;
  color: #111;
}

.chart-label-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: #555;
  font-size: 0.78rem;
}

.legend-line {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin: 0 0.25rem 0.2rem 0.55rem;
  background: #111;
}

.legend-line.plan { background: #a7a7a7; }

.monthly-heading {
  align-items: center;
}

.month-picker {
  min-width: 170px;
  color: #d0d0d0;
}

.month-picker select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border-color: #555;
  background: #111;
  color: #fff;
}

.monthly-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.monthly-stat {
  padding: 0.65rem;
  background: #333;
  border-radius: 9px;
}

.monthly-stat span,
.monthly-stat strong {
  display: block;
}

.monthly-stat span {
  color: #b9b9b9;
  font-size: 0.75rem;
}

.monthly-stat strong {
  margin-top: 0.25rem;
  font-size: 1.08rem;
}

.monthly-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.metric-sparkline {
  width: 100%;
  height: 46px;
  margin-top: 0.45rem;
  border: none;
  background: transparent;
}

.metric-card {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem;
  box-shadow: var(--shadow);
  min-height: 125px;
}

.source-metric .metric-value {
  letter-spacing: -0.03em;
}

.metric-title {
  margin: 0;
  color: #5a5a5a;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.metric-value {
  margin: 0.42rem 0;
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.2;
}

.metric-sub {
  margin: 0;
  color: #6a6a6a;
  font-size: 0.86rem;
}

.kpi-progress {
  height: 7px;
  border-radius: 999px;
  margin-top: 0.55rem;
  background: var(--gray-30);
  overflow: hidden;
}

.kpi-progress > span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.kpi-trend {
  margin-top: 0.48rem;
  font-size: 0.82rem;
}

.kpi-trend.positive { color: var(--success); }
.kpi-trend.negative { color: var(--alert); }

.panels {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.78rem;
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.95rem;
  box-shadow: var(--shadow);
}

.panel-large {
  grid-row: span 1;
}

.panel h2 {
  margin: 0.15rem 0 0.65rem;
  font-size: 1.04rem;
}

.source-panel {
  margin-top: 0.82rem;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: #777;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  color: #444;
  font-size: 0.78rem;
  white-space: nowrap;
}

.source-note {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f1f1f1;
  border-left: 4px solid var(--ink);
  color: #4d4d4d;
  font-size: 0.85rem;
}

.total-row td {
  border-top: 2px solid #222;
  font-weight: 700;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #f1f1f1;
  border-radius: 10px;
  background: #fcfcfc;
}

.panel-caption {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #666;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 760px;
}

thead th {
  text-align: left;
  text-transform: uppercase;
  color: #575757;
  font-size: 0.72rem;
  padding: 0.55rem;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid #ededed;
}

tbody tr:hover {
  background: #f5f5f5;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

#mixLegend {
  display: grid;
  gap: 0.38rem;
}

#mixLegend .legend-item {
  display: flex;
  justify-content: space-between;
  min-width: 150px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0.46rem 0.55rem;
  background: #fafafa;
}

#mixLegend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.mini-card {
  border: 1px solid #ececec;
  background: #fafafa;
  border-radius: 10px;
  padding: 0.7rem;
}

.mini-visual {
  background: #fff;
}

.mini-title {
  margin: 0;
  font-size: 0.82rem;
  color: #555;
  text-transform: uppercase;
}

.mini-value {
  margin: 0.5rem 0 0;
  font-size: 1.2rem;
}

.mini-meta {
  margin: 0.3rem 0 0;
  color: #666;
  font-size: 0.82rem;
}

#budgetSpark {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.56rem;
}

.spark-row {
  display: grid;
  grid-template-columns: 84px 1fr 68px;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.spark-bar {
  height: 10px;
  border-radius: 99px;
  background: #d8d8d8;
  overflow: hidden;
}

.spark-bar > span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.analysis-list {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.5rem;
}

.analysis-list li {
  border: 1px dashed var(--line);
  background: #fbfbfb;
  border-radius: 10px;
  padding: 0.62rem;
}

.tag {
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  display: inline-block;
  margin-bottom: 0.22rem;
}

.tag.success { background: #383838; }
.tag.alert { background: #1f1f1f; }
.tag.info { background: #666666; }

.creative-scoreboard {
  display: grid;
  gap: 0.7rem;
}

.creative-item {
  margin-top: 0.42rem;
}

.creative-item .bar-track {
  margin-top: 0.28rem;
  height: 11px;
  background: #e5e5e5;
  border-radius: 20px;
  overflow: hidden;
}

.creative-item .bar-track > span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.creative-item .label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.preview-note {
  width: min(1280px, 94vw);
  margin: 0.8rem auto 1.6rem;
  border: 1px solid var(--line);
  background: #f1f1f1;
  color: #404040;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.89rem;
}

@media (max-width: 1024px) {
  .metric-card {
    grid-column: span 6;
  }

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

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

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

@media (max-width: 620px) {
  .control-item {
    min-width: 100%;
  }

  .metric-card {
    grid-column: span 12;
  }

  .annual-summary-grid,
  .monthly-summary {
    grid-template-columns: 1fr 1fr;
  }

  .highlight-heading {
    display: block;
  }

  .data-freshness,
  .month-picker {
    display: inline-flex;
    margin-top: 0.8rem;
  }

  .month-picker {
    display: block;
  }

  .logo {
    width: 180px;
  }

  .section-heading {
    display: block;
  }

  .source-badge {
    display: inline-block;
    margin-top: 0.65rem;
  }
}

.master-shell {
  width: min(1320px, 94vw);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.master-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 14px;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}

.master-header .brand-lockup {
  margin: 0;
}

.master-header-copy h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.master-header-copy p:last-child {
  max-width: 75ch;
  margin: 0;
  color: #d0d0d0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.master-badge {
  border: 1px solid #666;
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  color: #eee;
  font-size: 0.75rem;
  white-space: nowrap;
}

.master-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.master-stat,
.master-panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow);
}

.master-stat {
  padding: 0.85rem;
}

.master-stat span,
.master-stat small {
  display: block;
  color: #666;
  font-size: 0.78rem;
}

.master-stat strong {
  display: block;
  margin: 0.25rem 0;
  font-size: 1.45rem;
}

.master-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.master-panel {
  padding: 0.95rem;
}

.master-panel h2 {
  margin: 0.1rem 0 0.7rem;
  font-size: 1.05rem;
}

.master-panel p {
  color: #666;
  font-size: 0.84rem;
}

.master-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.master-table th,
.master-table td {
  padding: 0.58rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top;
}

.master-table th {
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.master-status {
  display: inline-block;
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.master-status.ok { background: #dedede; color: #222; }
.master-status.alert { background: #222; color: #fff; }

.master-actions {
  display: grid;
  gap: 0.62rem;
  margin: 0;
}

.master-action {
  padding: 0.7rem;
  border-left: 4px solid #222;
  background: #f3f3f3;
  color: #444;
  font-size: 0.82rem;
}

.master-config {
  display: grid;
  gap: 0.72rem;
}

.master-config label {
  margin: 0;
  color: #444;
  font-weight: 700;
}

.master-config select,
.master-config input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 7px;
  color: #111;
  background: #fff;
  font: inherit;
}

.master-save {
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.load-metadata {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
  padding: 1rem;
  border-radius: 22px;
  background: #e5e5e7;
  color: #111111;
}

.load-metadata label {
  margin: 0;
  color: #5a5a5a;
}

.load-metadata input,
.load-metadata select,
.load-metadata textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  background: #fff;
  color: #111;
  padding: 0.62rem;
  font: inherit;
}

.load-metadata textarea {
  resize: vertical;
}

.metadata-wide {
  grid-column: span 2;
}

.master-queue-panel {
  margin-top: 0.75rem;
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.table-action {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-action.secondary {
  border: 1px solid #111111;
  background: transparent;
  color: #111111;
}

.table-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.master-feedback {
  min-height: 1.2rem;
  padding-top: 0.4rem;
  color: #444;
  font-size: 0.8rem;
}

@media (max-width: 1024px) {
  .master-grid { grid-template-columns: repeat(2, 1fr); }
  .master-layout { grid-template-columns: 1fr; }
  .load-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .master-header { grid-template-columns: 1fr; }
  .master-grid { grid-template-columns: 1fr 1fr; }
  .master-table { min-width: 680px; }
  .master-panel { overflow-x: auto; }
  .load-metadata { grid-template-columns: 1fr; }
  .metadata-wide { grid-column: span 1; }
}

/* Atelie editorial layer */
:root {
  --ink: #0a0a0a;
  --ink-soft: #141414;
  --gray-20: #ededed;
  --gray-30: #d4d4d6;
  --gray-40: #c9c9c9;
  --gray-50: #b8b8b8;
  --gray-60: #9e9e9e;
  --gray-70: #5a5a5a;
  --line: #d4d4d6;
  --surface: #e5e5e7;
  --success: #8fbf8f;
  --alert: #e5c97e;
  --shadow: none;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #ffffff;
  background:
    radial-gradient(ellipse at 88% -8%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(ellipse at 4% 76%, rgba(255, 255, 255, 0.10), transparent 28%),
    #0a0a0a;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  z-index: -1;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(255,255,255,0.5) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 12px);
  mix-blend-mode: screen;
}

.bg-grid {
  background:
    linear-gradient(120deg, transparent 0 46%, rgba(255,255,255,0.045) 46% 47%, transparent 47% 100%),
    linear-gradient(300deg, transparent 0 52%, rgba(255,255,255,0.035) 52% 53%, transparent 53% 100%);
}

.dashboard-shell {
  width: min(1440px, 94vw);
  padding: 1.1rem 0 1rem;
}

.hero {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 42%),
    #0f0f0f;
  padding: clamp(1.1rem, 2.2vw, 2rem);
}

.brand-lockup {
  background: transparent;
  min-height: auto;
  padding: 0;
  border-radius: 0;
}

.logo {
  width: 210px;
  content: url("assets/positivo-wordmark-white.png");
}

.client-logout {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  margin: 0;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.kicker,
.eyebrow,
label,
.metric-title,
.mini-title,
thead th {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 300;
}

.kicker {
  margin-top: 1.2rem;
  color: #b8b8b8;
}

h1 {
  max-width: 760px;
  margin: 0.35rem 0 0.55rem;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  max-width: 820px;
  color: #b8b8b8;
  font-weight: 300;
  font-size: 1.02rem;
}

.subtitle strong {
  color: #fff;
  font-weight: 700;
}

.hero-status strong,
.hero-status span {
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  color: #fff;
}

.tab-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin: 0.75rem 0 0;
  padding: 0.35rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: rgba(229,229,231,0.08);
}

.tab-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0.56rem 0.82rem;
  background: transparent;
  color: #c9c9c9;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tab-button.active {
  background: #ffffff;
  color: #111111;
}

.control-bar {
  margin-top: 0.75rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: rgba(10,10,10,0.72);
  color: #fff;
}

.filters {
  align-items: flex-end;
}

label {
  color: #b8b8b8;
  font-size: 0.72rem;
}

.segmented {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

.segment,
select {
  color: #e5e5e7;
}

.segment.active,
select {
  background: #e5e5e7;
  color: #111111;
}

select {
  border: 0;
  border-radius: 999px;
}

.scope-summary,
.section-title p:last-child,
.panel-caption {
  color: #b8b8b8;
}

.executive-highlight {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) 1fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.executive-copy {
  min-height: 100%;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 22px;
  padding: clamp(1rem, 2vw, 1.4rem);
  background: #111111;
}

.executive-copy h2 {
  margin: 0.1rem 0 1rem;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.executive-copy p:last-child {
  color: #b8b8b8;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 300;
}

.executive-copy strong {
  color: #ffffff;
}

.executive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.executive-card,
.panel,
.metric-card,
.annual-total,
.annual-chart-wrap,
.breakdown-chart,
.mini-card {
  background: #e5e5e7;
  color: #111111;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
}

.executive-card {
  min-height: 188px;
  padding: 1rem;
}

.executive-card > span {
  display: block;
  min-height: 2.2rem;
  color: #5a5a5a;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.executive-card > strong {
  display: block;
  margin: 0.45rem 0 0.25rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  font-weight: 900;
}

.executive-card small {
  display: block;
  color: #5a5a5a;
}

.exec-progress {
  height: 10px;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: #c9c9c9;
}

.exec-progress i {
  display: block;
  height: 100%;
  background: #111111;
}

.brand-lift-list,
.share-legend {
  display: grid;
  gap: 0.48rem;
  margin-top: 0.75rem;
}

.brand-lift-item,
.share-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-top: 1px solid #c9c9c9;
  padding-top: 0.48rem;
  color: #5a5a5a;
  font-size: 0.86rem;
}

.brand-lift-item strong,
.share-legend strong {
  color: #111111;
}

.share-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.share-legend span {
  flex: 1;
}

.executive-charts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
}

.executive-card.wide {
  min-height: 310px;
}

.chart-label-row select {
  min-width: auto;
  padding: 0.34rem 0.55rem;
  background: #111111;
  color: #fff;
}

.annual-highlight,
.monthly-highlight {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 22px;
  background: #111111;
}

.panel h2,
.section-title h2,
.highlight-heading h2 {
  letter-spacing: 0;
  text-transform: uppercase;
}

tbody tr:hover {
  background: transparent;
}

tbody td:nth-child(n+2),
thead th:nth-child(n+2) {
  text-align: right;
}

canvas {
  border: 0;
  border-radius: 14px;
  background: #e5e5e7;
}

.preview-note {
  border-color: rgba(255,255,255,0.16);
  background: transparent;
  color: #b8b8b8;
}

.access-gate {
  background:
    radial-gradient(ellipse at 85% 12%, rgba(255,255,255,0.18), transparent 32%),
    #0a0a0a;
}

.access-card {
  background: #e5e5e7;
  color: #111111;
  border-radius: 24px;
  box-shadow: none;
}

.access-form button {
  border-radius: 999px;
  background: #111111;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .executive-highlight,
  .executive-charts {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .hero {
    min-height: 0;
  }

  .client-logout {
    position: static;
    margin-top: 1rem;
  }

  .tab-nav {
    border-radius: 18px;
  }

  .executive-grid,
  .annual-summary-grid,
  .monthly-summary {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.45rem;
  }
}

/* UX/UI refinement layer */
.dashboard-shell {
  width: min(1500px, calc(100vw - 72px));
  padding: 0.85rem 0 1.25rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(360px, 0.7fr);
  grid-template-areas:
    "brand meta"
    "title copy"
    "status logout";
  align-items: start;
  column-gap: clamp(2rem, 5vw, 5.5rem);
  row-gap: 0.55rem;
  min-height: 0;
  padding: clamp(1.15rem, 1.7vw, 1.7rem);
  border-radius: 16px;
}

.brand-lockup {
  grid-area: brand;
  margin-bottom: 0.7rem;
}

.logo {
  width: clamp(150px, 12vw, 190px);
}

.kicker {
  grid-area: meta;
  justify-self: start;
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

h1 {
  grid-area: title;
  max-width: 920px;
  margin: 0.22rem 0 0.35rem;
  font-size: clamp(2.3rem, 4.55vw, 4rem);
  line-height: 0.98;
}

.subtitle {
  grid-area: copy;
  max-width: 820px;
  margin-top: 0;
  padding-top: 0.1rem;
  font-size: clamp(0.92rem, 1vw, 1rem);
  line-height: 1.38;
}

.hero-status {
  grid-area: status;
  margin-top: 0.75rem;
  gap: 0.45rem;
}

.hero-status strong,
.hero-status span {
  padding: 0.34rem 0.58rem;
  font-size: 0.7rem;
}

.client-logout {
  grid-area: logout;
  position: static;
  align-self: end;
  justify-self: end;
  padding: 0.38rem 0.68rem;
}

.tab-nav {
  margin-top: 0.6rem;
  padding: 0.28rem;
  border-radius: 14px;
  gap: 0.2rem;
}

.tab-button {
  padding: 0.46rem 0.68rem;
  font-size: 0.72rem;
}

.control-bar {
  margin-top: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(120px, 0.6fr) minmax(300px, 1.2fr) minmax(180px, 0.75fr);
  gap: 0.85rem;
}

.control-item {
  min-width: 0;
}

.segmented {
  width: 100%;
}

.segment {
  flex: 1 1 0;
  padding: 0.42rem 0.65rem;
  white-space: nowrap;
}

select {
  width: 100%;
  min-width: 0;
  padding: 0.48rem 0.7rem;
}

.scope-summary {
  margin-top: 0.7rem;
  font-size: 0.88rem;
}

.executive-highlight {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.executive-copy,
.executive-card,
.panel,
.metric-card,
.annual-total,
.annual-chart-wrap,
.breakdown-chart,
.mini-card,
.annual-highlight,
.monthly-highlight {
  border-radius: 14px;
}

.executive-copy {
  padding: clamp(1rem, 1.45vw, 1.25rem);
}

.executive-copy h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(2rem, 3.2vw, 3.35rem);
  line-height: 0.98;
}

.executive-copy p:last-child {
  font-size: 0.95rem;
  line-height: 1.42;
}

.executive-grid {
  grid-template-columns: repeat(4, minmax(175px, 1fr));
  gap: 0.65rem;
}

.executive-card {
  min-height: 156px;
  padding: 0.85rem;
  overflow: hidden;
}

.executive-card > span {
  min-height: 1.9rem;
  font-size: 0.66rem;
  line-height: 1.25;
}

.executive-card > strong {
  margin: 0.3rem 0 0.2rem;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 0.92;
}

.executive-card small {
  font-size: 0.82rem;
  line-height: 1.25;
}

.exec-progress {
  margin-top: 0.8rem;
  height: 8px;
}

.executive-card canvas {
  width: 100%;
  max-height: 76px;
  margin-top: 0.3rem;
}

.brand-lift-list,
.share-legend {
  gap: 0.34rem;
  margin-top: 0.55rem;
}

.brand-lift-item,
.share-legend div {
  padding-top: 0.34rem;
  font-size: 0.8rem;
  line-height: 1.15;
}

.executive-charts {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 0.75rem;
}

.executive-card.wide {
  min-height: 238px;
}

.executive-card.wide canvas,
#execShareChart {
  max-height: 190px;
}

.chart-label-row {
  gap: 0.65rem;
  align-items: center;
}

.chart-label-row select {
  width: auto;
  max-width: 170px;
  font-size: 0.78rem;
}

@media (max-width: 1180px) {
  .dashboard-shell {
    width: min(100% - 36px, 1240px);
  }

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

  .executive-highlight,
  .executive-charts {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "meta"
      "title"
      "copy"
      "status"
      "logout";
  }

  .subtitle {
    max-width: 760px;
  }

  .client-logout {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .dashboard-shell {
    width: min(100% - 24px, 720px);
  }

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

  .client-logout {
    justify-self: start;
    margin-top: 0.8rem;
  }

  .filters,
  .executive-grid {
    grid-template-columns: 1fr;
  }

  .tab-nav {
    border-radius: 12px;
  }
}

@media (max-width: 620px) {
  .dashboard-shell {
    width: min(100% - 20px, 560px);
    padding-top: 0.55rem;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 2.85rem);
  }

  .hero,
  .control-bar,
  .executive-copy,
  .executive-card {
    border-radius: 12px;
  }

  .tab-button {
    font-size: 0.68rem;
  }
}

.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: linear-gradient(140deg, #111 0%, #2d2d2d 58%, #f0f0f0 58%, #f0f0f0 100%);
}

.access-card {
  width: min(450px, 100%);
  padding: 1.5rem;
  border-radius: 16px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.access-brand {
  display: inline-flex;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  margin-bottom: 1.15rem;
}

.access-brand img {
  width: 178px;
  display: block;
}

.access-card h1 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.85rem;
}

.access-card > p:not(.eyebrow) {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.access-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.access-form input {
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  color: #111;
  font: inherit;
}

.access-form button,
.primary-action {
  border: 0;
  border-radius: 8px;
  padding: 0.78rem 1rem;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.access-error {
  min-height: 1.1rem;
  margin: 0.2rem 0 0;
  color: #222;
  font-size: 0.82rem;
}

.access-hint {
  display: grid;
  gap: 0.15rem;
  margin-top: 1.1rem;
  padding: 0.7rem;
  border-left: 3px solid #111;
  background: #f3f3f3;
  color: #555;
  font-size: 0.8rem;
}

.access-credit {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  align-self: end;
  color: #555;
  font-size: 0.75rem;
}

.access-credit img {
  width: 96px;
  height: auto;
  display: block;
}

.analyst-shell {
  width: min(1320px, 94vw);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.analyst-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}

.analyst-header .brand-lockup {
  margin: 0;
}

.analyst-header-copy h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.analyst-header-copy p:last-child {
  max-width: 70ch;
  margin: 0;
  color: #d0d0d0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.logout-button {
  border: 1px solid #666;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.analyst-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.8rem 1rem;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #fff;
}

.analyst-notice > div:last-child {
  display: grid;
  gap: 0.15rem;
}

.analyst-notice span {
  color: #666;
  font-size: 0.82rem;
}

.notice-mark {
  display: grid;
  place-items: center;
  min-width: 52px;
  min-height: 40px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.upload-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.upload-toolbar h2 {
  margin: 0.12rem 0 0.25rem;
}

.upload-toolbar p:last-child {
  max-width: 75ch;
  margin: 0;
  color: #666;
  font-size: 0.86rem;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.upload-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 0.9rem;
  border: 1px solid #d3d3d3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.upload-card.online-card { border-top: 4px solid #222; }
.upload-card.offline-card { border-top: 4px solid #888; }
.upload-card.support-card { border-top: 4px solid #c2c2c2; }

.upload-card-title {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-height: 54px;
}

.upload-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.upload-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.upload-card-title p {
  margin: 0.18rem 0 0;
  color: #707070;
  font-size: 0.76rem;
}

.upload-card > label {
  margin-top: 0.75rem;
  color: #3f3f3f;
  font-weight: 700;
}

.upload-card input[type="file"] {
  width: 100%;
  margin: 0.3rem 0 0.55rem;
  padding: 0.45rem;
  border: 1px dashed #aaa;
  border-radius: 7px;
  background: #fafafa;
  font: inherit;
  font-size: 0.76rem;
}

.upload-card input[type="file"][aria-invalid="true"] {
  border-color: #222;
  background: #ededed;
}

.upload-card details {
  margin-top: 0.25rem;
  color: #555;
  font-size: 0.77rem;
  line-height: 1.42;
}

.upload-card summary {
  cursor: pointer;
  color: #222;
  font-weight: 700;
}

.upload-card details p {
  margin: 0.45rem 0 0.25rem;
}

.upload-card details small {
  color: #777;
}

.file-status {
  margin: auto 0 0;
  padding-top: 0.65rem;
  color: #888;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.file-status.has-file {
  color: #111;
  font-weight: 700;
}

.file-status.invalid-file {
  color: #222;
  font-weight: 700;
}

.upload-feedback {
  min-height: 1.3rem;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.84rem;
}

.upload-feedback.success { background: #dedede; color: #111; }
.upload-feedback.error { background: #ededed; color: #333; }

.analyst-checklist {
  margin-top: 0.9rem;
  padding: 1rem;
  border-radius: 12px;
  background: #111;
  color: #fff;
}

.credit-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: min(1280px, 94vw);
  margin: 1rem auto 1.5rem;
  padding: 0.65rem;
  border: 1px solid #d2d2d2;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 0.8rem;
}

.credit-footer img {
  width: 104px;
  height: auto;
  display: block;
}

.analyst-checklist h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.audience-analysis-section {
  align-items: stretch;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  color: #666;
  font-size: 0.72rem;
  white-space: nowrap;
}

.audience-table .selected-row {
  background: #f0f0f0;
}

.audience-insight {
  margin-top: 1rem;
  padding: 0.8rem;
  border-left: 3px solid #111;
  background: #f4f4f4;
  color: #444;
  font-size: 0.82rem;
  line-height: 1.45;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.checklist-grid span {
  padding: 0.6rem;
  border: 1px solid #555;
  border-radius: 8px;
  color: #d2d2d2;
  font-size: 0.78rem;
}

@media (max-width: 1024px) {
  .upload-grid { grid-template-columns: repeat(2, 1fr); }
  .checklist-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .analyst-header { grid-template-columns: 1fr; }
  .upload-toolbar { display: grid; align-items: start; }
  .upload-grid { grid-template-columns: 1fr; }
  .checklist-grid { grid-template-columns: 1fr; }
  .analyst-notice { align-items: flex-start; }
}
