/*
 * Coswaa Affiliate — Frontend Styles
 * Minimal, clean, mobile-friendly.
 */

/* ── Dashboard wrapper ──────────────────────────────────────────────────────── */
.cwaff-dashboard {
	max-width: 680px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1a1a2e;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.cwaff-header {
	margin-bottom: 28px;
}

.cwaff-welcome {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 6px;
	color: #0f172a;
}

.cwaff-subtext {
	font-size: 0.9rem;
	color: #64748b;
	margin: 0;
}

/* ── Stat Cards ─────────────────────────────────────────────────────────────── */
.cwaff-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.cwaff-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 20px 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	transition: box-shadow 0.2s ease;
}

.cwaff-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cwaff-card--highlight {
	background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
	border-color: transparent;
	color: #ffffff;
}

.cwaff-card__icon {
	font-size: 1.6rem;
	line-height: 1;
}

.cwaff-card__value {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	color: inherit;
}

.cwaff-card--highlight .cwaff-card__value {
	color: #ffffff;
}

.cwaff-card__label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #94a3b8;
	font-weight: 500;
}

.cwaff-card--highlight .cwaff-card__label {
	color: rgba(255, 255, 255, 0.75);
}

/* Status colours */
.cwaff-pending  { color: #b45309; }
.cwaff-approved { color: #15803d; }

/* ── Referral Link Box ───────────────────────────────────────────────────────── */
.cwaff-reflink {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 24px;
}

.cwaff-reflink__label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #475569;
	margin-bottom: 10px;
}

.cwaff-reflink__row {
	display: flex;
	gap: 8px;
}

.cwaff-reflink__input {
	flex: 1;
	min-width: 0;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 0.9rem;
	color: #334155;
	background: #ffffff;
	cursor: text;
	outline: none;
	transition: border-color 0.15s ease;
}

.cwaff-reflink__input:focus {
	border-color: #1a56db;
	box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.cwaff-reflink__btn {
	white-space: nowrap;
	padding: 9px 18px;
	background: #1a56db;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
}

.cwaff-reflink__btn:hover {
	background: #1e40af;
}

.cwaff-reflink__btn:active {
	transform: scale(0.97);
}

.cwaff-reflink__btn.cwaff-copied {
	background: #16a34a;
}

.cwaff-reflink__hint {
	margin: 12px 0 0;
	font-size: 0.82rem;
	color: #64748b;
	line-height: 1.5;
}

/* ── Notice (disabled / guest) ──────────────────────────────────────────────── */
.cwaff-notice {
	background: #f1f5f9;
	border-left: 4px solid #1a56db;
	padding: 12px 16px;
	border-radius: 0 6px 6px 0;
	color: #334155;
	font-size: 0.9rem;
}

.cwaff-notice a {
	color: #1a56db;
	font-weight: 600;
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.cwaff-reflink__row {
		flex-direction: column;
	}
	.cwaff-reflink__btn {
		width: 100%;
		text-align: center;
	}
	.cwaff-stats {
		grid-template-columns: 1fr 1fr;
	}
}
