/* ==========================================================================
   Registration (registration.php) — modern fintech-style signup wizard.
   Self-contained: doesn't rely on css/modern-theme.css component classes so
   it can't be broken by changes elsewhere. Uses the same navy/teal palette.
   ========================================================================== */

.reg-page {
	--reg-navy-950: #050e1c;
	--reg-navy-900: #0b1f3a;
	--reg-navy-800: #122a4d;
	--reg-teal-400: #2dd4bf;
	--reg-teal-500: #14b8a6;
	--reg-teal-600: #0d9488;
	--reg-slate-50: #f8fafc;
	--reg-slate-100: #f1f5f9;
	--reg-slate-200: #e2e8f0;
	--reg-slate-400: #94a3b8;
	--reg-slate-500: #64748b;
	--reg-slate-900: #0f172a;
	--reg-radius: 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--reg-slate-100);
	padding: 48px 20px;
}

.reg-shell {
	max-width: 1080px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	background: #fff;
	border-radius: var(--reg-radius);
	box-shadow: 0 20px 60px rgba(11, 31, 58, 0.16);
	overflow: hidden;
	min-height: 640px;
}

.reg-aside {
	background: linear-gradient(150deg, var(--reg-navy-950) 0%, var(--reg-navy-900) 55%, var(--reg-teal-600) 130%);
	color: #fff;
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}
.reg-aside::before {
	content: '';
	position: absolute;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(45, 212, 191, 0.25), transparent 70%);
	top: -120px;
	right: -120px;
}
.reg-aside__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 1.1em;
	letter-spacing: 0.02em;
	margin-bottom: 40px;
}
.reg-aside__brand [data-lucide] {
	width: 22px;
	height: 22px;
	color: var(--reg-teal-400);
}
.reg-aside h2 {
	font-size: 1.7em;
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: 28px;
}
.reg-aside__perks {
	list-style: none;
	padding: 0;
	margin: 0 0 auto 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.reg-aside__perks li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 0.95em;
	color: rgba(255, 255, 255, 0.88);
}
.reg-aside__perks [data-lucide] {
	width: 20px;
	height: 20px;
	flex: none;
	color: var(--reg-teal-400);
	margin-top: 1px;
}
.reg-aside__quote {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	font-size: 0.85em;
	font-style: italic;
	color: rgba(255, 255, 255, 0.65);
}

.reg-card {
	padding: 44px 48px;
	display: flex;
	flex-direction: column;
}

.reg-progress {
	margin-bottom: 32px;
}
.reg-progress__bar {
	height: 6px;
	background: var(--reg-slate-200);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 14px;
}
.reg-progress__fill {
	height: 100%;
	width: 25%;
	background: linear-gradient(90deg, var(--reg-teal-500), var(--reg-teal-400));
	border-radius: 999px;
	transition: width 0.35s ease;
}
.reg-progress__steps {
	display: flex;
	justify-content: space-between;
}
.reg-step-label {
	font-size: 0.78em;
	font-weight: 600;
	color: var(--reg-slate-400);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.reg-step-label.is-active {
	color: var(--reg-teal-600);
}
.reg-step-label.is-done {
	color: var(--reg-navy-900);
}

.reg-step h3 {
	font-size: 1.3em;
	font-weight: 800;
	color: var(--reg-navy-900);
	margin-bottom: 6px;
}
.reg-step p.reg-step__hint {
	color: var(--reg-slate-500);
	font-size: 0.9em;
	margin-bottom: 24px;
}

.reg-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}
.reg-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}
.reg-field--full {
	grid-column: 1 / -1;
}
.reg-field label {
	font-size: 0.82em;
	font-weight: 600;
	color: var(--reg-navy-900);
}
.reg-field input,
.reg-field select {
	padding: 11px 14px;
	border: 1.5px solid var(--reg-slate-200);
	border-radius: 10px;
	font-size: 0.95em;
	font-family: inherit;
	color: var(--reg-slate-900);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reg-field input:focus,
.reg-field select:focus {
	outline: none;
	border-color: var(--reg-teal-500);
	box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}
.reg-field input.is-invalid {
	border-color: #e24b4a;
	box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.12);
}
.reg-field small {
	font-size: 0.76em;
	color: var(--reg-slate-500);
}

.reg-type-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 20px;
}
.reg-type-card {
	position: relative;
	border: 1.5px solid var(--reg-slate-200);
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.reg-type-card:hover {
	border-color: var(--reg-teal-400);
}
.reg-type-card input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.reg-type-card__icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--reg-slate-100);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	color: var(--reg-navy-900);
}
.reg-type-card__icon [data-lucide] {
	width: 18px;
	height: 18px;
}
.reg-type-card__label {
	font-weight: 700;
	font-size: 0.92em;
	color: var(--reg-navy-900);
}
.reg-type-card__desc {
	font-size: 0.76em;
	color: var(--reg-slate-500);
}
.reg-type-card.is-selected {
	border-color: var(--reg-teal-500);
	background: rgba(20, 184, 166, 0.06);
}
.reg-type-card.is-selected .reg-type-card__icon {
	background: var(--reg-teal-500);
	color: #fff;
}

.reg-pin-row {
	display: flex;
	gap: 10px;
}
.reg-pin-row input {
	width: 48px;
	height: 52px;
	text-align: center;
	font-size: 1.3em;
	font-weight: 700;
	border: 1.5px solid var(--reg-slate-200);
	border-radius: 10px;
	letter-spacing: 0;
}
.reg-pin-row input:focus {
	outline: none;
	border-color: var(--reg-teal-500);
	box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.reg-checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 8px 0 24px;
	font-size: 0.85em;
	color: var(--reg-slate-500);
}
.reg-checkbox-row input {
	margin-top: 3px;
}

.reg-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
}
.reg-btn {
	display: inline-block;
	border: none;
	border-radius: 10px;
	padding: 13px 26px;
	font-weight: 700;
	font-size: 0.94em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.reg-btn:hover {
	text-decoration: none;
}
.reg-btn--primary {
	background: linear-gradient(90deg, var(--reg-teal-500), var(--reg-teal-600));
	color: #fff;
	box-shadow: 0 8px 20px rgba(20, 184, 166, 0.28);
	margin-left: auto;
}
.reg-btn--primary:hover {
	transform: translateY(-1px);
}
.reg-btn--ghost {
	background: none;
	color: var(--reg-slate-500);
}
.reg-btn--ghost:hover {
	color: var(--reg-navy-900);
}

.reg-alert {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 0.88em;
	margin-bottom: 20px;
}
.reg-alert--error {
	background: rgba(226, 75, 74, 0.1);
	color: #b3261e;
	border: 1px solid rgba(226, 75, 74, 0.25);
}
.reg-alert--success {
	background: rgba(16, 185, 129, 0.1);
	color: #0d7a56;
	border: 1px solid rgba(16, 185, 129, 0.25);
}

.reg-signin-hint {
	text-align: center;
	margin-top: 24px;
	font-size: 0.88em;
	color: var(--reg-slate-500);
}
.reg-signin-hint a {
	color: var(--reg-teal-600);
	font-weight: 700;
	text-decoration: none;
}

/* loan.php renders one native <input type="radio"/checkbox"> per question
   with no JS — these :has() rules give the same "selected" visual treatment
   that registration.js applies manually via .is-selected elsewhere. */
.reg-type-card:has(input:checked) {
	border-color: var(--reg-teal-500);
	background: rgba(20, 184, 166, 0.06);
}
.reg-type-card:has(input:checked) .reg-type-card__icon {
	background: var(--reg-teal-500);
	color: #fff;
}
.reg-checkbox-pill:has(input:checked) {
	border-color: var(--reg-teal-500);
	background: rgba(20, 184, 166, 0.06);
}
.reg-checkbox-pill:has(input:checked) .reg-checkbox-pill__box {
	background: var(--reg-teal-500);
	border-color: var(--reg-teal-500);
}
.reg-checkbox-pill:has(input:checked) .reg-checkbox-pill__box [data-lucide] {
	opacity: 1;
}
.reg-step-yesno-detail .reg-detail-box {
	display: none;
}
.reg-step-yesno-detail:has(input[name="yn"][value="Yes"]:checked) .reg-detail-box {
	display: flex;
}

.reg-step-counter {
	display: block;
	font-size: 0.76em;
	font-weight: 700;
	color: var(--reg-teal-600);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
}

/* multi-select "use of proceeds"-style checkbox pills — same footprint as
   .reg-type-grid/.reg-type-card but for checkboxes instead of radios. */
.reg-checkbox-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 20px;
}
.reg-checkbox-pill {
	position: relative;
	border: 1.5px solid var(--reg-slate-200);
	border-radius: 12px;
	padding: 13px 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 0.9em;
	color: var(--reg-navy-900);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.reg-checkbox-pill:hover {
	border-color: var(--reg-teal-400);
}
.reg-checkbox-pill input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.reg-checkbox-pill__box {
	width: 20px;
	height: 20px;
	border-radius: 6px;
	border: 1.5px solid var(--reg-slate-200);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	color: #fff;
	transition: 0.15s all;
}
.reg-checkbox-pill__box [data-lucide] {
	width: 13px;
	height: 13px;
	opacity: 0;
	transition: 0.15s opacity;
}
.reg-checkbox-pill.is-selected {
	border-color: var(--reg-teal-500);
	background: rgba(20, 184, 166, 0.06);
}
.reg-checkbox-pill.is-selected .reg-checkbox-pill__box {
	background: var(--reg-teal-500);
	border-color: var(--reg-teal-500);
}
.reg-checkbox-pill.is-selected .reg-checkbox-pill__box [data-lucide] {
	opacity: 1;
}

/* currency input — $ prefix */
.reg-currency {
	position: relative;
}
.reg-currency::before {
	content: '$';
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--reg-slate-500);
	font-weight: 600;
	pointer-events: none;
}
.reg-currency input {
	padding-left: 28px !important;
}
.reg-field--suffix {
	position: relative;
}
.reg-field--suffix::after {
	content: attr(data-suffix);
	position: absolute;
	right: 14px;
	top: 38px;
	color: var(--reg-slate-500);
	font-weight: 600;
	pointer-events: none;
}

/* conditional detail box shown under a yes/no question */
.reg-detail-box {
	margin-top: 16px;
}
.reg-detail-box textarea {
	width: 100%;
	min-height: 100px;
	padding: 11px 14px;
	border: 1.5px solid var(--reg-slate-200);
	border-radius: 10px;
	font-size: 0.95em;
	font-family: inherit;
	color: var(--reg-slate-900);
	resize: vertical;
}
.reg-detail-box textarea:focus {
	outline: none;
	border-color: var(--reg-teal-500);
	box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

/* document checklist + file upload (loan.php documents step) */
.reg-doc-checklist {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 20px;
}
.reg-doc-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 0.85em;
	color: var(--reg-slate-500);
}
.reg-doc-checklist [data-lucide] {
	width: 16px;
	height: 16px;
	flex: none;
	margin-top: 2px;
	color: var(--reg-teal-500);
}
.reg-file-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	border: 1.5px dashed var(--reg-slate-200);
	border-radius: 12px;
	padding: 32px 20px;
	cursor: pointer;
	color: var(--reg-slate-500);
	transition: border-color 0.15s ease, background 0.15s ease;
	margin-bottom: 16px;
}
.reg-file-drop:hover {
	border-color: var(--reg-teal-400);
	background: rgba(20, 184, 166, 0.04);
}
.reg-file-drop [data-lucide] {
	width: 28px;
	height: 28px;
	color: var(--reg-teal-500);
}
.reg-file-drop strong {
	color: var(--reg-navy-900);
	font-size: 0.92em;
}
.reg-file-drop small {
	font-size: 0.78em;
}
.reg-file-drop input[type="file"] {
	display: none;
}
.reg-file-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.reg-file-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85em;
	color: var(--reg-navy-900);
	background: var(--reg-slate-100);
	border-radius: 8px;
	padding: 8px 12px;
}
.reg-file-list [data-lucide] {
	width: 15px;
	height: 15px;
	color: var(--reg-teal-500);
	flex: none;
}

/* review / summary step */
.reg-review-section {
	margin-bottom: 22px;
}
.reg-review-section h4 {
	font-size: 0.78em;
	font-weight: 700;
	color: var(--reg-teal-600);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 10px;
}
.reg-review-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--reg-slate-200);
	border-radius: 12px;
	overflow: hidden;
}
.reg-review-item {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 11px 16px;
	font-size: 0.86em;
	border-bottom: 1px solid var(--reg-slate-100);
}
.reg-review-item:last-child {
	border-bottom: none;
}
.reg-review-item__label {
	color: var(--reg-slate-500);
	flex: none;
	width: 42%;
}
.reg-review-item__value {
	color: var(--reg-navy-900);
	font-weight: 600;
	text-align: right;
	flex: 1;
}
.reg-review-item__edit {
	color: var(--reg-teal-600);
	font-size: 0.9em;
	font-weight: 700;
	text-decoration: none;
	flex: none;
	margin-left: 10px;
}

.reg-done {
	text-align: center;
	padding: 20px 0 8px;
}
.reg-done__icon {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: rgba(20, 184, 166, 0.12);
	color: var(--reg-teal-500);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}
.reg-done__icon [data-lucide] {
	width: 34px;
	height: 34px;
}
.reg-done h3 {
	font-size: 1.4em;
}
.reg-done__ref {
	display: inline-block;
	background: var(--reg-slate-100);
	color: var(--reg-navy-900);
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.88em;
	margin: 10px 0 22px;
}
.reg-done__next {
	text-align: left;
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.reg-done__next li {
	display: flex;
	gap: 10px;
	font-size: 0.88em;
	color: var(--reg-slate-500);
}
.reg-done__next [data-lucide] {
	width: 17px;
	height: 17px;
	color: var(--reg-teal-500);
	flex: none;
	margin-top: 2px;
}

@media (max-width: 860px) {
	.reg-shell {
		grid-template-columns: 1fr;
	}
	.reg-aside {
		display: none;
	}
	.reg-card {
		padding: 32px 24px;
	}
	.reg-grid,
	.reg-type-grid,
	.reg-checkbox-grid,
	.reg-doc-checklist {
		grid-template-columns: 1fr;
	}
}
