/* ============================================================
   NetworkPair.com — Components & Compensation Plan Styles
   ============================================================ */

/* ---------- Total Banner (index.html) ---------- */
.total-banner {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.total-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(244,166,33,.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(230,57,70,.1)   0%, transparent 50%);
  pointer-events: none;
}

.total-banner > * { position: relative; z-index: 1; }

.total-banner-label {
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.6);
  margin-bottom: .75rem;
}

.total-banner-amount {
  font-family: var(--ff-heading);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: var(--fw-extra);
  background: linear-gradient(135deg, var(--clr-gold), #ffcf6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: .5rem;
}

.total-banner-sub {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.65);
}

/* ============================================================
   COMPENSATION PLAN PAGE
   ============================================================ */

/* Page Hero (comp plan) */
.comp-hero {
  background: linear-gradient(145deg, #05153a 0%, var(--clr-primary) 55%, var(--clr-dark-alt) 100%);
  padding-block: 8rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.comp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.comp-hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(244,166,33,.1) 0%, transparent 70%);
  pointer-events: none;
}

.comp-hero-content { position: relative; z-index: 1; }

.comp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(244,166,33,.15);
  border: 1px solid rgba(244,166,33,.3);
  color: var(--clr-gold);
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.comp-hero-title {
  font-family: var(--ff-heading);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: var(--fw-extra);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.comp-hero-title span {
  background: linear-gradient(135deg, var(--clr-gold), #ffcf6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comp-hero-sub {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.7);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.comp-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.comp-hero-stat {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  min-width: 160px;
  backdrop-filter: blur(8px);
  text-align: center;
}

.comp-hero-stat-number {
  font-family: var(--ff-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extra);
  color: var(--clr-gold);
  line-height: 1;
  margin-bottom: .25rem;
}

.comp-hero-stat-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: var(--fw-medium);
}

/* ---------- Section Nav (comp plan) ---------- */
.comp-section-nav {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.comp-nav-inner {
  display: flex;
  align-items: center;
  gap: .25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: .75rem;
}

.comp-nav-inner::-webkit-scrollbar { display: none; }

.comp-nav-link {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.comp-nav-link:hover {
  color: var(--clr-primary);
  background: var(--clr-surface-alt);
}

.comp-nav-link.active {
  color: #fff;
  background: var(--clr-primary);
  border-color: var(--clr-primary);
}

/* ---------- Overview Section ---------- */
.comp-overview-section { background: var(--clr-surface); }

.overview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.overview-card {
  background: var(--clr-surface-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.overview-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  transition: all var(--transition-base);
}

.overview-card.card-gold::after  { background: linear-gradient(90deg, var(--clr-gold),    #ffcf6e); }
.overview-card.card-blue::after  { background: linear-gradient(90deg, var(--clr-primary),  var(--clr-primary-light)); }
.overview-card.card-red::after   { background: linear-gradient(90deg, var(--clr-accent),   var(--clr-accent-dark)); }

.overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.overview-card-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
  color: #fff;
}

.icon-gold { background: linear-gradient(135deg, var(--clr-gold),    var(--clr-gold-dark)); }
.icon-blue { background: linear-gradient(135deg, var(--clr-primary),  var(--clr-primary-light)); }
.icon-red  { background: linear-gradient(135deg, var(--clr-accent),   var(--clr-accent-dark)); }

.overview-card-value {
  font-family: var(--ff-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extra);
  color: var(--clr-primary);
  margin-bottom: .5rem;
}

.overview-card-label {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.overview-card-desc { font-size: var(--fs-sm); color: var(--clr-text-muted); line-height: 1.7; }

/* ---------- Matrix Diagrams ---------- */
.matrix-diagrams-section { background: var(--clr-surface-alt); }

.matrix-tabs {
  display: flex;
  gap: .75rem;
  margin-bottom: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.matrix-tab {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  padding: .75rem 2rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--clr-border);
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.matrix-tab:hover { border-color: var(--clr-primary); color: var(--clr-primary); }

.matrix-tab.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.matrix-tab-panel { display: none; }
.matrix-tab-panel.active { display: block; }

/* Matrix Diagram Wrapper */
.matrix-diagram-wrapper {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--clr-border);
  overflow-x: auto;
}

.matrix-diagram-title {
  text-align: center;
  font-family: var(--ff-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extra);
  color: var(--clr-primary);
  margin-bottom: .5rem;
}

.matrix-diagram-sub {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

/* SVG Diagram */
.matrix-svg-container {
  display: flex;
  justify-content: center;
  min-width: 320px;
  overflow-x: auto;
}

.matrix-svg-container svg {
  width: 100%;
  max-width: 820px;
  height: auto;
  overflow: visible;
}

/* Matrix legend */
.matrix-legend {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  font-weight: var(--fw-medium);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-you   { background: var(--clr-gold); }
.dot-l1    { background: var(--clr-primary); }
.dot-l2    { background: var(--clr-primary-light); }
.dot-l3    { background: #7899d4; }

/* ---------- Stage Detail Cards ---------- */
.stage-details-section { background: var(--clr-surface); }

.stage-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.stage-detail-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  background: var(--clr-surface);
}

.stage-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stage-detail-header {
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.stage-detail-header.header-blue { background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light)); color: #fff; }
.stage-detail-header.header-red  { background: linear-gradient(135deg, var(--clr-accent),  var(--clr-accent-dark)); color: #fff; }

.stage-detail-num {
  font-family: var(--ff-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extra);
  opacity: .25;
  line-height: 1;
}

.stage-detail-name {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extra);
  color: #fff;
  margin-bottom: .25rem;
}

.stage-detail-type {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: var(--fw-semibold);
}

.stage-detail-body { padding: 2rem; }

.stage-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: var(--fs-sm);
}

.stage-detail-row:last-child { border-bottom: none; }

.stage-detail-row-label {
  color: var(--clr-text-muted);
  font-weight: var(--fw-medium);
}

.stage-detail-row-value {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
}

.stage-detail-row-value.value-gold {
  color: var(--clr-gold-dark);
  font-size: var(--fs-xl);
}

/* Progress indicator */
.stage-progress-bar {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}

.stage-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .625rem;
}

.stage-progress-track {
  height: 8px;
  background: var(--clr-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stage-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-dark));
  width: 0%;
  transition: width 1.4s cubic-bezier(.34,1.56,.64,1);
}

/* ---------- Earnings Visualizer ---------- */
.visualizer-section { background: var(--clr-surface-alt); }

.earnings-chart-wrap {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--clr-border);
  margin-top: 3rem;
}

.earnings-chart-title {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  color: var(--clr-primary);
  margin-bottom: .5rem;
}

.earnings-chart-sub {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
}

.chart-container { height: 380px; position: relative; }

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  padding-bottom: 3rem;
  position: relative;
}

.chart-bars::after {
  content: '';
  position: absolute;
  bottom: 3rem; left: 0; right: 0;
  height: 1px;
  background: var(--clr-border);
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  flex: 1;
  max-width: 110px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  flex: 1;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  cursor: default;
  transition: filter var(--transition-fast), transform var(--transition-fast);
  min-height: 4px;
}

.chart-bar:hover { filter: brightness(1.1); transform: scaleX(1.04); }

.chart-bar.bar-blue { background: linear-gradient(180deg, var(--clr-primary-light), var(--clr-primary)); }
.chart-bar.bar-red  { background: linear-gradient(180deg, var(--clr-accent),         var(--clr-accent-dark)); }

.chart-bar-value {
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
  text-align: center;
  white-space: nowrap;
}

.chart-bar-label {
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--clr-text-muted);
  text-align: center;
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- Cumulative Table ---------- */
.cumulative-section { background: var(--clr-surface); }

.earnings-table-wrap {
  margin-top: 3rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--clr-border);
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.earnings-table thead th {
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.earnings-table thead th:last-child { text-align: right; }

.earnings-table tbody tr {
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition-fast);
}

.earnings-table tbody tr:last-child { border-bottom: none; }

.earnings-table tbody tr:hover { background: var(--clr-surface-alt); }

.earnings-table tbody td {
  padding: 1.125rem 1.5rem;
  color: var(--clr-text);
}

.earnings-table tbody td:last-child { text-align: right; }

.table-stage-badge {
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: .3rem .75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-stage-blue { background: rgba(10,36,99,.1); color: var(--clr-primary); }
.badge-stage-red  { background: rgba(230,57,70,.1); color: var(--clr-accent); }

.table-amount {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
}

.table-cumulative {
  font-family: var(--ff-heading);
  font-weight: var(--fw-extra);
  color: var(--clr-gold-dark);
}

.earnings-table tfoot td {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-dark));
  color: #fff;
  font-family: var(--ff-heading);
  font-weight: var(--fw-extra);
  padding: 1.5rem;
  font-size: var(--fs-md);
}

.earnings-table tfoot td:last-child {
  text-align: right;
  font-size: var(--fs-xl);
  color: var(--clr-gold);
}

/* ---------- CTA Strip (comp plan) ---------- */
.comp-cta-strip {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-dark) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.comp-cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(244,166,33,.15) 0%, transparent 55%);
  pointer-events: none;
}

.comp-cta-inner { position: relative; z-index: 1; }

.comp-cta-title {
  font-family: var(--ff-heading);
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  font-weight: var(--fw-extra);
  color: #fff;
  margin-bottom: 1rem;
}

.comp-cta-title span {
  background: linear-gradient(135deg, var(--clr-gold), #ffcf6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comp-cta-sub {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.7);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.comp-cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Payout Summary Rows (inside diagram panel) ---------- */
.stage-payout-summary {
  margin-top: 2rem;
  border-top: 1px solid var(--clr-border);
  padding-top: 1.5rem;
}

.payout-summary-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
}

.payout-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .875rem 1rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  flex-wrap: wrap;
}

.payout-row:hover { background: var(--clr-surface-alt); }

.payout-row-stage  { flex-shrink: 0; min-width: 90px; }
.payout-row-formula {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.payout-row-amount {
  font-family: var(--ff-heading);
  font-weight: var(--fw-extra);
  font-size: var(--fs-lg);
  color: var(--clr-gold-dark);
  flex-shrink: 0;
}

/* ---------- Responsive (comp plan) ---------- */
@media (max-width: 900px) {
  .overview-cards        { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .stage-detail-grid     { grid-template-columns: 1fr; }
  .chart-bars            { gap: .5rem; }
  .chart-bar-group       { max-width: 70px; }
  .chart-bar-value       { font-size: 10px; }
  .chart-bar-label       { font-size: 10px; }
}

@media (max-width: 640px) {
  .comp-hero-stats { gap: 1rem; }
  .comp-hero-stat  { min-width: 130px; padding: 1rem 1.25rem; }

  .matrix-diagram-wrapper { padding: 1.75rem 1rem; }

  .earnings-table thead th,
  .earnings-table tbody td { padding: .875rem 1rem; }

  .comp-cta-actions { flex-direction: column; align-items: center; }
  .comp-cta-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}
