/* ==========================================================================
   Telas de acesso – login, cadastro, esqueci a senha
   As cores principais são definidas em Portal de Acesso › Configurações › Visual.
   ========================================================================== */

.ec-auth,
.ec-form {
	--ec-ink: #12151C;        /* texto e painel escuro */
	--ec-muted: #4A505C;      /* texto secundário */
	--ec-soft: #5B6170;       /* dicas */
	--ec-line: #D5D7DD;       /* bordas */
	--ec-bg: #F6F6F3;         /* fundo da página */
	--ec-card: #FFFFFF;       /* fundo do formulário */
	--ec-accent: #2448D8;     /* botão e links */
	--ec-accent-dark: #1A36A8;
	--ec-accent-soft: #E6EBFC;
	--ec-on-dark: #C9CCD4;
	--ec-on-dark-accent: #A9B6F5;
	--ec-error: #B42318;
	--ec-error-bg: #FEF3F2;
	--ec-success: #0F6E4A;
	--ec-success-bg: #ECFDF3;
	--ec-radius: 12px;

	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ec-ink);
	-webkit-font-smoothing: antialiased;
}

.ec-auth *,
.ec-form * {
	box-sizing: border-box;
}

/* ---------- Estrutura em duas colunas ---------- */

.ec-auth {
	background: var(--ec-bg);
	padding: clamp(16px, 4vw, 48px) 16px;
}

.ec-auth__shell {
	max-width: 1080px;
	min-height: min(720px, calc(100vh - 160px));
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	background: var(--ec-card);
	border: 1px solid #E7E8EC;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 30px 60px -40px rgba(18, 21, 28, 0.35);
}

.ec-auth__shell--single {
	max-width: 560px;
	min-height: 0;
}

/* Painel escuro */
.ec-auth__brand {
	flex: 1 1 380px;
	min-width: 0;
	background: var(--ec-ink);
	color: #FFFFFF;
	padding: clamp(28px, 4vw, 48px);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
}

.ec-auth__logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #FFFFFF !important;
	text-decoration: none !important;
	font-weight: 800;
	font-size: 18px;
	letter-spacing: -0.02em;
}

.ec-auth__logo img {
	max-height: 40px;
	width: auto;
	filter: brightness(0) invert(1); /* deixa o logo branco; remova se o seu já for claro */
}

.ec-auth__logo-mark {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: #FFFFFF;
}

.ec-auth__brand-copy {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 420px;
}

.ec-auth__eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ec-on-dark-accent);
}

.ec-auth__brand-title {
	margin: 0;
	color: #FFFFFF;
	font-family: inherit;
	font-size: clamp(30px, 3.4vw, 42px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.ec-auth__brand-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ec-on-dark);
}

.ec-auth__perks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-size: 15px;
	color: var(--ec-on-dark);
}

.ec-auth__perks li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.ec-auth__perks .ec-icon {
	color: var(--ec-on-dark-accent);
	flex: none;
}

/* Coluna do formulário */
.ec-auth__panel {
	flex: 1.25 1 420px;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px);
}

.ec-auth__box {
	width: 100%;
	max-width: 400px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ec-auth__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ec-auth__title {
	margin: 0;
	font-family: inherit;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--ec-ink);
}

.ec-auth__subtitle {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ec-muted);
}

/* ---------- Tela limpa: fundo em 100% e conteúdo no centro ----------
   A cor e a imagem de fundo são escolhidas em Portal de Acesso › Configurações ›
   Visual. Os valores abaixo são só o padrão. */

body.ec-canvas {
	margin: 0;
	background: #F6F6F3;
}

body.ec-canvas .ec-auth {
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
}

body.ec-canvas .ec-auth__shell {
	width: 100%;
}

/* Se a página de cadastro tiver seções do Elementor em volta do shortcode,
   remove os espaçamentos delas para não empurrar o bloco */
body.ec-canvas .elementor-section:has(.ec-auth),
body.ec-canvas .e-con:has(.ec-auth) {
	padding: 0 !important;
	margin: 0 !important;
}

/* No celular o painel escuro vira uma faixa compacta no topo */
@media (max-width: 820px) {
	.ec-auth__brand {
		gap: 20px;
	}
	.ec-auth__brand-text,
	.ec-auth__perks {
		display: none;
	}
	.ec-auth__brand-title {
		font-size: 26px;
	}
}

/* ---------- Formulário ---------- */

.ec-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
}

.ec-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.ec-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (max-width: 480px) {
	.ec-grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.ec-form .ec-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-ink);
	margin: 0;
}

.ec-form .ec-input,
.ec-form input.ec-input[type="text"],
.ec-form input.ec-input[type="email"],
.ec-form input.ec-input[type="password"] {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--ec-line);
	border-radius: var(--ec-radius);
	background: #FFFFFF;
	color: var(--ec-ink);
	font-family: inherit;
	font-size: 16px; /* 16px evita zoom automático no iPhone */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ec-form .ec-input::placeholder {
	color: #8A8F9A;
}

.ec-form .ec-input:focus {
	outline: none;
	border-color: var(--ec-accent);
	box-shadow: 0 0 0 4px var(--ec-accent-soft);
}

.ec-hint {
	font-size: 13px;
	color: var(--ec-soft);
}

/* Senha com botão de mostrar */
.ec-password {
	position: relative;
}

.ec-form .ec-password .ec-input {
	padding-right: 52px;
}

.ec-form .ec-password__toggle {
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--ec-soft);
	cursor: pointer;
}

.ec-form .ec-password__toggle:hover,
.ec-form .ec-password__toggle[aria-pressed="true"] {
	background: var(--ec-bg);
	color: var(--ec-ink);
}

/* Linha "manter conectado / esqueci a senha" */
.ec-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ec-check {
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ec-muted);
	cursor: pointer;
}

.ec-check input {
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--ec-accent);
	flex: none;
}

/* Links */
.ec-auth a.ec-link,
.ec-form a.ec-link {
	color: var(--ec-accent);
	font-weight: 600;
	text-decoration: none;
}

.ec-auth a.ec-link:hover,
.ec-form a.ec-link:hover {
	color: var(--ec-accent-dark);
	text-decoration: underline;
}

.ec-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-muted) !important;
	text-decoration: none !important;
}

.ec-back:hover {
	color: var(--ec-ink) !important;
}

/* Botão principal (sobrescreve o estilo de botão do Hello Elementor) */
.ec-auth .ec-btn,
.ec-form .ec-btn,
.ec-form button.ec-btn[type="submit"] {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 54px;
	margin: 4px 0 0;
	padding: 0 24px;
	border: 0;
	border-radius: var(--ec-radius);
	background: var(--ec-accent);
	color: #FFFFFF;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}

.ec-auth .ec-btn:hover,
.ec-form .ec-btn:hover,
.ec-form .ec-btn:focus {
	background: var(--ec-accent-dark);
	color: #FFFFFF;
}

.ec-form .ec-btn:active {
	transform: translateY(1px);
}

.ec-form .ec-btn[disabled] {
	opacity: 0.7;
	cursor: wait;
}

.ec-switch {
	margin: 0;
	text-align: center;
	font-size: 15px;
	color: var(--ec-muted);
}

/* Mensagens */
.ec-alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 14px 16px;
	border-radius: var(--ec-radius);
	font-size: 14px;
	line-height: 1.5;
}

.ec-alert p {
	margin: 0;
}

.ec-alert .ec-icon {
	flex: none;
	margin-top: 1px;
}

.ec-alert--error {
	background: var(--ec-error-bg);
	color: var(--ec-error);
}

.ec-alert--success {
	background: var(--ec-success-bg);
	color: var(--ec-success);
}

/* Erro exibido pelo próprio Tutor via JavaScript */
.ec-form .tutor-login-error:empty {
	display: none;
}

.ec-form .tutor-login-error {
	font-size: 14px;
	color: var(--ec-error);
}

/* Consentimentos legais do Tutor 4.x */
.ec-consent {
	font-size: 14px;
	color: var(--ec-muted);
}

/* Formulário dentro do pop-up de login do Tutor */
.tutor-login-modal .ec-form {
	text-align: left;
}

.ec-optional {
	font-weight: 400;
	color: var(--ec-soft);
}
