/*
 * Pantallas de acceso (DANTE-58): login.php y cuenta_usuario.php con los tokens del tema, en claro y oscuro.
 * Todo acotado a body.shell-auth. La estructura de dos columnas sigue siendo la de auth.css (Mazer): #auth,
 * #auth-left (formulario) y #auth-right (columna decorativa, solo desde 992 px). Los avisos de SweetAlert2 y el
 * selector de tema (.shell-seg) salen de shell.css, igual que en los paneles.
 *
 * Especificidad: app-dark.css repite reglas con `html[data-bs-theme="dark"] …` y las utilidades de Bootstrap (mt-5,
 * text-muted) van con !important. Acá se escribe `html[data-bs-theme] body.shell-auth …`, que vence a las dos
 * primeras; a las utilidades solo se las pisa donde hace falta, con !important.
 */

html[data-bs-theme] body.shell-auth {
	background-color: var(--dante-bg);
	color: var(--dante-text);
}

/* Controles nativos (scroll, autocompletar, flechas) del color del tema elegido, no del sistema */
html[data-bs-theme="light"]:has(body.shell-auth) { color-scheme: light; }
html[data-bs-theme="dark"]:has(body.shell-auth) { color-scheme: dark; }

/* ---- Alto: la página crece con el contenido --------------------------------------------------------------------
   auth.css fija #auth en 100vh con scroll propio: en 1366x768 (o una notebook al 125 %) el pie quedaba escondido
   dentro de la columna. Ahora hace scroll la página y la columna derecha queda fija a la vista. */
html[data-bs-theme] body.shell-auth #auth {
	height: auto;
	min-height: 100dvh;
	overflow-x: clip; /* clip y no hidden: hidden lo volvería contenedor de scroll y el sticky no andaría */
}

html[data-bs-theme] body.shell-auth #auth > .row {
	min-height: 100dvh;
}

html[data-bs-theme] body.shell-auth #auth #auth-left {
	padding: 2rem 3rem 2.5rem;
}

@media (min-width: 1400px) {
	html[data-bs-theme] body.shell-auth #auth #auth-left { padding: 2.5rem 4.5rem 3rem; }
}

@media (max-width: 575.98px) {
	html[data-bs-theme] body.shell-auth #auth #auth-left { padding: 1rem 1rem 2rem; }
}

/* ---- Columna derecha ------------------------------------------------------------------------------------------
   Claro: el azul institucional (--dante-primary). Oscuro: superficie plana como la barra lateral de los paneles,
   para que no compita con el formulario; el escudo queda como marca de agua. El fondo va en la columna (que llega
   hasta el final aunque la página sea larga) y el escudo queda fijo a la vista. */
html[data-bs-theme] body.shell-auth #auth .row > :has(> #auth-right) {
	background: linear-gradient(135deg, var(--dante-primary) 0%,
		color-mix(in srgb, var(--dante-primary) 72%, #0b1530) 100%);
}

html[data-bs-theme="dark"] body.shell-auth #auth .row > :has(> #auth-right) {
	background: var(--dante-surface);
	border-left: 1px solid var(--dante-border);
}

html[data-bs-theme] body.shell-auth #auth #auth-right {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100dvh;
	overflow: hidden;
	background: none;
}

html[data-bs-theme="dark"] body.shell-auth #auth #auth-right img {
	opacity: .06 !important; /* el alt y la opacidad .1 vienen en línea en la página */
}

/* ---- Cabecera: logo y selector de tema ---------------------------------------------------------------------------
   En una fila; si no entran (celular), el selector sube a su propia fila arriba, a la derecha. */
html[data-bs-theme] body.shell-auth .shell-auth-cabecera {
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

html[data-bs-theme] body.shell-auth .shell-auth-cabecera .auth-logo {
	margin: 0;
}

html[data-bs-theme] body.shell-auth .shell-auth-tema {
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	min-width: 0;
}

html[data-bs-theme] body.shell-auth .shell-auth-tema .shell-seg-opt {
	min-width: 4.5rem;
	padding: .25rem .5rem;
}

/* ---- Textos ------------------------------------------------------------------------------------------------- */
html[data-bs-theme] body.shell-auth #auth #auth-left .auth-title {
	margin-bottom: .5rem;
	color: var(--dante-text-strong);
	font-size: 1.25rem;
	font-weight: 700;
}

/* auth.css lo pinta #a8aebb: ~2:1 sobre el fondo claro */
html[data-bs-theme] body.shell-auth #auth #auth-left .auth-subtitle {
	margin-bottom: 1.75rem;
	color: var(--dante-text-muted);
	font-size: 1.0625rem;
	line-height: 1.5;
}

html[data-bs-theme] body.shell-auth #auth #auth-left .form-label {
	color: var(--dante-text-strong);
}

html[data-bs-theme] body.shell-auth #auth #auth-left .text-muted {
	color: var(--dante-text-muted) !important;
}

/* ---- Formulario ----------------------------------------------------------------------------------------------- */
html[data-bs-theme] body.shell-auth #btnSubmit {
	min-height: var(--shell-hit);
	margin-top: 2rem !important; /* mt-5 */
	box-shadow: none !important; /* shadow-lg */
}

/* DNI (type=number): sin flechas, que en oscuro se ven claras y cambian el número con la rueda */
html[data-bs-theme] body.shell-auth #username::-webkit-outer-spin-button,
html[data-bs-theme] body.shell-auth #username::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

html[data-bs-theme] body.shell-auth #username[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Autocompletar de Chrome en oscuro: sin el fondo celeste claro con texto claro */
html[data-bs-theme="dark"] body.shell-auth input:-webkit-autofill,
html[data-bs-theme="dark"] body.shell-auth input:-webkit-autofill:hover,
html[data-bs-theme="dark"] body.shell-auth input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--dante-text-strong);
	box-shadow: 0 0 0 100rem var(--dante-surface) inset;
	caret-color: var(--dante-text-strong);
}

/* "¿No posee usuario…?": la frase entera es el enlace (antes, un "enlace" suelto de propósito poco claro) */
html[data-bs-theme] body.shell-auth .shell-auth-ayuda {
	margin-top: 2rem;
	color: var(--dante-text);
	font-size: 1.0625rem;
	text-align: center;
}

html[data-bs-theme] body.shell-auth .shell-auth-ayuda p {
	margin-bottom: .25rem;
}

html[data-bs-theme] body.shell-auth .shell-auth-ayuda a {
	display: inline-flex;
	align-items: center;
	min-height: var(--shell-hit);
	color: var(--dante-primary-text);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: .2em;
}

/* ---- cuenta_usuario: una tarjeta por cuenta -------------------------------------------------------------------- */
html[data-bs-theme] body.shell-auth #auth #auth-left .card {
	border: 1px solid var(--dante-border);
	border-radius: var(--dante-radius);
	background-color: var(--dante-surface);
	box-shadow: var(--dante-shadow);
}

html[data-bs-theme] body.shell-auth #auth #auth-left .card-footer {
	border-top: 1px solid var(--dante-border);
	background: transparent;
}

html[data-bs-theme] body.shell-auth #auth #auth-left .card-title {
	color: var(--dante-text-strong);
}
