/* Smart Affiliate Manager — Public Styles */

/* ------------------------------------------------------------------ */
/* Portal                                                              */
/* ------------------------------------------------------------------ */
.sam-portal {
	max-width: 900px;
	font-family: inherit;
	color: inherit;
}

.sam-portal-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}
.sam-portal-header h2 { margin: 0; }

.sam-badge-portal {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}
.sam-badge-portal--active { background: #d8f5e4; color: #0a6c3b; }

/* KPI Cards */
.sam-portal-kpi {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.sam-portal-kpi-card {
	background: #f9fafb;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 18px;
	text-align: center;
}
.sam-portal-kpi-card--approved { border-color: #9fe0c0; background: #f0fdf4; }
.sam-portal-kpi-card--paid     { border-color: #93c5fd; background: #eff6ff; }

.sam-portal-kpi-value {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 4px;
}
.sam-portal-kpi-label {
	font-size: 12px;
	color: #6b7280;
}

/* Sections */
.sam-portal-section {
	margin-bottom: 36px;
}
.sam-portal-section h3 {
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e7eb;
}

/* Referral link box */
.sam-ref-link-box {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}
.sam-ref-input {
	flex: 1;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	background: #f9fafb;
	direction: ltr;
	text-align: left;
}
.sam-copy-link-btn {
	padding: 9px 18px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
	transition: background 0.15s;
}
.sam-copy-link-btn:hover { background: #1d4ed8; }

.sam-qr-wrap {
	margin-top: 12px;
}
.sam-qr-wrap img {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 4px;
	background: #fff;
}

/* Table */
.sam-portal-table-wrap { overflow-x: auto; }

.sam-portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.sam-portal-table th,
.sam-portal-table td {
	padding: 10px 12px;
	text-align: right;
	border-bottom: 1px solid #f0f0f0;
}
.sam-portal-table thead th {
	background: #f9fafb;
	font-weight: 600;
	color: #374151;
}
.sam-portal-table tbody tr:hover { background: #fafafa; }

/* Badges small */
.sam-badge-sm {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #f0f0f1;
	color: #50575e;
}
.sam-badge-sm--success { background: #d8f5e4; color: #0a6c3b; }
.sam-badge-sm--info    { background: #ddeeff; color: #0c4a8c; }
.sam-badge-sm--warning { background: #fef3cd; color: #7a5000; }
.sam-badge-sm--danger  { background: #fde8e8; color: #8b0000; }
.sam-badge-sm--muted   { background: #f0f0f1; color: #50575e; }

/* ------------------------------------------------------------------ */
/* Registration Form                                                   */
/* ------------------------------------------------------------------ */
.sam-register-form {
	max-width: 560px;
}

.sam-form-group {
	margin-bottom: 18px;
}
.sam-form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}
.sam-form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	resize: vertical;
	font-family: inherit;
}

.sam-btn-primary {
	padding: 11px 28px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	transition: background 0.15s;
}
.sam-btn-primary:hover { background: #1d4ed8; }

/* ------------------------------------------------------------------ */
/* Notices                                                             */
/* ------------------------------------------------------------------ */
.sam-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 14px;
	background: #f0f0f1;
	border-right: 4px solid #9ea3a8;
}
.sam-notice--success {
	background: #f0fdf4;
	border-color: #22c55e;
	color: #15803d;
}
.sam-notice--warning {
	background: #fffbeb;
	border-color: #f59e0b;
	color: #92400e;
}
.sam-notice--error {
	background: #fef2f2;
	border-color: #ef4444;
	color: #991b1b;
}

.sam-desc { font-size: 13px; color: #6b7280; margin-top: 6px; }

/* Responsive */
@media (max-width: 600px) {
	.sam-portal-kpi { grid-template-columns: repeat(2, 1fr); }
	.sam-ref-link-box { flex-direction: column; }
	.sam-ref-input { width: 100%; }
}
