/* ============================================================
   SZD — Affiliate / Loyalty / Sponsorship front-office redesign
   Scoped to ets_affiliatemarketing module pages only.
   Matches the theme: pink/playful, rounded, RTL, mobile-first.
   v=A1
   ============================================================ */
body[id^="module-ets_affiliatemarketing-"]{
  --af-pink:#F478A9;--af-pink2:#FF8FBD;--af-dk:#C2185B;--af-ink:#3D2C2E;
  --af-ink2:#7B6B6E;--af-soft:#FFF4F8;--af-soft2:#FDF0F6;--af-line:#F0E6EA;--af-r:16px;
}
body[id^="module-ets_affiliatemarketing-"] *{box-sizing:border-box}

/* ---------- main wrapper ---------- */
body[id^="module-ets_affiliatemarketing-"] .ets-am-program{
  max-width:1000px;margin:14px auto 0;padding:0 12px;font-family:inherit
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-program .ets-am-content{
  background:transparent
}

/* ---------- header: title + sub-program tabs ---------- */
body[id^="module-ets_affiliatemarketing-"] .navbar-page{margin:0 0 14px}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links{
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;list-style:none;
  margin:0;padding:16px 16px 14px;
  background:linear-gradient(135deg,var(--af-pink),var(--af-pink2));
  border-radius:var(--af-r);box-shadow:0 8px 22px rgba(244,120,169,.28)
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links .list-title{
  flex:1 1 100%;margin:0 0 6px
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links .list-title h1,
body[id^="module-ets_affiliatemarketing-"] h1.only-title{
  display:flex;align-items:center;gap:9px;margin:0;
  font-size:18px;font-weight:900;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.12)
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links .list-title h1 .ets_svg svg,
body[id^="module-ets_affiliatemarketing-"] h1.only-title .ets_svg svg{
  width:20px;height:20px;fill:#fff
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links li:not(.list-title){list-style:none}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links li:not(.list-title) a{
  display:inline-flex;align-items:center;padding:8px 16px;border-radius:999px;
  background:rgba(255,255,255,.22);color:#fff;font-weight:800;font-size:12.5px;
  text-decoration:none;transition:.16s;border:1px solid rgba(255,255,255,.35)
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links li:not(.list-title) a:hover{
  background:rgba(255,255,255,.34)
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content-links li:not(.list-title) a.active{
  background:#fff;color:var(--af-dk);box-shadow:0 3px 8px rgba(0,0,0,.12)
}

/* standalone title (loyalty page) gets its own pink card */
body[id^="module-ets_affiliatemarketing-"] h1.only-title{
  background:linear-gradient(135deg,var(--af-pink),var(--af-pink2));
  padding:16px;border-radius:var(--af-r);box-shadow:0 8px 22px rgba(244,120,169,.28);
  margin:0 0 14px
}

/* ---------- content cards ---------- */
body[id^="module-ets_affiliatemarketing-"] .ets-am-content .content,
body[id^="module-ets_affiliatemarketing-"] .eam-section,
body[id^="module-ets_affiliatemarketing-"] .stats-container{
  background:#fff;border:1px solid var(--af-line);border-radius:var(--af-r);
  padding:16px;margin:0 0 14px;box-shadow:0 4px 14px rgba(244,120,169,.08)
}
body[id^="module-ets_affiliatemarketing-"] .eam-p0{padding:0}

/* paragraphs (loyalty eligibility text etc.) */
body[id^="module-ets_affiliatemarketing-"] .ets-am-content p,
body[id^="module-ets_affiliatemarketing-"] .eam-section p{
  color:var(--af-ink2);font-size:13.5px;line-height:2;text-align:right
}
body[id^="module-ets_affiliatemarketing-"] .ets-am-content strong{color:var(--af-ink)}

/* ---------- alerts ---------- */
body[id^="module-ets_affiliatemarketing-"] .alert{
  border-radius:12px;border:none;padding:12px 16px;font-weight:700;font-size:13px;text-align:right
}
body[id^="module-ets_affiliatemarketing-"] .alert-info{background:#FFF1F7;color:var(--af-dk)}
body[id^="module-ets_affiliatemarketing-"] .alert-warning{background:#FFF6E6;color:#9A6A00}
body[id^="module-ets_affiliatemarketing-"] .alert-success{background:#EAF8EF;color:#1E7A45}

/* ---------- KPI stat cards ---------- */
body[id^="module-ets_affiliatemarketing-"] .eam-dashboard-reward .row{display:flex;flex-wrap:wrap;margin:0 -6px}
body[id^="module-ets_affiliatemarketing-"] .eam-dashboard-reward [class*="col-"]{padding:6px}
body[id^="module-ets_affiliatemarketing-"] .box-info{
  border-radius:14px;padding:14px;color:#fff;min-height:92px;display:flex;
  flex-direction:column;justify-content:center;gap:4px;box-shadow:0 5px 14px rgba(0,0,0,.10)
}
body[id^="module-ets_affiliatemarketing-"] .box-info [class*="number"],
body[id^="module-ets_affiliatemarketing-"] .box-info .value,
body[id^="module-ets_affiliatemarketing-"] .box-info b{font-size:18px;font-weight:900}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-blue"]{background:linear-gradient(135deg,#4F9EE8,#3B7FD0)}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-green"]{background:linear-gradient(135deg,#46C28A,#2FA572)}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-red"]{background:linear-gradient(135deg,#F2787E,#E0565D)}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-orange"]{background:linear-gradient(135deg,#F7A85C,#EE8B36)}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-pink"]{background:linear-gradient(135deg,var(--af-pink),var(--af-dk))}
body[id^="module-ets_affiliatemarketing-"] .box-info[data-bg="bg-violet"]{background:linear-gradient(135deg,#9E7BD6,#7E5CC0)}

/* ---------- filters ---------- */
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter{
  display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;
  background:var(--af-soft);border:1px solid var(--af-line);border-radius:var(--af-r);
  padding:14px;margin:0 0 14px
}
body[id^="module-ets_affiliatemarketing-"] .eam_select_filter{flex:1 1 160px;padding:0}
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter label{
  display:block;font-size:11.5px;font-weight:800;color:var(--af-ink2);margin:0 0 5px
}
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter select,
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter input[type="text"],
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter .form-control{
  width:100%;height:42px;border:1px solid var(--af-line);border-radius:11px;
  padding:0 12px;background:#fff;color:var(--af-ink);font-size:13px;font-family:inherit;
  appearance:none;-webkit-appearance:none
}
body[id^="module-ets_affiliatemarketing-"] .eam-box-filter select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C2185B' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 12px center;padding-left:32px
}
body[id^="module-ets_affiliatemarketing-"] .eam_action{display:flex;gap:8px;flex:1 1 100%;margin-top:4px}

/* ---------- buttons ---------- */
body[id^="module-ets_affiliatemarketing-"] .btn,
body[id^="module-ets_affiliatemarketing-"] button[type="submit"],
body[id^="module-ets_affiliatemarketing-"] .btn-default{
  border-radius:11px;font-weight:800;font-size:13px;font-family:inherit;padding:10px 18px;
  border:1.5px solid var(--af-pink);background:#fff;color:var(--af-dk);cursor:pointer;transition:.16s
}
body[id^="module-ets_affiliatemarketing-"] .btn:hover,
body[id^="module-ets_affiliatemarketing-"] .btn-default:hover{background:var(--af-soft)}
body[id^="module-ets_affiliatemarketing-"] .btn-success,
body[id^="module-ets_affiliatemarketing-"] .btn-primary,
body[id^="module-ets_affiliatemarketing-"] .product-sales-filter,
body[id^="module-ets_affiliatemarketing-"] .js-eam-btn-submit{
  background:linear-gradient(135deg,var(--af-pink),var(--af-pink2));color:#fff;border-color:transparent;
  box-shadow:0 5px 14px rgba(244,120,169,.32)
}
body[id^="module-ets_affiliatemarketing-"] .btn-success:hover,
body[id^="module-ets_affiliatemarketing-"] .product-sales-filter:hover{filter:brightness(1.05)}
body[id^="module-ets_affiliatemarketing-"] .btn-block{width:100%}

/* ---------- tables ---------- */
body[id^="module-ets_affiliatemarketing-"] .eam-table-flat,
body[id^="module-ets_affiliatemarketing-"] .eam-table-data,
body[id^="module-ets_affiliatemarketing-"] .ets-am-content table{
  width:100%;border-collapse:separate;border-spacing:0;background:#fff;
  border:1px solid var(--af-line);border-radius:var(--af-r);overflow:hidden;font-size:12.5px
}
body[id^="module-ets_affiliatemarketing-"] .eam-table-flat th,
body[id^="module-ets_affiliatemarketing-"] .eam-table-data th,
body[id^="module-ets_affiliatemarketing-"] .ets-am-content table th{
  background:var(--af-soft2);color:var(--af-dk);font-weight:800;padding:12px 10px;text-align:right;border:none
}
body[id^="module-ets_affiliatemarketing-"] .eam-table-flat td,
body[id^="module-ets_affiliatemarketing-"] .eam-table-data td,
body[id^="module-ets_affiliatemarketing-"] .ets-am-content table td{
  padding:11px 10px;text-align:right;color:var(--af-ink);border:none;border-top:1px solid var(--af-line)
}
body[id^="module-ets_affiliatemarketing-"] .eam-table-flat tbody tr:nth-child(even){background:#FFFcFd}

/* ---------- refer / sponsorship boxes ---------- */
body[id^="module-ets_affiliatemarketing-"] .eam-box-field{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 0;
  border-bottom:1px solid var(--af-line)
}
body[id^="module-ets_affiliatemarketing-"] .eam-box-field:last-child{border-bottom:none}
body[id^="module-ets_affiliatemarketing-"] .eam-box-label{
  display:flex;align-items:center;gap:6px;min-width:130px;font-weight:800;color:var(--af-ink);font-size:13px
}
body[id^="module-ets_affiliatemarketing-"] .eam-box-input,
body[id^="module-ets_affiliatemarketing-"] .eam-box-link{flex:1 1 200px}
body[id^="module-ets_affiliatemarketing-"] .eam-box-input input[type="text"],
body[id^="module-ets_affiliatemarketing-"] .eam-ref-banner-code,
body[id^="module-ets_affiliatemarketing-"] .input-group .form-control{
  width:100%;height:42px;border:1px solid var(--af-line);border-radius:11px 0 0 11px;
  padding:0 12px;background:#FFF8FB;color:var(--af-ink2);font-size:12px;direction:ltr;text-align:left
}
body[id^="module-ets_affiliatemarketing-"] .btn-copy-link,
body[id^="module-ets_affiliatemarketing-"] .input-group-addon{
  display:inline-flex;align-items:center;justify-content:center;height:42px;min-width:44px;
  background:linear-gradient(135deg,var(--af-pink),var(--af-pink2));color:#fff;
  border-radius:0 11px 11px 0;cursor:pointer;border:none
}
body[id^="module-ets_affiliatemarketing-"] .btn-copy-link .ets_svg svg{fill:#fff;width:16px;height:16px}
body[id^="module-ets_affiliatemarketing-"] .qr_image{border:1px solid var(--af-line);border-radius:12px;padding:6px;background:#fff}
body[id^="module-ets_affiliatemarketing-"] .eam-tooltip .ets_svg svg{fill:var(--af-pink);width:15px;height:15px}

/* ---------- back / breadcrumb ---------- */
body[id^="module-ets_affiliatemarketing-"] .eam-back-section{
  display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin:14px 0 4px
}
body[id^="module-ets_affiliatemarketing-"] .eam-back-link{
  display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:999px;
  background:#fff;border:1px solid var(--af-line);color:var(--af-ink);font-weight:800;
  font-size:12px;text-decoration:none;transition:.16s
}
body[id^="module-ets_affiliatemarketing-"] .eam-back-link:hover{
  border-color:var(--af-pink);color:var(--af-dk);background:var(--af-soft)
}
body[id^="module-ets_affiliatemarketing-"] .eam-back-link .ets_svg svg{fill:currentColor;width:13px;height:13px}
