/**
 * R31D — Login / registrazione cliente premium (mobile-first).
 */
body.wa-auth-page .wa-auth-page-wrap {
	max-width: 580px;
	margin: 0 auto;
	padding: 1.25rem clamp(1rem, 4vw, 1.5rem) 2.5rem;
}

body.wa-auth-page.wa-client-app {
	background: linear-gradient(180deg, rgba(241, 245, 249, 0.65) 0%, rgba(255, 255, 255, 0) 220px);
}

body.wa-auth-page .wa-auth-panel {
	margin-bottom: 1.1rem;
}

body.wa-auth-page .wa-auth-panel__title {
	margin: 0 0 0.3rem;
	font-size: clamp(1.15rem, 3.5vw, 1.35rem);
	font-weight: 800;
	color: var(--wa-color-text, #0f172a);
}

body.wa-auth-page .wa-auth-panel__subtitle {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-hero {
	text-align: center;
	margin-bottom: 1.15rem;
}

body.wa-auth-page .wa-auth-hero__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.35rem, 4vw, 1.65rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wa-color-text, #0f172a);
}

body.wa-auth-page .wa-auth-hero__subtitle {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-card {
	background: var(--wa-color-surface, #fff);
	border: 1px solid var(--wa-color-border, #e2e8f0);
	border-radius: 16px;
	box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
	padding: 1.35rem 1.25rem 1.5rem;
}

body.wa-auth-page .wa-auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding: 0.35rem;
	background: var(--wa-color-surface-muted, #f1f5f9);
	border-radius: 999px;
}

body.wa-auth-page .wa-auth-tabs__link {
	display: block;
	text-align: center;
	padding: 0.55rem 0.75rem;
	border-radius: 999px;
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--wa-color-muted, #64748b);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.wa-auth-page .wa-auth-tabs__link.is-active {
	background: var(--wa-color-surface, #fff);
	color: var(--wa-color-text, #0f172a);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body.wa-auth-page .wa-auth-field {
	margin-bottom: 1rem;
}

body.wa-auth-page .wa-auth-field__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
}

body.wa-auth-page .wa-auth-input-wrap__icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wa-color-muted, #94a3b8);
	font-size: 0.95rem;
	pointer-events: none;
	z-index: 1;
}

body.wa-auth-page .wa-auth-input-wrap .form-control {
	padding-left: 2.45rem;
	padding-right: 2.45rem;
	border-radius: 10px;
	min-height: 46px;
	font-size: 1rem;
	border-color: var(--wa-field-surface-border, var(--wa-color-border, #cbd5e1));
	background: var(--wa-field-surface-bg, #ffffff);
	color: var(--wa-field-surface-color, var(--wa-text-color, #1f1a16));
	box-shadow: var(--wa-field-surface-shadow, 0 1px 2px rgba(31, 26, 22, 0.07));
}

body.wa-auth-page .wa-auth-input-wrap .form-control:focus {
	border-color: var(--wa-button-primary-bg, #166534);
	box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

body.wa-auth-page .wa-auth-input-wrap--password .form-control {
	padding-right: 2.85rem;
}

body.wa-auth-page .wa-auth-pw-toggle {
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: var(--wa-color-muted, #64748b);
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 8px;
	cursor: pointer;
	z-index: 2;
}

body.wa-auth-page .wa-auth-pw-toggle:hover,
body.wa-auth-page .wa-auth-pw-toggle:focus-visible {
	color: var(--wa-color-text, #0f172a);
	background: rgba(15, 23, 42, 0.05);
}

body.wa-auth-page .wa-auth-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

body.wa-auth-page .wa-auth-forgot {
	margin: 0.35rem 0 0;
	text-align: right;
	font-size: 0.88rem;
}

body.wa-auth-page .wa-auth-forgot a {
	font-weight: 600;
}

body.wa-auth-page .wa-auth-hint {
	margin: 0.65rem 0 0;
	font-size: 0.84rem;
	color: var(--wa-color-muted, #64748b);
	text-align: center;
}

body.wa-auth-page .wa-auth-submit {
	margin-top: 0.25rem;
	border-radius: 999px;
	min-height: 48px;
	font-weight: 700;
	font-size: 1rem;
}

body.wa-auth-page .wa-auth-submit.is-loading {
	opacity: 0.85;
	pointer-events: none;
}

body.wa-auth-page .wa-auth-pw-tools {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	margin: 0.35rem 0 0.65rem;
}

body.wa-auth-page .wa-auth-pw-generate-hint {
	margin: 0;
	font-size: 0.78rem;
	color: var(--wa-color-muted, #64748b);
	line-height: 1.4;
}

body.wa-auth-page .wa-auth-pw-generate {
	border: 1px dashed var(--wa-color-border, #cbd5e1);
	background: var(--wa-color-surface-muted, #f8fafc);
	color: var(--wa-color-text, #334155);
	border-radius: 999px;
	padding: 0.35rem 0.75rem;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
}

body.wa-auth-page .wa-auth-strength {
	margin-bottom: 0.65rem;
}

body.wa-auth-page .wa-auth-strength__bar {
	height: 6px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
	margin-bottom: 0.35rem;
}

body.wa-auth-page .wa-auth-strength__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: #ef4444;
	transition: width 0.2s ease, background 0.2s ease;
}

body.wa-auth-page .wa-auth-strength__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-requirements {
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0;
	display: grid;
	gap: 0.25rem;
}

body.wa-auth-page .wa-auth-requirements li {
	font-size: 0.82rem;
	color: var(--wa-color-muted, #64748b);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

body.wa-auth-page .wa-auth-requirements li.is-ok {
	color: var(--wa-color-success, #15803d);
}

body.wa-auth-page .wa-auth-requirements li i {
	width: 1rem;
	text-align: center;
	font-size: 0.75rem;
}

body.wa-auth-page .wa-auth-terms {
	margin: 0.85rem 0 1rem;
	font-size: 0.88rem;
	line-height: 1.45;
}

body.wa-auth-page .wa-auth-terms .form-check-input {
	margin-top: 0.2rem;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--wa-checkbox-control-border, #6f6258);
	background-color: var(--wa-checkbox-control-bg, #ffffff);
}

body.wa-auth-page .wa-auth-terms .form-check-input:checked {
	background-color: var(--wa-checkbox-control-checked-bg, var(--wa-accent-color, #b87932));
	border-color: var(--wa-checkbox-control-checked-border, var(--wa-accent-color, #b87932));
}

body.wa-auth-page .wa-auth-social {
	margin-top: 1.15rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wa-color-border, #e2e8f0);
}

body.wa-auth-page .wa-auth-magic {
	margin-bottom: 0.25rem;
}

body.wa-auth-page .wa-auth-magic--secondary {
	margin: 0;
	border: none;
	padding: 0;
}

/* R33d — Magic Link card premium (login cliente) */
body.wa-auth-page .wa-auth-magic-card {
	margin-top: 1.35rem;
	padding: 1.15rem 1.2rem 1.2rem;
	border: 1px solid var(--wa-color-border, #e2e8f0);
	border-radius: 16px;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.wa-auth-page .wa-auth-magic-card__head {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.55rem;
}

body.wa-auth-page .wa-auth-magic-card__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 12px;
	background: #ecfdf5;
	color: #0f766e;
	font-size: 1rem;
	border: 1px solid #99f6e4;
}

body.wa-auth-page .wa-auth-magic-card__head-text {
	min-width: 0;
	flex: 1;
}

body.wa-auth-page .wa-auth-magic-card__title {
	margin: 0 0 0.25rem;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wa-color-text, #0f172a);
}

body.wa-auth-page .wa-auth-magic-card__lead {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--wa-text-muted, #64748b);
}

body.wa-auth-page .wa-auth-magic-card__note {
	margin: 0 0 0.85rem;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--wa-color-muted, #94a3b8);
}

body.wa-auth-page .wa-auth-magic-card__actions {
	margin-top: 0.15rem;
}

body.wa-auth-page .wa-auth-magic-card__field {
	margin-bottom: 0.65rem;
}

body.wa-auth-page .wa-auth-magic-card__btn {
	background: #fff;
	border: 1.5px solid #0f766e;
	color: #0f766e;
	font-weight: 600;
	font-size: 0.92rem;
	padding: 0.72rem 1rem;
	border-radius: 12px;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.wa-auth-page .wa-auth-magic-card__btn:hover,
body.wa-auth-page .wa-auth-magic-card__btn:focus-visible {
	background: #0f766e;
	border-color: #0f766e;
	color: #fff;
}

body.wa-auth-page .wa-auth-magic-card__btn.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

body.wa-auth-page .wa-auth-magic-card__status {
	margin-top: 0.85rem;
	padding: 0.75rem 0.85rem;
	border-radius: 10px;
	font-size: 0.86rem;
	line-height: 1.45;
}

body.wa-auth-page .wa-auth-magic-card__status--ok {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

body.wa-auth-page .wa-auth-magic-card__status--warn {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	color: #92400e;
}

body.wa-auth-page .wa-auth-other-methods--social {
	margin-top: 1.15rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wa-color-border, #e2e8f0);
}

body.wa-auth-page .wa-auth-field.is-magic-email-needed .form-control {
	border-color: #0d9488;
	box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

body.wa-auth-page .wa-auth-other-methods {
	margin-top: 1.35rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--wa-color-border, #e2e8f0);
}

body.wa-auth-page .wa-auth-other-methods__intro {
	margin: 0 0 0.65rem;
	font-size: 0.88rem;
	line-height: 1.45;
	color: var(--wa-text-muted, #64748b);
}

body.wa-auth-page .wa-auth-magic-debug {
	margin: 0;
	padding: 0.5rem 0.65rem;
	font-size: 0.78rem;
	line-height: 1.4;
	color: #64748b;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
}

body.wa-auth-page .wa-auth-other-methods__title {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-other-methods__item {
	margin-bottom: 0.65rem;
	border: 1px solid var(--wa-color-border, #e2e8f0);
	border-radius: 10px;
	background: var(--wa-color-surface-muted, #f8fafc);
}

body.wa-auth-page .wa-auth-magic--secondary .wa-auth-magic__body {
	padding: 0.85rem;
}

body.wa-auth-page .wa-auth-other-methods__summary {
	cursor: pointer;
	padding: 0.72rem 0.85rem;
	font-size: 0.88rem;
	font-weight: 600;
	list-style: none;
}

body.wa-auth-page .wa-auth-other-methods__summary::-webkit-details-marker {
	display: none;
}

body.wa-auth-page .wa-auth-other-methods__summary::after {
	content: '+';
	float: right;
	font-weight: 700;
	color: var(--wa-color-muted, #64748b);
}

body.wa-auth-page .wa-auth-other-methods__item[open] .wa-auth-other-methods__summary::after {
	content: '−';
}

body.wa-auth-page .wa-auth-magic__body {
	padding: 0 0.85rem 0.85rem;
}

body.wa-auth-page .wa-auth-magic__lead--compact {
	margin: 0 0 0.65rem;
	font-size: 0.82rem;
}

body.wa-auth-page .wa-auth-other-methods__social {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: 0.35rem;
}

body.wa-auth-page .wa-auth-social--secondary {
	margin-top: 1.15rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wa-color-border, #e2e8f0);
}

body.wa-auth-page .wa-auth-switch-tab {
	margin: 0.65rem 0 0;
	text-align: center;
	font-size: 0.88rem;
}

body.wa-auth-page .wa-auth-magic__title {
	margin: 0 0 0.25rem;
	font-size: 0.98rem;
	font-weight: 700;
}

body.wa-auth-page .wa-auth-magic__lead {
	margin: 0 0 0.85rem;
	font-size: 0.86rem;
	color: var(--wa-color-muted, #64748b);
	line-height: 1.45;
}

body.wa-auth-page .wa-auth-magic__btn {
	background: #0f766e;
	border: none;
	color: #fff;
	font-weight: 700;
	padding: 0.72rem 1rem;
	border-radius: 10px;
}

body.wa-auth-page .wa-auth-magic__btn:hover,
body.wa-auth-page .wa-auth-magic__btn:focus-visible {
	background: #0d9488;
	color: #fff;
}

body.wa-auth-page .wa-auth-magic__btn.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

body.wa-auth-page .wa-auth-magic__hint {
	margin: 0.65rem 0 0;
	font-size: 0.8rem;
	color: var(--wa-color-muted, #64748b);
	line-height: 1.4;
}

body.wa-auth-page .wa-auth-magic__status {
	margin-top: 0.85rem;
	padding: 0.75rem 0.85rem;
	border-radius: 10px;
	font-size: 0.86rem;
	line-height: 1.45;
}

body.wa-auth-page .wa-auth-magic__status--ok {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

body.wa-auth-page .wa-auth-magic__status--warn {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	color: #92400e;
}

body.wa-auth-page .wa-auth-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0 1rem;
	color: var(--wa-color-muted, #64748b);
	font-size: 0.82rem;
	text-transform: lowercase;
}

body.wa-auth-page .wa-auth-divider::before,
body.wa-auth-page .wa-auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--wa-color-border, #e2e8f0);
}

body.wa-auth-page .wa-auth-social__title {
	margin: 0 0 0.25rem;
	font-size: 0.92rem;
	font-weight: 700;
}

body.wa-auth-page .wa-auth-social__lead {
	margin: 0 0 0.85rem;
	font-size: 0.84rem;
	color: var(--wa-color-muted, #64748b);
	line-height: 1.4;
}

body.wa-auth-page .wa-auth-social__actions {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

body.wa-auth-page .wa-auth-return {
	margin-top: 1.25rem;
	text-align: center;
}

body.wa-auth-page .wa-auth-msg {
	margin-bottom: 1rem;
}

body.wa-auth-page .wa-auth-field.is-invalid .form-control {
	border-color: #dc2626;
}

body.wa-auth-page .wa-auth-field__error {
	margin: 0.3rem 0 0;
	font-size: 0.8rem;
	color: #dc2626;
}

@media (max-width: 480px) {
	body.wa-auth-page .wa-auth-row-2 {
		grid-template-columns: 1fr;
	}

	body.wa-auth-page .wa-auth-card {
		padding: 1.15rem 1rem 1.25rem;
	}

	body.wa-auth-page .wa-auth-magic-card {
		padding: 1rem 0.95rem 1.05rem;
		border-radius: 14px;
	}

	body.wa-auth-page .wa-auth-magic-card__title {
		font-size: 0.98rem;
	}

	body.wa-auth-page .wa-auth-magic-card__btn {
		font-size: 0.9rem;
		padding: 0.68rem 0.85rem;
	}
}

/* Profilo cliente — stessi campi password premium (R41), body id wa-profilo */
body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-field {
	margin-bottom: 1rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-field__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--wa-color-muted, #64748b);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-input-wrap__icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wa-color-muted, #94a3b8);
	font-size: 0.95rem;
	pointer-events: none;
	z-index: 1;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-input-wrap .form-control {
	width: 100%;
	padding-left: 2.45rem;
	padding-right: 2.45rem;
	border-radius: 10px;
	min-height: 46px;
	font-size: 1rem;
	border-color: var(--wa-color-border, #cbd5e1);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-input-wrap .form-control:focus {
	border-color: var(--wa-button-primary-bg, #166534);
	box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-input-wrap--password .form-control {
	padding-right: 2.85rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-pw-toggle {
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: var(--wa-color-muted, #64748b);
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 8px;
	cursor: pointer;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-pw-toggle:hover,
body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-pw-toggle:focus-visible {
	color: var(--wa-color-text, #0f172a);
	background: rgba(15, 23, 42, 0.05);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-strength {
	margin: 0.35rem 0 0.65rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-strength__bar {
	height: 6px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
	margin-bottom: 0.35rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-strength__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: #ef4444;
	transition: width 0.2s ease, background 0.2s ease;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-strength__label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wa-color-muted, #64748b);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-requirements {
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0.65rem 0.75rem;
	display: grid;
	gap: 0.3rem;
	background: var(--wa-color-surface-muted, #f8fafc);
	border: 1px solid var(--wa-color-border, #e2e8f0);
	border-radius: 10px;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-requirements li {
	font-size: 0.82rem;
	color: var(--wa-color-muted, #64748b);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-requirements li.is-ok {
	color: var(--wa-color-success, #15803d);
}

body#wa-profilo.wa-client-app .wa-profilo-sec-form .wa-auth-requirements li i {
	width: 1rem;
	text-align: center;
	font-size: 0.75rem;
	flex-shrink: 0;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-generate {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-generate-btn {
	border: 1px dashed var(--wa-color-border, #cbd5e1);
	background: var(--wa-color-surface-muted, #f8fafc);
	color: var(--wa-color-text, #334155);
	border-radius: 999px;
	padding: 0.35rem 0.85rem;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
}

body#wa-profilo.wa-client-app .wa-profilo-sec-generate-btn:hover,
body#wa-profilo.wa-client-app .wa-profilo-sec-generate-btn:focus-visible {
	background: #ecfdf5;
	border-color: #86efac;
	color: #166534;
	text-decoration: none;
}
