/* AffiliatePro — Client Design System v3 */

/* ── Design Tokens ─────────────────────────────── */
:root {
  --ap-font-head:  'Plus Jakarta Sans', -apple-system, sans-serif;
  --ap-font-body:  'Inter', -apple-system, sans-serif;

  --ap-indigo-50:  #eef2ff;
  --ap-indigo-100: #e0e7ff;
  --ap-indigo-500: #6366f1;
  --ap-indigo-600: #4f46e5;
  --ap-indigo-700: #4338ca;

  --ap-emerald-50:  #ecfdf5;
  --ap-emerald-500: #10b981;
  --ap-emerald-600: #059669;

  --ap-amber-50:  #fffbeb;
  --ap-amber-500: #f59e0b;
  --ap-amber-600: #d97706;

  --ap-sky-50:  #f0f9ff;
  --ap-sky-500: #0ea5e9;
  --ap-sky-600: #0284c7;

  --ap-violet-50:  #f5f3ff;
  --ap-violet-600: #7c3aed;

  --ap-rose-50:  #fff1f2;
  --ap-rose-500: #f43f5e;

  --ap-slate-50:  #f8fafc;
  --ap-slate-100: #f1f5f9;
  --ap-slate-200: #e2e8f0;
  --ap-slate-300: #cbd5e1;
  --ap-slate-400: #94a3b8;
  --ap-slate-500: #64748b;
  --ap-slate-700: #334155;
  --ap-slate-800: #1e293b;
  --ap-slate-900: #0f172a;

  --ap-radius-xs: 6px;
  --ap-radius-sm: 8px;
  --ap-radius:    12px;
  --ap-radius-lg: 16px;
  --ap-radius-xl: 20px;

  --ap-shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --ap-shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --ap-shadow:    0 4px 12px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --ap-shadow-md: 0 8px 24px rgba(15,23,42,.09), 0 4px 8px rgba(15,23,42,.04);
  --ap-shadow-lg: 0 16px 40px rgba(15,23,42,.10), 0 8px 16px rgba(15,23,42,.05);

  --ap-transition: all .18s cubic-bezier(.4,0,.2,1);
}

/* ── Base ──────────────────────────────────────── */
.ap-wrap {
  font-family: var(--ap-font-body);
  color: var(--ap-slate-700);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.ap-wrap * { box-sizing: border-box; }

/* ── Typography helpers ────────────────────────── */
.ap-title {
  font-family: var(--ap-font-head);
  font-weight: 700;
  color: var(--ap-slate-900);
}
.ap-label {
  font-family: var(--ap-font-body);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--ap-slate-500);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════
   LINK HERO PANEL
══════════════════════════════════════════════════ */
.ap-hero {
  position: relative;
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
  border-radius: var(--ap-radius-lg);
  padding: 24px 26px 20px;
  margin-bottom: 18px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(79,70,229,.28);
}
/* Decorative circles */
.ap-hero::before,
.ap-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.ap-hero::before { width: 220px; height: 220px; right: -50px; top: -70px; }
.ap-hero::after  { width: 140px; height: 140px; right: 80px;  bottom: -60px; }

.ap-hero-eyebrow {
  font-family: var(--ap-font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  opacity: .7;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ap-hero-eyebrow svg { width: 14px; height: 14px; }

.ap-hero-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.ap-hero-input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--ap-radius-sm);
  color: #fff;
  padding: 11px 14px;
  font-size: 13px;
  font-family: 'SFMono-Regular', 'Fira Code', Consolas, monospace;
  font-weight: 500;
  outline: none;
  transition: var(--ap-transition);
}
.ap-hero-input:focus { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }

.ap-hero-copy {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: var(--ap-indigo-600);
  border: none;
  border-radius: var(--ap-radius-sm);
  padding: 0 20px;
  font-family: var(--ap-font-head);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ap-transition);
  flex-shrink: 0;
}
.ap-hero-copy svg { width: 15px; height: 15px; }
.ap-hero-copy:hover  { background: #f0efff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.ap-hero-copy:active { transform: translateY(0); }
.ap-hero-copy.copied { background: var(--ap-emerald-500); color: #fff; }

.ap-hero-meta {
  margin-top: 10px;
  font-size: 11.5px;
  opacity: .65;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.ap-hero-meta span { display: flex; align-items: center; gap: 4px; }
.ap-hero-meta svg  { width: 12px; height: 12px; }

/* ══════════════════════════════════════════════════
   METRIC CARDS
══════════════════════════════════════════════════ */
.ap-metrics-section-label {
  font-family: var(--ap-font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ap-slate-400);
  margin-bottom: 10px;
  padding-left: 2px;
}

.ap-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 991px) { .ap-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .ap-metrics { grid-template-columns: 1fr 1fr; } }

.ap-stat {
  background: #fff;
  border-radius: var(--ap-radius);
  padding: 18px 16px 16px;
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: var(--ap-transition);
}
.ap-stat:hover { box-shadow: var(--ap-shadow-sm); border-color: var(--ap-slate-200); }

.ap-stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--ap-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.ap-stat-icon-wrap svg { width: 20px; height: 20px; }

.ap-stat-icon-wrap.sky     { background: var(--ap-sky-50);     color: var(--ap-sky-600); }
.ap-stat-icon-wrap.indigo  { background: var(--ap-indigo-50);  color: var(--ap-indigo-600); }
.ap-stat-icon-wrap.emerald { background: var(--ap-emerald-50); color: var(--ap-emerald-600); }
.ap-stat-icon-wrap.amber   { background: var(--ap-amber-50);   color: var(--ap-amber-600); }
.ap-stat-icon-wrap.violet  { background: var(--ap-violet-50);  color: var(--ap-violet-600); }

.ap-stat-value {
  font-family: var(--ap-font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--ap-slate-900);
  line-height: 1;
  letter-spacing: -.5px;
}
.ap-stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ap-slate-400);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════
   ALERT STRIP
══════════════════════════════════════════════════ */
.ap-strip {
  border-radius: var(--ap-radius);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-strip svg { width: 15px; height: 15px; flex-shrink: 0; }
.ap-strip.sky     { background: var(--ap-sky-50);     color: var(--ap-sky-600);     border: 1px solid #bae6fd; }
.ap-strip.amber   { background: var(--ap-amber-50);   color: var(--ap-amber-600);   border: 1px solid #fde68a; }
.ap-strip.emerald { background: var(--ap-emerald-50); color: var(--ap-emerald-600); border: 1px solid #a7f3d0; }
.ap-strip.rose    { background: var(--ap-rose-50);    color: var(--ap-rose-500);    border: 1px solid #fecdd3; }

/* ══════════════════════════════════════════════════
   LEVEL CARD
══════════════════════════════════════════════════ */
.ap-level {
  background: #fff;
  border-radius: var(--ap-radius);
  padding: 18px 20px;
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  margin-bottom: 18px;
}
.ap-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.ap-level-heading {
  font-family: var(--ap-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-slate-800);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ap-level-heading svg { width: 16px; height: 16px; color: var(--ap-amber-500); }

.ap-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--ap-font-head);
  white-space: nowrap;
}
.ap-chip.bronze   { background: #fff7ed; color: #c2410c; border: 1.5px solid #fed7aa; }
.ap-chip.prata    { background: #f8fafc; color: #475569; border: 1.5px solid #cbd5e1; }
.ap-chip.ouro     { background: #fefce8; color: #a16207; border: 1.5px solid #fde68a; }
.ap-chip.diamante { background: var(--ap-indigo-50); color: var(--ap-indigo-600); border: 1.5px solid #c4b5fd; }
.ap-chip.sky      { background: var(--ap-sky-50); color: var(--ap-sky-600); border: 1.5px solid #bae6fd; }
.ap-chip.default  { background: var(--ap-slate-100); color: var(--ap-slate-600); border: 1.5px solid var(--ap-slate-200); }

.ap-level-caption {
  font-size: 12px;
  color: var(--ap-slate-500);
  margin-bottom: 8px;
}
.ap-level-caption strong { color: var(--ap-slate-700); font-weight: 600; }

.ap-track {
  background: var(--ap-slate-100);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.ap-track-fill {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #7c3aed);
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.ap-level-max {
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-emerald-600);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ap-level-max svg { width: 15px; height: 15px; }

/* ══════════════════════════════════════════════════
   NAV TILES
══════════════════════════════════════════════════ */
.ap-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
@media (max-width: 768px) { .ap-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 479px) { .ap-tiles { grid-template-columns: repeat(2, 1fr); } }

.ap-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 12px 16px;
  background: #fff;
  border: 1.5px solid var(--ap-slate-100);
  border-radius: var(--ap-radius);
  text-decoration: none !important;
  color: var(--ap-slate-700);
  font-family: var(--ap-font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--ap-transition);
  box-shadow: var(--ap-shadow-xs);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ap-tile:hover {
  border-color: var(--ap-indigo-500);
  color: var(--ap-indigo-600);
  box-shadow: var(--ap-shadow);
  transform: translateY(-2px);
}
.ap-tile:active { transform: translateY(0); }

.ap-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ap-slate-50);
  border: 1.5px solid var(--ap-slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-slate-500);
  transition: var(--ap-transition);
}
.ap-tile-icon svg { width: 20px; height: 20px; }
.ap-tile:hover .ap-tile-icon {
  background: var(--ap-indigo-50);
  border-color: var(--ap-indigo-100);
  color: var(--ap-indigo-600);
}

/* ══════════════════════════════════════════════════
   INNER PAGE CARDS
══════════════════════════════════════════════════ */
.ap-card {
  background: #fff;
  border-radius: var(--ap-radius);
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  margin-bottom: 16px;
  overflow: hidden;
}
.ap-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ap-slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ap-card-head-title {
  font-family: var(--ap-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-slate-800);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ap-card-head-title svg { width: 16px; height: 16px; color: var(--ap-slate-400); }
.ap-card-body { padding: 20px; }

/* ══════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════ */
.ap-empty {
  text-align: center;
  padding: 52px 24px;
}
.ap-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--ap-radius);
  background: var(--ap-slate-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-slate-300);
  margin-bottom: 16px;
}
.ap-empty-icon svg { width: 28px; height: 28px; }
.ap-empty-title {
  font-family: var(--ap-font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ap-slate-800);
  margin: 0 0 6px;
}
.ap-empty-sub { font-size: 13px; color: var(--ap-slate-400); margin: 0 0 20px; }

/* ══════════════════════════════════════════════════
   BUTTON
══════════════════════════════════════════════════ */
.ap-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--ap-radius-sm);
  font-family: var(--ap-font-head);
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--ap-transition);
}
.ap-btn svg { width: 16px; height: 16px; }
.ap-btn.primary {
  background: var(--ap-indigo-600);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.ap-btn.primary:hover {
  background: var(--ap-indigo-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
  color: #fff;
  text-decoration: none;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════ */
.ap-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
  flex-wrap: wrap;
}
.ap-page-title {
  font-family: var(--ap-font-head);
  font-size: 19px;
  font-weight: 800;
  color: var(--ap-slate-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.ap-page-title svg { width: 20px; height: 20px; color: var(--ap-indigo-500); flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════════ */
.ap-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ap-filter-bar .ap-select,
.ap-filter-bar .ap-input,
.ap-filter-bar input[type=date] {
  height: 36px;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════ */
.ap-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 767px) { .ap-form-grid { grid-template-columns: 1fr; } }

.ap-form-section {
  background: #fff;
  border-radius: var(--ap-radius);
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  overflow: hidden;
}
.ap-form-section-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--ap-slate-100);
  font-family: var(--ap-font-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ap-slate-800);
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ap-slate-50);
}
.ap-form-section-head svg { width: 15px; height: 15px; color: var(--ap-indigo-500); }
.ap-form-section-body { padding: 18px; }

.ap-field { margin-bottom: 14px; }
.ap-field:last-child { margin-bottom: 0; }

.ap-label {
  display: block;
  font-family: var(--ap-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ap-slate-600);
  margin-bottom: 5px;
  letter-spacing: .15px;
}
.ap-label .opt {
  font-weight: 400;
  color: var(--ap-slate-400);
  font-size: 11px;
  margin-left: 4px;
}

.ap-input,
.ap-select,
.ap-textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--ap-slate-200);
  border-radius: var(--ap-radius-sm);
  color: var(--ap-slate-800);
  font-family: var(--ap-font-body);
  font-size: 13.5px;
  font-weight: 400;
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.ap-input:focus,
.ap-select:focus,
.ap-textarea:focus {
  border-color: var(--ap-indigo-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.ap-input[readonly] { background: var(--ap-slate-50); color: var(--ap-slate-500); cursor: default; }
.ap-input.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 13px; }
.ap-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; cursor: pointer; }
.ap-textarea { resize: vertical; min-height: 80px; }

.ap-input-group { display: flex; align-items: stretch; }
.ap-input-group .ap-input { border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0; }
.ap-prefix {
  display: flex;
  align-items: center;
  padding: 0 11px;
  background: var(--ap-slate-50);
  border: 1.5px solid var(--ap-slate-200);
  border-right: none;
  border-radius: var(--ap-radius-sm) 0 0 var(--ap-radius-sm);
  font-size: 13px;
  color: var(--ap-slate-500);
  font-weight: 600;
  white-space: nowrap;
}
.ap-hint {
  display: block;
  font-size: 11.5px;
  color: var(--ap-slate-400);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   STATS MINI STRIP
══════════════════════════════════════════════════ */
.ap-stats-mini {
  display: flex;
  gap: 2px;
  background: var(--ap-slate-50);
  border: 1.5px solid var(--ap-slate-100);
  border-radius: var(--ap-radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.ap-stats-mini-item {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  border-right: 1px solid var(--ap-slate-100);
  min-width: 0;
}
.ap-stats-mini-item:last-child { border-right: none; }
.ap-stats-mini-value {
  font-family: var(--ap-font-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--ap-slate-900);
  line-height: 1.1;
}
.ap-stats-mini-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ap-slate-400);
  margin-top: 2px;
}
.ap-stats-mini-value.emerald { color: var(--ap-emerald-600); }
.ap-stats-mini-value.amber   { color: var(--ap-amber-600); }
.ap-stats-mini-value.indigo  { color: var(--ap-indigo-600); }

/* ══════════════════════════════════════════════════
   STATUS PILLS
══════════════════════════════════════════════════ */
.ap-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--ap-font-head);
  white-space: nowrap;
}
.ap-pill.p-pending   { background: var(--ap-amber-50);   color: var(--ap-amber-600);   border: 1px solid #fde68a; }
.ap-pill.p-active    { background: var(--ap-emerald-50); color: var(--ap-emerald-600); border: 1px solid #a7f3d0; }
.ap-pill.p-approved  { background: var(--ap-sky-50);     color: var(--ap-sky-600);     border: 1px solid #bae6fd; }
.ap-pill.p-paid      { background: var(--ap-emerald-50); color: var(--ap-emerald-600); border: 1px solid #a7f3d0; }
.ap-pill.p-rejected,
.ap-pill.p-reversed,
.ap-pill.p-inactive  { background: var(--ap-rose-50);    color: var(--ap-rose-500);    border: 1px solid #fecdd3; }
.ap-pill.p-processing { background: var(--ap-indigo-50); color: var(--ap-indigo-600);  border: 1px solid #c4b5fd; }

/* ══════════════════════════════════════════════════
   INNER LINK ROW (non-hero variant)
══════════════════════════════════════════════════ */
.ap-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}
.ap-link-row .ap-input { font-family: monospace; font-size: 12.5px; }
.ap-link-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--ap-indigo-600);
  color: #fff;
  border: none;
  border-radius: var(--ap-radius-sm);
  font-family: var(--ap-font-head);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ap-transition);
  flex-shrink: 0;
}
.ap-link-copy svg { width: 13px; height: 13px; }
.ap-link-copy:hover { background: var(--ap-indigo-700); }
.ap-link-copy.copied { background: var(--ap-emerald-500); }

/* ══════════════════════════════════════════════════
   CAMPAIGN CARDS
══════════════════════════════════════════════════ */
.ap-campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 6px;
}
@media (max-width: 640px) { .ap-campaign-grid { grid-template-columns: 1fr; } }

.ap-campaign-card {
  background: #fff;
  border-radius: var(--ap-radius);
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  overflow: hidden;
  transition: var(--ap-transition);
}
.ap-campaign-card:hover { box-shadow: var(--ap-shadow-sm); border-color: var(--ap-slate-200); }
.ap-campaign-card-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--ap-slate-50);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.ap-campaign-name {
  font-family: var(--ap-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-slate-900);
}
.ap-campaign-body { padding: 12px 16px; }
.ap-campaign-desc { font-size: 13px; color: var(--ap-slate-500); margin-bottom: 10px; line-height: 1.4; }
.ap-commission-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--ap-emerald-50);
  color: var(--ap-emerald-600);
  border: 1px solid #a7f3d0;
  border-radius: 99px;
  padding: 3px 11px;
  font-family: var(--ap-font-head);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.ap-commission-badge svg { width: 12px; height: 12px; }
.ap-campaign-expiry {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ap-slate-400);
  margin-bottom: 10px;
}
.ap-campaign-expiry svg { width: 12px; height: 12px; }

/* ══════════════════════════════════════════════════
   COUPON CARD
══════════════════════════════════════════════════ */
.ap-coupon-card {
  background: #fff;
  border-radius: var(--ap-radius-lg);
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.ap-coupon-top {
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid var(--ap-slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ap-coupon-code-val {
  font-family: var(--ap-font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ap-slate-900);
}
.ap-coupon-stats {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.ap-coupon-stat-item { text-align: center; }
.ap-coupon-stat-val {
  font-family: var(--ap-font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--ap-slate-900);
  line-height: 1;
}
.ap-coupon-stat-val.emerald { color: var(--ap-emerald-600); }
.ap-coupon-stat-label { font-size: 11px; color: var(--ap-slate-400); font-weight: 500; margin-top: 2px; }
.ap-coupon-copy-row {
  padding: 0 24px 18px;
}

/* ══════════════════════════════════════════════════
   MATERIAL GRID
══════════════════════════════════════════════════ */
.ap-material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .ap-material-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .ap-material-grid { grid-template-columns: 1fr; } }

.ap-material-card {
  background: #fff;
  border-radius: var(--ap-radius);
  border: 1.5px solid var(--ap-slate-100);
  box-shadow: var(--ap-shadow-xs);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--ap-transition);
}
.ap-material-card:hover { box-shadow: var(--ap-shadow-sm); border-color: var(--ap-slate-200); }
.ap-material-preview {
  background: var(--ap-slate-50);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--ap-slate-100);
}
.ap-material-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.ap-material-preview .ap-material-icon-placeholder {
  color: var(--ap-slate-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ap-slate-400);
}
.ap-material-preview .ap-material-icon-placeholder svg { width: 32px; height: 32px; }
.ap-material-body { padding: 12px 14px; flex: 1; }
.ap-material-name {
  font-family: var(--ap-font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-slate-800);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-material-type {
  font-size: 11px;
  color: var(--ap-slate-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.ap-material-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--ap-slate-50);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════
   BUTTON VARIANTS
══════════════════════════════════════════════════ */
.ap-btn.sm { padding: 7px 14px; font-size: 12.5px; }
.ap-btn.sm svg { width: 14px; height: 14px; }
.ap-btn.ghost {
  background: transparent;
  color: var(--ap-slate-600);
  border: 1.5px solid var(--ap-slate-200);
}
.ap-btn.ghost:hover { background: var(--ap-slate-50); color: var(--ap-slate-800); text-decoration: none; }
.ap-btn.ghost svg { color: inherit; }
.ap-btn.emerald {
  background: var(--ap-emerald-500);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.25);
}
.ap-btn.emerald:hover { background: var(--ap-emerald-600); color: #fff; text-decoration: none; }

/* ══════════════════════════════════════════════════
   INFO BOX
══════════════════════════════════════════════════ */
.ap-info-box {
  background: var(--ap-indigo-50);
  border: 1px solid var(--ap-indigo-100);
  border-radius: var(--ap-radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--ap-slate-700);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-info-box svg { width: 15px; height: 15px; color: var(--ap-indigo-500); flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   PAGINATION (Bootstrap override)
══════════════════════════════════════════════════ */
.ap-wrap .pagination {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.ap-wrap .pagination li a,
.ap-wrap .pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--ap-radius-xs);
  border: 1.5px solid var(--ap-slate-200);
  font-family: var(--ap-font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-slate-600);
  text-decoration: none;
  transition: var(--ap-transition);
  background: #fff;
}
.ap-wrap .pagination li a:hover { border-color: var(--ap-indigo-500); color: var(--ap-indigo-600); text-decoration: none; }
.ap-wrap .pagination li.active span,
.ap-wrap .pagination li.active a {
  background: var(--ap-indigo-600);
  border-color: var(--ap-indigo-600);
  color: #fff;
}
.ap-wrap .pagination li.disabled a,
.ap-wrap .pagination li.disabled span {
  opacity: .4;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   COPY FEEDBACK
══════════════════════════════════════════════════ */
.btn-copy-success,
.ap-hero-copy.copied,
.ap-link-copy.copied {
  background: var(--ap-emerald-500) !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════
   TERMS BOX
══════════════════════════════════════════════════ */
.ap-terms-box {
  background: var(--ap-slate-50);
  border: 1.5px solid var(--ap-slate-200);
  border-radius: var(--ap-radius-sm);
  padding: 14px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12.5px;
  color: var(--ap-slate-600);
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.ap-checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ap-slate-700);
  font-weight: 500;
}
.ap-checkbox-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--ap-indigo-600); }
