/* ============================================================
   Vivo Corporate Login - Proposta final
   Design tokens (from Figma "Proposta final")
   ------------------------------------------------------------
   page background ....... #ECECEC
   card background ....... #F1EFF6  (radius 40px)
   brand purple .......... #660099
   input background ...... #FFFFFF  (radius 16px)
   label / placeholder ... #666666
   divider ............... #DDDDDD
   ============================================================ */

:root {
	--vivo-purple: #660099;
	--vivo-purple-dark: #4d0073;
	--page-bg: #ECECEC;
	--card-bg: #F1EFF6;
	--field-bg: #FFFFFF;
	--text: #000000;
	--text-muted: #666666;
	--divider: #DDDDDD;
	--error: #D8232A;
	--font-stack: 'Vivo Type', Helvetica, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	height: 100%;
}

body {
	min-height: 100vh;
	margin: 0;
	font-family: var(--font-stack);
	color: var(--text);
	background-color: var(--card-bg);
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------
   Card layout
   ------------------------------------------------------------ */
.page {
	width: 100%;
	min-height: 100vh;
	display: flex;
}

.card {
	position: relative;
	width: 100%;
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: var(--card-bg);
	overflow: hidden;
}

.card__form {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 48px;
	text-align: center;
}

.card__image {
	background-image: url(../img/background.png);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	mix-blend-mode: multiply;
}

/* Single-column card (OTP, MFA, change password, errors) */
.card--single {
	grid-template-columns: 1fr;
}

/* Legacy ".container" wrapper fallback (error / timeout / X509 pages
   not yet migrated to the .card markup) — render them as the new card. */
.container {
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.container > div:first-of-type {
	width: 100%;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 8px;
	padding: 56px 48px;
}

.container header {
	margin-bottom: 8px;
}

.container main {
	width: 100%;
}

/* ------------------------------------------------------------
   Header / brand
   ------------------------------------------------------------ */
.brand {
	margin-bottom: 16px;
}

.logo {
	width: 150px;
	height: auto;
	display: block;
	margin: 0 auto;
}

.title {
	font-size: 24px;
	font-weight: 400;
	line-height: 28px;
	color: var(--text);
	margin: 0 0 32px;
}

/* ------------------------------------------------------------
   Form
   ------------------------------------------------------------ */
form {
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
}

form fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Visually hidden labels (kept for screen readers) */
form label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Inputs --------------------------------------------------- */
.field {
	position: relative;
	width: 100%;
}

form input[type="text"],
form input[type="password"] {
	width: 100%;
	height: 60px;
	padding: 8px 16px;
	background: var(--field-bg);
	border: 1px solid transparent;
	border-radius: 16px;
	font-family: var(--font-stack);
	font-size: 18px;
	line-height: 24px;
	color: var(--text);
	outline: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

form input::placeholder {
	color: var(--text-muted);
	opacity: 1;
}

form input:focus {
	border-color: var(--vivo-purple);
	box-shadow: 0 0 0 3px rgba(102, 0, 153, 0.12);
}

/* Password field with eye toggle */
.field--password input {
	padding-right: 56px;
}

.toggle-pass {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	cursor: pointer;
	transition: background 160ms ease;
}

.toggle-pass:hover {
	background: rgba(25, 25, 25, 0.06);
}

.toggle-pass img {
	width: 20px;
	height: 20px;
	display: block;
}

/* ------------------------------------------------------------
   Captcha
   ------------------------------------------------------------ */
.captcha {
	border: 0;
	margin: 8px 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.captcha-row {
	display: flex;
	align-self: center;
	align-items: center;
	gap: 19px;
}

.img-captcha {
	height: 56px;
	max-width: 100%;
	border-radius: 8px;
}

.captcha-controls {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.img-renew,
.img-play {
	width: 24px;
	height: 24px;
	cursor: pointer;
}

/* ------------------------------------------------------------
   MFA radio options
   ------------------------------------------------------------ */
.mfa-options {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.mfa-option {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	min-height: 72px;
	border-bottom: 1px solid var(--divider);
}

.mfa-option:last-child {
	border-bottom: 0;
}

.mfa-option label,
.mfa-option .mfa-label {
	order: 0;
	position: static;
	flex: 1;
	min-width: 0;
	width: auto;
	height: auto;
	clip: auto;
	overflow: visible;
	white-space: normal;
	text-align: left;
	font-size: 18px;
	font-weight: 500;
	line-height: 24px;
	color: var(--text);
	word-break: break-word;
	cursor: pointer;
}

.mfa-option input[type="radio"] {
	order: 1;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--vivo-purple);
	flex: none;
}

.otp-helper {
	font-size: 18px;
	line-height: 24px;
	text-align: center;
	color: var(--text);
	margin: 0;
}

/* ------------------------------------------------------------
   Messages
   ------------------------------------------------------------ */
.msg {
	min-height: 1em;
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	text-align: center;
	color: var(--text);
}

/* ------------------------------------------------------------
   Buttons / links
   ------------------------------------------------------------ */
.btn-submit {
	align-self: center;
	min-width: 192px;
	height: 48px;
	margin-top: 8px;
	padding: 12px 24px;
	background: var(--vivo-purple);
	color: #fff;
	border: 0;
	border-radius: 32px;
	font-family: var(--font-stack);
	font-size: 18px;
	font-weight: 500;
	line-height: 24px;
	cursor: pointer;
	transition: background 180ms ease, transform 120ms ease;
}

.btn-submit:hover {
	background: var(--vivo-purple-dark);
}

.btn-submit:active {
	transform: scale(0.98);
}

a {
	color: var(--vivo-purple);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}

a:hover {
	text-decoration: underline;
}

.link-ecpf {
	margin-top: 4px;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
footer {
	margin-top: 32px;
	font-size: 12px;
	color: var(--text-muted);
}

/* ------------------------------------------------------------
   Loading overlay
   ------------------------------------------------------------ */
#loading {
	display: none;
}

/* ------------------------------------------------------------
   Responsive (tablet / mobile)
   ------------------------------------------------------------ */
@media (max-width: 880px) {
	.card {
		min-height: 100vh;
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.card__image {
		order: -1;
		justify-self: end;
		width: 276px;
		max-width: 100%;
		height: 212px;
		margin-right: -23px;
		background-image: url(../img/backgroundiphone.png);
		background-size: cover;
		background-position: top center;
	}

	.card__form {
		padding: 32px 16px 48px;
	}

	.title {
		font-size: 16px;
		line-height: 24px;
		margin-bottom: 32px;
	}
}

@media (max-width: 360px) {
	.card__image {
		width: 100%;
		margin-right: 0;
		height: 180px;
	}
}
