/**
 * Pantalla de acceso — marca Dental Flex.
 *
 * Sección 1: `.crd-login-page` — la vista propia servida en la raíz (split screen).
 * Sección 2: `body.login` — respaldo para wp-login.php (tarjeta centrada).
 */

/* ==========================================================================
   1) VISTA PROPIA (raíz del sitio)
   ========================================================================== */

body.crd-login-page {
	margin: 0;
	min-height: 100vh;
	background: #F8FAFC;
	color: #212121;
	font-family: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.crd-login,
.crd-login * {
	box-sizing: border-box;
}

.crd-login {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	min-height: 100vh;
}

/* ===== Panel de marca ===== */
.crd-login__brand {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 56px;
	background:
		radial-gradient(circle at 12% 12%, rgba(126, 194, 0, .30) 0%, transparent 45%),
		radial-gradient(circle at 92% 92%, rgba(50, 182, 161, .38) 0%, transparent 50%),
		linear-gradient(155deg, #0052A3 0%, #0B3C68 58%, #0A2722 100%);
	color: #FFFFFF;
}

.crd-login__brand::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: .55;
	pointer-events: none;
}

.crd-login__brand-inner {
	position: relative;
	z-index: 1;
	max-width: 400px;
}

.crd-login__logo-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 30px;
	padding: 22px 26px;
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 20px 44px rgba(0, 0, 0, .28);
}

.crd-login__logo {
	display: block;
	width: 190px;
	height: 138px;
	background-image: url("../../../assets/img/logo-dental-flex.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.crd-login__brand-title {
	margin: 0 0 10px;
	color: #FFFFFF;
	font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}

.crd-login__brand-text {
	margin: 0 0 26px;
	color: #CBD5E1;
	font-size: 15px;
	line-height: 1.6;
}

.crd-login__brand-points {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
}

.crd-login__brand-points li {
	position: relative;
	padding-left: 28px;
	color: #E2E8F0;
	font-size: 14px;
}

.crd-login__brand-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	border-radius: 50%;
	background: #7EC200;
	box-shadow: inset 0 0 0 4px rgba(10, 39, 34, .28);
}

/* ===== Panel del formulario ===== */
.crd-login__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	background: #F8FAFC;
}

.crd-login__card {
	width: 100%;
	max-width: 400px;
}

.crd-login__eyebrow {
	display: inline-block;
	margin-bottom: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #E0F2FE;
	color: #0052A3;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
}

.crd-login__title {
	margin: 0 0 6px;
	color: #0A2722;
	font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
}

.crd-login__subtitle {
	margin: 0 0 26px;
	color: #64748B;
	font-size: 14px;
}

.crd-login__field {
	display: block;
	margin-bottom: 16px;
}

.crd-login__label {
	display: block;
	margin-bottom: 6px;
	color: #64748B;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.crd-login__input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	background: #FFFFFF;
	border: 1px solid #CECECE;
	border-radius: 12px;
	color: #212121;
	font-family: inherit;
	font-size: 15px;
	transition: border-color .12s ease, box-shadow .12s ease;
}

.crd-login__input:focus {
	border-color: #0052A3;
	box-shadow: 0 0 0 3px rgba(0, 82, 163, .35);
	outline: none;
}

.crd-login__submit {
	display: block;
	width: 100%;
	min-height: 50px;
	margin-top: 8px;
	border: none;
	border-radius: 12px;
	background: #0052A3;
	color: #FFFFFF;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}

.crd-login__submit:hover {
	background: #00458B;
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0, 82, 163, .28);
}

.crd-login__submit:active {
	transform: translateY(0);
	box-shadow: none;
}

.crd-login__error {
	margin: 0 0 18px;
	padding: 12px 16px;
	background: #FEF3F2;
	border: 1px solid #FECDCA;
	border-radius: 12px;
	color: #D92D20;
	font-size: 14px;
}

.crd-login__foot {
	margin: 26px 0 0;
	color: #94A3B8;
	font-size: 12px;
	text-align: center;
}

@media (max-width: 900px) {
	.crd-login {
		grid-template-columns: 1fr;
	}

	.crd-login__brand {
		padding: 34px 24px;
	}

	.crd-login__brand-points {
		display: none;
	}

	.crd-login__logo-chip {
		margin-bottom: 16px;
		padding: 14px 18px;
	}

	.crd-login__logo {
		width: 150px;
		height: 109px;
	}

	.crd-login__brand-title {
		font-size: 24px;
	}

	.crd-login__brand-text {
		margin-bottom: 0;
	}

	.crd-login__panel {
		padding: 32px 20px 48px;
	}
}

/* ==========================================================================
   2) RESPALDO — wp-login.php (tarjeta centrada)
   ========================================================================== */

body.login {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	margin: 0;
	background-color: #F8FAFC;
	background-image:
		radial-gradient(circle at 15% 0%, #E0F2FE 0%, transparent 55%),
		radial-gradient(circle at 100% 100%, #F0FDF4 0%, transparent 45%);
	font-family: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #212121;
}

#login {
	width: 100%;
	max-width: 400px;
	padding: 24px 16px;
}

.login h1 {
	margin: 0 0 24px;
	text-align: center;
}

.login h1 a {
	display: inline-block;
	width: 220px;
	height: 160px;
	margin: 0;
	padding: 0;
	background-image: url("../../../assets/img/logo-dental-flex.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	overflow: hidden;
	text-indent: -9999px;
}

.login form {
	margin: 0;
	padding: 28px 28px 12px;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(16, 24, 40, .10);
}

.login label {
	display: block;
	margin-bottom: 4px;
	color: #64748B;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.login form .input,
.login form input[type="text"],
.login form input[type="password"] {
	width: 100%;
	min-height: 46px;
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #FFFFFF;
	border: 1px solid #CECECE;
	border-radius: 10px;
	box-shadow: none;
	color: #212121;
	font-size: 15px;
	transition: border-color .12s ease, box-shadow .12s ease;
}

.login form .input:focus,
.login form input[type="text"]:focus,
.login form input[type="password"]:focus {
	border-color: #0052A3;
	box-shadow: 0 0 0 3px rgba(0, 82, 163, .35);
	outline: none;
}

.login .button-primary,
.wp-core-ui .button-primary {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0 16px;
	background: #0052A3;
	border: none;
	border-radius: 10px;
	box-shadow: none;
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 600;
	line-height: 48px;
	text-shadow: none;
	transition: background .12s ease, transform .12s ease;
}

.login .button-primary:hover,
.wp-core-ui .button-primary:hover {
	background: #00458B;
	transform: translateY(-1px);
}

.login .button-primary:focus,
.wp-core-ui .button-primary:focus {
	background: #00458B;
	box-shadow: 0 0 0 3px rgba(0, 82, 163, .35);
	outline: none;
}

.login .forgetmenot,
#nav,
#backtoblog,
.language-switcher,
.privacy-policy-page-link {
	display: none;
}

.login .message,
.login #login_error {
	margin: 0 0 16px;
	padding: 12px 16px;
	background: #FFFFFF;
	border-left: 4px solid #0052A3;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
	font-size: 14px;
}

.login #login_error {
	border-left-color: #D92D20;
}

@media (max-width: 480px) {
	.login h1 a {
		width: 180px;
		height: 131px;
	}

	.login form {
		padding: 22px 20px 8px;
	}
}

/* ==========================================================================
   Accesibilidad
   ========================================================================== */
.crd-login-page :focus-visible,
body.login :focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 82, 163, .45);
}

@media (prefers-reduced-motion: reduce) {
	.crd-login-page *,
	body.login * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
