:root {
  --primary: #00c2ff;
  --primary-soft: rgba(0, 194, 255, 0.12);
  --canvas: #e2e2e2;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --ink: #2d251f;
  --muted: #746a61;
  --soft-text: #9c9c9c;
  --error: #ba1a1a;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 30px rgba(45, 37, 31, 0.05);
  --shadow-header: 0 10px 24px rgba(45, 37, 31, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  padding: 0 12px 18px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

.page {
  width: min(1780px, calc(100vw - 24px));
  max-width: 100%;
  margin: 0 auto;
}

.shell {
  display: grid;
  gap: 22px;
  padding-top: 108px;
}

#instagramContent,
#publicInstagramContent,
#youtubeContent,
#tiktokContent,
#twitchContent,
#overviewContent {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  min-height: 78px;
  padding: 14px 22px;
  background: #ffffff;
  box-shadow: var(--shadow-header);
}

.nav,
.nav-main,
.nav-modes,
.channel-switcher,
.table-pagination,
.inline-actions,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-main {
  align-items: center;
  justify-content: center;
  width: min(1780px, 100%);
  padding-right: 0;
}

.nav-title,
h1,
h2,
h3,
th {
  font-family: "Public Sans", sans-serif;
}

.nav-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-right: 12px;
}

.nav-modes {
  display: none;
}

.nav-pill,
.channel-chip,
.pager-button,
.ghost-link,
.ghost-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: #008fbd;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.nav-pill:hover,
.channel-chip:hover,
.pager-button:hover,
.ghost-link:hover,
.ghost-button:hover,
.primary-link:hover {
  transform: translateY(-1px);
}

.nav-pill.is-active,
.channel-chip.is-active,
.pager-button.is-active,
.ghost-button.is-active-toggle,
.primary-link {
  background: var(--primary);
  color: #ffffff;
}

.ghost-link,
.ghost-button {
  background: rgba(255, 255, 255, 0.9);
  color: #008fbd;
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.06);
}

.nav-modes .ghost-link {
  min-height: 40px;
  padding: 10px 14px;
}

.primary-link:active,
.ghost-button:active,
.nav-pill:active,
.channel-chip:active,
.pager-button:active {
  transform: scale(0.98);
}

.eyebrow,
.stat-label,
.entries-control span,
.brand-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.hero-panel,
.platform-hero,
.data-surface,
.surface,
.channel-summary-card,
.metric-tile,
.platform-entry,
.overview-surface,
.empty-state,
.error-banner,
.rail-card {
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-panel,
.platform-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 30px 34px;
}

.hero-panel h1,
.platform-hero h1,
.channel-switch-surface h2,
.table-head h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy,
.platform-hero-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.hero-copy p:last-child,
.platform-hero-copy p,
.platform-entry p,
.note,
.subcopy,
.empty-state p,
.chart-labels,
.table-toolbar-copy span,
.note-stack,
.rail-card p {
  color: var(--muted);
}

.hero-meta .chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.06);
}

.platform-entry-grid,
.summary-grid,
.channel-summary-grid,
.top-metrics-grid,
.section-grid,
.rail-grid,
.action-row {
  display: grid;
  gap: 18px;
}

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

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.platform-entry {
  display: grid;
  gap: 12px;
  padding: 24px;
  cursor: pointer;
}

.platform-entry:hover {
  transform: translateY(-1px);
}

.platform-panel,
.overview-surface {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.platform-panel > *,
.overview-surface > *,
.shell > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.is-hidden {
  display: none;
}

.channel-summary-grid,
.top-metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.channel-summary-card,
.metric-tile {
  padding: 20px 22px;
}

.channel-summary-card.is-active {
  background: #f4fcff;
}

.channel-summary-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.channel-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0, 194, 255, 0.12);
  color: #008fbd;
  font-weight: 800;
}

.channel-summary-name {
  display: block;
  margin-top: 2px;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.channel-summary-stats.stacked {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}

.channel-summary-stats.stacked span {
  display: block;
}

.channel-summary-stats.stacked strong {
  display: inline;
  margin-right: 8px;
  font-size: 0.98rem;
  color: var(--ink);
}

.channel-switch-surface,
.data-surface,
.surface,
.overview-surface {
  padding: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.data-surface {
  overflow: hidden;
}

.platform-hero,
.hero-panel,
.platform-hero-copy,
.hero-copy,
.table-head,
.table-scroll {
  min-width: 0;
}

.channel-switch-surface {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.channel-switch-copy {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.channel-switcher {
  flex: 1 1 420px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.channel-switcher .subcopy {
  width: 100%;
  text-align: right;
}

.public-ig-toolbar,
.public-ig-filter-row,
.public-ig-toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.public-ig-toolbar {
  align-items: flex-start;
}

.public-ig-toolbar-copy {
  display: grid;
  gap: 6px;
  min-width: 280px;
  flex: 1 1 420px;
}

.public-ig-toolbar-copy h2,
.public-ig-toolbar-copy p {
  margin: 0;
}

.public-ig-toolbar-actions {
  justify-content: flex-end;
  align-items: center;
}

.public-ig-filter-row {
  align-items: flex-end;
  margin-top: 18px;
}

.public-ig-filter-field {
  display: grid;
  gap: 8px;
  min-width: 170px;
}

.public-ig-filter-field input {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 37, 31, 0.12);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.public-ig-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.public-ig-selected-grid {
  margin-bottom: 12px;
}

.public-ig-selected-copy {
  margin: 0 0 8px;
}

.public-ig-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-ig-content-cell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.public-ig-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(0, 194, 255, 0.12);
}

.public-ig-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #008fbd;
  font-weight: 800;
}

.public-ig-inline-link {
  min-height: 36px;
  padding: 8px 12px;
}

.public-ig-inline-error {
  padding: 14px 16px;
}

.auth-action-surface {
  align-items: flex-start;
}

.auth-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}

.table-head h2 {
  font-size: 1.7rem;
}

.entries-control {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.entries-select-wrap {
  position: relative;
  display: inline-flex;
  width: 72px;
  min-width: 72px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(45, 37, 31, 0.08),
    0 8px 18px rgba(45, 37, 31, 0.04);
}

.entries-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(45, 37, 31, 0.42);
  border-bottom: 2px solid rgba(45, 37, 31, 0.42);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.entries-control select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 36px 10px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.entries-control select:focus {
  outline: none;
}

.entries-select-wrap:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(0, 194, 255, 0.3),
    0 10px 24px rgba(0, 194, 255, 0.12);
}

.table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  padding-bottom: 4px;
}

table {
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0 14px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

th.col-media,
td.col-media {
  width: 500px;
  min-width: 310px;
  max-width: 500px;
}

th.col-tags,
td.col-tags {
  width: 200px;
  min-width: 200px;
}

th.col-tags.is-expanded,
td.col-tags.is-expanded {
  width: 400px;
  min-width: 400px;
  max-width: 400px;
}

th.col-type,
td.col-type {
  min-width: 92px;
}

th.col-week,
td.col-week {
  min-width: 110px;
}

th.col-range,
td.col-range {
  min-width: 220px;
}

td.col-details {
  text-align: left;
}

th.col-actions,
td.col-actions {
  min-width: 168px;
  width: 168px;
}

.table-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.table-filter-row {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.table-filter-chip {
  min-height: 40px;
}

.table-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 14px;
  max-height: 64px;
  overflow: hidden;
}

.table-selected-tags.is-inline {
  margin: 0;
  max-height: none;
  overflow: visible;
  order: 2;
}

.text-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #008fbd;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-link-button:hover {
  text-decoration: underline;
}

.tag-cell {
  display: inline-flex;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 84px;
  overflow: hidden;
}

.tag-cell.is-expanded {
  max-height: 92px;
}

.tag-cell .inline-tag-chip,
.table-selected-tags .inline-tag-chip {
  max-width: 154px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-cell.is-expanded .inline-tag-chip {
  max-width: 220px;
}

.tag-pill-button,
.tag-plus-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #008fbd;
  font-weight: 800;
  cursor: pointer;
}

.tag-pill-button {
  gap: 6px;
  min-width: 0;
  padding: 0;
}

.tag-plus-button {
  min-width: 40px;
  padding: 0 12px;
  background: rgba(0, 194, 255, 0.02);
  color: #00749a;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 143, 189, 0.16);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.tag-plus-button:hover,
.tag-plus-button:focus-visible {
  background: rgba(0, 194, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(0, 143, 189, 0.34),
    0 0 0 4px rgba(0, 194, 255, 0.08);
  transform: translateY(-1px) scale(1.04);
}

.tag-plus-button:active {
  transform: scale(0.96);
}

.tag-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #008fbd;
  font-weight: 800;
  cursor: pointer;
}

th .th-label-wrap {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 24px;
}

th .th-label-text {
  display: inline-block;
  line-height: 1.25;
  white-space: normal;
}

th .mini-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #8d857f;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    color 140ms ease;
}

th .mini-toggle:hover {
  color: #2d251f;
}

th .mini-toggle.sort-toggle.is-active {
  color: #2d251f;
}

td {
  background: var(--surface);
}

tbody tr:nth-child(even) td {
  background: #e2e2e2;
}

tbody tr td:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

tbody tr td:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

tbody tr.is-incomplete-week td,
tbody tr.is-incomplete-week .metric-pill,
tbody tr.is-incomplete-week .subcopy {
  color: var(--soft-text);
}

.video-cell {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  max-width: 500px;
}

.video-thumb {
  width: 108px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0, 194, 255, 0.1);
  flex: 0 0 auto;
}

.video-thumb-fallback {
  display: inline-block;
}

.video-meta {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.video-title {
  display: -webkit-box;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-date {
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-pill {
  display: inline;
  padding: 0;
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}

.metric-pill.is-pending {
  color: var(--soft-text);
}

.metric-pill.is-none {
  color: var(--muted);
}

.metric-pill.is-approx {
  color: #298750;
}

.metric-pill.is-gap {
  color: #b26a00;
}

.metric-pill.is-manual {
  color: #7a4bb7;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions {
  justify-content: flex-end;
}

.table-load-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft-text);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.table-load-all-button {
  min-height: 34px;
  padding: 8px 12px;
}

.row-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.08);
  color: #008fbd;
  font-weight: 700;
  cursor: pointer;
}

.row-action-button-manual {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(0, 143, 189, 0.16);
}

.content-range-surface {
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.channel-switch-surface.is-compact {
  padding: 22px;
}

.row-action-button.is-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.row-action-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.row-action-empty {
  color: var(--soft-text);
}

.manual-input-wrap {
  display: block;
}

.manual-input {
  width: 100%;
  min-width: 92px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.1);
  color: var(--ink);
  font-weight: 700;
}

.manual-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0, 194, 255, 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-pagination {
  justify-content: center;
  padding-top: 14px;
}

.pager-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.simple-chart {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.06);
}

.simple-chart::after {
  content: "ANALYTICS";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: rgba(0, 194, 255, 0.08);
  pointer-events: none;
}

.simple-chart svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.spotlight-card {
  display: grid;
  gap: 16px;
}

.spotlight-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.top-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-tile {
  padding: 20px 22px;
}

.metric-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  color: var(--muted);
}

.metric-row strong {
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
}

.metric-subrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.metric-subrow strong {
  color: var(--ink);
  font-size: 1rem;
}

.metric-note {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.section-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.action-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
  align-items: center;
}

.auth-surface {
  display: grid;
  gap: 14px;
}

.auth-surface-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.auth-surface-copy {
  display: grid;
  gap: 6px;
}

.auth-surface-copy .subcopy {
  margin: 0;
}

.rail-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.rail-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.muted-card {
  opacity: 0.86;
}

.detail-chart {
  height: 190px;
}

.detail-chart-twitch {
  height: 280px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(45, 37, 31, 0.22);
  backdrop-filter: blur(6px);
}

.modal-window {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  max-height: min(86vh, 940px);
  overflow: auto;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(45, 37, 31, 0.18);
}

.modal-window-wide {
  width: min(1240px, calc(100vw - 48px));
}

.modal-window-small {
  width: min(620px, calc(100vw - 48px));
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  min-height: 24px;
}

.modal-head.is-compact {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  justify-content: flex-end;
  min-height: 0;
  margin: 0;
}

.modal-head h2 {
  margin: 8px 0 0;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.modal-subcopy {
  margin-top: 8px;
  color: var(--muted);
}

.modal-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #008fbd;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.modal-summary-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: #f7f7f7;
}

.modal-summary-list {
  display: grid;
  gap: 12px;
}

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

.modal-summary-row span {
  color: var(--muted);
}

.modal-summary-row strong {
  font-family: "Public Sans", sans-serif;
  font-size: 1.02rem;
  text-align: right;
}

.modal-summary-combo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-delta {
  font-family: "Manrope", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.detail-delta.is-up {
  color: #298750;
}

.detail-delta.is-down {
  color: #ba1a1a;
}

.detail-delta.is-flat,
.detail-delta.is-none {
  color: var(--muted);
}

.modal-series-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--series-color);
  flex: 0 0 auto;
}

.modal-chart-grid {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.content-detail-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.content-detail-chart-grid.is-four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-detail-chart-grid.is-three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-chart-card {
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: #f7f7f7;
}

.modal-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-chart-head strong {
  display: block;
  font-family: "Public Sans", sans-serif;
  font-size: 1.02rem;
}

.modal-chart-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.modal-chart-legend {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-chart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.modal-chart-scale {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.modal-echart {
  height: 360px;
  padding-top: 16px;
  box-sizing: border-box;
  margin-top: 6px;
  border-radius: 14px;
  overflow: hidden;
  background: #fbfbfb;
}

.modal-echart-split {
  height: 312px;
}

.modal-chart-card.is-breakdown-card {
  min-height: 470px;
}

.modal-echart-breakdown {
  height: 430px;
}

.modal-table-scroll {
  margin-top: 18px;
}

.reporting-shell,
.report-builder-grid {
  display: grid;
  gap: 18px;
}

.reporting-spaced {
  gap: 24px;
}

.report-builder-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.report-field {
  display: grid;
  gap: 8px;
}

.report-field span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.report-field input,
.report-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.08);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
}

.report-field input:focus,
.report-field select:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 194, 255, 0.34),
    0 10px 22px rgba(0, 194, 255, 0.12);
}

.report-field select[multiple] {
  min-height: 156px;
  padding: 12px 14px;
}

.report-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.report-template-grid,
.report-comparison-grid,
.report-split-grid,
.tag-manager-grid {
  display: grid;
  gap: 18px;
}

.report-template-grid,
.report-comparison-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.report-split-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.report-section-card {
  gap: 16px;
}

.tag-manager-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.tag-selector-box {
  display: grid;
  gap: 12px;
}

.tag-choice-list,
.tag-new-list {
  display: grid;
  gap: 10px;
}

.report-tag-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.tag-choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 0;
}

.ui-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ui-check-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(45, 37, 31, 0.2);
  flex: 0 0 auto;
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
  position: relative;
}

.ui-check-box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  background: transparent;
  transition: background-color 150ms ease;
}

.tag-choice-row:hover .ui-check-box {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1.5px rgba(0, 143, 189, 0.34);
}

.ui-check:checked + .ui-check-box {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(0, 143, 189, 0.36);
}

.ui-check:checked + .ui-check-box::after {
  background: #00a7e0;
}

.ui-check-box.is-soft-tile {
  border-radius: 7px;
}

.ui-check-box.is-pill-check {
  width: 26px;
  border-radius: 999px;
}

.ui-check-box.is-pill-check::after {
  inset: 5px 9px;
  border-radius: 999px;
}

.ui-check-box.is-minimal-outline {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(45, 37, 31, 0.22);
}

.ui-check-box.is-minimal-outline::after {
  inset: 3px;
}

.ui-check-box.is-glass-dot {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}

.ui-check-box.is-glass-dot::after {
  inset: 4px;
  border-radius: 999px;
}

.ui-check-box.is-solid-fill {
  border-radius: 6px;
  background: rgba(0, 143, 189, 0.08);
}

.ui-check:checked + .ui-check-box.is-solid-fill {
  background: #00a7e0;
  box-shadow:
    inset 0 0 0 1px rgba(0, 143, 189, 0.34),
    0 0 0 4px rgba(0, 194, 255, 0.08);
}

.ui-check:checked + .ui-check-box.is-solid-fill::after {
  background: #ffffff;
}

.ui-check-box.is-split-capsule {
  width: 28px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(0, 194, 255, 0.12) 0 50%, rgba(45, 37, 31, 0.04) 50% 100%);
}

.ui-check-box.is-split-capsule::after {
  inset: 4px 10px;
  border-radius: 999px;
}

.tag-choice-row.is-muted {
  opacity: 0.42;
}

.tag-choice-label {
  display: inline-flex;
  align-items: center;
}

.tag-choice-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #008fbd;
}

.tag-new-field {
  margin: 0;
}

.tag-new-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) minmax(120px, 0.9fr);
}

.tag-choice-group {
  display: grid;
  gap: 10px;
  align-content: start;
}

.tag-choice-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag-manager-groups,
.tag-manager-list,
.tag-manager-form {
  display: grid;
  gap: 14px;
}

.tag-manager-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(140px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.tag-manager-select,
.tag-manager-order {
  min-height: 40px;
}

.tag-manager-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.08);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  min-width: 148px;
}

.tag-manager-select:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 194, 255, 0.34),
    0 10px 22px rgba(0, 194, 255, 0.12);
}

.platform-toggle-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.platform-toggle-button {
  min-height: 42px;
  padding: 10px 16px;
}

.tag-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-color-picker.is-compact {
  gap: 6px;
}

.tag-color-swatch {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.14);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.tag-color-swatch:hover,
.tag-color-swatch:focus-visible {
  transform: scale(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(45, 37, 31, 0.22),
    0 0 0 4px rgba(0, 194, 255, 0.08);
}

.tag-color-swatch.is-active {
  box-shadow:
    inset 0 0 0 2px rgba(45, 37, 31, 0.34),
    0 0 0 4px rgba(0, 194, 255, 0.12);
}

.tag-color-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tag-color-popover-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.tag-color-popover-current {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(45, 37, 31, 0.18);
}

.tag-color-popover-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 10;
  width: 190px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  display: none;
  box-shadow:
    0 18px 48px rgba(45, 37, 31, 0.14),
    inset 0 0 0 1px rgba(45, 37, 31, 0.06);
}

.tag-color-popover.is-open .tag-color-popover-panel {
  display: block;
}

.report-channel-shell {
  min-height: 148px;
  transition: min-height 180ms ease;
}

.report-channel-groups {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-channel-group {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fbfbfb;
  transition: opacity 160ms ease, filter 160ms ease;
  align-content: start;
}

.report-channel-group.is-disabled {
  opacity: 0.5;
  filter: saturate(0.75);
}

.report-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: flex;
  align-items: center;
}

.report-select-tags {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.tag-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.report-list {
  display: grid;
  gap: 14px;
}

.report-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #f7f7f7;
}

.template-card {
  background: linear-gradient(180deg, #fbfbfb 0%, #f4f9fb 100%);
}

.inner-surface {
  background: #f7f7f7;
  box-shadow: none;
}

.compact-head {
  margin-bottom: 16px;
}

.subtle-loading-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 194, 255, 0.08);
  color: #007ca3;
  font-size: 0.94rem;
  font-weight: 700;
}

.subtle-loading-copy {
  min-width: 0;
}

.subtle-loading-spinner {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0, 124, 163, 0.24);
  border-top-color: #007ca3;
  animation: subtleSpinner 0.7s linear infinite;
}

.empty-state-loading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.deferred-placeholder-stack {
  display: grid;
  gap: 22px;
}

.deferred-placeholder-grid {
  width: 100%;
}

.deferred-placeholder-card {
  min-height: 132px;
}

.deferred-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(45, 37, 31, 0.06) 0%, rgba(45, 37, 31, 0.12) 50%, rgba(45, 37, 31, 0.06) 100%);
  background-size: 220% 100%;
  animation: deferredShimmer 1.2s linear infinite;
}

.deferred-line + .deferred-line {
  margin-top: 12px;
}

.deferred-line-title {
  width: 58%;
  height: 18px;
}

.deferred-line-medium {
  width: 82%;
}

.deferred-line-short {
  width: 46%;
}

.deferred-line-label {
  width: 42%;
}

.deferred-line-value {
  width: 68%;
  height: 18px;
}

@keyframes subtleSpinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes deferredShimmer {
  to {
    background-position: -220% 0;
  }
}

.report-card p,
.report-card-meta {
  margin: 0;
  color: var(--muted);
}

.report-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #008fbd;
  font-weight: 700;
}

.inline-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--tag-color) 100%, black 0%);
  border-radius: 999px;
  background: var(--tag-color-soft);
  color: color-mix(in srgb, var(--tag-color) 58%, black 42%);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.inline-tag-chip.is-overflow-chip {
  border-color: rgba(45, 37, 31, 0.12);
  background: rgba(45, 37, 31, 0.06);
  color: var(--muted);
}

.content-detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.content-preview-card,
.content-meta-card {
  min-height: 100%;
}

.content-meta-card .modal-summary-list {
  gap: 12px;
}

.content-meta-card-hero {
  display: grid;
  gap: 14px;
  align-content: start;
}

.content-meta-header {
  display: grid;
  gap: 6px;
}

.modal-summary-list-compact .modal-summary-row strong {
  text-align: right;
}

.content-preview-card.is-plain {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.content-preview-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
}

.content-preview-card.is-portrait .content-preview-frame {
  min-height: 520px;
  max-height: 620px;
}

.content-preview-card.is-crop-strong .content-preview-frame {
  min-height: 380px;
}

.content-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-preview-card.is-crop-strong .content-preview-image {
  object-fit: cover;
  object-position: center 36%;
  transform: scale(1.56);
}

.content-preview-card.is-portrait .content-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-admin-table th,
.tag-admin-table td {
  vertical-align: middle;
}

.tag-admin-table td {
  background: transparent;
}

.tag-admin-table .tag-manager-select {
  width: 100%;
  min-width: 132px;
}

.tag-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-table-scroll {
  overflow-x: auto;
}

.tag-manager-table-card {
  margin-top: 18px;
}

.collapsible-surface {
  padding-top: 18px;
}

.collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.collapse-toggle h2 {
  margin: 0;
}

.collapse-toggle-icon {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.collapse-body {
  margin-top: 18px;
}

.overview-workspace .report-tag-grid {
  margin-top: 24px;
}

.overview-workspace .tag-choice-group {
  align-content: start;
}

.content-preview-fallback {
  color: var(--muted);
  font-weight: 700;
}

.content-detail-title {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.content-detail-subtitle,
.content-detail-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.content-detail-kicker {
  margin-top: 4px;
}

.content-detail-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.detail-tag-list {
  align-items: flex-start;
  margin-top: 4px;
}

.content-stat-list {
  margin-top: 2px;
}

.detail-chat-grid {
  margin-top: 16px;
}

.detail-chat-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-chat-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-chat-item-compact {
  gap: 4px;
}

.detail-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-chat-meta strong {
  font-family: "Public Sans", sans-serif;
  font-size: 0.95rem;
}

.detail-chat-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.detail-chat-text {
  margin: 0;
  color: #2d251f;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-chat-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-extra-chart-toggle-row {
  margin-top: 18px;
}

.detail-extra-charts {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 220ms ease,
    opacity 220ms ease;
}

.detail-extra-charts.is-expanded {
  max-height: 2400px;
  opacity: 1;
  margin-top: 16px;
}

.content-detail-chart-grid.is-three-up {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-detail-chart-grid.is-four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.report-channel-groups {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.report-channel-group {
  display: grid;
  gap: 10px;
}

.report-section-card .report-builder-grid + .tag-selector-box {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .content-detail-hero-grid,
  .tag-new-grid,
  .tag-manager-row {
    grid-template-columns: 1fr;
  }

  .content-detail-chart-grid.is-four-up {
    grid-template-columns: 1fr;
  }

  .report-tag-grid,
  .report-channel-groups {
    grid-template-columns: 1fr;
  }
}

.modal-summary-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 194, 255, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes subtleLoadSweep {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(110%);
  }
  100% {
    transform: translateX(110%);
  }
}

.compact-empty {
  padding: 18px;
}

.compact-empty p {
  margin: 0;
}

.tag-editor-form {
  display: grid;
  gap: 16px;
}

.note-stack {
  display: grid;
  gap: 12px;
}

.empty-state,
.error-banner {
  padding: 24px;
}

.empty-state {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.error-banner {
  color: var(--error);
}

.panel-head {
  display: none !important;
}

.admin-shell,
.admin-surface {
  gap: 18px;
}

.admin-head {
  align-items: start;
}

.admin-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-grid {
  grid-template-columns: 1.15fr 1fr;
}

.admin-issue-list,
.admin-inline-issues {
  display: grid;
  gap: 10px;
}

.admin-inline-issues {
  margin-top: 16px;
}

.admin-issue {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafafa;
}

.admin-issue-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-audit-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-audit-table th,
.admin-audit-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.admin-audit-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-metric-cell,
.admin-source,
.admin-reason {
  display: grid;
  gap: 4px;
}

.admin-source,
.admin-reason {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-view-mode="marketing"] .platform-panel,
body[data-view-mode="marketing"] .platform-entry-grid,
body[data-view-mode="marketing"] .nav[aria-label="Plattformnavigation"],
body[data-view-mode="presentation"] .panel-actions,
body[data-view-mode="presentation"] .nav[aria-label="Plattformnavigation"] {
  display: none !important;
}

body[data-view-mode="presentation"] .nav-modes {
  display: none !important;
}

@media (max-width: 1280px) {
  .platform-entry-grid,
  .channel-summary-grid,
  .top-metrics-grid,
  .modal-summary-grid,
  .section-grid,
  .rail-grid {
    grid-template-columns: 1fr;
  }

  .nav-main {
    padding-right: 0;
  }

  .topbar {
    min-height: 104px;
    flex-direction: column;
    align-items: stretch;
  }

  .shell {
    padding-top: 130px;
  }
}

@media (max-width: 900px) {
  body {
    padding: 0 12px 12px;
  }

  .hero-panel,
  .platform-hero,
  .channel-switch-surface,
  .table-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .channel-switcher {
    width: 100%;
    justify-content: flex-start;
  }

  .channel-switcher .subcopy {
    text-align: left;
  }

  .nav-main {
    justify-content: flex-start;
  }

  .public-ig-grid {
    grid-template-columns: 1fr;
  }

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

  .public-ig-toolbar-actions,
  .public-ig-filter-row {
    width: 100%;
    justify-content: flex-start;
  }

  .public-ig-filter-field {
    min-width: min(100%, 220px);
  }

  .modal-chart-head {
    flex-direction: column;
  }

  .modal-chart-legend {
    justify-content: flex-start;
  }
}

/* SPONTRANET operational skin */
:root {
  --primary: #111111;
  --primary-soft: #f0f0ef;
  --canvas: #efefed;
  --surface: #ffffff;
  --surface-alt: #f6f6f4;
  --ink: #111111;
  --muted: #5f5f5a;
  --soft-text: #8a8a84;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(17, 17, 17, 0.16);
  --focus-ring: rgba(17, 17, 17, 0.12);
  --success: #1f6a3d;
  --warning: #8c6416;
  --error: #a12a2a;
  --radius-xl: 8px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-pill: 999px;
  --shadow-soft: none;
  --shadow-header: none;
}

body {
  background: var(--canvas);
  color: var(--ink);
  padding: 0 16px 16px;
}

.page {
  width: min(1880px, calc(100vw - 32px));
}

.shell {
  gap: 16px;
  padding-top: 92px;
}

#instagramContent,
#publicInstagramContent,
#youtubeContent,
#tiktokContent,
#twitchContent,
#overviewContent,
.platform-panel,
.overview-surface {
  gap: 16px;
}

.topbar {
  min-height: 68px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.nav-main {
  justify-content: flex-start;
  gap: 8px;
}

.nav-title {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-pill,
.channel-chip,
.pager-button,
.ghost-link,
.ghost-button,
.primary-link,
.row-action-button,
.public-ig-inline-link,
.table-filter-chip,
.platform-toggle-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-pill:hover,
.channel-chip:hover,
.pager-button:hover,
.ghost-link:hover,
.ghost-button:hover,
.primary-link:hover,
.row-action-button:hover,
.table-filter-chip:hover {
  transform: none;
  background: var(--surface-alt);
  border-color: var(--line-strong);
}

.nav-pill.is-active,
.channel-chip.is-active,
.pager-button.is-active,
.ghost-button.is-active-toggle,
.primary-link,
.row-action-button.is-primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.primary-link[disabled],
.ghost-button[disabled],
.nav-pill[disabled],
.channel-chip[disabled],
.pager-button[disabled],
.row-action-button[disabled] {
  background: var(--surface-alt);
  color: var(--soft-text);
  border-color: rgba(17, 17, 17, 0.08);
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-modes .ghost-link {
  min-height: 36px;
  padding: 8px 10px;
}

.hero-panel,
.platform-hero,
.data-surface,
.surface,
.channel-summary-card,
.metric-tile,
.platform-entry,
.overview-surface,
.empty-state,
.error-banner,
.rail-card,
.channel-switch-surface,
.modal-window,
.modal-summary-card,
.modal-chart-card,
.report-card,
.report-section-card,
.report-channel-group,
.inner-surface,
.tag-manager-table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.hero-panel,
.platform-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 22px 24px;
}

.hero-panel h1,
.platform-hero h1,
.channel-switch-surface h2,
.table-head h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-copy,
.platform-hero-copy,
.channel-switch-copy,
.public-ig-toolbar-copy {
  gap: 10px;
}

.hero-copy p,
.platform-hero-copy p,
.platform-entry p,
.subcopy,
.note,
.empty-state p,
.public-ig-toolbar-copy p,
.report-card p,
.report-card-meta,
.rail-card p {
  color: var(--muted);
}

.hero-meta .chip {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.78rem;
}

.platform-entry-grid,
.summary-grid,
.channel-summary-grid,
.top-metrics-grid,
.section-grid,
.rail-grid,
.action-row,
.report-template-grid,
.report-comparison-grid,
.report-split-grid,
.report-tag-grid,
.tag-manager-grid {
  gap: 14px;
}

.platform-entry {
  padding: 18px;
}

.platform-entry:hover {
  transform: none;
  border-color: var(--line-strong);
}

.channel-summary-card,
.metric-tile,
.channel-switch-surface,
.data-surface,
.surface,
.overview-surface {
  padding: 18px;
}

.channel-summary-card.is-active,
.report-channel-group,
.public-ig-thumb,
.channel-avatar,
.video-thumb,
.content-preview-frame {
  background: var(--surface-alt);
}

.channel-avatar,
.public-ig-thumb-fallback {
  color: var(--ink);
  border-radius: 8px;
}

.channel-summary-name {
  font-size: 0.98rem;
}

.eyebrow,
.stat-label,
.entries-control span,
.brand-kicker,
.report-field span,
.tag-choice-group-title,
th {
  color: var(--muted);
  letter-spacing: 0.08em;
}

.public-ig-filter-field input,
.report-field input,
.report-field select,
.manual-input,
.tag-manager-select,
.entries-select-wrap,
.entries-control select {
  border-radius: 6px;
}

.public-ig-filter-field input,
.report-field input,
.report-field select,
.manual-input,
.tag-manager-select {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.public-ig-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.public-ig-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) max-content max-content;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.public-ig-filter-row .ghost-button,
.public-ig-filter-row .primary-link {
  min-height: 40px;
}

.public-ig-grid {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.public-ig-status-list {
  gap: 10px;
  align-content: start;
}

.public-ig-status-list p {
  margin: 0;
}

.public-ig-status-item {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.public-ig-status-item strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.public-ig-status-item span,
.public-ig-status-note {
  color: var(--muted);
}

.public-ig-filter-field input:focus,
.report-field input:focus,
.report-field select:focus,
.manual-input:focus,
.tag-manager-select:focus,
.entries-select-wrap:focus-within {
  outline: none;
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.entries-select-wrap {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.entries-select-wrap::after {
  border-right-color: rgba(17, 17, 17, 0.45);
  border-bottom-color: rgba(17, 17, 17, 0.45);
}

.table-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.table-scroll,
.tag-table-scroll,
.modal-table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding-bottom: 0;
}

table {
  border-spacing: 0;
}

th,
td {
  padding: 11px 12px;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.69rem;
}

td {
  background: transparent;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

tbody tr:nth-child(even) td {
  background: rgba(17, 17, 17, 0.018);
}

tbody tr td:first-child,
tbody tr td:last-child {
  border-radius: 0;
}

.video-thumb,
.spotlight-card img,
.content-preview-frame,
.modal-echart,
.simple-chart {
  border-radius: 8px;
}

.video-date,
.metric-note,
.metric-subrow,
.chart-labels,
.modal-subcopy,
.modal-summary-row span,
.modal-chart-copy span,
.modal-chart-scale,
.content-detail-subtitle,
.content-detail-kicker,
.content-detail-date,
.admin-source,
.admin-reason {
  color: var(--muted);
}

.metric-pill.is-pending,
.row-action-empty,
.metric-pill.is-none {
  color: var(--soft-text);
}

.metric-pill.is-approx,
.detail-delta.is-up {
  color: var(--success);
}

.metric-pill.is-gap {
  color: #b26a00;
}

.metric-pill.is-manual {
  color: #7a4bb7;
}

.detail-delta.is-down,
.error-banner,
.metric-status-badge.is-error,
.metric-status-badge[data-status="error"] {
  color: var(--error);
}

.row-action-button-manual,
.ghost-link,
.ghost-button,
.public-ig-inline-link {
  background: var(--surface-alt);
  color: var(--ink);
}

.simple-chart {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  box-shadow: none;
}

.simple-chart::after {
  color: rgba(17, 17, 17, 0.05);
}

.metric-row strong {
  font-size: 1.28rem;
}

.metric-subrow strong,
.modal-summary-row strong,
.modal-chart-head strong {
  font-size: 0.96rem;
}

.modal-backdrop {
  background: rgba(15, 15, 15, 0.22);
  backdrop-filter: blur(4px);
}

.modal-window {
  width: min(1100px, calc(100vw - 36px));
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
}

.modal-window-wide {
  width: min(1320px, calc(100vw - 36px));
}

.modal-window-small {
  width: min(680px, calc(100vw - 36px));
}

.modal-head h2 {
  font-size: 1.35rem;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 1.15rem;
}

.modal-summary-card,
.modal-chart-card,
.report-card,
.template-card,
.inner-surface,
.report-channel-group {
  background: var(--surface-alt);
}

.modal-chart-pill,
.tag-plus-button,
.tag-more-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.tag-plus-button:hover,
.tag-plus-button:focus-visible,
.tag-color-swatch:hover,
.tag-color-swatch:focus-visible {
  transform: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.tag-color-popover-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.08);
}

.subtle-loading-banner,
.empty-state,
.error-banner {
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  box-shadow: none;
}

.subtle-loading-banner {
  color: var(--muted);
}

.subtle-loading-spinner {
  border-color: rgba(17, 17, 17, 0.16);
  border-top-color: var(--ink);
}

.error-banner {
  border-color: rgba(161, 42, 42, 0.18);
  background: rgba(161, 42, 42, 0.04);
}

.tag-chip {
  background: var(--tag-color-soft, #f3f3f1);
  color: color-mix(in srgb, var(--tag-color, #444444) 60%, black 40%);
  border: 1px solid color-mix(in srgb, var(--tag-color, #444444) 80%, black 20%);
}

.inline-tag-chip {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: 999px;
  background: var(--tag-color-soft);
  color: color-mix(in srgb, var(--tag-color) 58%, black 42%);
  border: 1px solid color-mix(in srgb, var(--tag-color) 82%, black 18%);
  box-shadow: none;
}

.inline-tag-chip.is-overflow-chip {
  border-color: rgba(17, 17, 17, 0.12);
  background: rgba(17, 17, 17, 0.05);
  color: var(--muted);
}

.empty-state,
.content-preview-fallback {
  color: var(--muted);
}

.ui-check-box {
  border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.26);
}

.tag-choice-row:hover .ui-check-box,
.ui-check:checked + .ui-check-box,
.ui-check-box.is-minimal-outline,
.ui-check-box.is-solid-fill,
.ui-check-box.is-glass-dot,
.ui-check-box.is-split-capsule {
  box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.34);
}

.ui-check:checked + .ui-check-box::after,
.ui-check:checked + .ui-check-box.is-solid-fill::after {
  background: var(--ink);
}

.deferred-line {
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.05) 0%, rgba(17, 17, 17, 0.09) 50%, rgba(17, 17, 17, 0.05) 100%);
}

@media (max-width: 1280px) {
  .shell {
    padding-top: 112px;
  }

  .topbar {
    min-height: 88px;
  }
}

@media (max-width: 900px) {
  body {
    padding: 0 10px 10px;
  }

  .page {
    width: min(100vw - 20px, 1880px);
  }

  .shell {
    gap: 12px;
    padding-top: 118px;
  }

  .hero-panel,
  .platform-hero,
  .channel-switch-surface,
  .table-head {
    gap: 14px;
    padding: 16px;
  }

  .nav-title {
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }

  .public-ig-summary-grid,
  .public-ig-filter-row,
  .public-ig-grid,
  .public-ig-status-item {
    grid-template-columns: 1fr;
  }

  .public-ig-status-item {
    gap: 4px;
  }
}
