:root {
  --bp-green: #007f3f;
  --bp-green-2: #1f9b57;
  --bp-lime: #7ac143;
  --bp-yellow: #ffd200;

  --ink-900: #1f1f1f;
  --ink-700: #3c3c3c;
  --ink-500: #6b7280;

  --surface-0: #ffffff;
  --surface-1: #f6f8fb;
  --surface-2: #eef3f0;

  --border: #e5e7eb;

  --radius-lg: 14px;
  --radius-md: 10px;

  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.06);

  --bg-surface: var(--surface-1);
  --card-border: var(--border);
  --text-muted: var(--ink-500);
  --accent: var(--ink-900);
}

body {
  background: var(--surface-1);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink-900);
}

h1 {
  font-weight: 600;
}

.bp-page {
  min-height: 100vh;
}

.bp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 18px;
}

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

.bp-title {
  font-size: 26px;
  font-weight: 600;
  margin: 0;
}

.bp-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1 1 520px;
}

.bp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
}

.bp-logo img {
  width: auto;
  object-fit: contain;
}

.bp-logo-bp {
  height: 96px;
}

@media (max-width: 768px) {
  .bp-header {
    justify-content: center;
  }

  .bp-header-main {
    order: 2;
  }

  .bp-logo-left {
    order: 1;
  }

  .bp-logo-right {
    order: 3;
    width: 100%;
    margin-top: 10px;
    align-items: center;
  }
}

.bp-logo-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  min-width: 180px;
}

.tekne-logo-header {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.bp-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bp-btn-white {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bp-btn-white:hover {
  background: #f9fafb;
  border-color: var(--ink-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.bp-btn-white svg {
  color: var(--bp-green);
}

.bp-filters {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-1);
  min-width: 360px;
}

section {
  margin-bottom: 22px !important;
}

.bp-section {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 18px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--bp-green);
  border-radius: 2px;
}

.card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.card.shadow-sm {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1) !important;
  position: relative;
  overflow: hidden;
}

.card.shadow-sm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bp-green);
}

.card-body {
  padding: 18px !important;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}

.chart-notes {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.chart-notes-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

.chart-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.chart-note {
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
}

.chart-note-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.chart-note-body {
  font-size: 0.85rem;
  color: #1f2937;
}

.kpi-card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 14px 14px 12px;
  height: 100%;
  position: relative;
  min-height: 96px;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bp-green);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.kpi-card.is-reach::before {
  background: var(--bp-green);
}

.kpi-card.is-engagement::before {
  background: var(--bp-lime);
}

.kpi-card.is-cost::before {
  background: var(--bp-yellow);
}

.kpi-label,
.kpi-title {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.kpi-value {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-sub,
.kpi-definition {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.4;
}

.fb-organic-subtitle {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 14px;
}

.fb-organic-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
}

.funnel {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}

.funnel-step {
  position: relative;
  flex: 1;
  min-width: 220px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.04));
  border: 1px solid var(--card-border);
}

.funnel-step:first-child {
  flex: 1.2;
}

.funnel-step:nth-child(2) {
  flex: 1;
}

.funnel-step:nth-child(3) {
  flex: 0.9;
}

.funnel-step:nth-child(2) {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
}

.funnel-step:nth-child(3) {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
}

.funnel-step-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.funnel-step strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 0.5rem;
  color: #111827;
}

.funnel-step small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #374151;
}

.funnel-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0.7;
}

.table thead th {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--card-border);
}

.message-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.sentiment-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.sentiment-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.5rem;
}

.sentiment-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}

.sentiment-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sentiment-value {
  font-size: 2rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.sentiment-status {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #eef2ff;
  color: #1e3a8a;
}


.sentiment-green {
  border-bottom: 4px solid #16a34a;
  color: #16a34a;
}

.sentiment-pink {
  border-bottom: 4px solid #e11d48;
  color: #e11d48;
}

.sentiment-red {
  border-bottom: 4px solid #dc2626;
  color: #dc2626;
}

.sentiment-ok {
  background: #dcfce7;
  color: #166534;
}

.sentiment-love {
  background: #ffe4e6;
  color: #9f1239;
}

.sentiment-alert {
  background: #fee2e2;
  color: #991b1b;
}

.format-subtitle {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 14px;
}

.format-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.format-chart h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #111827;
}

.format-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.format-chart-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.format-total {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.format-total-definition {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.paid-table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.paid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.paid-table thead th {
  background: var(--surface-2);
  color: var(--ink-500);
  font-weight: 600;
  padding: 10px 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.paid-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

.paid-table th:last-child,
.paid-table td:last-child {
  width: 45%;
}

.paid-table-desc {
  color: var(--ink-500);
  font-size: 0.85rem;
}

.paid-table tbody tr:hover {
  background: #f9fbfa;
}

@media (max-width: 768px) {

  .paid-table th:last-child,
  .paid-table td:last-child {
    width: auto;
  }
}

.format-chart canvas {
  max-height: 120px;
}

.format-verdict {
  margin-top: 1.5rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1rem;
}

.format-verdict-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.format-verdict-text {
  font-size: 0.95rem;
  color: #111827;
}

.ads-subtitle {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 14px;
}

.ads-table tbody tr td {
  vertical-align: middle;
}

.ads-creative {
  font-weight: 500;
  color: #111827;
}

.ads-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ads-link {
  color: #111827;
  text-decoration: none;
}

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

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-dark {
  background: #f3e8ff;
  color: #6b21a8;
}

.badge-pub {
  background: #dcfce7;
  color: #166534;
}

.badge-deleted {
  background: #fee2e2;
  color: #991b1b;
}

.ads-glossary {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.85rem;
  color: #374151;
}

.ads-glossary-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.high-perf {
  color: #166534;
  font-weight: 600;
}

.low-perf {
  color: #dc2626;
  font-weight: 600;
  opacity: 0.8;
}

.filters .form-select,
.filters .form-control {
  min-width: 170px;
}

.date-range {
  min-width: 260px;
}

.date-range-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--card-border);
  background: #ffffff;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.date-range-button:focus {
  outline: 2px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.date-range-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.date-range-caret {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.date-range-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  width: 360px;
  padding: 1rem;
}

.date-range-panel-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.date-range-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.date-range-presets button {
  border: 1px solid var(--card-border);
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  color: #1f2937;
  text-align: left;
}

.date-range-presets button:hover {
  background: #eef2ff;
}

.date-range-inputs label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.date-range-inputs .form-control {
  margin-bottom: 0.6rem;
}

.date-range-apply {
  width: 100%;
  border: none;
  background: #111827;
  color: #ffffff;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
}

.date-range-apply:hover {
  background: #0f172a;
}

@media (max-width: 768px) {
  .date-range-panel {
    width: 100%;
    right: auto;
    left: 0;
  }

  .funnel-step:not(:last-child)::after {
    display: none;
  }
}