/* ServiceV2 - Pantallas de acceso (login, verificacion en dos pasos, recuperar clave) */
:root {
	--c-primary: #00427B;
	--c-primary-600: #0B5AA3;
	--c-primary-050: #EAF2FA;
	--c-accent: #1AA0DB;
	--c-text: #1B2733;
	--c-muted: #5B6B7C;
	--c-border: #DCE3EC;
	--c-border-strong: #C5D0DD;
	--c-danger: #C8372D;
	--c-success: #1E8E5A;
	--font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
	font: 400 14px/1.5 var(--font);
	color: var(--c-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

.auth {
	display: grid;
	grid-template-columns: minmax(360px, 44%) 1fr;
	min-height: 100%;
}

/* Panel institucional (izquierda) */
.auth-brand {
	position: relative;
	overflow: hidden;
	color: #fff;
	padding: 48px 56px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background:
		radial-gradient(1200px 600px at -10% 110%, rgba(26, 160, 219, .35), transparent 60%),
		linear-gradient(160deg, #00335F 0%, #00427B 55%, #0B5AA3 100%);
}

/* Lineas de velocidad, guino al isotipo del logo */
.auth-brand::before {
	content: "";
	position: absolute;
	left: -40px;
	top: 16%;
	width: 70%;
	height: 132px;
	background: repeating-linear-gradient(180deg,
		rgba(255, 255, 255, .16) 0 4px,
		transparent 4px 18px);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 70%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 70%, transparent 100%);
}

.auth-brand .kicker {
	position: relative;
	font: 600 12px var(--font);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .72);
}

.auth-brand h2 {
	position: relative;
	font: 600 34px/1.15 var(--font);
	letter-spacing: -.02em;
	margin: 0 0 12px 0;
	max-width: 420px;
}

.auth-brand p {
	position: relative;
	margin: 0;
	max-width: 400px;
	color: rgba(255, 255, 255, .78);
	font-size: 15px;
}

.auth-brand .shield {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: rgba(255, 255, 255, .8);
}
.auth-brand .shield svg { flex: none; }

/* Panel del formulario (derecha) */
.auth-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	background: #fff;
}

.auth-card {
	width: 100%;
	max-width: 380px;
}

.auth-logo { display: block; height: 52px; width: auto; margin: 0 0 36px -6px; }

.auth-card h1 {
	font: 600 24px/1.2 var(--font);
	letter-spacing: -.01em;
	margin: 0 0 6px 0;
}

.auth-card .lead {
	color: var(--c-muted);
	margin: 0 0 24px 0;
}

/* Indicador de pasos */
.steps {
	display: flex;
	gap: 8px;
	margin: 0 0 24px 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	color: var(--c-muted);
}
.steps li {
	flex: 1;
	padding-top: 8px;
	border-top: 3px solid var(--c-border);
}
.steps li.on { border-top-color: var(--c-primary); color: var(--c-primary); font-weight: 600; }
.steps li.done { border-top-color: var(--c-accent); }

.field { margin: 0 0 16px 0; }

.field label {
	display: block;
	font: 600 13px var(--font);
	margin: 0 0 6px 0;
}

.field .hint { display: block; font-size: 12px; color: var(--c-muted); margin-top: 6px; }

.control { position: relative; }

.input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font: 400 15px var(--font);
	color: var(--c-text);
	background: #fff;
	border: 1px solid var(--c-border-strong);
	border-radius: 8px;
	transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #9FB1C4; }
.input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(26, 160, 219, .28); }
.input.err { border-color: var(--c-danger); }

.control .input { padding-right: 76px; }

.toggle-pass {
	position: absolute;
	right: 6px;
	top: 6px;
	height: 32px;
	padding: 0 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	font: 600 12px var(--font);
	color: var(--c-primary-600);
	cursor: pointer;
}
.toggle-pass:hover { background: var(--c-primary-050); }

.code-input::placeholder { color: #C5D0DD; }
.code-input {
	letter-spacing: .5em;
	text-align: center;
	font: 600 24px var(--font);
	height: 56px;
	padding: 0 0 0 .5em;
	font-variant-numeric: tabular-nums;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--c-primary);
	color: #fff;
	font: 600 15px var(--font);
	cursor: pointer;
	transition: background-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--c-primary-600); }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(26, 160, 219, .35); }
.btn[disabled] { opacity: .6; cursor: progress; }

.row-between {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: -4px 0 20px 0;
	font-size: 13px;
}

.link { color: var(--c-primary-600); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: 8px;
	margin: 0 0 20px 0;
	font-size: 13px;
}
.alert svg { flex: none; margin-top: 1px; }
.alert-error { background: #FDECEA; color: #8E2A22; border: 1px solid #F2C2BD; }
.alert-info { background: #E8F1FD; color: #1D4F8C; border: 1px solid #C6DAF5; }
.alert-ok { background: #E6F5EC; color: #17683F; border: 1px solid #BFE3CE; }

/* Enrolamiento del autenticador */
.enroll {
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 16px;
	align-items: start;
	padding: 16px;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	margin: 0 0 20px 0;
	background: #F8FAFC;
}
.enroll .qr {
	width: 168px;
	height: 168px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: 8px;
	padding: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.enroll .qr svg, .enroll .qr img { width: 100%; height: 100%; display: block; }
.enroll ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--c-muted); }
.enroll ol li { margin: 0 0 6px 0; }
.enroll ol strong { color: var(--c-text); }
.secret {
	display: inline-block;
	margin-top: 4px;
	font: 600 13px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
	letter-spacing: .04em;
	color: var(--c-text);
	background: #fff;
	border: 1px dashed var(--c-border-strong);
	border-radius: 6px;
	padding: 6px 8px;
	word-break: normal;
	user-select: all;
}

.foot {
	margin-top: 36px;
	font-size: 12px;
	color: var(--c-muted);
	display: flex;
	justify-content: space-between;
	gap: 12px;
}
.foot a { color: var(--c-muted); }

@media (max-width: 860px) {
	.auth { grid-template-columns: 1fr; }
	.auth-brand { display: none; }
}
@media (max-width: 420px) {
	.enroll { grid-template-columns: 1fr; }
	.enroll .qr { margin: 0 auto; }
}
