:root {
  --pm-bg-main: #0e0f12;
  --pm-bg-alt: #14171d;
  --pm-card: #16181d;
  --pm-card-soft: #1b1f27;
  --pm-text: #f3f5f8;
  --pm-muted: #b9c1ce;
  --pm-line: #2e3340;
  --pm-line-soft: #262b35;
  --pm-gold: #d4af37;
  --pm-gold-soft: rgba(212, 175, 55, 0.14);
  --pm-gold-glow: rgba(212, 175, 55, 0.25);
  --pm-ok: #3ad29f;
  --pm-bad: #ff7b7b;
  --pm-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  --pm-radius: 16px;
}

html,
body {
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1200px 560px at 50% -14%, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0) 63%),
    radial-gradient(760px 360px at 95% 120%, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0) 52%),
    linear-gradient(180deg, var(--pm-bg-alt) 0%, var(--pm-bg-main) 44%, #0a0b0f 100%);
  color: var(--pm-text);
}

.pro-metrics-page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 12px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pro-metrics-page .card {
  border-radius: var(--pm-radius);
}

.pro-metrics-page a:focus-visible,
.pro-metrics-page button:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.92);
  outline-offset: 2px;
}

.pro-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--pm-line);
  background: linear-gradient(135deg, rgba(24, 27, 35, 0.96), rgba(16, 19, 26, 0.96));
  box-shadow: var(--pm-shadow), 0 0 34px var(--pm-gold-glow);
  overflow: hidden;
  padding: 18px;
}

.pro-header::before {
  content: "";
  position: absolute;
  right: -150px;
  top: -160px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.24), rgba(212, 175, 55, 0));
  pointer-events: none;
}

.pro-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cfb874;
  font-weight: 700;
}

.pro-header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f5f6f8 0%, var(--pm-gold) 52%, #f5f6f8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pro-subtitle {
  margin: 8px 0 0;
  color: #d6deea;
  font-size: 14px;
  line-height: 1.55;
  max-width: 62ch;
}

.pro-subnote {
  margin: 10px 0 0;
  color: #f2d685;
  font-size: 13px;
  line-height: 1.5;
}

.pro-back {
  width: 100%;
}

.pro-metrics-page .btn {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pro-metrics-page .btn.btn-primary {
  background: linear-gradient(135deg, var(--pm-gold), #e7c65a);
  color: #131518;
  border: 1px solid #f2d685;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.28);
}

.pro-metrics-page .btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.45);
}

.pro-metrics-page .btn.ghost {
  border: 1px solid rgba(212, 175, 55, 0.42);
  color: #f2d685;
  background: rgba(212, 175, 55, 0.08);
}

.pro-metrics-page .btn.ghost:hover {
  transform: translateY(-2px);
  background: rgba(212, 175, 55, 0.16);
}

.page-guest,
.pro-empty,
.section-block,
.pro-overview {
  border: 1px solid var(--pm-line);
  background: linear-gradient(140deg, rgba(22, 24, 29, 0.95), rgba(18, 21, 28, 0.96));
  box-shadow: var(--pm-shadow);
}

.page-guest,
.pro-empty,
.pro-overview {
  padding: 16px;
}

.guest-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #cfb874;
  font-weight: 700;
}

.page-guest h2,
.pro-empty h2 {
  margin: 0 0 10px;
  color: #f5f7fb;
}

.guest-lead,
.pro-empty p {
  margin: 0 0 14px;
  color: var(--pm-muted);
  line-height: 1.56;
}

.guest-preview-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: #c6cfdb;
  display: grid;
  gap: 7px;
  line-height: 1.45;
}

.guest-cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#proMetricsContent {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pro-overview h2 {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.overview-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.12);
  color: #f3da8f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-text {
  margin: 0;
  color: #d3dbe8;
  line-height: 1.6;
}

.overview-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #e5ebf5;
  display: grid;
  gap: 7px;
}

.overview-cta {
  margin-top: 14px;
}

.section-block {
  border-radius: var(--pm-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 20px;
}

.section-title-row--small {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.section-title-row--small h3 {
  margin: 0;
  font-size: 16px;
}

.section-brief {
  margin: 0;
  color: #c7cfdb;
  font-size: 14px;
  line-height: 1.58;
}

.section-next-step {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--pm-gold);
  background: rgba(212, 175, 55, 0.1);
  color: #f3f6fb;
  font-size: 13px;
  line-height: 1.5;
}

.section-microcopy {
  margin: 10px 0 0;
  color: var(--pm-muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-info-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #3f4754;
  color: #c9d2dd;
  background: #1a1e26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
  position: relative;
}

.info-icon,
.section-info-icon {
  position: relative;
}

.pm-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: min(320px, calc(100vw - 16px));
  background: #12161d;
  border: 1px solid #2f3744;
  border-radius: 10px;
  padding: 9px 10px;
  color: #dbe2ec;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  max-height: calc(100vh - 16px);
  overflow: auto;
}

.pm-tooltip.hidden {
  display: none;
}

.pm-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 10px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: #12161d;
  border-left: 1px solid #2f3744;
  border-top: 1px solid #2f3744;
}

.pm-tooltip.tooltip-up::before {
  top: auto;
  bottom: -6px;
  transform: rotate(225deg);
  border-left: 0;
  border-top: 0;
  border-right: 1px solid #2f3744;
  border-bottom: 1px solid #2f3744;
}

.pro-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.35), transparent);
  margin: 2px 0;
}

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

.kpi-card-pro,
.mini-card,
.chart-card,
.table-card {
  border: 1px solid var(--pm-line-soft);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(24, 27, 35, 0.78), rgba(18, 21, 27, 0.76));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.kpi-card-pro:hover,
.mini-card:hover,
.chart-card:hover,
.table-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.kpi-card-pro {
  padding: 12px;
  min-height: 92px;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-title {
  color: #aab4c3;
  font-size: 12px;
}

.info-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #3c4350;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #c8d0db;
  cursor: help;
}

.kpi-value-pro {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
}

.positive { color: var(--pm-ok); }
.negative { color: var(--pm-bad); }
.neutral { color: #e1e7f0; }

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

.mini-card {
  padding: 12px;
}

.mini-card-label {
  color: #aab4c3;
  font-size: 12px;
}

.mini-card-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
}

.chart-card,
.table-card {
  padding: 13px;
}

.chart-card h3,
.table-card h3 {
  margin: 0 0 10px;
  text-align: left;
}

.chart-card canvas {
  width: 100%;
  display: block;
  min-height: 220px;
  height: 220px;
  max-height: 260px;
}

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

.mini-table th,
.mini-table td {
  border-bottom: 1px solid #2a2f38;
  text-align: left;
  padding: 8px 6px;
  white-space: nowrap;
}

.mini-table th {
  color: #aab4c3;
  font-weight: 600;
}

.pro-empty h2 {
  font-size: 20px;
}

.pro-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.skeleton-card,
.skeleton-chart {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(24, 27, 35, 0.92), rgba(18, 21, 27, 0.95));
  border: 1px solid var(--pm-line-soft);
}

.skeleton-card {
  height: 84px;
}

.skeleton-chart {
  height: 230px;
}

.skeleton-card::after,
.skeleton-chart::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.14), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.hidden {
  display: none !important;
}

@media (min-width: 760px) {
  .pro-metrics-page {
    padding: 24px 20px 42px;
    gap: 20px;
  }

  .pro-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 22px;
  }

  .pro-back {
    width: auto;
    min-width: 176px;
  }

  .guest-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pro-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

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

  .chart-card canvas {
    min-height: 250px;
    height: 250px;
    max-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
