/* =========================================================
   Orvex Affiliates — frontend styles
   Brand: teal #1FB8B6 · navy #0F2740
   ========================================================= */

.orvex-aff-form,
.orvex-aff-dash {
	--oaf-teal:       #1FB8B6;
	--oaf-teal-deep:  #0F8F8D;
	--oaf-teal-glow:  rgba(31, 184, 182, 0.12);
	--oaf-navy:       #0F2740;
	--oaf-ink:        #1A2B3D;
	--oaf-ink-soft:   #5C6F7E;
	--oaf-muted:      #8A98A6;
	--oaf-line:       #E7ECEF;
	--oaf-line-soft:  #F0F4F6;
	--oaf-surface:    #F7FAFB;
	--oaf-radius:     14px;
	--oaf-radius-sm:  10px;
	--oaf-tr:         0.22s cubic-bezier(0.4, 0, 0.2, 1);
	--oaf-shadow:     0 8px 24px -12px rgba(15, 39, 64, 0.16);

	color: var(--oaf-ink);
	font-family: inherit;
	box-sizing: border-box;
}
.orvex-aff-form *,
.orvex-aff-dash * { box-sizing: border-box; }

/* ========== Registration form ============================ */
.orvex-aff-form {
	background: #fff;
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius);
	padding: 36px;
	max-width: 720px;
	margin: 0 auto;
}
.orvex-aff-form__head {
	margin: 0 0 28px;
	text-align: left;
}
.orvex-aff-form__title {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
	color: var(--oaf-navy);
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.orvex-aff-form__sub {
	margin: 0;
	font-size: 15px;
	color: var(--oaf-ink-soft);
	line-height: 1.55;
}

.orvex-aff-form__inner {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.orvex-aff-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
@media (max-width: 640px) {
	.orvex-aff-form { padding: 24px 20px; }
	.orvex-aff-form__grid { grid-template-columns: 1fr; }
}

.orvex-aff-field { display: flex; flex-direction: column; gap: 6px; }
.orvex-aff-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--oaf-ink);
	letter-spacing: 0.01em;
}
.orvex-aff-field .req { color: #d04848; }

.orvex-aff-form input[type="text"],
.orvex-aff-form input[type="email"],
.orvex-aff-form input[type="url"],
.orvex-aff-form input[type="password"],
.orvex-aff-form input[type="number"],
.orvex-aff-form input[type="tel"],
.orvex-aff-form select,
.orvex-aff-form textarea,
.orvex-aff-dash input[type="text"],
.orvex-aff-dash input[type="email"],
.orvex-aff-dash input[type="url"],
.orvex-aff-dash select,
.orvex-aff-dash textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius-sm);
	font: inherit;
	font-size: 14.5px;
	background: #fff;
	color: var(--oaf-ink);
	transition: border-color var(--oaf-tr), box-shadow var(--oaf-tr);
	outline: none;
}
.orvex-aff-form textarea,
.orvex-aff-dash textarea { font-family: inherit; resize: vertical; min-height: 90px; }
.orvex-aff-form input:focus,
.orvex-aff-form select:focus,
.orvex-aff-form textarea:focus,
.orvex-aff-dash input:focus,
.orvex-aff-dash select:focus,
.orvex-aff-dash textarea:focus {
	border-color: var(--oaf-teal);
	box-shadow: 0 0 0 3px var(--oaf-teal-glow);
}

.orvex-aff-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: 14px;
	color: var(--oaf-ink-soft);
	line-height: 1.5;
	cursor: pointer;
}
.orvex-aff-field--check input[type="checkbox"] {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	accent-color: var(--oaf-teal);
}

/* ========== Buttons ====================================== */
.orvex-aff-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	background: var(--oaf-navy);
	color: #fff;
	border: 1px solid var(--oaf-navy);
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--oaf-tr);
	text-decoration: none;
	line-height: 1.2;
	letter-spacing: 0.01em;
}
.orvex-aff-btn:hover {
	background: var(--oaf-teal);
	border-color: var(--oaf-teal);
	color: #fff;
}
.orvex-aff-btn--primary { background: var(--oaf-navy); border-color: var(--oaf-navy); color: #fff; }
.orvex-aff-btn--ghost {
	background: #fff;
	color: var(--oaf-ink);
	border-color: var(--oaf-line);
}
.orvex-aff-btn--ghost:hover {
	background: var(--oaf-surface);
	border-color: var(--oaf-teal);
	color: var(--oaf-teal-deep);
}
.orvex-aff-btn--lg { padding: 16px 30px; font-size: 14.5px; }
.orvex-aff-btn[disabled],
.orvex-aff-btn.is-loading {
	opacity: 0.7;
	cursor: wait;
}

/* ========== Alerts ======================================= */
.orvex-aff-form__alert {
	padding: 16px 20px;
	border-radius: var(--oaf-radius-sm);
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 16px;
}
.orvex-aff-form__alert strong { display: block; margin-bottom: 4px; font-size: 15px; }
.orvex-aff-form__alert p { margin: 6px 0 0; }
.orvex-aff-form__alert--info    { background: var(--oaf-teal-glow); color: var(--oaf-teal-deep); border-left: 4px solid var(--oaf-teal); }
.orvex-aff-form__alert--success { background: #E8F7F3; color: #0F6E5C; border-left: 4px solid #1FB6A0; }
.orvex-aff-form__alert--error   { background: #FCEDED; color: #8C1F1F; border-left: 4px solid #D04848; }

.orvex-aff-form--info {
	padding: 28px;
	text-align: left;
}

/* ========== Dashboard ==================================== */
.orvex-aff-dash {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.orvex-aff-stats {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
}
@media (max-width: 1024px) { .orvex-aff-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .orvex-aff-stats { grid-template-columns: repeat(2, 1fr); } }

.orvex-aff-stat {
	background: #fff;
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius);
	padding: 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: var(--oaf-tr);
}
.orvex-aff-stat:hover {
	border-color: var(--oaf-teal);
	box-shadow: var(--oaf-shadow);
}
.orvex-aff-stat__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--oaf-ink-soft);
}
.orvex-aff-stat__value {
	font-size: 22px;
	font-weight: 700;
	color: var(--oaf-navy);
	line-height: 1.2;
}
.orvex-aff-stat__value .woocommerce-Price-currencySymbol {
	font-size: 14px;
	color: var(--oaf-muted);
	font-weight: 500;
}
.orvex-aff-stat__sub {
	font-size: 11.5px;
	color: var(--oaf-muted);
	margin-top: 2px;
}

/* ========== Cards ======================================== */
.orvex-aff-card {
	background: #fff;
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius);
	padding: 24px;
}
.orvex-aff-card__title {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	color: var(--oaf-navy);
	line-height: 1.3;
}
.orvex-aff-muted { color: var(--oaf-ink-soft); font-size: 14px; line-height: 1.55; margin: 0 0 16px; }

.orvex-aff-empty-state {
	text-align: center;
	padding: 36px 24px;
}
.orvex-aff-empty-state h3 {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: var(--oaf-navy);
}
.orvex-aff-empty-state p { color: var(--oaf-ink-soft); font-size: 15px; line-height: 1.6; }

/* ========== Copy row ===================================== */
.orvex-aff-copyrow {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
}
.orvex-aff-copyrow__input {
	flex: 1;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	background: var(--oaf-surface) !important;
}
.orvex-aff-copyrow .orvex-aff-btn { flex-shrink: 0; }

.orvex-aff-codeblock {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--oaf-surface);
	border-radius: var(--oaf-radius-sm);
	padding: 14px 16px;
	margin-bottom: 10px;
}
.orvex-aff-codeblock__label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--oaf-ink-soft);
	margin-bottom: 3px;
}
.orvex-aff-codeblock__value {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 17px;
	font-weight: 700;
	color: var(--oaf-navy);
	letter-spacing: 0.01em;
}

@media (max-width: 640px) {
	.orvex-aff-copyrow { flex-direction: column; }
	.orvex-aff-codeblock { flex-direction: column; align-items: flex-start; }
}

/* ========== Tables ====================================== */
.orvex-aff-table-wrap { overflow-x: auto; }
.orvex-aff-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.orvex-aff-table th,
.orvex-aff-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--oaf-line);
}
.orvex-aff-table th {
	background: var(--oaf-surface);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--oaf-ink-soft);
}
.orvex-aff-table tbody tr:hover { background: var(--oaf-surface); }
.orvex-aff-table strong { color: var(--oaf-navy); }

/* ========== Status pills ================================ */
.orvex-aff-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--oaf-line);
	color: var(--oaf-ink-soft);
}
.orvex-aff-pill--pending   { background: rgba(255, 165, 0, 0.14);  color: #B36A00; }
.orvex-aff-pill--approved  { background: rgba(31, 184, 182, 0.16); color: var(--oaf-teal-deep); }
.orvex-aff-pill--paid      { background: rgba(15, 110, 92, 0.14);  color: #0F6E5C; }
.orvex-aff-pill--rejected  { background: rgba(208, 72, 72, 0.14);  color: #8C1F1F; }
.orvex-aff-pill--inactive  { background: rgba(138, 152, 166, 0.14); color: var(--oaf-ink-soft); }

/* ========== Payment form ================================ */
.orvex-aff-payment-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.orvex-aff-payment-form__msg {
	display: inline-block;
	margin-left: 10px;
	font-size: 13px;
	color: var(--oaf-teal-deep);
	font-weight: 500;
}
.orvex-aff-payment-form__msg.error { color: #8C1F1F; }

/* ========== Checkout box ================================ */
.orvex-aff-checkout-box {
	margin: 16px 0;
	padding: 16px 18px;
	background: var(--oaf-surface);
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius-sm);
}
.orvex-aff-checkout-box__label {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--oaf-ink);
}
.orvex-aff-checkout-box__row {
	display: flex;
	gap: 8px;
}
.orvex-aff-checkout-box__row input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--oaf-line);
	border-radius: var(--oaf-radius-sm);
	font: inherit;
	font-size: 14px;
	background: #fff;
	outline: none;
	transition: var(--oaf-tr);
}
.orvex-aff-checkout-box__row input:focus {
	border-color: var(--oaf-teal);
	box-shadow: 0 0 0 3px var(--oaf-teal-glow);
}
.orvex-aff-checkout-box__row .button {
	padding: 10px 18px !important;
	background: var(--oaf-navy) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--oaf-radius-sm) !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: var(--oaf-tr);
}
.orvex-aff-checkout-box__row .button:hover {
	background: var(--oaf-teal) !important;
}
.orvex-aff-checkout-box__msg {
	margin: 8px 0 0;
	font-size: 13px;
	min-height: 18px;
}
.orvex-aff-checkout-box__msg.success { color: var(--oaf-teal-deep); }
.orvex-aff-checkout-box__msg.error   { color: #8C1F1F; }
