:root{
  --bg: #f6f8fb;
  --card: #ffffff;
  --text-1: #0f172a;
  --text-2: #475569;
  --muted: #d8dee9;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #eef2ff;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 6px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --radius-lg: 18px;
  --container: 1080px;
}

*{ box-sizing: border-box; }


.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.promotion-page{
  max-width: 1200px;
  margin: 20px auto 40px;
  padding: 0 16px;
}

@media (max-width: 768px){
  .promotion-page{
    padding: 0 12px;
  }
  .trend-table,
  .data-table{
    min-width: 0;
  }
  .table-container{
    overflow-x: auto;
  }
  .analytics-panel,
  .payout-card,
  .analytics-panel__head,
  .promo-note{
    width: 100%;
  }
}

.affiliate-page{
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.hero-layout{
  display: flex;
  gap: 20px;
  flex-direction: column;
  
}
@media (min-width: 900px){

}
.hero-content{
  background: #ffffff;
  
  
  
  
}
.badge{
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--brand-dark);
  border: 1px solid #dde3ff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.hero-content h1{
  
  font-size: 15px;
  
  
  font-weight: normal;
}
.hero-content h1 strong{
  color: var(--brand-dark);
}
.hero-sub{
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}
.hero-sub .em{
  color: var(--brand-dark);
  font-weight: 600;
}

.promo-card{
  
  
  
  
  
  display: flex;
  flex-direction: row;
}
.promo-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.promo-title{
  font-size: 16px;
  font-weight: 700;
}
.promo-status{
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--muted);
  background: #f8fafc;
  color: var(--text-2);
}
.promo-status.ok{
  background: #ecfdf5;
  color: #065f46;
  border-color: #bbf7d0;
}
.promo-status.off{
  background: #fff7ed;
  color: #7c2d12;
  border-color: #fed7aa;
}
.promo-row{
  margin-top: 16px;
  flex: 2;
  background-color: #ffffff;
  
}
.input-wrap{
  display: flex;
  align-items: center;
  gap: 10px;
}

.promo-meta{
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}


.btn:focus-visible{
  outline: 0;
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
}
.btn:active{
  transform: translateY(1px);
}


.btn-icon{
  width: 44px;
  justify-content: center;
  padding: 10px;
}
.btn-icon .icon{
  display: block;
}
.btn-icon .icon-check{ display: none; }
.btn-icon.copied .icon-copy{ display: none; }
.btn-icon.copied .icon-check{
  display: block;
  color: var(--success);
}

.analytics-section{
  margin-top: 48px;
}
.section-header h2{
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
}
.section-subtitle{
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.analytics-summary{
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.metric-card{
  flex: 1 1 220px;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-card__label{
  font-size: 13px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.metric-card__value{
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-1);
}
.metric-card__delta{
  font-size: 12px;
  color: var(--brand-dark);
  font-weight: 600;
}

.analytics-panels{
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 900px){
  .analytics-panels{
    flex-wrap: wrap;
    flex-direction: row;
  }
}
.analytics-panel{
  flex: 1 1 360px;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  /* box-shadow: 0 2px 3px rgba(0,0,0,.1); */
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.analytics-panel__head{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.analytics-panel__head h3{
  margin: 0;
  font-size: 16px;
}
.panel-sub{
  font-size: 12px;
  color: var(--text-2);
}

.chart-wrap{
  position: relative;
  width: 100%;
  height: 240px;
}
.chart-wrap canvas{
  width: 100% !important;
  height: 100% !important;
}

.table-container{
  overflow-x: auto;
}
.trend-table,
.data-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 0;
  table-layout: fixed;
}
.trend-table thead th,
.data-table thead th{
  text-align: left;
  padding: 8px 0;
  
  
  border-bottom: 1px solid var(--muted);
  flex: 1;
}
.trend-table tbody td,
.data-table tbody td{
  padding: 10px 0;
  border-bottom: 1px solid rgba(226,232,240,.6);
  color: var(--text-1);
  word-break: break-word;
}

.trend-table tbody tr:last-child td,
.data-table tbody tr:last-child td{
  border-bottom: none;
}
.empty{
  text-align: center;
  color: var(--text-2);
  padding: 16px 0;
}

@media (min-width: 900px){
  .trend-table,
  .data-table{
    min-width: 420px;
    table-layout: auto;
  }
}

.steps-section{
  margin-top: 48px;
}
.steps-list{
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-item{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
}
.step-index{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.step-body h4{
  margin: 0 0 4px;
  font-size: 15px;
}
.step-body p{
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

.note-section{
  margin-top: 40px;
}
.note-card{
  background: var(--card);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
}
.note-card h3{
  margin: 0 0 12px;
  font-size: 16px;
}
.note-card ul{
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  line-height: 1.6;
  font-size: 13px;
}

@media (max-width: 640px){
  .input-wrap{
    flex-direction: column;
    align-items: stretch;
  }
  .btn-icon{
    width: 100%;
  }
  .metric-card{
    min-width: 100%;
  }
  .steps-list{
    gap: 12px;
  }
  .step-item{
    flex-direction: column;
    gap: 10px;
  }
  .step-index{
    width: 32px;
    height: 32px;
    font-size: 15px;
  }
  
  .trend-table,
  .data-table{
    min-width: 0;           
    width: 100%;            
  }
  
  .nav-list{ flex-wrap: wrap; }
}


section.promo-summary {
    background-color: #ffffff;
}