/* ============================================================
   Cockpit — Tool-UI (hell, modern, dicht)
   Inspired by: Linear · Stripe Dashboard · Vercel · Plausible
   Brand-Akzent (Orange #FF5728) bleibt als IIM-Verbindung erhalten
   ============================================================ */

:root {
  /* Surfaces */
  --bg:           #F7F8FA;
  --surface:      #FFFFFF;
  --surface-2:    #F1F2F5;
  --surface-3:    #E8EAEF;
  --hover:        #F4F5F7;

  /* Borders */
  --border:        #E5E7EB;
  --border-strong: #D1D5DB;
  --border-focus:  #0F172A;

  /* Text */
  --text:        #0F172A;
  --text-muted:  #64748B;
  --text-dim:    #94A3B8;
  --text-soft:   #475569;

  /* Brand-Akzent (von Invest in Marketing) */
  --accent:      #FF5728;
  --accent-bg:   #FFF1EC;
  --accent-text: #B83D17;

  /* Status */
  --ok:        #10B981;
  --ok-bg:     #D1FAE5;
  --okish:     #F59E0B;
  --okish-bg:  #FEF3C7;
  --warn:      #EA580C;
  --warn-bg:   #FFEDD5;
  --crit:      #DC2626;
  --crit-bg:   #FEE2E2;
  --info:      #2563EB;
  --info-bg:   #DBEAFE;

  /* Fonts */
  --sans: 'Inter', 'Inter Tight', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Sizing */
  --radius:    8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1480px; margin: 0 auto; padding: 0 32px; }

/* =================== TOP NAV =================== */
nav.cockpit-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
nav.cockpit-nav .container {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px;
}
.brand-stack {
  display: flex; align-items: center; gap: 20px;
}
.brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.brand .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.brand b { font-weight: 700; }
.client-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 999px;
}
.tabs { display: flex; gap: 2px; }
.tabs a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.tabs a:hover { color: var(--text); background: var(--hover); }
.tabs a.active { color: var(--text); background: var(--surface-2); font-weight: 600; }
.user-chip {
  font-size: 13px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.user-chip::before {
  content: '';
  width: 28px; height: 28px;
  background: var(--surface-3);
  border-radius: 50%;
  display: inline-block;
}

/* =================== PAGE HEADER =================== */
.page-header { padding: 36px 0 20px; }
.page-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.page-title em {
  font-style: normal;
  color: var(--accent);
}
.page-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =================== SECTION =================== */
section { padding: 20px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* =================== CARDS (Generic) =================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--border-strong); }

/* =================== KPI CARDS =================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color .15s;
}
.kpi-card:hover { border-color: var(--border-strong); }
.kpi-card .kpi-eyebrow {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.kpi-card .kpi-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.status-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.status-ok    { background: var(--ok-bg);    color: var(--ok); }
.status-okish { background: var(--okish-bg); color: var(--okish); }
.status-warn  { background: var(--warn-bg);  color: var(--warn); }
.status-crit  { background: var(--crit-bg);  color: var(--crit); }

.kpi-numbers {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.kpi-current {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-target {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.kpi-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0 10px;
}
.kpi-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .6s ease;
}
.kpi-bar-fill.is-ok    { background: var(--ok); }
.kpi-bar-fill.is-okish { background: var(--okish); }
.kpi-bar-fill.is-warn  { background: var(--warn); }
.kpi-bar-fill.is-crit  { background: var(--crit); }

.kpi-projection {
  font-size: 12px;
  color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
.kpi-projection b {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.delta { font-family: var(--mono); font-size: 11px; }
.delta.negative { color: var(--crit); }
.delta.positive { color: var(--ok); }

/* =================== WEEK STRIP =================== */
.week-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.week-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}
.week-cell:last-child { border-right: 0; }
.week-cell .label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.week-cell .value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.week-cell .delta-tag {
  font-size: 11px;
  margin-top: 4px;
  display: inline-block;
}

/* =================== WARNINGS =================== */
.warning-list { display: grid; gap: 8px; }
.warning {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.warning.is-crit { border-left-color: var(--crit); }
.warning .icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}
.warning.is-crit .icon { background: var(--crit-bg); color: var(--crit); }
.warning .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.warning .detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.warning .action {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =================== AI INSIGHTS =================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
}
.insight-card::before {
  content: 'AI';
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.insight-card .headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 8px;
  padding-right: 36px;
}
.insight-card .detail {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.insight-card .meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =================== LIVE ASSETS LIST =================== */
.live-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.live-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.live-row:last-child { border-bottom: 0; }
.live-row:hover { background: var(--hover); }
.live-row .title { font-size: 14px; font-weight: 500; }
.live-row .meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.live-row .stat-block { text-align: right; }
.live-row .stat-block .num {
  font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.live-row .stat-block .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* =================== LINK BUTTON =================== */
.link-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all .15s;
}
.link-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* =================== FOOTER =================== */
footer.cockpit-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 20px 0;
  background: var(--surface);
}
footer.cockpit-footer .container {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  color: var(--text-dim);
}

/* =================== MODAL =================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 920px;
  border: 1px solid var(--border);
  overflow: hidden;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header .title { font-size: 15px; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 16px;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
}
.modal-thumb {
  background: var(--surface-2);
  aspect-ratio: 9/16;
  display: grid; place-items: center;
  overflow: hidden;
}
.modal-thumb img, .modal-thumb video {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-content { padding: 24px; }
.modal-content .pillar {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.modal-content .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.modal-content .hook {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}
.modal-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.modal-stat-group {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.modal-stat-group .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.modal-stat-group .row {
  display: flex; justify-content: space-between;
  font-size: 13px; line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.modal-stat-group .row span:first-child { color: var(--text-muted); }
.modal-stat-group .row span:last-child  { color: var(--text); font-weight: 600; }
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-2);
}
.modal-footer a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.modal-footer a:hover { border-color: var(--border-strong); }

/* =================== ASSETS GRID (Cards mit Thumbnails) =================== */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.asset-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.asset-card-v2:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.asset-card-v2 .thumb {
  aspect-ratio: 9/16;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.asset-card-v2 .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.asset-card-v2 .thumb .play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
}
.asset-card-v2 .thumb .play::after {
  content: '▶';
  color: white;
  font-size: 20px;
  background: rgba(0,0,0,0.45);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
}
.asset-card-v2 .thumb .pillar-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
}
.asset-card-v2 .thumb .duration-tag {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 3px 7px;
  border-radius: 4px;
}
.asset-card-v2 .body { padding: 14px 16px; }
.asset-card-v2 .name {
  font-size: 14px; font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.asset-card-v2 .live-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.asset-card-v2 .stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.asset-card-v2 .stat {
  font-variant-numeric: tabular-nums;
}
.asset-card-v2 .stat .v {
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.asset-card-v2 .stat .l {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}
.asset-card-v2 .er-pill {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
}
.asset-card-v2 .er-pill.up   { background: var(--ok-bg);   color: var(--ok); }
.asset-card-v2 .er-pill.flat { background: var(--okish-bg); color: var(--okish); }
.asset-card-v2 .er-pill.down { background: var(--crit-bg); color: var(--crit); }

.filters {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.filters button:hover { color: var(--text); border-color: var(--border-strong); }
.filters button.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

/* =================== PERFORMANCE TAB =================== */
.perf-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
}
.perf-period .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Top-Line Strip */
.perf-topline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.perf-tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.perf-tl-card.is-inactive { opacity: 0.55; }
.perf-tl-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 500;
}
.perf-tl-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.perf-tl-value .unit {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}
.perf-tl-delta {
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.perf-tl-delta.is-up        { color: var(--ok); }
.perf-tl-delta.is-down      { color: var(--crit); }
.perf-tl-delta.is-down-good { color: var(--ok); }
.perf-tl-delta.is-flat      { color: var(--text-muted); }
.perf-tl-delta.is-inactive  { color: var(--text-dim); }

/* Trend Chart */
.perf-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
}
.perf-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.perf-chart-title { font-size: 15px; font-weight: 600; color: var(--text); }
.perf-chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.perf-chart-legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.perf-chart-canvas { position: relative; height: 280px; }

/* Channel Breakdown Table */
.perf-channels {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.perf-channels table { width: 100%; border-collapse: collapse; font-size: 14px; }
.perf-channels thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.perf-channels thead th.num,
.perf-channels tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.perf-channels tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.perf-channels tbody tr:last-child td { border-bottom: none; }
.perf-channels tbody tr.is-inactive td { color: var(--text-dim); }
.perf-channels tbody tr.is-inactive td.ch-name { color: var(--text-muted); }
.perf-channels .ch-name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.perf-channels .ch-dot { width: 8px; height: 8px; border-radius: 50%; }
.perf-channels .ch-dot.active   { background: var(--ok); }
.perf-channels .ch-dot.inactive { background: var(--text-dim); }
.perf-channels .ch-dot.paused   { background: var(--okish); }
.perf-channels .ch-note {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

/* Top Ads */
.perf-top-ads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.perf-ad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.perf-ad-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--surface-3) center/cover no-repeat;
  flex-shrink: 0;
}
.perf-ad-body { min-width: 0; }
.perf-ad-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.perf-ad-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.perf-ad-meta b { color: var(--text); font-weight: 600; }

/* Funnel */
.perf-funnel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.perf-funnel-rows { display: flex; flex-direction: column; gap: 10px; }
.perf-funnel-row {
  display: grid;
  grid-template-columns: 240px 1fr 140px;
  gap: 14px;
  align-items: center;
}
.perf-funnel-label { font-size: 14px; color: var(--text); font-weight: 500; }
.perf-funnel-bar {
  height: 28px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.perf-funnel-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: width .4s ease;
}
.perf-funnel-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.perf-funnel-drop {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}

/* Empty state for inactive channels */
.perf-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  nav.cockpit-nav .container { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
  .tabs { width: 100%; overflow-x: auto; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-thumb { aspect-ratio: 16/9; max-height: 280px; }
  .live-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .perf-topline { grid-template-columns: repeat(2, 1fr); }
  .perf-funnel-row { grid-template-columns: 1fr; }
  .perf-funnel-value { text-align: left; }
  .perf-channels { overflow-x: auto; }
  .perf-channels table { min-width: 640px; }
}
