/* CIB Group: página de acesso (wp-login.php) */
body.login {
	--cib-brand: #2C1B3F;
	--cib-deep: #191025;
	--cib-soft: #3E2857;
	--cib-gold: #C9A84B;
	--cib-ink: #22182F;
	--cib-muted: #5E5470;
	--cib-line: #E4E0EA;
	--cib-bg: #F7F6F2;
	--cib-aside: 46vw;
	background: var(--cib-bg);
	font-family: "Lato", system-ui, sans-serif;
	color: var(--cib-ink);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
body.login * { box-sizing: border-box; }

/* painel da marca */
.cib-la {
	position: fixed; top: 0; left: 0; bottom: 0; width: var(--cib-aside); z-index: 1;
	display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
	padding: 52px clamp(36px, 5vw, 72px);
	color: #fff; overflow: hidden;
	background:
		linear-gradient(180deg, rgba(44, 27, 63, .74) 0%, rgba(25, 16, 37, .93) 68%),
		var(--cib-la-photo, none) center / cover no-repeat,
		var(--cib-brand);
	border-right: 4px solid var(--cib-gold);
}
.cib-la::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--cib-gold); }
.cib-la__logo img { height: 52px; width: auto; display: block; }
.cib-la__body { max-width: 30rem; }
.cib-la__eyebrow {
	font-family: "Michroma", sans-serif; font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
	color: var(--cib-gold); margin: 0 0 18px;
}
.cib-la__title { font-weight: 900; font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.01em; margin: 0; color: #fff; }
.cib-la__title::after { content: ""; display: block; width: 96px; height: 3px; background: var(--cib-gold); margin-top: 24px; }
.cib-la__text { font-size: 1.08rem; line-height: 1.65; color: rgba(255, 255, 255, .8); margin: 22px 0 0; }
.cib-la__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(255, 255, 255, .6); }
.cib-la__foot a { color: #fff; text-decoration: none; font-weight: 700; }
.cib-la__foot a:hover { color: var(--cib-gold); }

/* seletor de idioma */
.cib-ll { position: absolute; top: 28px; right: 32px; z-index: 2; display: inline-flex; border: 1px solid var(--cib-line); border-radius: 4px; overflow: hidden; background: #fff; }
.cib-ll a, .cib-ll span { padding: 8px 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1; text-decoration: none; color: var(--cib-muted); }
.cib-ll > * + * { border-left: 1px solid var(--cib-line); }
.cib-ll .is-active { background: var(--cib-brand); color: #fff; }
.cib-ll a:hover { color: var(--cib-brand); background: var(--cib-bg); }

/* coluna do formulário */
body.login #login {
	width: min(420px, calc(100% - 48px));
	margin: 0 0 0 calc(var(--cib-aside) + (100vw - var(--cib-aside) - min(420px, calc(100vw - var(--cib-aside) - 48px))) / 2);
	padding: max(12vh, 96px) 0 24px;
	position: relative; z-index: 1;
}
body.login #login > h1 { display: none; }
.cib-lh { margin: 0 0 26px; text-align: left; }
body.login .wp-tooltip__toggle { color: var(--cib-soft); }
body.login .wp-tooltip__toggle:focus { box-shadow: 0 0 0 2px var(--cib-gold); }
body.login .wp-tooltip__bubble { border-radius: 6px; font-size: 14px; line-height: 1.5; }
body.login .cib-lh__title { text-align: left; font-weight: 900; font-size: 2rem; line-height: 1.1; color: var(--cib-brand); margin: 0; }
.cib-lh__text { margin: 10px 0 0; color: var(--cib-muted); font-size: 1rem; line-height: 1.6; }

body.login form {
	margin: 0; padding: 30px 30px 26px; background: #fff; border: 1px solid var(--cib-line);
	border-radius: 10px; box-shadow: 0 22px 44px -28px rgba(44, 27, 63, .45);
	overflow: visible;
}
body.login label { font-size: 14px; font-weight: 700; color: var(--cib-ink); margin-bottom: 6px; display: inline-block; }
body.login form .input, body.login input[type="text"], body.login input[type="password"], body.login input[type="email"] {
	font-family: inherit; font-size: 16px; color: var(--cib-ink); background: #fff;
	height: 48px; min-height: 48px; padding: 0 14px; margin: 0 0 18px; line-height: 1.3;
	border: 1px solid #CFC7DA; border-radius: 4px; box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
body.login .wp-pwd input[type="password"], body.login .wp-pwd input[type="text"] { padding-right: 48px; }
body.login form .input:focus, body.login input[type="text"]:focus, body.login input[type="password"]:focus {
	border-color: var(--cib-brand); box-shadow: 0 0 0 3px rgba(201, 168, 75, .45); outline: none;
}
body.login .button.wp-hide-pw { height: 48px; min-height: 48px; width: 46px; color: var(--cib-soft); }
body.login .button.wp-hide-pw:focus { border-color: var(--cib-brand); box-shadow: 0 0 0 2px var(--cib-gold); }
body.login .button.wp-hide-pw .dashicons { top: 0; }
body.login .forgetmenot { float: none; margin: 2px 0 20px; display: flex; align-items: center; gap: 8px; }
body.login .forgetmenot label { font-weight: 400; color: var(--cib-muted); margin: 0; font-size: 15px; }
body.login input[type="checkbox"] { border-color: #CFC7DA; border-radius: 3px; }
body.login input[type="checkbox"]:checked::before { content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%232C1B3F%27%2F%3E%3C%2Fsvg%3E"); }
body.login input[type="checkbox"]:focus { border-color: var(--cib-brand); box-shadow: 0 0 0 2px rgba(201, 168, 75, .6); }
body.login p.submit { clear: both; margin: 0; padding: 0; }
body.login .button-primary, body.login #wp-submit {
	float: none; width: 100%; height: 44px; min-height: 44px; line-height: 1;
	background: var(--cib-gold); border: 1.5px solid var(--cib-gold); border-radius: 4px; color: var(--cib-brand);
	font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-shadow: none; box-shadow: none;
	transition: background-color .2s ease, transform .1s ease;
}
body.login .button-primary:hover, body.login #wp-submit:hover { background: #D8BB66; border-color: #D8BB66; color: var(--cib-brand); }
body.login .button-primary:focus, body.login #wp-submit:focus { box-shadow: 0 0 0 3px rgba(44, 27, 63, .35); border-color: var(--cib-brand); }
body.login .button-primary:active, body.login #wp-submit:active { transform: translateY(1px); }
body.login .button:not(.button-primary):not(.wp-hide-pw) { border-color: var(--cib-brand); color: var(--cib-brand); }

/* ligações e mensagens */
body.login #nav, body.login #backtoblog { margin: 18px 0 0; padding: 0; font-size: 15px; }
body.login #nav a { color: var(--cib-brand); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(44, 27, 63, .3); }
body.login #nav a:hover { color: var(--cib-soft); border-bottom-color: var(--cib-gold); }
body.login #backtoblog, body.login .privacy-policy-page-link, body.login .language-switcher { display: none; }
body.login .message, body.login .notice, body.login #login_error, body.login .success {
	border: 1px solid var(--cib-line); border-left: 4px solid var(--cib-gold); border-radius: 4px;
	background: #fff; box-shadow: none; padding: 14px 16px; margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: var(--cib-ink);
}
body.login #login_error, body.login .notice-error { border-left-color: #B5530A; background: #FBF1EA; }
body.login .success, body.login .notice-success { border-left-color: #166535; background: #EEF6F0; }
body.login #login_error a, body.login .message a { color: var(--cib-brand); font-weight: 700; }
body.login .description, body.login .indicator-hint { color: var(--cib-muted); }

.cib-lf {
	width: min(420px, calc(100% - 48px));
	margin: 26px 0 48px calc(var(--cib-aside) + (100vw - var(--cib-aside) - min(420px, calc(100vw - var(--cib-aside) - 48px))) / 2);
	padding-top: 20px; border-top: 1px solid var(--cib-line);
	font-size: 14px; line-height: 1.55; color: var(--cib-muted);
	display: flex; gap: 10px; align-items: flex-start;
}
.cib-lf > span { flex: 1 1 0; min-width: 0; }
.cib-lf svg { flex: 0 0 auto; margin-top: 2px; color: var(--cib-soft); }
.cib-lf__back { display: none; }

/* ecrãs estreitos: painel no topo */
@media (max-width: 960px) {
	body.login { --cib-aside: 0px; }
	.cib-la {
		position: relative; width: auto; min-height: 0; border-right: 0; border-bottom: 4px solid var(--cib-gold);
		padding: 36px 24px 34px; gap: 26px;
	}
	.cib-la__logo img { height: 40px; }
	.cib-la__title { font-size: 1.7rem; }
	.cib-la__title::after { margin-top: 16px; width: 72px; }
	.cib-la__text { font-size: 1rem; margin-top: 16px; }
	.cib-la__foot { display: none; }
	.cib-ll { position: absolute; top: 34px; right: 24px; border-color: rgba(255, 255, 255, .3); background: transparent; }
	.cib-ll a, .cib-ll span { color: rgba(255, 255, 255, .8); }
	.cib-ll > * + * { border-left-color: rgba(255, 255, 255, .3); }
	.cib-ll .is-active { background: var(--cib-gold); color: var(--cib-brand); }
	.cib-ll a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
	body.login #login { margin: 0 auto; padding: 36px 0 8px; width: min(440px, calc(100% - 40px)); }
	.cib-lf { margin: 22px auto 40px; width: min(440px, calc(100% - 40px)); flex-wrap: wrap; }
	.cib-lf__back { display: block; width: 100%; margin-top: 8px; }
	.cib-lf__back a { color: var(--cib-brand); font-weight: 700; text-decoration: none; }
}
@media (max-width: 480px) {
	.cib-la__body .cib-la__text { display: none; }
	body.login form { padding: 24px 20px 22px; }
	.cib-lh__title { font-size: 1.7rem; }
}

/* janela de nova autenticação dentro do painel */
body.interim-login .cib-la, body.interim-login .cib-ll, body.interim-login .cib-lf { display: none; }
body.interim-login #login { margin: 0 auto; padding: 24px 0; }

@media (prefers-reduced-motion: reduce) {
	body.login * { transition: none !important; }
}
