:root {
	--red: #8b1a1a;
	--red-dark: #5c1010;
	--red-light: #b52b2b;
	--gold: #c8881a;
	--gold-light: #e8b44a;
	--gold-pale: #fdf4e3;
	--gold-border: #e8c97a;
	--bg: #f5f3ef;
	--white: #ffffff;
	--surface: #faf9f7;
	--border: #e2ddd6;
	--border-strong: #c8c0b4;
	--text: #1c1814;
	--text-mid: #4a4238;
	--muted: #7a7068;
	--radius: 10px;
	--radius-sm: 6px;
	--shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
	--shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
	--transition: 0.18s ease;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "DM Sans", sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	font-size: 15px;
	line-height: 1.5;
}

/* ── Header ── */
header {
	background: linear-gradient(
		160deg,
		var(--red-dark) 0%,
		var(--red) 60%,
		#a02020 100%
	);
	color: #fff;
	padding: 20px 40px;
	display: flex;
	align-items: center;
	gap: 20px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
	position: relative;
	overflow: hidden;
}
header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 30px,
		rgba(255, 255, 255, 0.015) 30px,
		rgba(255, 255, 255, 0.015) 31px
	);
	pointer-events: none;
}
.logo-mark {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, var(--gold-light), var(--gold));
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Cormorant Garamond", serif;
	font-weight: 700;
	font-size: 22px;
	color: #fff;
	flex-shrink: 0;
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	letter-spacing: 1px;
}
.header-text h1 {
	font-family: "Cormorant Garamond", serif;
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	line-height: 1.2;
}
.header-text p {
	font-size: 0.78rem;
	opacity: 0.72;
	margin-top: 3px;
	font-weight: 300;
	letter-spacing: 0.4px;
}
.header-badge {
	margin-left: auto;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.6px;
	white-space: nowrap;
	backdrop-filter: blur(4px);
}

/* ── Progress strip ── */
.progress-wrap {
	background: var(--white);
	border-bottom: 1px solid var(--border);
	padding: 18px 40px;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: var(--shadow-sm);
}
.steps {
	display: flex;
	gap: 0;
	max-width: 920px;
	margin: 0 auto;
}
.step-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	cursor: default;
}
.step-item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 15px;
	left: 50%;
	width: 100%;
	height: 2px;
	background: var(--border);
	z-index: 0;
	transition: background 0.4s;
}
.step-item.done:not(:last-child)::after {
	background: var(--gold);
}
.step-item.active:not(:last-child)::after {
	background: linear-gradient(90deg, var(--gold), var(--border));
}
.step-dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid var(--border);
	background: var(--white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	z-index: 1;
	transition: all 0.3s;
	position: relative;
	font-family: "DM Sans", sans-serif;
}
.step-item.active .step-dot {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(139, 26, 26, 0.12);
}
.step-item.done .step-dot {
	background: var(--gold);
	border-color: var(--gold);
	color: #fff;
}
.step-item.done .step-dot::before {
	content: "✓";
	font-size: 13px;
}
.step-item.done .step-dot span {
	display: none;
}
.step-label {
	font-size: 9.5px;
	color: var(--muted);
	margin-top: 6px;
	text-align: center;
	line-height: 1.3;
	white-space: nowrap;
	font-weight: 500;
	letter-spacing: 0.2px;
}
.step-item.active .step-label {
	color: var(--red);
	font-weight: 600;
}
.step-item.done .step-label {
	color: var(--gold);
}

/* ── Container ── */
.container {
	max-width: 920px;
	margin: 36px auto;
	padding: 0 20px 80px;
}

/* ── Page heading ── */
.page-heading {
	margin-bottom: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
}
.page-heading h2 {
	font-family: "Cormorant Garamond", serif;
	font-size: 1.7rem;
	font-weight: 700;
	color: var(--text);
	line-height: 1.2;
}
.page-heading p {
	font-size: 0.83rem;
	color: var(--muted);
	margin-top: 5px;
}
.step-counter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 8px;
}
.step-counter::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 2px;
	background: var(--gold);
	border-radius: 2px;
}

/* ── Card ── */
.card {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
	padding: 28px 32px;
	margin-bottom: 20px;
	transition: box-shadow var(--transition);
}
.card:hover {
	box-shadow: var(--shadow-lg);
}

.card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}
.card-header-icon {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--gold-pale), #f5e8c8);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	flex-shrink: 0;
	border: 1px solid var(--gold-border);
}
.card-header h3 {
	/*font-family: "Cormorant Garamond", serif;*/
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text);
}
.card-header p {
	font-size: 0.75rem;
	color: var(--muted);
	margin-top: 1px;
}

/* ── Section label ── */
.section-label {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	color: var(--muted);
	margin-bottom: 16px;
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.section-label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border);
}

/* ── Grid ── */
.grid {
	display: grid;
	gap: 16px;
}
.g2 {
	grid-template-columns: 1fr 1fr;
}
.g3 {
	grid-template-columns: 1fr 1fr 1fr;
}
.g4 {
	grid-template-columns: 1fr 1fr 1fr 1fr;
}
.span2 {
	grid-column: span 2;
}
.span3 {
	grid-column: span 3;
}
.span4 {
	grid-column: span 4;
}

/* ── Fields ── */
.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field label {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--text-mid);
	text-transform: uppercase;
	letter-spacing: 0.7px;
	display: flex;
	align-items: center;
	gap: 4px;
}
.field input,
.field select,
.field textarea {
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 10px 13px;
	font-size: 0.88rem;
	color: var(--text);
	background: var(--white);
	font-family: "DM Sans", sans-serif;
	transition:
		border-color var(--transition),
		box-shadow var(--transition),
		background var(--transition);
	width: 100%;
	outline: none;
	-webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder {
	color: #b8b0a8;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(200, 136, 26, 0.1);
	background: var(--gold-pale);
}
.field input.error,
.field select.error,
.field textarea.error {
	border-color: #c0392b;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}
.field-error {
	font-size: 0.7rem;
	color: #c0392b;
	display: none;
	margin-top: 2px;
	font-weight: 500;
}
.field-error.show {
	display: block;
}

.field textarea {
	resize: vertical;
	min-height: 80px;
}
.field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a7068'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
	cursor: pointer;
}

/* ── Radio / Checkbox ── */
.radio-group,
.check-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding-top: 2px;
	position: relative;
	cursor: pointer;
}

.radio-option,
.check-option {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border: 1.5px solid var(--border);
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text-mid);
	cursor: pointer;
	transition: all var(--transition);
	user-select: none;
	white-space: nowrap;
}
.radio-option:has(input:checked),
.check-option:has(input:checked) {
	background: var(--gold-pale);
	border-color: var(--gold);
	color: var(--gold);
}
.radio-option input,
.check-option input {
	width: 14px;
	height: 14px;
	accent-color: var(--red);
	cursor: pointer;
	flex-shrink: 0;
}
.radio-option:hover,
.check-option:hover {
	border-color: var(--gold-light);
	background: var(--gold-pale);
}

input[type="radio"],
input[type="checkbox"] {
	/* display: none; */
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.radio-option:focus-within,
.check-option:focus-within {
	outline: 2px solid var(--gold-light);
}

.radio-group .field-error {
	flex-basis: 100%;
}

/* ── Toggle row ── */
.toggle-row {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	flex-wrap: wrap;
}
.toggle-row .toggle-label {
	font-size: 0.87rem;
	font-weight: 500;
	flex: 1;
	min-width: 200px;
	color: var(--text-mid);
}
.toggle-row .radio-group {
	flex: 0 0 auto;
	gap: 6px;
}
.toggle-row .radio-option {
	padding: 5px 12px;
	font-size: 0.8rem;
}

/* ── File upload ── */
.file-upload {
	border: 2px dashed var(--border-strong);
	border-radius: var(--radius);
	padding: 22px 20px;
	text-align: center;
	cursor: pointer;
	transition: all var(--transition);
	position: relative;
	background: var(--surface);
}
.file-upload:hover {
	border-color: var(--gold);
	background: var(--gold-pale);
}
.file-upload.has-file {
	border-color: var(--gold);
	background: var(--gold-pale);
	border-style: solid;
}
.file-upload input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.file-upload .upload-icon {
	font-size: 2rem;
	margin-bottom: 8px;
	display: block;
}
.file-upload strong {
	font-size: 0.85rem;
	color: var(--text);
	display: block;
	margin-bottom: 3px;
}
.file-upload p {
	font-size: 0.75rem;
	color: var(--muted);
}
.file-preview {
	margin-top: 10px;
	font-size: 0.78rem;
	color: var(--gold);
	font-weight: 600;
	display: none;
}
.file-preview.show {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

/* ── Photo box ── */
.photo-box {
	border-radius: var(--radius);
	background: var(--gold-pale);
	width: 110px;
	height: 132px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 0.68rem;
	color: var(--gold);
	font-weight: 600;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
	transition: all var(--transition);
}
.photo-box:hover {
	border: 2px solid rgba(200, 136, 26, 0.4);
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(200, 136, 26, 0.1);
}
.photo-box input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}
.photo-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	inset: 0;
}
.photo-box .ph-icon {
	font-size: 2rem;
	margin-bottom: 5px;
}
.photo-box:focus-within {
	outline: 2px solid var(--gold-light);
}

/* ── Applicant header row ── */
.applicant-header {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}
.applicant-fields {
	flex: 1;
}

/* ── Divider ── */
.divider {
	height: 1px;
	background: var(--border);
	margin: 24px 0;
}

/* ── Info note ── */
.info-note {
	background: var(--gold-pale);
	border-left: 3px solid var(--gold);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	padding: 11px 15px;
	font-size: 0.8rem;
	color: #7a5c10;
	margin-bottom: 20px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
.info-note::before {
	content: "ℹ️";
	flex-shrink: 0;
	margin-top: 1px;
}

/* ── Conditional ── */
.conditional {
	display: none;
}
.conditional.show {
	display: block;
}

/* ── Navigation ── */
.nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid var(--border);
	gap: 12px;
}
.btn {
	padding: 11px 26px;
	border-radius: 8px;
	font-size: 0.87rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all var(--transition);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: "DM Sans", sans-serif;
	letter-spacing: 0.2px;
	white-space: nowrap;
}
.btn-primary {
	background: var(--red);
	color: #fff;
	box-shadow: 0 2px 8px rgba(139, 26, 26, 0.3);
}
.btn-primary:hover {
	background: var(--red-dark);
	box-shadow: 0 4px 14px rgba(139, 26, 26, 0.4);
	transform: translateY(-1px);
}
.btn-outline {
	background: var(--white);
	color: var(--text-mid);
	border: 1.5px solid var(--border);
}
.btn-outline:hover {
	border-color: var(--border-strong);
	color: var(--text);
	background: var(--surface);
}
.btn-gold {
	background: linear-gradient(135deg, var(--gold-light), var(--gold));
	color: #fff;
	box-shadow: 0 2px 8px rgba(200, 136, 26, 0.35);
}
.btn-gold:hover {
	box-shadow: 0 4px 14px rgba(200, 136, 26, 0.45);
	transform: translateY(-1px);
}
.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}
.btn-lg {
	padding: 13px 32px;
	font-size: 0.93rem;
}
#top-back-btn {
	margin-bottom: 15px;
}

/* ── Pages ── */
.page {
	display: none;
}
.page.active {
	display: block;
	animation: fadeInUp 0.28s ease;
}
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Summary ── */
.summary-table {
	width: 100%;
	border-collapse: collapse;
}
.summary-table tr {
	border-bottom: 1px solid var(--border);
}
.summary-table tr:last-child {
	border-bottom: none;
}
.summary-table td {
	padding: 9px 0;
	vertical-align: top;
}
.summary-table td:first-child {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	width: 200px;
	padding-right: 16px;
}
.summary-table td:last-child {
	font-size: 0.88rem;
	color: var(--text);
}

/* ── Mandate cards ── */
.mandate-option {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
	padding: 14px 16px;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	transition: all var(--transition);
	margin-bottom: 10px;
}
.mandate-option:has(input:checked) {
	background: var(--gold-pale);
	border-color: var(--gold);
}
.mandate-option:hover {
	border-color: var(--gold-light);
	background: var(--gold-pale);
}
.mandate-option input {
	margin-top: 3px;
	accent-color: var(--red);
	flex-shrink: 0;
}
.mandate-option strong {
	font-size: 0.87rem;
	display: block;
	margin-bottom: 3px;
}
.mandate-option p {
	font-size: 0.78rem;
	color: var(--muted);
}

/* ── Sub-card (persons in relatives) ── */
.sub-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 16px;
	margin-bottom: 12px;
}
.sub-card h4 {
	font-size: 0.76rem;
	color: var(--muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 14px;
}

/* ── Attestation ── */
.attest-box {
	background: var(--gold-pale);
	border: 1.5px solid var(--gold-border);
	border-radius: var(--radius-sm);
	padding: 16px 18px;
}
.attest-box label {
	display: block;
	cursor: pointer;
	font-size: 0.85rem;
	line-height: 1.6;
	color: var(--text-mid);
	padding-left: 28px;
	position: relative;
}

.attest-box input[type="checkbox"] {
	position: absolute;
	left: 0;
	top: 4px;
	width: 18px !important;
	height: 18px !important;
	opacity: 1 !important;
	accent-color: var(--red);
	cursor: pointer;
}

.attest-box label a {
	display: inline !important;
	color: var(--gold);
	text-decoration: underline;
}

/* ── Success page ── */
.success-card {
	text-align: center;
	padding: 60px 40px;
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
}
.success-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gold-light), var(--gold));
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	margin: 0 auto 24px;
	box-shadow: 0 4px 20px rgba(200, 136, 26, 0.35);
}
.success-card h2 {
	font-family: "Cormorant Garamond", serif;
	font-size: 2rem;
	color: var(--text);
	margin-bottom: 12px;
}
.success-card p {
	color: var(--muted);
	max-width: 440px;
	margin: 0 auto 24px;
	line-height: 1.7;
}
.contact-box {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px 20px;
	display: inline-block;
	margin-bottom: 28px;
}
.contact-box p {
	font-size: 0.8rem;
	color: var(--muted);
	margin-bottom: 2px;
}
.contact-box strong {
	color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 640px) {
	.g2,
	.g3,
	.g4 {
		grid-template-columns: 1fr;
	}
	.span2,
	.span3,
	.span4 {
		grid-column: span 1;
	}
	.card {
		padding: 18px;
	}
	.applicant-header {
		flex-direction: column;
	}
	.steps .step-label {
		display: none;
	}
	header {
		padding: 14px 18px;
	}
	.header-badge {
		display: none;
	}
	.progress-wrap {
		padding: 14px 18px;
	}
	.container {
		padding: 0 12px 60px;
	}
}

.required {
	color: var(--red);
	font-weight: 700;
}
.form-note {
	font-size: 0.75rem;
	color: var(--muted);
	margin-top: 4px;
}

/* ── NOK section backgrounds ── */
.nok-section {
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	padding: 20px;
	margin-bottom: 16px;
}
.nok-section:first-of-type {
	background: rgba(139, 26, 26, 0.025);
	border-color: rgba(139, 26, 26, 0.12);
}
.nok-section:last-of-type {
	background: var(--surface);
}
.nok-title {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.nok-section:first-of-type .nok-title {
	color: var(--red);
}
.nok-section:last-of-type .nok-title {
	color: var(--muted);
}

/* ── Scroll target for errors ── */
.error-banner {
	background: #fde8e8;
	border: 1.5px solid #e74c3c;
	border-radius: var(--radius-sm);
	padding: 12px 16px;
	font-size: 0.82rem;
	color: #922b21;
	margin-bottom: 16px;
	display: none;
	font-weight: 500;
	align-items: center;
	gap: 8px;
}
.error-banner.show {
	display: flex;
}

.terms-container {
	padding-block: 40px;
	padding-inline: 20px;
	max-width: 1280px;
	margin-inline: auto;
}

.terms-container ol {
	padding-left: 16px;
	color: var(--text);
	font-size: 1rem;
	line-height: 1.7;
	text-wrap: pretty;
}

.terms-container ol li {
	margin-bottom: 32px;
}

.terms-container ol li:last-child {
	margin-bottom: 0;
}

.terms-container ol li::marker {
	font-weight: 700;
}

.card-header h3,
.nok-title,
h3 {
	/* color: var(--red-dark); */
	text-transform: uppercase !important;
}

.m-5 {
	margin: 8px 0px;
}
