/* Affiliate Ecom — affiliate area
   All interactive elements are scoped to .affecom-wrap and protected with !important
   so the theme's button / input styles cannot change them. Colours come from
   Settings > Appearance (CSS variables printed inline). */

.affecom-wrap {
	--affecom-primary: #6c5ce7;
	--affecom-btn-bg: #6c5ce7;
	--affecom-btn-text: #ffffff;
	--affecom-btn-hover: #5847d8;
	--affecom-btn-radius: 10px;
	--affecom-primary-soft: color-mix(in srgb, var(--affecom-primary) 10%, #fff);
	--affecom-primary-line: color-mix(in srgb, var(--affecom-primary) 30%, #fff);
	--affecom-text: #1d2133;
	--affecom-muted: #6b7083;
	--affecom-border: #e6e8f0;
	--affecom-bg: #ffffff;
	--affecom-bg-soft: #f6f7fb;
	--affecom-green: #12a150;
	--affecom-amber: #d48806;
	--affecom-red: #d6336c;
	--affecom-blue: #2f80ed;
	--affecom-radius: 16px;
	--affecom-shadow: 0 1px 2px rgba(20, 22, 40, .04), 0 6px 20px rgba(20, 22, 40, .05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--affecom-text);
	font-size: 15px;
	line-height: 1.5;
	max-width: 1120px;
	margin: 0 auto;
	text-align: start;
}
.affecom-wrap[dir="rtl"] { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif; }
.affecom-wrap *, .affecom-wrap *::before, .affecom-wrap *::after { box-sizing: border-box; }
.affecom-wrap h2, .affecom-wrap h3 { margin: 0; color: var(--affecom-text); line-height: 1.3; font-family: inherit; letter-spacing: 0; text-transform: none; }
.affecom-wrap a { color: var(--affecom-primary); text-decoration: none; box-shadow: none; }
.affecom-wrap p { margin: 0; }
.affecom-wrap .affecom-ico { flex: none; vertical-align: middle; }
.affecom-wrap .affecom-hidden, .affecom-wrap [hidden] { display: none !important; }
.affecom-wrap .affecom-muted { color: var(--affecom-muted); font-size: 13px; }
.affecom-wrap .affecom-small { font-size: 13px; }
.affecom-wrap .affecom-help { color: var(--affecom-muted); font-size: 13px; margin: 14px 0 0; }
.affecom-wrap .woocommerce-Price-amount, .affecom-wrap .woocommerce-Price-amount bdi, .affecom-wrap .woocommerce-Price-currencySymbol { color: inherit !important; font: inherit !important; background: none !important; }

/* ---------------------------------------------------------------- */
/* Reset of theme styles on buttons                                 */
/* ---------------------------------------------------------------- */
.affecom-wrap button,
.affecom-wrap .affecom-btn,
.affecom-wrap .affecom-tab,
.affecom-wrap .affecom-cat,
.affecom-wrap .affecom-share__btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
	min-height: 0 !important;
	min-width: 0 !important;
	width: auto;
	margin: 0 !important;
	font-family: inherit !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .05s;
}

/* Primary button */
.affecom-wrap .affecom-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--affecom-btn-bg) !important;
	color: var(--affecom-btn-text) !important;
	border: 1px solid transparent !important;
	border-radius: var(--affecom-btn-radius) !important;
	padding: 11px 18px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	box-shadow: 0 1px 2px rgba(20, 22, 40, .08), 0 4px 12px color-mix(in srgb, var(--affecom-btn-bg) 25%, transparent) !important;
	white-space: nowrap;
	height: auto !important;
}
.affecom-wrap .affecom-btn:hover, .affecom-wrap .affecom-btn:focus-visible { background: var(--affecom-btn-hover) !important; color: var(--affecom-btn-text) !important; }
.affecom-wrap .affecom-btn:focus-visible { outline: 3px solid var(--affecom-primary-line) !important; outline-offset: 2px; }
.affecom-wrap .affecom-btn:active { transform: translateY(1px); }
.affecom-wrap .affecom-btn[disabled] { opacity: .45 !important; cursor: not-allowed; box-shadow: none !important; }
.affecom-wrap .affecom-btn .affecom-ico, .affecom-wrap .affecom-btn svg { stroke: currentColor; }
.affecom-wrap .affecom-btn.is-done { background: var(--affecom-green) !important; }
.affecom-wrap .affecom-btn--block { display: flex !important; width: 100% !important; padding: 13px 18px !important; font-size: 15px !important; }
.affecom-wrap .affecom-btn--sm { padding: 8px 12px !important; font-size: 13px !important; }
.affecom-wrap .affecom-btn--soft { background: var(--affecom-primary-soft) !important; color: var(--affecom-primary) !important; box-shadow: none !important; }
.affecom-wrap .affecom-btn--soft:hover { background: var(--affecom-primary-line) !important; color: var(--affecom-primary) !important; }
.affecom-wrap .affecom-btn--wa { background: #25d366 !important; color: #fff !important; box-shadow: none !important; padding: 8px 10px !important; }
.affecom-wrap .affecom-btn--wa:hover { background: #1ebe5b !important; }

/* ---------------------------------------------------------------- */
/* Forms                                                            */
/* ---------------------------------------------------------------- */
.affecom-wrap .affecom-form { display: grid; gap: 16px; }
.affecom-wrap .affecom-field { display: grid; gap: 6px; }
.affecom-wrap .affecom-field > label, .affecom-wrap .affecom-field__row > label { font-weight: 600; font-size: 13px; color: var(--affecom-text); margin: 0; }
.affecom-wrap .affecom-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.affecom-wrap input[type="text"], .affecom-wrap input[type="email"], .affecom-wrap input[type="password"],
.affecom-wrap input[type="url"], .affecom-wrap input[type="search"], .affecom-wrap input[type="number"], .affecom-wrap input[type="tel"],
.affecom-wrap select, .affecom-wrap textarea {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	border: 1px solid var(--affecom-border) !important;
	background: var(--affecom-bg) !important;
	color: var(--affecom-text) !important;
	border-radius: 10px !important;
	padding: 11px 13px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	font-family: inherit !important;
	outline: none;
	margin: 0 !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: 44px;
	transition: border-color .15s, box-shadow .15s;
}
.affecom-wrap textarea { min-height: 90px; resize: vertical; }
.affecom-wrap 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='%236b7083' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	padding-inline-end: 34px !important;
}
.affecom-wrap[dir="rtl"] select { background-position: left 12px center !important; }
.affecom-wrap input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.affecom-wrap input:focus, .affecom-wrap select:focus, .affecom-wrap textarea:focus {
	border-color: var(--affecom-primary) !important;
	box-shadow: 0 0 0 3px var(--affecom-primary-soft) !important;
}
.affecom-wrap input::placeholder, .affecom-wrap textarea::placeholder { color: #a3a7b7; opacity: 1; }
.affecom-wrap .affecom-check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; margin: 0; font-weight: 400; }
.affecom-wrap .affecom-check input { width: 17px !important; height: 17px !important; margin: 0 !important; accent-color: var(--affecom-primary); flex: none; }

/* Password with eye button */
.affecom-wrap .affecom-pass { position: relative; }
.affecom-wrap .affecom-pass input { padding-inline-end: 46px !important; }
.affecom-wrap .affecom-pass__toggle {
	position: absolute !important;
	inset-inline-end: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--affecom-muted) !important;
	padding: 8px !important;
	width: 36px !important;
	height: 36px !important;
	border-radius: 8px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}
.affecom-wrap .affecom-pass__toggle:hover, .affecom-wrap .affecom-pass__toggle.is-on { background: var(--affecom-bg-soft) !important; color: var(--affecom-primary) !important; }
.affecom-wrap .affecom-hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }
.affecom-wrap .affecom-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.affecom-wrap .affecom-sponsor-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--affecom-primary-soft); color: var(--affecom-primary); padding: 6px 10px; border-radius: 999px; font-size: 13px; width: fit-content; }

/* Account type choice */
.affecom-wrap .affecom-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.affecom-wrap .affecom-choice__item { position: relative; cursor: pointer; margin: 0; font-weight: 400 !important; }
.affecom-wrap .affecom-choice__item input { position: absolute; opacity: 0; pointer-events: none; }
.affecom-wrap .affecom-choice__item > span { display: grid; gap: 4px; height: 100%; padding: 14px; border: 1px solid var(--affecom-border); border-radius: 12px; color: var(--affecom-muted); transition: all .15s; }
.affecom-wrap .affecom-choice__item strong { color: var(--affecom-text); font-size: 14px; }
.affecom-wrap .affecom-choice__item small { font-size: 12px; line-height: 1.4; }
.affecom-wrap .affecom-choice__item input:checked + span { border-color: var(--affecom-primary); background: var(--affecom-primary-soft); box-shadow: 0 0 0 1px var(--affecom-primary) inset; color: var(--affecom-primary); }
.affecom-wrap .affecom-choice__item input:focus-visible + span { outline: 3px solid var(--affecom-primary-line); }

/* Alerts */
.affecom-wrap .affecom-alert { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.affecom-wrap .affecom-alert--error { background: #fdecf1; color: #a61e4d; }
.affecom-wrap .affecom-alert--success { background: #e7f8ee; color: #0b7a3b; }
.affecom-wrap .affecom-alert--info { background: #eaf2fe; color: #1c5fbd; margin: 14px 0 0; }

/* ---------------------------------------------------------------- */
/* Auth pages                                                       */
/* ---------------------------------------------------------------- */
.affecom-wrap .affecom-auth {
	max-width: 440px; margin: 32px auto; background: var(--affecom-bg); border: 1px solid var(--affecom-border);
	border-radius: 20px; padding: 32px; box-shadow: var(--affecom-shadow);
}
.affecom-wrap .affecom-auth--wide { max-width: 580px; }
.affecom-wrap .affecom-auth__head { text-align: center; margin-bottom: 22px; }
.affecom-wrap .affecom-auth__icon {
	display: inline-flex; width: 54px; height: 54px; border-radius: 16px; align-items: center; justify-content: center;
	background: var(--affecom-primary-soft); color: var(--affecom-primary); margin-bottom: 12px;
}
.affecom-wrap .affecom-auth__head h2 { font-size: 22px; margin-bottom: 6px; }
.affecom-wrap .affecom-auth__head p { color: var(--affecom-muted); font-size: 14px; }
.affecom-wrap .affecom-auth__foot { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--affecom-muted); }
.affecom-wrap .affecom-auth__foot a { font-weight: 600; }

/* ---------------------------------------------------------------- */
/* Dashboard                                                        */
/* ---------------------------------------------------------------- */
.affecom-wrap.affecom-dash { display: grid; gap: 18px; }
.affecom-wrap .affecom-hero {
	display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap;
	background:
		radial-gradient(circle at 85% -20%, rgba(255,255,255,.18), transparent 45%),
		linear-gradient(135deg, var(--affecom-primary), color-mix(in srgb, var(--affecom-primary) 55%, #120c38));
	color: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: var(--affecom-shadow);
}
.affecom-wrap .affecom-hero__user { display: flex; gap: 16px; align-items: center; min-width: 0; }
.affecom-wrap .affecom-hero .affecom-avatar { border-radius: 50%; border: 3px solid rgba(255,255,255,.35); width: 64px; height: 64px; flex: none; }
.affecom-wrap .affecom-hero__info { display: grid; gap: 4px; min-width: 0; }
.affecom-wrap .affecom-hero__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.affecom-wrap[dir="rtl"] .affecom-hero__kicker { letter-spacing: 0; }
.affecom-wrap .affecom-hero__name { font-size: 22px; font-weight: 700; color: #fff; }
.affecom-wrap .affecom-hero__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.affecom-wrap .affecom-chip-light { background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px; color: #fff; }
.affecom-wrap .affecom-chip-light strong { color: #fff; }
.affecom-wrap .affecom-hero__balance { display: grid; gap: 6px; text-align: start; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 16px 18px; min-width: 220px; }
.affecom-wrap .affecom-hero__balance > span { font-size: 13px; opacity: .85; color: #fff; }
.affecom-wrap .affecom-hero__balance strong, .affecom-wrap .affecom-hero__balance strong * { color: #fff !important; font-size: 28px !important; font-weight: 700 !important; line-height: 1.15; }
.affecom-wrap .affecom-hero__btn {
	display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
	background: #fff !important; color: var(--affecom-primary) !important; border: 0 !important; border-radius: var(--affecom-btn-radius) !important;
	padding: 10px 14px !important; font-size: 14px !important; font-weight: 700 !important; margin-top: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.affecom-wrap .affecom-hero__btn:hover { background: rgba(255,255,255,.9) !important; }

/* Tabs (real links) */
.affecom-wrap .affecom-tabs {
	display: flex; flex-wrap: wrap; gap: 6px; background: var(--affecom-bg); border: 1px solid var(--affecom-border);
	border-radius: 14px; padding: 6px; scrollbar-width: none; box-shadow: var(--affecom-shadow);
}
.affecom-wrap .affecom-tabs::-webkit-scrollbar { display: none; }
.affecom-wrap .affecom-tab {
	display: inline-flex !important; gap: 8px; align-items: center; flex: none;
	background: transparent !important; color: var(--affecom-muted) !important; border: 0 !important; box-shadow: none !important;
	padding: 10px 14px !important; border-radius: 10px !important; font-size: 14px !important; font-weight: 600 !important; white-space: nowrap;
}
.affecom-wrap .affecom-tab:hover { color: var(--affecom-text) !important; background: var(--affecom-bg-soft) !important; }
.affecom-wrap .affecom-tab.is-active { background: var(--affecom-btn-bg) !important; color: var(--affecom-btn-text) !important; }
.affecom-wrap .affecom-tab--logout { margin-inline-start: auto !important; background: #fdecf1 !important; color: #c9184a !important; }
.affecom-wrap .affecom-tab--logout:hover { background: #c9184a !important; color: #fff !important; }

.affecom-wrap .affecom-panel { display: grid; gap: 18px; animation: affecom-fade .25s ease; }
@keyframes affecom-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.affecom-wrap .affecom-card { background: var(--affecom-bg); border: 1px solid var(--affecom-border); border-radius: var(--affecom-radius); padding: 20px; box-shadow: var(--affecom-shadow); min-width: 0; }
.affecom-wrap .affecom-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.affecom-wrap .affecom-card__head h3 { font-size: 16px; font-weight: 700; }
.affecom-wrap .affecom-card__head .affecom-select { width: auto !important; min-height: 38px; padding: 7px 34px 7px 12px !important; }
.affecom-wrap .affecom-grid-2--wide { gap: 18px; }

.affecom-wrap .affecom-linkbox__label { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; color: var(--affecom-muted); margin-bottom: 10px; }
.affecom-wrap .affecom-copy { display: flex; gap: 8px; align-items: stretch; }
.affecom-wrap .affecom-copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 13px !important; background: var(--affecom-bg-soft) !important; text-overflow: ellipsis; }

.affecom-wrap .affecom-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.affecom-wrap .affecom-stat { background: var(--affecom-bg); border: 1px solid var(--affecom-border); border-radius: var(--affecom-radius); padding: 18px; display: grid; gap: 4px; box-shadow: var(--affecom-shadow); }
.affecom-wrap .affecom-stat__icon { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--affecom-primary-soft); color: var(--affecom-primary); margin-bottom: 6px; }
.affecom-wrap .affecom-stat__icon--amber { background: #fff4e0; color: var(--affecom-amber); }
.affecom-wrap .affecom-stat__icon--green { background: #e7f8ee; color: var(--affecom-green); }
.affecom-wrap .affecom-stat__icon--blue { background: #eaf2fe; color: var(--affecom-blue); }
.affecom-wrap .affecom-stat__label { color: var(--affecom-muted); font-size: 13px; }
.affecom-wrap .affecom-stat__value { font-size: 22px; font-weight: 700; color: var(--affecom-text); }
.affecom-wrap .affecom-stat__value * { font-size: inherit !important; font-weight: inherit !important; }
.affecom-wrap .affecom-stat--primary { border-color: var(--affecom-primary-line); }

.affecom-wrap .affecom-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.affecom-wrap .affecom-mini { display: flex; align-items: center; gap: 8px; background: var(--affecom-bg); border: 1px solid var(--affecom-border); border-radius: 12px; padding: 12px 14px; color: var(--affecom-muted); font-size: 13px; }
.affecom-wrap .affecom-mini strong { margin-inline-start: auto; color: var(--affecom-text); font-size: 15px; }

.affecom-wrap .affecom-chart { position: relative; width: 100%; color: var(--affecom-muted); }
.affecom-wrap .affecom-chart canvas { display: block; width: 100%; direction: ltr; }

.affecom-wrap .affecom-list { list-style: none; margin: 0; padding: 0; }
.affecom-wrap .affecom-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--affecom-border); margin: 0; }
.affecom-wrap .affecom-list li:last-child { border-bottom: 0; }
.affecom-wrap .affecom-list li > div:first-child { display: grid; }
.affecom-wrap .affecom-list__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.affecom-wrap .affecom-howto { display: grid; gap: 10px; margin-bottom: 16px; }
.affecom-wrap .affecom-howto > div { display: flex; gap: 12px; align-items: center; background: var(--affecom-bg-soft); border-radius: 12px; padding: 12px; font-size: 14px; }
.affecom-wrap .affecom-howto span { width: 28px; height: 28px; border-radius: 50%; background: var(--affecom-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }

.affecom-wrap .affecom-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--affecom-bg-soft); color: var(--affecom-muted); white-space: nowrap; }
.affecom-wrap .affecom-badge--pending, .affecom-wrap .affecom-badge--requested { background: #fff4e0; color: #ad6800; }
.affecom-wrap .affecom-badge--approved, .affecom-wrap .affecom-badge--active { background: #e7f8ee; color: #0b7a3b; }
.affecom-wrap .affecom-badge--paid { background: #eaf2fe; color: #1c5fbd; }
.affecom-wrap .affecom-badge--rejected, .affecom-wrap .affecom-badge--suspended { background: #fdecf1; color: #a61e4d; }
.affecom-wrap .affecom-pill { display: inline-block; background: var(--affecom-primary-soft); color: var(--affecom-primary); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; unicode-bidi: isolate; }
.affecom-wrap .affecom-empty { text-align: center; color: var(--affecom-muted); padding: 26px 12px; background: var(--affecom-bg-soft); border-radius: 12px; font-size: 14px; grid-column: 1 / -1; }

/* Share */
.affecom-wrap .affecom-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.affecom-wrap .affecom-share .affecom-muted { display: inline-flex; gap: 6px; align-items: center; }
.affecom-wrap .affecom-share__btn {
	background: var(--affecom-bg) !important; color: var(--affecom-text) !important; border: 1px solid var(--affecom-border) !important;
	border-radius: 999px !important; padding: 7px 14px !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important;
}
.affecom-wrap .affecom-share__btn:hover { border-color: var(--affecom-primary) !important; color: var(--affecom-primary) !important; }
.affecom-wrap .affecom-share__btn--wa { background: #25d366 !important; border-color: #25d366 !important; color: #fff !important; }
.affecom-wrap .affecom-share__btn--wa:hover { background: #1ebe5b !important; color: #fff !important; }
.affecom-wrap .affecom-generator { display: flex; gap: 8px; margin-bottom: 10px; }

/* Product browser */
.affecom-wrap .affecom-search { position: relative; margin-bottom: 12px; }
.affecom-wrap .affecom-search .affecom-ico { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--affecom-muted); pointer-events: none; }
.affecom-wrap .affecom-search input { padding-inline-start: 40px !important; }
.affecom-wrap .affecom-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.affecom-wrap .affecom-cat {
	display: inline-flex !important; align-items: center; gap: 6px; flex: none;
	background: var(--affecom-bg) !important; color: var(--affecom-muted) !important; border: 1px solid var(--affecom-border) !important;
	border-radius: 999px !important; padding: 7px 14px !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important;
}
.affecom-wrap .affecom-cat small { background: var(--affecom-bg-soft); color: var(--affecom-muted); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.affecom-wrap .affecom-cat:hover { border-color: var(--affecom-primary) !important; color: var(--affecom-primary) !important; }
.affecom-wrap .affecom-cat.is-active { background: var(--affecom-btn-bg) !important; border-color: var(--affecom-btn-bg) !important; color: var(--affecom-btn-text) !important; }
.affecom-wrap .affecom-cat.is-active small { background: rgba(255,255,255,.25); color: inherit; }
.affecom-wrap .affecom-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.affecom-wrap .affecom-product { display: flex; gap: 12px; align-items: center; border: 1px solid var(--affecom-border); border-radius: 14px; padding: 10px; background: var(--affecom-bg); transition: border-color .15s, box-shadow .15s; }
.affecom-wrap .affecom-product:hover { border-color: var(--affecom-primary-line); box-shadow: var(--affecom-shadow); }
.affecom-wrap .affecom-product__img { flex: none; }
.affecom-wrap .affecom-product__img img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: block; background: var(--affecom-bg-soft); }
.affecom-wrap .affecom-product__body { min-width: 0; flex: 1; display: grid; gap: 2px; }
.affecom-wrap .affecom-product__name { unicode-bidi: isolate; text-align: start; font-weight: 600; font-size: 14px; color: var(--affecom-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.affecom-wrap .affecom-product__price { font-size: 13px; color: var(--affecom-muted); }
.affecom-wrap .affecom-product__price del { opacity: .7; margin-inline-end: 4px; }
.affecom-wrap .affecom-product__com { font-size: 12px; color: var(--affecom-green); font-weight: 700; unicode-bidi: isolate; }
.affecom-wrap .affecom-product__com.is-none { color: var(--affecom-muted); font-weight: 600; }
.affecom-wrap .affecom-product__actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.affecom-wrap .affecom-more { display: flex; justify-content: center; margin-top: 14px; }

/* Network */
.affecom-wrap .affecom-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.affecom-wrap .affecom-level-card { background: var(--affecom-bg); border: 1px solid var(--affecom-border); border-radius: 14px; padding: 14px; display: grid; gap: 2px; justify-items: start; box-shadow: var(--affecom-shadow); }
.affecom-wrap .affecom-level-card strong { font-size: 24px; }
.affecom-wrap .affecom-level-card__n { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--affecom-primary-soft); color: var(--affecom-primary); font-weight: 800; font-size: 12px; margin-bottom: 4px; }
.affecom-wrap .affecom-level-card .affecom-pill { margin-top: 6px; }
.affecom-wrap .affecom-pill--muted { background: var(--affecom-bg-soft, #f1f2f6); color: var(--affecom-muted); font-weight: 600; }

/* Hero: commission badge */
.affecom-wrap .affecom-hero__rate { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; background: #fff; color: var(--affecom-primary); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.12); max-width: 100%; }
.affecom-wrap .affecom-hero__rate strong { color: #12a150; font-weight: 800; font-size: 14px; unicode-bidi: isolate; }
.affecom-wrap .affecom-hero__rate svg { flex: none; }

/* "Build your team" card */
.affecom-wrap .affecom-promo { display: grid; gap: 16px; border-color: var(--affecom-primary-line); background: linear-gradient(180deg, var(--affecom-primary-soft), var(--affecom-bg) 75%); }
.affecom-wrap .affecom-promo__intro { display: flex; gap: 14px; align-items: flex-start; }
.affecom-wrap .affecom-promo__intro h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.affecom-wrap .affecom-promo__intro p { margin: 0; color: var(--affecom-muted); font-size: 14px; line-height: 1.55; }
.affecom-wrap .affecom-promo__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--affecom-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.affecom-wrap .affecom-promo__steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.affecom-wrap .affecom-promo__step { background: var(--affecom-bg); border: 1px solid var(--affecom-border); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; justify-items: start; }
.affecom-wrap .affecom-promo__step strong { font-size: 18px; font-weight: 800; color: var(--affecom-text, inherit); unicode-bidi: isolate; }
.affecom-wrap .affecom-promo__step small { color: var(--affecom-muted); font-size: 12px; }
.affecom-wrap .affecom-promo__lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--affecom-primary-soft); color: var(--affecom-primary); font-weight: 800; font-size: 12px; }
.affecom-wrap .affecom-promo__step.is-you { background: var(--affecom-primary); border-color: transparent; color: #fff; }
.affecom-wrap .affecom-promo__step.is-you strong, .affecom-wrap .affecom-promo__step.is-you small { color: #fff; }
.affecom-wrap .affecom-promo__step.is-you .affecom-promo__lvl { background: rgba(255,255,255,.22); color: #fff; }
.affecom-wrap .affecom-level-card--total { background: var(--affecom-primary); color: #fff; border-color: transparent; }
.affecom-wrap .affecom-level-card--total .affecom-muted { color: rgba(255,255,255,.8); }
.affecom-wrap .affecom-level-card--total .affecom-level-card__n { background: rgba(255,255,255,.2); color: #fff; }

.affecom-wrap .affecom-tree ul { list-style: none; margin: 0; padding: 0; padding-inline-start: 22px; border: 0; border-inline-start: 2px dashed var(--affecom-border); margin-inline-start: 15px; }
.affecom-wrap .affecom-tree > ul { padding-inline-start: 0; border: 0; margin-inline-start: 0; }
.affecom-wrap .affecom-tree li { margin: 0; }
.affecom-wrap .affecom-node { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; margin: 4px 0; background: var(--affecom-bg-soft); }
.affecom-wrap .affecom-node__toggle {
	width: 30px !important; height: 30px !important; border-radius: 8px !important; border: 0 !important; padding: 0 !important;
	background: var(--affecom-bg) !important; color: var(--affecom-primary) !important; box-shadow: none !important;
	display: inline-flex !important; align-items: center; justify-content: center; transition: transform .15s; flex: none;
}
.affecom-wrap .affecom-node__toggle[disabled] { opacity: .3; cursor: default; }
.affecom-wrap .affecom-node.is-open .affecom-node__toggle { transform: rotate(90deg); }
.affecom-wrap[dir="rtl"] .affecom-node__toggle svg { transform: scaleX(-1); }
.affecom-wrap .affecom-node__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--affecom-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.affecom-wrap .affecom-node__main { display: grid; min-width: 0; flex: 1; }
.affecom-wrap .affecom-node__name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: isolate; text-align: start; }
.affecom-wrap .affecom-node__meta { font-size: 12px; color: var(--affecom-muted); }

/* Tables */
.affecom-wrap .affecom-table-wrap { overflow-x: auto; }
.affecom-wrap .affecom-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0 !important; background: none; }
.affecom-wrap .affecom-table th { text-align: start; font-size: 12px; color: var(--affecom-muted); font-weight: 600; padding: 10px 12px; border: 0 !important; border-bottom: 1px solid var(--affecom-border) !important; background: var(--affecom-bg-soft) !important; }
.affecom-wrap .affecom-table td { padding: 12px; border: 0 !important; border-bottom: 1px solid var(--affecom-border) !important; background: none !important; vertical-align: middle; }
.affecom-wrap .affecom-table tr:last-child td { border-bottom: 0 !important; }

/* Wallet & payment methods */
.affecom-wrap .affecom-wallet { display: grid; gap: 10px; align-content: start; }
.affecom-wrap .affecom-wallet__amount, .affecom-wrap .affecom-wallet__amount * { font-size: 34px !important; font-weight: 700 !important; line-height: 1.1; color: var(--affecom-text); }
.affecom-wrap .affecom-progress { height: 8px; background: var(--affecom-bg-soft); border-radius: 99px; overflow: hidden; }
.affecom-wrap .affecom-progress span { display: block; height: 100%; background: var(--affecom-primary); border-radius: 99px; }
.affecom-wrap .affecom-methods { display: grid; gap: 8px; }
.affecom-wrap .affecom-method { position: relative; display: block; cursor: pointer; margin: 0; font-weight: 400 !important; }
.affecom-wrap .affecom-method input { position: absolute; opacity: 0; pointer-events: none; }
.affecom-wrap .affecom-method__box { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; border: 1px solid var(--affecom-border); border-radius: 12px; background: var(--affecom-bg); transition: border-color .15s, background .15s, box-shadow .15s; }
.affecom-wrap .affecom-method:hover .affecom-method__box { border-color: var(--affecom-primary-line); }
.affecom-wrap .affecom-method__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--affecom-bg-soft); color: var(--affecom-muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.affecom-wrap .affecom-method__name { flex: 1; font-weight: 600; font-size: 14px; color: var(--affecom-text); line-height: 1.3; }
.affecom-wrap .affecom-method__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c9ccd8; flex: none; position: relative; }
.affecom-wrap .affecom-method input:checked + .affecom-method__box { border-color: var(--affecom-primary); background: var(--affecom-primary-soft); box-shadow: 0 0 0 1px var(--affecom-primary) inset; }
.affecom-wrap .affecom-method input:checked + .affecom-method__box .affecom-method__icon { background: var(--affecom-primary); color: #fff; }
.affecom-wrap .affecom-method input:checked + .affecom-method__box .affecom-method__radio { border-color: var(--affecom-primary); }
.affecom-wrap .affecom-method input:checked + .affecom-method__box .affecom-method__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--affecom-primary); }
.affecom-wrap .affecom-method input:focus-visible + .affecom-method__box { outline: 3px solid var(--affecom-primary-line); outline-offset: 2px; }

/* Store credit */
.affecom-wrap .affecom-credit { display: grid; gap: 16px; border-color: var(--affecom-primary-line); background: linear-gradient(180deg, var(--affecom-primary-soft), var(--affecom-bg) 70%); }
.affecom-wrap .affecom-credit__intro { display: flex; gap: 14px; align-items: flex-start; }
.affecom-wrap .affecom-credit__intro h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.affecom-wrap .affecom-credit__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--affecom-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.affecom-wrap .affecom-credit__bonus { margin-inline-start: auto; background: #12a150; color: #fff; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.affecom-wrap .affecom-credit__row { display: flex; gap: 8px; }
.affecom-wrap .affecom-credit__row input { flex: 0 1 220px; min-width: 0; width: auto !important; }
.affecom-wrap .affecom-credit__row .affecom-btn { flex: none; white-space: nowrap; }
.affecom-wrap .affecom-coupons { display: grid; gap: 8px; }
.affecom-wrap .affecom-coupon { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--affecom-primary-line); border-radius: 12px; background: var(--affecom-bg); }
.affecom-wrap .affecom-coupon__main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.affecom-wrap .affecom-coupon code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 14px; background: var(--affecom-primary-soft); color: var(--affecom-primary); padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; }
.affecom-wrap .affecom-coupon__actions { display: flex; gap: 6px; }
.affecom-wrap .affecom-coupon--used, .affecom-wrap .affecom-coupon--expired { opacity: .55; border-style: solid; border-color: var(--affecom-border); }
.affecom-wrap .affecom-coupon--used code, .affecom-wrap .affecom-coupon--expired code { text-decoration: line-through; }

/* Profile */
.affecom-wrap .affecom-avatar-edit { display: flex; align-items: center; gap: 16px; }
.affecom-wrap .affecom-avatar-edit__img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--affecom-primary-soft); flex: none; }
.affecom-wrap .affecom-avatar-edit__actions { display: grid; gap: 8px; justify-items: start; }
.affecom-wrap .affecom-file { position: relative; overflow: hidden; }
.affecom-wrap .affecom-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.affecom-wrap input:disabled { background: var(--affecom-bg-soft) !important; color: var(--affecom-muted) !important; cursor: not-allowed; }

/* Spam protection */
.affecom-wrap .affecom-captcha { display: flex; justify-content: center; min-height: 65px; }

/* Product page box */
.affecom-wrap.affecom-product-box { margin: 20px 0; padding: 16px; border: 1px dashed var(--affecom-primary-line); border-radius: 14px; background: color-mix(in srgb, var(--affecom-primary) 4%, #fff); display: grid; gap: 10px; max-width: 100%; }
.affecom-wrap .affecom-product-box__head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.affecom-wrap .affecom-product-box__title { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; }
.affecom-wrap.affecom-product-box .affecom-share { margin-top: 0; }

/* Toast */
.affecom-wrap .affecom-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1d2133; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99999; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.affecom-wrap .affecom-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.affecom-wrap .affecom-toast.is-error { background: #a61e4d; }

/* Responsive */
@media (max-width: 860px) {
	.affecom-wrap .affecom-stats, .affecom-wrap .affecom-minis { grid-template-columns: repeat(2, 1fr); }
	.affecom-wrap .affecom-grid-2--wide { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.affecom-wrap .affecom-auth { padding: 22px 18px; margin: 16px auto; }
	.affecom-wrap .affecom-grid-2, .affecom-wrap .affecom-choice { grid-template-columns: 1fr; }
	.affecom-wrap .affecom-hero { padding: 20px; }
	.affecom-wrap .affecom-hero__balance { width: 100%; }
	.affecom-wrap .affecom-tab span { display: none; }
	.affecom-wrap .affecom-tab.is-active span, .affecom-wrap .affecom-tab--logout span { display: inline; }
	.affecom-wrap .affecom-copy, .affecom-wrap .affecom-generator, .affecom-wrap .affecom-credit__row { flex-direction: column; }
	.affecom-wrap .affecom-credit__row input { max-width: none; }
	.affecom-wrap .affecom-avatar-edit { flex-direction: column; align-items: flex-start; }
	.affecom-wrap .affecom-stat__value { font-size: 18px; }
	.affecom-wrap .affecom-products { grid-template-columns: 1fr; }
	.affecom-wrap .affecom-table thead { display: none; }
	.affecom-wrap .affecom-table tr { display: block; border-bottom: 1px solid var(--affecom-border); padding: 6px 0; }
	.affecom-wrap .affecom-table td { display: flex; justify-content: space-between; border: 0 !important; padding: 6px 4px; }
	.affecom-wrap .affecom-table td::before { content: attr(data-label); color: var(--affecom-muted); font-size: 13px; }
}

/* Pending account (locked preview) */
.affecom-wrap .affecom-pending { display: flex; gap: 14px; align-items: flex-start; background: #fff8e6; border: 1px solid #f5d48a; color: #6b4d00; border-radius: 14px; padding: 14px 16px; }
.affecom-wrap .affecom-pending strong { display: block; font-size: 15px; margin-bottom: 2px; color: #5a4000; }
.affecom-wrap .affecom-pending p { margin: 0; font-size: 14px; line-height: 1.55; }
.affecom-wrap .affecom-pending__icon { width: 38px; height: 38px; border-radius: 10px; background: #f5b400; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.affecom-wrap .affecom-locked { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 36px 20px; }
.affecom-wrap .affecom-locked h3 { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.affecom-wrap .affecom-locked p { margin: 0 0 8px; color: var(--affecom-muted); max-width: 420px; }
.affecom-wrap .affecom-locked__icon { width: 60px; height: 60px; border-radius: 18px; background: var(--affecom-primary-soft); color: var(--affecom-primary); display: inline-flex; align-items: center; justify-content: center; }
.affecom-wrap .affecom-tab.is-locked { opacity: .65; }
.affecom-wrap .affecom-tab__lock { display: inline-flex; margin-inline-start: 2px; }
