/* ════════════════════════════════════════════════════════════════════
   referral.css — Referral Program dashboard
   Loaded AFTER icms-app.css so it inherits base typography, buttons,
   container width, toast, and the icms-libnav-btn chrome. Only adds
   the bits unique to the referral dashboard.
   ════════════════════════════════════════════════════════════════════ */

.referral-app-header .header-right { gap: 10px !important; }
.referral-app-container { padding-top: 24px !important; }

/* ── Hero ───────────────────────────────────────────────────────── */
.ref-hero {
	background: linear-gradient(135deg, #fffdf7 0%, #fef3c7 100%);
	color: #0a1228;
	border: 1.5px solid #fde68a;
	border-radius: 16px;
	padding: 28px;
	margin-bottom: 22px;
	box-shadow: 0 6px 24px rgba(212, 163, 90, 0.12);
}
.ref-hero-inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 32px;
	align-items: center;
}
@media (max-width: 900px) {
	.ref-hero-inner { grid-template-columns: 1fr; }
}
.ref-hero-eyebrow {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.18em;
	color: #b45309;
	margin-bottom: 8px;
}
.ref-hero h2 {
	font-size: 28px;
	line-height: 1.2;
	margin: 0 0 10px;
	font-weight: 800;
	color: #0a1228;
}
.ref-hero h2 span {
	color: #fbbf24;
	background: #0a1228;
	padding: 0 10px;
	border-radius: 8px;
}
.ref-hero p {
	color: #475569;
	line-height: 1.7;
	font-size: 14px;
	margin: 0;
}
.ref-hero p strong { color: #0a1228; }
.ref-hero-steps {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ref-hero-step {
	display: flex;
	gap: 14px;
	align-items: center;
	background: #ffffff;
	border: 1px solid #fde68a;
	padding: 12px 16px;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.ref-step-n {
	width: 32px; height: 32px;
	border-radius: 50%;
	background: #fbbf24;
	color: #0a1228;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 800;
}
.ref-hero-step strong { color: #0a1228; font-size: 14px; display: block; }
.ref-hero-step span   { color: #64748b; font-size: 12px; }

/* ── Card chrome ───────────────────────────────────────────────── */
.ref-card {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 18px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.ref-card-head {
	font-size: 13px;
	font-weight: 800;
	color: #0f172a;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 12px;
	display: flex; align-items: center; gap: 8px;
}
.ref-card-head i { color: #fbbf24; }
.ref-card-intro {
	color: #475569;
	font-size: 13.5px;
	line-height: 1.6;
	margin: 0 0 16px;
}

/* ── Share input row ───────────────────────────────────────────── */
.ref-share-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.ref-share-input {
	flex: 1 1 320px;
	min-width: 0;
	padding: 12px 14px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	color: #0f172a;
	background: #f8fafc;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ref-share-input:focus { outline: 2px solid #fbbf24; border-color: #fbbf24; }
.ref-share-code {
	margin-top: 10px;
	color: #475569;
	font-size: 13px;
}
.ref-share-code strong {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	letter-spacing: 0.12em;
	color: #0a1228;
	background: #fef3c7;
	padding: 2px 10px;
	border-radius: 6px;
}
.ref-share-share {
	display: flex; gap: 8px; flex-wrap: wrap;
	margin-top: 14px;
}
.ref-chip {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 13px; font-weight: 600;
	padding: 8px 14px; border-radius: 999px;
	text-decoration: none;
	color: #fff;
	transition: transform .12s ease;
}
.ref-chip:hover { transform: translateY(-1px); }
.ref-chip-wa   { background: #25d366; }
.ref-chip-mail { background: #475569; }
.ref-chip-tg   { background: #0088cc; }

/* ── Buttons ───────────────────────────────────────────────────── */
.ref-btn {
	display: inline-flex; align-items: center; gap: 8px;
	border: none; cursor: pointer;
	font-weight: 700; font-size: 14px;
	padding: 11px 18px;
	border-radius: 10px;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.ref-btn:disabled { opacity: .55; cursor: not-allowed; }
.ref-btn-gold    { background: #fbbf24; color: #0a1228; }
.ref-btn-gold:hover:not(:disabled) { background: #f59e0b; }
.ref-btn-primary { background: #0a1228; color: #fbbf24; }
.ref-btn-primary:hover:not(:disabled) { background: #1e293b; }

/* ── Stats grid ────────────────────────────────────────────────── */
.ref-stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
	margin-bottom: 18px;
}
@media (max-width: 1100px) { .ref-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .ref-stats { grid-template-columns: repeat(2, 1fr); } }
.ref-stat {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px 18px;
}
.ref-stat-accent {
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
	border-color: #f59e0b;
	color: #0a1228;
}
.ref-stat-accent .ref-stat-label,
.ref-stat-accent .ref-stat-sub   { color: #422006; }
.ref-stat-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.ref-stat-value { font-size: 22px; font-weight: 800; color: #0a1228; line-height: 1.1; }
.ref-stat-accent .ref-stat-value { color: #0a1228; }
.ref-stat-sub   { font-size: 11.5px; color: #94a3b8; margin-top: 4px; }

/* ── Payout form ───────────────────────────────────────────────── */
.ref-form-row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 14px;
	margin-bottom: 14px;
}
@media (max-width: 700px) { .ref-form-row { grid-template-columns: 1fr; } }
.ref-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ref-field span { color: #475569; font-weight: 600; }
.ref-field span i { color: #fbbf24; margin-right: 4px; }
.ref-field input, .ref-field select, .ref-field textarea {
	padding: 10px 12px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	color: #0f172a;
	background: #fff;
}
.ref-field input:focus, .ref-field select:focus, .ref-field textarea:focus {
	outline: 2px solid #fbbf24; border-color: #fbbf24;
}
.ref-payout-actions {
	display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.ref-payout-msg { font-size: 13px; color: #475569; }
.ref-payout-msg.error   { color: #b91c1c; font-weight: 600; }
.ref-payout-msg.success { color: #166534; font-weight: 600; }

/* "Can I withdraw yet?" status banner above the payout form. */
.ref-payout-status {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.55;
	padding: 11px 14px;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #475569;
}
.ref-payout-status i { margin-right: 5px; }
.ref-payout-status.ready   { background: #dcfce7; border-color: #86efac; color: #166534; }
.ref-payout-status.waiting { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── Tabs ──────────────────────────────────────────────────────── */
.ref-tabs {
	display: flex; gap: 6px; flex-wrap: wrap;
	border-bottom: 1.5px solid #e2e8f0;
	margin-bottom: 14px;
}
.ref-tab {
	background: transparent;
	border: none;
	padding: 10px 14px;
	font-size: 13.5px;
	font-weight: 700;
	color: #64748b;
	cursor: pointer;
	border-bottom: 3px solid transparent;
	transform: translateY(1.5px);
	display: inline-flex; align-items: center; gap: 6px;
}
.ref-tab:hover { color: #0f172a; }
.ref-tab.active { color: #0a1228; border-bottom-color: #fbbf24; }

.ref-tab-panel { display: none; }
.ref-tab-panel.active { display: block; }

/* ── Table ─────────────────────────────────────────────────────── */
.ref-table-wrap {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	overflow-x: auto;
	margin-bottom: 18px;
}
.ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	min-width: 600px;
}
.ref-table thead th {
	background: #f8fafc;
	color: #475569;
	text-align: left;
	padding: 11px 14px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-bottom: 1px solid #e2e8f0;
}
.ref-table thead th.num,
.ref-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ref-table tbody td {
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
	color: #1e293b;
}
.ref-table tbody tr:last-child td { border-bottom: none; }
.ref-table tbody tr:hover td { background: #fefce8; }
.ref-empty { text-align: center; color: #94a3b8; padding: 24px !important; }
.ref-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.ref-pill-available { background: #dcfce7; color: #166534; }
.ref-pill-requested { background: #dbeafe; color: #1e40af; }
.ref-pill-paid      { background: #fef3c7; color: #92400e; }
.ref-pill-reversed  { background: #fee2e2; color: #991b1b; }
.ref-pill-rejected  { background: #fee2e2; color: #991b1b; }
.ref-pill-pending   { background: #fef3c7; color: #92400e; }

/* ── FAQ ───────────────────────────────────────────────────────── */
.ref-faq { margin-top: 26px; }
.ref-faq h3 { font-size: 18px; color: #0a1228; margin: 0 0 12px; }
.ref-faq details {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 8px;
}
.ref-faq summary {
	cursor: pointer;
	font-weight: 700;
	color: #0f172a;
	font-size: 14px;
	list-style: none;
}
.ref-faq summary::-webkit-details-marker { display: none; }
.ref-faq summary::before {
	content: "+ ";
	color: #fbbf24;
	font-weight: 800;
}
.ref-faq details[open] summary::before { content: "− "; }
.ref-faq details p { color: #475569; line-height: 1.7; margin: 8px 0 0; font-size: 13.5px; }
