:root {
	--otp-primary: #6366f1;
	--otp-primary-dark: #4338ca;
	--otp-text: #1f2933;
	--otp-card-bg: #ffffff;
	--otp-radius: 16px;
	--otp-shadow: 0 10px 40px rgba(0, 0, 0, 0.10);
	--otp-border: none;
}

.otp-auth-wrapper {
	max-width: 440px;
	margin: 32px auto;
	font-family: inherit;
}

.otp-auth-card {
	position: relative;
	background: var(--otp-card-bg);
	border-radius: var(--otp-radius);
	box-shadow: var(--otp-shadow);
	border: var(--otp-border);
	padding: 36px 30px;
	overflow: hidden;
}

.otp-auth-card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--otp-primary), var(--otp-primary-dark));
}

.otp-auth-title {
	margin: 6px 0 6px;
	font-size: 23px;
	font-weight: 800;
	text-align: center;
	color: var(--otp-text);
}

.otp-auth-desc {
	margin: 0 0 24px;
	text-align: center;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.7;
}

.otp-auth-message {
	display: none;
	margin-bottom: 18px;
	padding: 11px 14px;
	border-radius: calc(var(--otp-radius) * 0.5);
	font-size: 13.5px;
	text-align: center;
	animation: otp-fade-in 0.2s ease;
}

.otp-auth-message.is-success {
	display: block;
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.otp-auth-message.is-error {
	display: block;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.otp-auth-step {
	display: none;
	animation: otp-fade-in 0.25s ease;
}

.otp-auth-step.active {
	display: block;
}

.otp-field {
	margin-bottom: 18px;
}

.otp-field label {
	display: block;
	margin-bottom: 7px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--otp-text);
}

.otp-field input,
.otp-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	background: #f9fafb;
	border: 1.5px solid #e5e7eb;
	border-radius: calc(var(--otp-radius) * 0.5);
	font-size: 15px;
	color: var(--otp-text);
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.otp-field input:focus,
.otp-field select:focus {
	outline: none;
	background: #fff;
	border-color: var(--otp-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--otp-primary) 18%, transparent);
}

#otp-code {
	letter-spacing: 10px;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
}

.otp-auth-btn {
	width: 100%;
	padding: 13px 16px;
	background: linear-gradient(135deg, var(--otp-primary), var(--otp-primary-dark));
	color: #fff;
	border: none;
	border-radius: calc(var(--otp-radius) * 0.5);
	font-size: 15.5px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 16px color-mix(in srgb, var(--otp-primary) 35%, transparent);
	transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.otp-auth-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px color-mix(in srgb, var(--otp-primary) 45%, transparent);
}

.otp-auth-btn:active:not(:disabled) {
	transform: translateY(0);
}

.otp-auth-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none;
}

.otp-auth-btn-link {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 9px;
	background: none;
	border: none;
	color: var(--otp-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: opacity 0.15s ease;
}

.otp-auth-btn-link:hover:not(:disabled) {
	opacity: 0.75;
}

.otp-auth-btn-link:disabled {
	color: #9ca3af;
	cursor: not-allowed;
}

.otp-auth-sent-to {
	text-align: center;
	font-size: 14px;
	color: #4b5563;
	margin-bottom: 18px;
}

.otp-auth-sent-to strong {
	color: var(--otp-text);
}

.otp-auth-notice {
	max-width: 440px;
	margin: 32px auto;
	text-align: center;
	color: #374151;
	padding: 16px;
	border-radius: var(--otp-radius);
	background: #f9fafb;
}

@keyframes otp-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* -----------------------------------------------------------
   Header user bar: [otp_auth_userbar]
   ----------------------------------------------------------- */

.otp-auth-userbar {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--otp-text);
}

.otp-auth-userbar-name {
	font-weight: 600;
}

.otp-auth-userbar-name::before {
	content: "👤";
	margin-left: 6px;
}

.otp-auth-userbar-logout {
	display: inline-block;
	padding: 6px 14px;
	background: linear-gradient(135deg, var(--otp-primary), var(--otp-primary-dark));
	color: #fff !important;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none !important;
	transition: opacity 0.15s ease;
}

.otp-auth-userbar-logout:hover {
	opacity: 0.85;
}
