/* WC Affiliate Pro - Scoped Minimalist White/Black UI */
.wcap-portal-wrap {
	background: #ffffff;
	color: #111111;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 16px;
	box-sizing: border-box;
}

.wcap-portal-wrap *,
.wcap-portal-wrap *::before,
.wcap-portal-wrap *::after {
	box-sizing: border-box;
}

.wcap-context-myaccount {
	padding: 4px 0;
}

.wcap-portal-header {
	margin-bottom: 24px;
}

.wcap-portal-wrap .wcap-title {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	color: #111111;
	letter-spacing: -0.02em;
}

.wcap-portal-wrap .wcap-subtitle {
	margin: 0;
	font-size: 14px;
	color: #4b5563;
}

.wcap-portal-wrap .wcap-muted {
	color: #6b7280;
	font-size: 13px;
}

/* Auth Switcher */
.wcap-auth-shell {
	max-width: 720px;
	margin: 0 auto;
}

.wcap-auth-switcher {
	display: inline-flex;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 4px;
	background: #f9fafb;
	margin-bottom: 20px;
}

.wcap-switch-btn {
	background: transparent;
	border: none;
	color: #374151;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.wcap-switch-btn.is-active {
	background: #111111;
	color: #ffffff;
}

.wcap-auth-panel {
	display: none;
}

.wcap-auth-panel.is-active {
	display: block;
}

/* Cards */
.wcap-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 20px;
}

.wcap-card-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 600;
	color: #111111;
}

/* Multi-Step Stepper */
.wcap-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	padding-bottom: 18px;
	border-bottom: 1px solid #e5e7eb;
}

.wcap-step-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #9ca3af;
	font-size: 13px;
	font-weight: 600;
}

.wcap-step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid #d1d5db;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	background: #ffffff;
	color: #6b7280;
}

.wcap-step-item.is-active {
	color: #111111;
}

.wcap-step-item.is-active .wcap-step-num {
	background: #111111;
	border-color: #111111;
	color: #ffffff;
}

.wcap-step-item.is-done .wcap-step-num {
	background: #111111;
	border-color: #111111;
	color: #ffffff;
}

.wcap-step-line {
	flex: 1;
	height: 1px;
	background: #e5e7eb;
	margin: 0 12px;
}

.wcap-form-step {
	display: none;
}

.wcap-form-step.is-active {
	display: block;
}

/* Form Fields */
.wcap-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.wcap-field {
	margin-bottom: 16px;
}

.wcap-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #111111;
	margin-bottom: 6px;
}

.wcap-req {
	color: #dc2626;
}

.wcap-portal-wrap input[type="text"],
.wcap-portal-wrap input[type="email"],
.wcap-portal-wrap input[type="password"],
.wcap-portal-wrap input[type="tel"],
.wcap-portal-wrap input[type="url"],
.wcap-portal-wrap input[type="number"],
.wcap-portal-wrap input[type="search"],
.wcap-portal-wrap select,
.wcap-portal-wrap textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #ffffff;
	color: #111111;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color 0.15s ease;
}

.wcap-portal-wrap input:focus,
.wcap-portal-wrap select:focus,
.wcap-portal-wrap textarea:focus {
	outline: none;
	border-color: #111111;
}

.wcap-portal-wrap input.is-invalid,
.wcap-portal-wrap select.is-invalid,
.wcap-portal-wrap textarea.is-invalid {
	border-color: #dc2626;
}

.wcap-checkbox-field {
	margin: 14px 0 20px;
	font-size: 13px;
	color: #111111;
}

.wcap-checkbox-field label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

/* Buttons */
.wcap-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid #111111;
	text-decoration: none;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.wcap-btn-primary {
	background: #111111;
	color: #ffffff;
}

.wcap-btn-primary:hover {
	background: #000000;
	color: #ffffff;
}

.wcap-btn-secondary {
	background: #ffffff;
	color: #111111;
	border-color: #d1d5db;
}

.wcap-btn-secondary:hover {
	border-color: #111111;
}

.wcap-btn-sm {
	padding: 7px 14px;
	font-size: 13px;
}

.wcap-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.wcap-step-actions,
.wcap-form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
}

.wcap-align-right {
	justify-content: flex-end;
}

.wcap-text-link {
	color: #111111;
	font-size: 13px;
	text-decoration: underline;
}

/* Alerts */
.wcap-alert {
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 16px;
	border: 1px solid #d1d5db;
}

.wcap-alert.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.wcap-alert.is-success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}

/* Status Card */
.wcap-status-card {
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
	padding: 36px 24px;
}

.wcap-status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #f3f4f6;
	color: #111111;
	border: 1px solid #d1d5db;
	margin-bottom: 12px;
}

.wcap-meta-row {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-top: 18px;
	font-size: 13px;
	color: #4b5563;
	flex-wrap: wrap;
}

/* Dashboard */
.wcap-dash-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.wcap-dash-badges {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wcap-pill {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #f9fafb;
	font-size: 13px;
	color: #111111;
}

.wcap-tabs {
	display: flex;
	gap: 8px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 20px;
	overflow-x: auto;
}

.wcap-tab-btn {
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
}

.wcap-tab-btn.is-active {
	color: #111111;
	border-bottom-color: #111111;
}

.wcap-tab-panel {
	display: none;
}

.wcap-tab-panel.is-active {
	display: block;
}

/* KPI Grid */
.wcap-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}

.wcap-kpi-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 18px;
}

.wcap-kpi-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	margin-bottom: 6px;
}

.wcap-kpi-value {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #111111;
	margin-bottom: 4px;
}

.wcap-kpi-note {
	font-size: 12px;
	color: #6b7280;
}

.wcap-copy-row {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.wcap-copy-row input {
	flex: 1;
	background: #f9fafb;
}

/* Products Filter & List */
.wcap-filter-bar {
	display: flex;
	gap: 12px;
	margin-bottom: 18px;
}

.wcap-filter-bar input {
	flex: 2;
}

.wcap-filter-bar select {
	flex: 1;
}

.wcap-product-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #e5e7eb;
}

.wcap-product-row:last-child {
	border-bottom: none;
}

.wcap-prod-thumb {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.wcap-prod-info {
	flex: 1;
	min-width: 0;
}

.wcap-prod-name {
	display: block;
	font-weight: 600;
	color: #111111;
	text-decoration: none;
	margin-bottom: 3px;
}

.wcap-prod-name:hover {
	text-decoration: underline;
}

.wcap-prod-meta {
	font-size: 13px;
	color: #4b5563;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wcap-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-top: 18px;
}

.wcap-page-btn {
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	background: #ffffff;
	color: #111111;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}

.wcap-page-btn.is-active {
	background: #111111;
	border-color: #111111;
	color: #ffffff;
}

/* Tables */
.wcap-table-wrap {
	overflow-x: auto;
}

.wcap-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.wcap-table th,
.wcap-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #e5e7eb;
	color: #111111;
}

.wcap-table th {
	font-weight: 600;
	background: #f9fafb;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #4b5563;
}

.wcap-truncate {
	max-width: 240px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wcap-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	border: 1px solid #d1d5db;
	background: #f9fafb;
	color: #111111;
}

.wcap-badge-approved,
.wcap-badge-paid {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}

.wcap-badge-pending {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.wcap-badge-rejected,
.wcap-badge-cancelled {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.wcap-empty {
	text-align: center;
	padding: 24px 12px;
	color: #6b7280;
	font-size: 14px;
}

@media (max-width: 768px) {
	.wcap-grid-2,
	.wcap-kpi-grid {
		grid-template-columns: 1fr;
	}
	.wcap-filter-bar,
	.wcap-copy-row {
		flex-direction: column;
	}
	.wcap-step-label {
		display: none;
	}
}
