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

:root {
	--color-bg: #f5f5f5;
	--color-surface: #fff;
	--color-primary: #4a6cf7;
	--color-primary-hover: #3a56d4;
	--color-text: #333;
	--color-text-muted: #999;
	--color-border: #dddddd;
	--color-error: #d93523;
	--color-success-bg: #d4edda;
	--color-success-text: #249c3f;
	--color-success-border: #29c94e;
	--color-error-bg: #f8d7da;
	--color-error-text: #721c24;
	--color-error-border: #f5c6cb;
	--color-hover-bg: #f6f7fe;
	--radius: 8px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background: var(--color-bg);
	color: var(--color-text);
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

/* ── Card container ─────────────────────────────── */

.container {
	background: var(--color-surface);
	border-radius: var(--radius);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	padding: 2rem;
	max-width: 480px;
	width: 100%;
	text-align: center;
}

.container--wide {
	max-width: 900px;
	padding: 2rem;
	text-align: left;
}

.page-actions {
	display: flex;
	justify-content: center;
	margin: 0.5rem 0 0;
	gap: 10px;
}

h1 {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

/* ── Form fields ────────────────────────────────── */

.form-group {
	width: 100%;
	text-align: left;
}

.form-label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: var(--color-text);
}

.required {
	color: var(--color-error);
}
.optional {
	color: var(--color-text-muted);
}

.form-input {
	width: 100%;
	padding: 0.6rem 0.75rem;
	font-size: 0.95rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-family: inherit;
	color: var(--color-text);
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.form-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
}

.form-input.input-error {
	border-color: var(--color-error);
}

.form-input.input-error:focus {
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-textarea {
	resize: vertical;
	min-height: 4rem;
}

/* ── Submit button ──────────────────────────────── */

.btn-submit {
	display: inline-block;
	background: var(--color-primary);
	color: #fff;
	padding: 0.75rem 2rem;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 1rem;
	font-family: inherit;
	transition: background 0.15s ease;
}

.btn-submit:hover,
.btn-submit:focus-visible {
	background: var(--color-primary-hover);
	outline: none;
}

.btn-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-secondary {
	display: inline-block;
	background: transparent;
	color: var(--color-primary);
	padding: 0.75rem 2rem;
	border: 2px solid var(--color-primary);
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 1rem;
	font-family: inherit;
	text-decoration: none;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.btn-secondary:hover {
	background: var(--color-primary);
	color: #fff;
	outline: none;
}

/* ── Alerts (success / error) ───────────────────── */

.alert {
	position: relative;
	padding: 1rem;
	border-radius: var(--radius);
	margin-bottom: 1.25rem;
	text-align: left;
	font-size: 0.9rem;
	line-height: 1.5;
}

.alert ul {
	margin-top: 0.25rem;
	padding-left: 1.25rem;
}

.alert-success {
	background: var(--color-success-bg);
	color: var(--color-success-text);
	border: 1px solid var(--color-success-border);
}

.alert-error {
	background: var(--color-error-bg);
	color: var(--color-error-text);
	border: 1px solid var(--color-error-border);
}

.alert-dismiss {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
	padding: 0;
}

.alert-dismiss:hover {
	opacity: 1;
}

/* ── Client-side field errors ───────────────────── */

.field-error {
	color: var(--color-error);
	font-size: 0.8rem;
	margin-top: 0.25rem;
}

/* ── Empty state ────────────────────────────────── */

.empty-state {
	text-align: center;
	color: var(--color-text-muted);
	padding: 3rem 1rem;
	font-size: 1rem;
}
