:root {
  color-scheme: light;
  --ink: #1e2421;
  --muted: #66716c;
  --line: #d9dfdb;
  --surface: #f7f8f5;
  --panel: #ffffff;
  --sidebar: #eef2ed;
  --control-bg: #ffffff;
  --metric-bg: #fbfcfa;
  --brand-mark-bg: #1e2421;
  --brand-mark-fg: #ffffff;
  --toggle-bg: #ffffff;
  --toggle-active-bg: #1e2421;
  --toggle-active-fg: #ffffff;
  --accent: #9b2f46;
  --accent-2: #2f6f61;
  --warn: #a35f16;
  --bad: #8f3131;
  --tone-green: #2f6f61;
  --tone-blue: #456c97;
  --tone-slate: #59676d;
  --tone-violet: #6a5c91;
  --tone-amber: #9a6b22;
  --tone-rose: #9b2f46;
  --shadow: 0 18px 45px rgba(30, 36, 33, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.theme-dark {
  color-scheme: dark;
  --ink: #f4f1eb;
  --muted: #a5aaa5;
  --line: #303630;
  --surface: #080908;
  --panel: #111411;
  --sidebar: #050605;
  --control-bg: #0b0d0b;
  --metric-bg: #151915;
  --brand-mark-bg: #f4f1eb;
  --brand-mark-fg: #080908;
  --toggle-bg: #111411;
  --toggle-active-bg: #f4f1eb;
  --toggle-active-fg: #080908;
  --accent: #f4f1eb;
  --accent-2: #f4f1eb;
  --warn: #d8d2c5;
  --bad: #f4f1eb;
  --tone-green: #93c8b3;
  --tone-blue: #9ebce3;
  --tone-slate: #b6c0bd;
  --tone-violet: #b9afe0;
  --tone-amber: #e1c072;
  --tone-rose: #dca0ad;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.app {
  display: grid;
  grid-template-columns: minmax(300px, var(--sidebar-width, 380px)) 12px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  background: var(--sidebar);
  padding: 22px;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
}

.sidebar-resizer {
  position: relative;
  z-index: 5;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resizer::before {
  content: "";
  position: absolute;
  inset: 0 3px;
  border-radius: 999px;
  background: transparent;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--line);
}

.sidebar-resizer:hover::before,
.sidebar-resizer:focus-visible::before,
body.resizing .sidebar-resizer::before {
  background: rgba(155, 47, 70, 0.16);
}

.sidebar-resizer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

body.resizing {
  cursor: col-resize;
  user-select: none;
}

.toast {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid color-mix(in srgb, var(--tone-rose) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 94%, var(--tone-rose));
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(30, 36, 33, 0.16);
  padding: 13px 14px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

body.theme-dark .toast {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 13px;
  line-height: 1.2;
}

.toast span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.toast-undo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.toast-undo:hover {
  border-color: var(--tone-green);
  color: var(--tone-green);
}

.sidebar-head {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.sidebar-eyebrow {
  justify-self: center;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.brand {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.sidebar.is-compact .brand {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--brand-mark-bg);
  color: var(--brand-mark-fg);
  font-weight: 760;
  font-size: 14px;
  letter-spacing: 0;
}

.sidebar.is-compact .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 12px;
}

.brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 0.95;
  letter-spacing: 0;
}

.sidebar.is-compact .brand h1 {
  font-size: 21px;
  line-height: 0.98;
}

.brand h1 span {
  display: block;
}

.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-self: start;
  min-width: 116px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--toggle-bg);
  color: var(--muted);
  padding: 3px;
  cursor: pointer;
}

.sidebar.is-compact .theme-toggle {
  grid-column: 1 / -1;
  width: 100%;
}

.theme-toggle span {
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 760;
}

body:not(.theme-dark) .theme-toggle span:first-child,
body.theme-dark .theme-toggle span:last-child {
  background: var(--toggle-active-bg);
  color: var(--toggle-active-fg);
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.sidebar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-action[hidden],
.toast[hidden] {
  display: none;
}

.sidebar-action:hover,
.sidebar-action[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  color: var(--accent);
}

.undo-action {
  color: var(--tone-green);
}

.undo-action:hover {
  border-color: var(--tone-green);
  background: color-mix(in srgb, var(--tone-green) 10%, var(--panel));
  color: var(--tone-green);
}

.controls {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}

.controls label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.controls input,
.controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--ink) 11%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 56%, transparent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  padding: 10px 13px;
}

.controls select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.controls select:hover,
.controls select:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background-color: color-mix(in srgb, var(--panel) 72%, transparent);
  outline: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sidebar.is-compact .stats {
  grid-template-columns: 1fr;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.stat strong {
  display: block;
  font-size: 20px;
}

.stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.sidebar.is-compact .stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
}

.sidebar.is-compact .stat span {
  margin-top: 0;
}

.creator-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 3px;
  min-height: 0;
  overscroll-behavior: contain;
}

.creator-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.creator-item.editable {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.creator-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.delete-creator {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.delete-creator:hover {
  border-color: var(--tone-rose);
  background: color-mix(in srgb, var(--tone-rose) 8%, var(--panel));
  color: var(--tone-rose);
}

.creator-button:hover,
.creator-button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 47, 70, 0.12);
}

.creator-button strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.creator-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-list-meta.has-pipeline {
  color: var(--accent);
}

.pipeline-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
}

.pipeline-dot.ready {
  background: var(--tone-green);
}

.pipeline-dot.sent,
.pipeline-dot.follow {
  background: var(--tone-blue);
}

.pipeline-dot.contact {
  background: var(--tone-amber);
}

.creator-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--metric-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.creator-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-avatar span {
  line-height: 1;
}

.detail {
  padding: 30px;
  overflow: auto;
  height: 100vh;
  min-width: 0;
  overscroll-behavior: contain;
}

.detail-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
  gap: 18px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-identity {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-width: 0;
}

.detail-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--metric-bg);
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.detail-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.detail-avatar span {
  line-height: 1;
}

.detail-channel-link {
  cursor: pointer;
}

.detail-channel-link:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.detail-title {
  min-width: 0;
}

.detail h2 {
  margin: 0;
  font-size: clamp(34px, 3.7vw, 50px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.detail-name-link {
  color: var(--ink);
  text-decoration: none;
}

.detail-name-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  max-width: 760px;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid color-mix(in srgb, var(--tone-slate) 18%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, var(--tone-slate));
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.profile-tag.fit-path {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  color: var(--accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: #dfeee7;
  color: #17604f;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

body.theme-dark .status-pill {
  border: 1px solid color-mix(in srgb, #64d9b6 38%, var(--line));
  background: color-mix(in srgb, #64d9b6 18%, var(--panel));
  color: #9ff0d7;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.updated-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}

.updated-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.updated-card strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.25;
}

.creator-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.kpi-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 11px;
  box-shadow: var(--shadow);
}

.kpi-card.tone-green {
  border-color: color-mix(in srgb, var(--tone-green) 22%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-green) 8%, var(--panel)), var(--panel) 62%);
}

.kpi-card.tone-blue {
  border-color: color-mix(in srgb, var(--tone-blue) 22%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-blue) 8%, var(--panel)), var(--panel) 62%);
}

.kpi-card.tone-slate {
  border-color: color-mix(in srgb, var(--tone-slate) 22%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-slate) 8%, var(--panel)), var(--panel) 62%);
}

.kpi-card.tone-violet {
  border-color: color-mix(in srgb, var(--tone-violet) 22%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-violet) 8%, var(--panel)), var(--panel) 62%);
}

.kpi-card.tone-amber {
  border-color: color-mix(in srgb, var(--tone-amber) 24%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-amber) 9%, var(--panel)), var(--panel) 62%);
}

.kpi-card.tone-rose {
  border-color: color-mix(in srgb, var(--tone-rose) 24%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone-rose) 8%, var(--panel)), var(--panel) 62%);
}

.kpi-card.score-kpi {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--score-color) 64%, var(--line));
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--score-bg) 22%, transparent), transparent 54%),
    linear-gradient(135deg, color-mix(in srgb, var(--score-bg) 13%, var(--panel)), var(--panel) 64%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 30px var(--score-glow);
}

.kpi-card.score-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--score-color);
  opacity: 0.9;
}

.kpi-card.score-gold {
  border-color: #ffb000;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 176, 0, 0.34), transparent 58%),
    linear-gradient(135deg, rgba(255, 176, 0, 0.18), var(--panel) 64%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(255, 176, 0, 0.1),
    0 14px 36px rgba(255, 176, 0, 0.34);
}

.kpi-card.score-critical {
  border-color: #050505;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 16, 40, 0.24), transparent 52%),
    linear-gradient(135deg, #080908, #151915);
  color: #f7f8f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(5, 5, 5, 0.3);
}

.kpi-card > span,
.kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kpi-card > span {
  text-transform: uppercase;
}

.kpi-card > .kpi-label {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 20px;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.kpi-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, currentColor 7%, transparent);
}

.kpi-label .ui-icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.25;
}

.kpi-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card.tone-green .kpi-label,
.kpi-card.tone-green .ui-icon {
  color: var(--tone-green);
}

.kpi-card.tone-blue .kpi-label,
.kpi-card.tone-blue .ui-icon {
  color: var(--tone-blue);
}

.kpi-card.tone-slate .kpi-label,
.kpi-card.tone-slate .ui-icon {
  color: var(--tone-slate);
}

.kpi-card.tone-violet .kpi-label,
.kpi-card.tone-violet .ui-icon {
  color: var(--tone-violet);
}

.kpi-card.tone-amber .kpi-label,
.kpi-card.tone-amber .ui-icon {
  color: var(--tone-amber);
}

.kpi-card.tone-rose .kpi-label,
.kpi-card.tone-rose .ui-icon {
  color: var(--tone-rose);
}

.kpi-card.score-kpi .kpi-label,
.kpi-card.score-kpi .ui-icon {
  color: var(--score-color);
}

.kpi-card.score-gold .kpi-label,
.kpi-card.score-gold .ui-icon {
  color: #c37c00;
}

.kpi-card.score-critical .kpi-label,
.kpi-card.score-critical .ui-icon {
  color: #ff4056;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card small {
  margin-top: 6px;
  line-height: 1.2;
}

.kpi-card.score-critical strong {
  color: #f7f8f5;
}

.kpi-card.score-critical small {
  color: rgba(247, 248, 245, 0.72);
}

.status-pill.watchlist {
  background: #f2eadf;
  color: var(--warn);
}

.status-pill.needs,
.status-pill.needs-contact,
.status-pill.poor,
.status-pill.too {
  background: #f4e4e1;
  color: var(--bad);
}

body.theme-dark .status-pill.watchlist {
  border-color: color-mix(in srgb, var(--tone-amber) 46%, var(--line));
  background: color-mix(in srgb, var(--tone-amber) 18%, var(--panel));
  color: #ffd18b;
}

body.theme-dark .status-pill.needs,
body.theme-dark .status-pill.needs-contact,
body.theme-dark .status-pill.poor,
body.theme-dark .status-pill.too {
  border-color: color-mix(in srgb, var(--tone-rose) 48%, var(--line));
  background: color-mix(in srgb, var(--tone-rose) 18%, var(--panel));
  color: #ff9bae;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.panel,
.contact-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

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

.panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.1;
}

.panel-heading h3 .ui-icon {
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 3px;
  color: var(--accent);
  stroke-width: 2.3;
}

.panel-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.insight-column .panel {
  box-shadow: none;
}

.decision-panel {
  display: grid;
  gap: 18px;
}

.decision-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.2;
}

.decision-panel .row-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.decision-panel .row-label .ui-icon {
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 3px;
  color: var(--accent);
  stroke-width: 2.3;
}

.compact-insights {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.compact-insights .metric {
  padding: 10px;
}

.compact-insights .metric strong {
  font-size: 14px;
  line-height: 1.3;
}

.email-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.email-panel.has-email {
  border-color: color-mix(in srgb, var(--tone-green) 18%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--tone-green) 7%, var(--panel)), var(--panel) 68%);
}

.email-panel.empty-email {
  border-color: color-mix(in srgb, var(--tone-amber) 22%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--tone-amber) 7%, var(--panel)), var(--panel) 68%);
}

.pipeline-panel {
  display: grid;
  gap: 14px;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, var(--panel)), var(--panel) 68%);
}

.pipeline-panel.empty-pipeline {
  border-color: color-mix(in srgb, var(--tone-slate) 16%, var(--line));
  background: var(--panel);
}

.pipeline-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--tone-slate) 8%, var(--panel));
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.pipeline-status.ready {
  background: color-mix(in srgb, var(--tone-green) 12%, var(--panel));
  color: var(--tone-green);
}

.pipeline-status.sent,
.pipeline-status.follow {
  background: color-mix(in srgb, var(--tone-blue) 12%, var(--panel));
  color: var(--tone-blue);
}

.pipeline-status.contact {
  background: color-mix(in srgb, var(--tone-amber) 13%, var(--panel));
  color: var(--tone-amber);
}

.pipeline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-field,
.pipeline-next {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--metric-bg) 72%, transparent);
  padding: 10px;
}

.pipeline-field span,
.pipeline-next span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.pipeline-field strong,
.pipeline-next strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pipeline-next strong {
  font-size: 13px;
}

.email-editor {
  display: grid;
  gap: 8px;
}

.email-edit-row,
.email-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--metric-bg);
  padding: 7px;
}

.email-add-row {
  grid-template-columns: minmax(0, 1fr) auto;
  border-style: dashed;
  background: color-mix(in srgb, var(--metric-bg) 72%, transparent);
}

.email-edit-row input,
.email-add-row input {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 3px;
  font-size: 13px;
  font-weight: 760;
  outline: none;
}

.email-edit-row input::placeholder,
.email-add-row input::placeholder {
  color: var(--muted);
  font-weight: 650;
}

.email-edit-row input:focus,
.email-add-row input:focus {
  color: var(--accent);
}

.email-value a {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.copy-email {
  justify-self: end;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.save-email,
.add-email {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  padding: 5px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.copy-email:hover,
.save-email:hover,
.add-email:hover {
  border-color: var(--accent);
}

.save-email:hover,
.add-email:hover {
  color: var(--accent);
}

.email-meta,
.extra-emails {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.email-meta span,
.extra-emails a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}

.email-empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--metric-bg);
  padding: 13px;
}

.email-empty-state strong {
  display: block;
  font-size: 15px;
}

.email-empty-state p {
  margin-top: 6px;
  font-size: 13px;
}

.email-empty-note {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--metric-bg);
  padding: 10px;
}

.email-empty-note strong,
.email-empty-note span {
  display: block;
}

.email-empty-note strong {
  font-size: 14px;
}

.email-empty-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--metric-bg);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.rows {
  display: grid;
  gap: 10px;
}

.contact-row {
  padding: 13px;
  box-shadow: none;
}

.video-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.video-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 14px;
  align-items: center;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.video-row:hover {
  background: color-mix(in srgb, var(--tone-blue) 5%, transparent);
}

.video-thumb {
  position: relative;
  display: block;
  width: 118px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--metric-bg);
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  border-radius: 999px;
  background: rgba(8, 9, 8, 0.72);
  color: #ffffff;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
}

.video-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.video-title {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.video-posted {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--muted) 5%, var(--panel));
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.sponsor-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
  min-height: 24px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--brand-color, var(--line)) 20%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel) 94%, var(--brand-color, var(--line)));
  color: var(--brand-color, var(--muted));
  padding: 3px 9px 3px 6px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.sponsor-chip::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--brand-color, var(--line));
}

.sponsor-name {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sponsor-logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  flex: 0 0 18px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand-color, var(--muted)) 88%, #111111);
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.sponsor-logo.has-image {
  border: 1px solid color-mix(in srgb, var(--brand-color) 16%, var(--line));
  background: #ffffff;
}

.sponsor-chip .sponsor-logo img {
  display: block;
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain;
  object-position: center;
  transform: none !important;
}

.sponsor-chip.none {
  border-color: var(--line);
  background: color-mix(in srgb, var(--muted) 5%, var(--panel));
  color: var(--muted);
  padding-left: 8px;
}

.sponsor-chip.unknown {
  border-style: dashed;
  color: var(--muted);
}

.video-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.video-metrics div {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 8px;
  overflow: hidden;
}

.video-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.video-metrics dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.video-metrics dd.metric-value-long {
  font-size: 12.5px;
}

.video-metrics dd.metric-value-xl {
  font-size: 11.5px;
}

.video-row a,
.contact-row a,
.detail a {
  color: var(--accent);
  text-decoration: none;
}

.video-row a:hover,
.contact-row a:hover,
.detail a:hover {
  text-decoration: underline;
}

.detail .detail-name-link {
  color: var(--ink);
}

.detail .detail-name-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.detail .detail-avatar:hover {
  text-decoration: none;
}

.row-label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: calc(100vh - 60px);
  text-align: center;
}

.empty-state h2 {
  font-size: 36px;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar-resizer {
    display: none;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .creator-list {
    max-height: 340px;
  }

  .detail {
    padding: 22px;
    height: auto;
    overflow: visible;
  }

  .detail-header,
  .grid,
  .creator-kpis {
    grid-template-columns: 1fr;
  }

  .detail-identity {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-avatar {
    width: 76px;
    height: 76px;
    font-size: 18px;
  }

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

  .header-side {
    justify-items: stretch;
  }

  .brand {
    grid-template-columns: 56px 1fr;
  }

  .theme-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .status-pill {
    justify-content: center;
  }
}

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

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

@media (max-width: 560px) {
  .sidebar,
  .detail {
    padding: 16px;
  }

  .stats,
  .metrics,
  .creator-kpis {
    grid-template-columns: 1fr;
  }

  .video-row {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }

  .video-thumb {
    width: 92px;
  }

  .video-metrics {
    grid-column: 2;
  }

  .detail h2 {
    font-size: 31px;
  }
}
