/**
 * Auth v3 — fintech clean (Outfit + ink/slate)
 * Diferente do card roxo antigo: painel tipográfico, inputs sem ícone colorido
 */

.uds-auth-body {
	--auth-ink: #0b1220;
	--auth-ink-soft: #1e293b;
	--auth-muted: #64748b;
	--auth-line: #e2e8f0;
	--auth-surface: #ffffff;
	--auth-canvas: #f3f5f8;
	--auth-accent: #1d4ed8;
	--auth-accent-soft: #dbeafe;
	--auth-focus: rgba(29, 78, 216, 0.18);
	--auth-danger: #dc2626;
	--auth-ok: #059669;
	--auth-radius: 12px;
	--auth-input-h: 3rem;
	--auth-gap: 1.125rem;
	--auth-display: "Outfit", "Segoe UI", sans-serif;
	--auth-body-font: "IBM Plex Sans", "Segoe UI", sans-serif;

	margin: 0;
	min-height: 100vh;
	font-family: var(--auth-body-font);
	font-size: 0.9375rem;
	background: var(--auth-canvas);
	color: var(--auth-ink);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

.uds-auth-body *,
.uds-auth-body *::before,
.uds-auth-body *::after {
	box-sizing: border-box;
}

.dark .uds-auth-body {
	--auth-ink: #f1f5f9;
	--auth-ink-soft: #cbd5e1;
	--auth-muted: #94a3b8;
	--auth-line: rgba(148, 163, 184, 0.22);
	--auth-surface: #0f1624;
	--auth-canvas: #070b12;
	--auth-accent: #60a5fa;
	--auth-accent-soft: rgba(96, 165, 250, 0.12);
	--auth-focus: rgba(96, 165, 250, 0.22);
}

/* ── Chrome (home + theme) ── */
.uds-auth-chrome {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	pointer-events: none;
}

.uds-auth-chrome__home,
.uds-auth-chrome__theme {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.35rem;
	border-radius: 999px;
	border: 1px solid var(--auth-line);
	background: color-mix(in srgb, var(--auth-surface) 88%, transparent);
	backdrop-filter: blur(12px);
	color: var(--auth-muted);
	font-family: var(--auth-body-font);
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.uds-auth-chrome__home {
	padding: 0 0.9rem;
}

.uds-auth-chrome__theme {
	width: 2.35rem;
	padding: 0;
}

.uds-auth-chrome__home:hover,
.uds-auth-chrome__theme:hover {
	color: var(--auth-ink);
	border-color: color-mix(in srgb, var(--auth-accent) 40%, var(--auth-line));
}

.uds-auth-theme-icon--dark { display: none; }
.dark .uds-auth-theme-icon--light { display: none; }
.dark .uds-auth-theme-icon--dark { display: inline; }

/* ── Shell ── */
.uds-auth-shell {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1fr;
}

@media (min-width: 980px) {
	.uds-auth-shell {
		grid-template-columns: minmax(380px, 1.08fr) minmax(420px, 1fr);
	}
}

/* ── Hero ── */
.uds-auth-hero {
	display: none;
	position: relative;
	padding: 3.5rem 3.5rem 2.5rem;
	background: #070b12;
	color: #e2e8f0;
	overflow: hidden;
}

.uds-auth-hero__glow {
	position: absolute;
	inset: auto -20% -30% auto;
	width: 70%;
	height: 70%;
	background: radial-gradient(circle, rgba(29, 78, 216, 0.35), transparent 68%);
	filter: blur(20px);
	pointer-events: none;
}

@media (min-width: 980px) {
	.uds-auth-hero {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		min-height: 100vh;
	}
}

.uds-auth-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 28rem;
	animation: auth-in 0.65s ease both;
}

.uds-auth-hero__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.85rem;
	margin-bottom: 2.75rem;
}

.uds-auth-hero__logo {
	max-height: 44px;
	max-width: 170px;
	width: auto;
	object-fit: contain;
}

.uds-auth-hero__app {
	font-family: var(--auth-display);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #93c5fd;
}

.uds-auth-hero__title {
	margin: 0 0 1rem;
	font-family: var(--auth-display);
	font-size: clamp(2rem, 3.2vw, 2.75rem);
	font-weight: 750;
	line-height: 1.08;
	letter-spacing: -0.04em;
	color: #fff;
}

.uds-auth-hero__text {
	margin: 0 0 2.25rem;
	font-size: 1.02rem;
	line-height: 1.65;
	color: rgba(226, 232, 240, 0.78);
	max-width: 26rem;
}

.uds-auth-hero__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.uds-auth-hero__features li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.92rem;
	color: rgba(241, 245, 249, 0.88);
}

.uds-auth-hero__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #60a5fa;
	box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
	flex-shrink: 0;
}

.uds-auth-hero__copy {
	position: relative;
	z-index: 1;
	margin: 2rem 0 0;
	font-size: 0.75rem;
	color: rgba(148, 163, 184, 0.7);
}

/* ── Main / panel ── */
.uds-auth-main {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5.25rem 1.15rem 2.25rem;
	min-height: 100vh;
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

@media (min-width: 980px) {
	.uds-auth-main {
		align-items: center;
		padding: 2.5rem 2rem;
	}
}

.uds-auth-panel {
	width: 100%;
	max-width: min(var(--auth-panel-max, 420px), 100%);
	min-width: 0;
	animation: auth-in 0.55s ease both;
}

@keyframes auth-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.uds-auth-header {
	margin-bottom: 1.75rem;
	width: 100%;
	min-width: 0;
}

.uds-auth-header__logo {
	display: none;
	max-height: 40px;
	max-width: min(160px, 55vw);
	width: auto;
	object-fit: contain;
	margin: 0 0 1rem;
}

@media (max-width: 979px) {
	.uds-auth-header__logo { display: block; }
	/* Com logo, o kicker com nome vira ruído — some no mobile */
	.uds-auth-header:has(.uds-auth-header__logo) .uds-auth-header__kicker {
		display: none;
	}
}

.uds-auth-header__kicker {
	margin: 0 0 0.55rem;
	font-family: var(--auth-display);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--auth-accent);
	overflow-wrap: anywhere;
}

.uds-auth-title {
	margin: 0;
	font-family: var(--auth-display);
	font-size: clamp(1.65rem, 4vw, 1.95rem);
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1.15;
	color: var(--auth-ink);
}

.uds-auth-subtitle {
	margin: 0.45rem 0 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--auth-muted);
}

.uds-auth-content {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.uds-auth-form {
	display: flex;
	flex-direction: column;
	gap: var(--auth-gap);
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

/* ── Fields ── */
.uds-auth-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.uds-auth-field label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--auth-ink-soft);
	letter-spacing: 0.01em;
}

.uds-auth-field label i { display: none; }

.uds-auth-required {
	color: var(--auth-danger);
	font-weight: 700;
}

.uds-auth-optional {
	font-weight: 500;
	color: var(--auth-muted);
	font-size: 0.75rem;
}

.uds-auth-body .uds-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: var(--auth-input-h);
	height: var(--auth-input-h);
	padding: 0 0.95rem;
	font-size: 0.95rem;
	font-family: inherit;
	line-height: 1.25;
	border-radius: var(--auth-radius);
	border: 1px solid var(--auth-line);
	background: var(--auth-surface);
	color: var(--auth-ink);
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.dark .uds-auth-body .uds-input {
	background: rgba(255, 255, 255, 0.04);
}

.uds-auth-body .uds-input::placeholder {
	color: color-mix(in srgb, var(--auth-muted) 80%, transparent);
}

.uds-auth-body .uds-input:hover {
	border-color: color-mix(in srgb, var(--auth-accent) 35%, var(--auth-line));
}

.uds-auth-body .uds-input:focus {
	outline: none;
	border-color: var(--auth-accent);
	box-shadow: 0 0 0 3px var(--auth-focus);
}

.uds-auth-body .uds-input:-webkit-autofill,
.uds-auth-body .uds-input:-webkit-autofill:hover,
.uds-auth-body .uds-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--auth-ink);
	caret-color: var(--auth-ink);
	box-shadow: 0 0 0 1000px var(--auth-surface) inset;
	transition: background-color 9999s ease-in-out 0s;
}

.dark .uds-auth-body .uds-input:-webkit-autofill,
.dark .uds-auth-body .uds-input:-webkit-autofill:hover,
.dark .uds-auth-body .uds-input:-webkit-autofill:focus {
	box-shadow: 0 0 0 1000px #0f1624 inset;
	-webkit-text-fill-color: #f1f5f9;
}

.uds-auth-body .uds-input.uds-input--error {
	border-color: var(--auth-danger);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.uds-auth-input-wrap {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.uds-auth-input-wrap .uds-input {
	padding-right: 2.75rem;
}

.uds-auth-toggle-pw {
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2.1rem;
	height: 2.1rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--auth-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	flex-shrink: 0;
}

.uds-auth-toggle-pw:hover {
	color: var(--auth-ink);
	background: color-mix(in srgb, var(--auth-accent) 10%, transparent);
}

/* ── Buttons ── */
.uds-auth-body .uds-btn {
	min-height: var(--auth-input-h);
	height: var(--auth-input-h);
	padding: 0 1.1rem;
	font-family: var(--auth-display);
	font-size: 0.95rem;
	font-weight: 650;
	border-radius: var(--auth-radius);
	gap: 0.45rem;
	box-shadow: none;
}

.uds-auth-body .uds-btn--primary {
	background: #0f172a;
	border: none;
	color: #fff;
	transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.uds-auth-body .uds-btn--primary:hover {
	background: #1e293b;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.dark .uds-auth-body .uds-btn--primary {
	background: #2563eb;
}

.dark .uds-auth-body .uds-btn--primary:hover {
	background: #3b82f6;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.uds-auth-body .uds-btn--secondary,
.uds-auth-body .uds-btn--ghost {
	background: transparent;
	border: 1px solid var(--auth-line);
	color: var(--auth-ink-soft);
}

.uds-auth-btn-block {
	width: 100%;
	justify-content: center;
}

/* ── Row / links ── */
.uds-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	font-size: 0.84rem;
}

.uds-auth-check {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	color: var(--auth-muted);
	user-select: none;
}

.uds-auth-check input {
	width: 0.95rem;
	height: 0.95rem;
	accent-color: var(--auth-accent);
	margin: 0;
}

.uds-auth-link {
	color: var(--auth-accent);
	text-decoration: none;
	font-weight: 600;
}

.uds-auth-link:hover { text-decoration: underline; }

.uds-auth-center-text {
	text-align: center;
	font-size: 0.88rem;
	color: var(--auth-muted);
	margin: 0.15rem 0 0;
}

/* ── Social ── */
.uds-auth-social {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
}

.uds-auth-google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: var(--auth-input-h);
	border-radius: var(--auth-radius);
	border: 1px solid var(--auth-line);
	background: var(--auth-surface);
	color: var(--auth-ink);
	font-family: var(--auth-display);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s;
}

.dark .uds-auth-google-btn {
	background: rgba(255, 255, 255, 0.03);
}

.uds-auth-google-btn:hover {
	border-color: color-mix(in srgb, var(--auth-accent) 45%, var(--auth-line));
	text-decoration: none;
}

.uds-auth-google-icon {
	width: 1.1rem;
	height: 1.1rem;
}

.uds-auth-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--auth-muted);
	font-size: 0.78rem;
}

.uds-auth-divider::before,
.uds-auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--auth-line);
}

/* ── Grid / section ── */
.uds-auth-grid-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--auth-gap);
	width: 100%;
	min-width: 0;
}

@media (min-width: 540px) {
	.uds-auth-grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.uds-auth-grid-2 > .uds-auth-field {
	min-width: 0;
}

.uds-auth-details {
	border: 1px solid var(--auth-line);
	border-radius: var(--auth-radius);
	background: color-mix(in srgb, var(--auth-surface) 70%, transparent);
	overflow: hidden;
}

.uds-auth-details > summary {
	list-style: none;
	cursor: pointer;
	padding: 0.85rem 1rem;
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--auth-ink-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	user-select: none;
}

.uds-auth-details > summary::-webkit-details-marker { display: none; }

.uds-auth-details > summary::after {
	content: "+";
	font-weight: 700;
	color: var(--auth-muted);
}

.uds-auth-details[open] > summary::after { content: "–"; }

.uds-auth-details__body {
	padding: 0 1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.uds-auth-details__hint {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--auth-muted);
}

.uds-auth-input-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
}

.uds-auth-input-row .uds-btn {
	height: var(--auth-input-h);
	min-height: var(--auth-input-h);
	white-space: nowrap;
}

@media (max-width: 420px) {
	.uds-auth-input-row { grid-template-columns: 1fr; }
}

/* ── Strength / match / errors ── */
.uds-auth-strength {
	display: flex;
	gap: 4px;
	margin-top: 0.2rem;
}

.uds-auth-strength span {
	flex: 1;
	height: 3px;
	border-radius: 999px;
	background: var(--auth-line);
}

.uds-auth-strength span.is-weak { background: #f87171; }
.uds-auth-strength span.is-fair { background: #fbbf24; }
.uds-auth-strength span.is-good { background: #34d399; }
.uds-auth-strength span.is-strong { background: #10b981; }

.uds-auth-strength-text {
	margin: 0.2rem 0 0;
	font-size: 0.75rem;
	color: var(--auth-muted);
}

.uds-auth-match-ok {
	margin-top: 0.2rem;
	font-size: 0.78rem;
	color: var(--auth-ok);
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.uds-auth-field-error {
	font-size: 0.78rem;
	color: var(--auth-danger);
	display: flex;
	align-items: flex-start;
	gap: 0.3rem;
}

.uds-auth-body .uds-alert {
	margin: 0;
	padding: 0.75rem 0.9rem;
	font-size: 0.84rem;
	border-radius: var(--auth-radius);
}

.uds-auth-turnstile {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	min-height: 65px;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.uds-auth-turnstile .cf-turnstile,
.uds-auth-turnstile iframe {
	max-width: 100% !important;
}

.uds-auth-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.85rem;
	margin-top: 0.25rem;
	font-size: 0.8rem;
	color: var(--auth-muted);
}

.uds-auth-meta a {
	color: var(--auth-muted);
	text-decoration: none;
	font-weight: 500;
}

.uds-auth-meta a:hover {
	color: var(--auth-accent);
}

.uds-auth-meta__sep {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--auth-muted);
	opacity: 0.5;
}

.uds-auth-foot {
	margin-top: 1.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--auth-line);
	text-align: center;
}

.uds-auth-foot__secure {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	color: var(--auth-muted);
}

.uds-auth-foot__secure i {
	font-size: 0.7rem;
	color: var(--auth-ok);
}

.hidden { display: none !important; }

/* legacy class aliases used by older pages */
.uds-auth-card { max-width: none; }
.uds-auth-badge { display: none; }
.uds-auth-extras { display: none; }
.uds-auth-callout { display: none; }
.uds-auth-section { border: 0; padding: 0; margin: 0; }
.uds-auth-tg { display: none; }
.uds-auth-trust { display: none; }
.uds-auth-topbar { display: none; }
.uds-auth-bg { display: none; }
