/**
 * SISGED VI — Login institucional MINEDU (plomo medio celeste)
 * Rediseño moderno 2026: animaciones, micro-interacciones, UX mejorada
 */
:root {
	--minedu-rojo: #6A8BA3;
	--minedu-rojo-oscuro: #557690;
	--minedu-rojo-claro: #E8EEF3;
	--sg-primary: #6A8BA3;
	--sg-primary-hover: #557690;
	--sg-primary-soft: #E8EEF3;
	--sg-secondary: #7E99AD;
	--minedu-gris: #4d5154;
	--minedu-gris-claro: #f4f4f5;
	--minedu-blanco: #ffffff;
	--minedu-texto: #1a1a1a;
	--minedu-texto-muted: #5c6570;
	--minedu-borde: #e2e4e8;
	--minedu-sombra: 0 20px 60px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(106, 139, 163, 0.12);
	--minedu-font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
	--sg-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--sg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--sg-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.sisged-login-page {
	margin: 0;
	min-height: 100%;
	font-family: var(--minedu-font);
	color: var(--minedu-texto);
	background: var(--minedu-blanco);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

/* ==================== FONDO ANIMADO ==================== */
.sisged-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(135deg, #fafafa 0%, #fff 40%, var(--sg-primary-soft) 100%);
}

.sisged-bg__pattern {
	position: absolute;
	inset: 0;
	opacity: 0.4;
	background-image: radial-gradient(circle at 1px 1px, rgba(106, 139, 163, 0.06) 1px, transparent 0);
	background-size: 28px 28px;
}

.sisged-bg__stripe {
	position: absolute;
	top: 0;
	left: 0;
	width: 6px;
	height: 100%;
	background: var(--sg-primary);
}

/* Canvas de partículas */
.sisged-bg__canvas {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ==================== LAYOUT ==================== */
.sisged-shell {
	position: relative;
	z-index: 2;
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(300px, 1fr) minmax(360px, 520px);
}

/* ==================== HERO IZQUIERDO ==================== */
.sisged-hero {
	background:
		radial-gradient(ellipse 90% 60% at 100% 0%, rgba(106, 139, 163, 0.07) 0%, transparent 55%),
		radial-gradient(ellipse 70% 50% at 0% 100%, rgba(106, 139, 163, 0.04) 0%, transparent 50%),
		linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
	color: var(--minedu-texto);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: clamp(4.5rem, 8vw, 5.5rem);
	position: relative;
	overflow: hidden;
	border-right: 1px solid var(--minedu-borde);
}

.sisged-hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: linear-gradient(180deg, var(--sg-primary) 0%, var(--sg-primary-hover) 100%);
}

.sisged-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.35;
	background-image: radial-gradient(circle at 1px 1px, rgba(106, 139, 163, 0.05) 1px, transparent 0);
	background-size: 32px 32px;
	pointer-events: none;
}

.sisged-hero__inner {
	max-width: 420px;
	position: relative;
	z-index: 1;
	text-align: center;
}

.sisged-hero__logo-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 1.5rem;
}

.sisged-hero__logo-minedu {
	display: block;
	width: 108px;
	height: auto;
	padding: 0.85rem;
	background: var(--minedu-blanco);
	border-radius: 20px;
	border: 1px solid var(--minedu-borde);
	box-shadow:
		0 4px 20px rgba(0, 0, 0, 0.05),
		0 1px 3px rgba(106, 139, 163, 0.06);
	animation: sgLogoIn 0.8s var(--sg-ease-out) both;
}

@keyframes sgLogoIn {
	from {
		opacity: 0;
		transform: scale(0.85) translateY(12px);
	}
	to {
		transform: scale(1) translateY(0);
	}
}

.sisged-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--sg-primary);
	background: var(--minedu-blanco);
	border: 1px solid var(--minedu-borde);
	padding: 0.4rem 1rem;
	border-radius: 999px;
	margin-bottom: 1rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

/* Typewriter */
.sisged-typewriter {
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	border-right: none;
	min-height: 1.2em;
}

.sisged-typewriter__cursor {
	display: inline-block;
	width: 2px;
	height: 0.85em;
	background: var(--sg-primary);
	margin-left: 2px;
	vertical-align: -0.05em;
	animation: sgTypewriterBlink 0.7s step-end infinite;
}

@keyframes sgTypewriterBlink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.sisged-hero__title {
	font-size: clamp(1.85rem, 4vw, 2.5rem);
	font-weight: 800;
	margin: 0 0 0.75rem;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--minedu-texto);
}

.sisged-hero__title-accent {
	position: relative;
	display: inline-block;
	color: var(--sg-primary);
}

/* Efecto de cursor parpadeante sobre "Bienvenido" */
.sisged-hero__cursor {
	display: inline-block;
	width: 3px;
 height: 0.9em;
	background: var(--sg-primary);
	margin-left: 2px;
	vertical-align: -0.05em;
	animation: sgBlink 1s step-end infinite;
}

@keyframes sgBlink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.sisged-hero__subtitle {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--minedu-texto-muted);
	margin: 0 auto 1.75rem;
	max-width: 38ch;
}

.sisged-hero__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sisged-hero__features li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--minedu-gris);
	padding: 0.85rem 1rem;
	background: var(--minedu-blanco);
	border-radius: 14px;
	border: 1px solid var(--minedu-borde);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
	overflow: hidden;
	position: relative;
}

/* Barra de progreso animada en cada feature */
.sisged-hero__features li::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--sg-primary), var(--sg-secondary));
	border-radius: 0 2px 0 0;
	width: 0;
}

body.sisged-ready .sisged-hero__features li::after {
	animation: sgFeatureBar 1.2s var(--sg-ease-out) forwards;
}

body.sisged-ready .sisged-hero__features li:nth-child(1)::after { animation-delay: 0.6s; }
body.sisged-ready .sisged-hero__features li:nth-child(2)::after { animation-delay: 0.9s; }
body.sisged-ready .sisged-hero__features li:nth-child(3)::after { animation-delay: 1.2s; }

@keyframes sgFeatureBar {
	from { width: 0; }
	to { width: 100%; }
}

.sisged-hero__features li:hover {
	border-color: rgba(106, 139, 163, 0.2);
	box-shadow: 0 6px 20px rgba(106, 139, 163, 0.08);
	transform: translateX(4px);
}

.sisged-hero__features li::before {
	content: "";
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--sg-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236A8BA3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.sisged-hero__contact {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(1.75rem, 4vw, 2.75rem);
	z-index: 1;
	margin: 0;
	padding: 0 1.5rem;
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--sg-primary-hover);
	line-height: 1.45;
}

.sisged-hero__contact a {
	color: var(--sg-primary);
	text-decoration: none;
	font-weight: 700;
	border-bottom: 1px solid rgba(106, 139, 163, 0.35);
	transition: color 0.2s var(--sg-ease-smooth), border-color 0.2s var(--sg-ease-smooth);
}

.sisged-hero__contact a:hover,
.sisged-hero__contact a:focus-visible {
	color: var(--sg-primary-hover);
	border-bottom-color: var(--sg-primary-hover);
	outline: none;
}

/* ==================== PANEL ACCESO ==================== */
.sisged-access {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(1.5rem, 4vw, 3rem);
	background:
		linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #fafbfc 100%);
	position: relative;
	overflow: hidden;
}

.sisged-access__decor {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.sisged-access__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(106, 139, 163, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(106, 139, 163, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.sisged-access__orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
}

.sisged-access__orb--1 {
	width: 320px;
	height: 320px;
	top: -80px;
	right: -60px;
	background: rgba(106, 139, 163, 0.14);
	animation: sgOrbFloat1 12s ease-in-out infinite;
}

.sisged-access__orb--2 {
	width: 260px;
	height: 260px;
	bottom: 5%;
	left: -70px;
	background: rgba(106, 139, 163, 0.10);
	animation: sgOrbFloat2 15s ease-in-out infinite;
}

.sisged-access__orb--3 {
	width: 180px;
	height: 180px;
	top: 40%;
	right: 20%;
	background: rgba(106, 139, 163, 0.06);
	animation: sgOrbFloat3 18s ease-in-out infinite reverse;
}

@keyframes sgOrbFloat1 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(20px, -25px) scale(1.05); }
	66% { transform: translate(-10px, 15px) scale(0.95); }
}

@keyframes sgOrbFloat2 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(15px, -20px) scale(1.08); }
}

@keyframes sgOrbFloat3 {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(-12px, 18px); }
}

/* Roles decorativos adicionales (solo en pantallas grandes) */
@media (min-width: 1400px) {
	.sisged-access__orb--1 { width: 400px; height: 400px; }
	.sisged-access__orb--2 { width: 320px; height: 320px; }
	.sisged-access__orb--3 { width: 240px; height: 240px; }
}

/* ==================== TARJETA ==================== */
.sisged-card {
	width: 100%;
	max-width: 440px;
	padding: clamp(1.75rem, 4vw, 2.35rem);
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(226, 228, 232, 0.9);
	border-radius: 24px;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.07),
		0 0 0 1px rgba(255, 255, 255, 0.8) inset,
		0 8px 32px rgba(106, 139, 163, 0.06);
	position: relative;
	z-index: 1;
}

.sisged-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 1.5rem;
	right: 1.5rem;
	height: 4px;
	background: linear-gradient(90deg, var(--sg-primary), var(--sg-secondary), var(--sg-primary));
	border-radius: 0 0 4px 4px;
}

.sisged-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 24px;
	padding: 1px;
	background: linear-gradient(145deg, rgba(106, 139, 163, 0.15), transparent 40%, rgba(106, 139, 163, 0.05));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

/* Estado de éxito en la tarjeta */
.sisged-card.sisged-card--success {
	animation: sgCardSuccess 0.6s var(--sg-ease-out) forwards;
}

@keyframes sgCardSuccess {
	0% { transform: scale(1); }
	30% { transform: scale(0.97); }
	60% { transform: scale(1.02); }
	100% { transform: scale(1); }
}

.sisged-card__status {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--minedu-texto-muted);
	background: var(--minedu-gris-claro);
	border: 1px solid var(--minedu-borde);
	border-radius: 999px;
	padding: 0.35rem 0.75rem;
	margin-bottom: 1.25rem;
}

.sisged-card__status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
	animation: sgPulseDot 2s ease-in-out infinite;
}

@keyframes sgPulseDot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.55; transform: scale(0.85); }
}

.sisged-card__header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.sisged-card__logo-sm {
	flex-shrink: 0;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sisged-card__eyebrow {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--sg-primary);
	margin: 0 0 0.25rem;
}

.sisged-card__title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0 0 0.25rem;
	color: var(--minedu-texto);
	letter-spacing: -0.02em;
}

.sisged-card__hint {
	font-size: 0.88rem;
	color: var(--minedu-texto-muted);
	margin: 0;
}

/* ==================== CAMPOS (Floating Labels) ==================== */
.sisged-field {
	margin-bottom: 1.25rem;
	position: relative;
}

.sisged-field__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--minedu-gris);
	margin-bottom: 0.5rem;
	transition: color 0.25s var(--sg-ease-smooth);
}

.sisged-field__control {
	position: relative;
	display: flex;
	align-items: center;
}

.sisged-field__icon {
	position: absolute;
	left: 1rem;
	color: var(--minedu-texto-muted);
	pointer-events: none;
	display: flex;
	transition: color 0.25s var(--sg-ease-smooth), transform 0.25s var(--sg-ease-spring);
}

.sisged-field__input {
	width: 100%;
	padding: 0.9rem 1rem 0.9rem 2.75rem;
	font-family: var(--minedu-font);
	font-size: 1rem;
	color: var(--minedu-texto);
	background: rgba(244, 244, 245, 0.85);
	border: 1.5px solid var(--minedu-borde);
	border-radius: 14px;
	transition: border-color 0.25s var(--sg-ease-smooth),
		box-shadow 0.25s var(--sg-ease-smooth),
		background 0.25s var(--sg-ease-smooth),
		transform 0.2s var(--sg-ease-smooth);
}

.sisged-field__input::placeholder {
	color: transparent;
}

.sisged-field__input--plain {
	padding-left: 1rem;
}

.sisged-field__input:focus {
	outline: none;
	border-color: var(--sg-primary);
	background: var(--minedu-blanco);
	box-shadow: 0 0 0 4px var(--sg-primary-soft);
}

.sisged-field__control:focus-within .sisged-field__icon {
	color: var(--sg-primary);
	transform: scale(1.1);
}

.sisged-field__control:focus-within .sisged-field__label {
	color: var(--sg-primary);
}

.sisged-field__input.is-invalid {
	border-color: #dc3545;
	box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
	animation: sgShake 0.4s var(--sg-ease-smooth);
}

@keyframes sgShake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

/* Mensaje de error debajo del campo */
.sisged-field__error {
	font-size: 0.75rem;
	color: #dc3545;
	margin-top: 0.35rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.2s, transform 0.2s var(--sg-ease-smooth);
}

.sisged-field__input.is-invalid ~ .sisged-field__error {
	opacity: 1;
	transform: translateY(0);
}

.sisged-field__toggle {
	position: absolute;
	right: 0.65rem;
	background: none;
	border: none;
	color: var(--minedu-texto-muted);
	cursor: pointer;
	padding: 0.35rem;
	display: flex;
	border-radius: 8px;
	transition: color 0.2s, background 0.2s, transform 0.2s var(--sg-ease-spring);
}

.sisged-field__toggle:hover {
	color: var(--sg-primary);
	background: var(--sg-primary-soft);
	transform: scale(1.1);
}

.sisged-field__toggle:active {
	transform: scale(0.95);
}

/* Indicador de fortaleza de contraseña */
.sisged-field__strength {
	display: flex;
	gap: 4px;
	margin-top: 0.5rem;
}

.sisged-field__strength-bar {
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: var(--minedu-borde);
	transition: background 0.3s var(--sg-ease-smooth);
}

.sisged-field__strength-bar.sisged-field__strength-bar--weak { background: #ef4444; }
.sisged-field__strength-bar.sisged-field__strength-bar--medium { background: #f59e0b; }
.sisged-field__strength-bar.sisged-field__strength-bar--strong { background: #22c55e; }

.sisged-field__strength-text {
	font-size: 0.7rem;
	color: var(--minedu-texto-muted);
	margin-top: 0.25rem;
}

/* ==================== BOTONES ==================== */
.sisged-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--minedu-font);
	font-size: 0.95rem;
	font-weight: 700;
	border: none;
	border-radius: 12px;
	padding: 0.9rem 1.5rem;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

/* Efecto ripple */
.sisged-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
	transform: scale(0);
	opacity: 0;
	pointer-events: none;
}

.sisged-btn:active::after {
	transform: scale(2.5);
	opacity: 1;
	transition: transform 0.5s, opacity 0.3s;
}

.sisged-btn--primary {
	width: 100%;
	margin-top: 0.35rem;
	color: var(--minedu-blanco);
	background: linear-gradient(135deg, var(--sg-primary) 0%, var(--sg-primary-hover) 100%);
	box-shadow: 0 8px 24px rgba(106, 139, 163, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	transition: transform 0.2s var(--sg-ease-spring),
		box-shadow 0.25s var(--sg-ease-smooth),
		background 0.25s var(--sg-ease-smooth);
}

.sisged-btn--primary::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
	transform: translateX(-100%);
	transition: transform 0.6s var(--sg-ease-out);
}

.sisged-btn--primary:hover:not(:disabled)::before {
	transform: translateX(100%);
}

.sisged-btn--primary:hover:not(:disabled) {
	background: var(--sg-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(106, 139, 163, 0.45);
}

.sisged-btn--primary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 4px 16px rgba(106, 139, 163, 0.3);
}

.sisged-btn--ghost {
	background: var(--minedu-gris-claro);
	color: var(--minedu-gris);
	border: 1px solid var(--minedu-borde);
}

.sisged-btn--ghost:hover {
	background: #e8e8ea;
}

.sisged-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

.d-none {
	display: none !important;
}

.sisged-btn .btn-loading {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.sisged-link {
	display: block;
	width: 100%;
	margin-top: 1.15rem;
	padding: 0;
	background: none;
	border: none;
	text-align: center;
	font-family: var(--minedu-font);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--sg-primary);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
	transition: color 0.2s, text-underline-offset 0.2s var(--sg-ease-smooth);
}

.sisged-link:hover {
	color: var(--sg-primary-hover);
	text-underline-offset: 5px;
}

.sisged-spinner {
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sgSpin 0.65s linear infinite;
}

.sisged-spinner--light {
	border-color: rgba(106, 139, 163, 0.2);
	border-top-color: var(--sg-primary);
}

@keyframes sgSpin {
	to { transform: rotate(360deg); }
}

/* ==================== CHECKMARK ANIMADO (éxito) ==================== */
.sisged-success-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
}

.sisged-checkmark {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
	transform: scale(0);
	animation: sgCheckPop 0.5s var(--sg-ease-spring) forwards;
}

.sisged-checkmark svg {
	width: 32px;
	height: 32px;
	stroke: #fff;
	stroke-width: 3;
	fill: none;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: sgCheckDraw 0.4s var(--sg-ease-out) 0.3s forwards;
}

@keyframes sgCheckPop {
	0% { transform: scale(0); }
	60% { transform: scale(1.15); }
	100% { transform: scale(1); }
}

@keyframes sgCheckDraw {
	to { stroke-dashoffset: 0; }
}

/* ==================== FOOTER ==================== */
.sisged-footer {
	margin-top: 1.5rem;
	font-size: 0.68rem;
	color: var(--minedu-texto-muted);
	text-align: center;
	line-height: 1.5;
	max-width: 420px;
	position: relative;
	z-index: 1;
}

/* ==================== ANIMACIONES ENTRADA ==================== */
.sisged-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s var(--sg-ease-out), transform 0.7s var(--sg-ease-out);
}

body.sisged-ready .sisged-reveal {
	opacity: 1;
	transform: translateY(0);
}

body.sisged-ready .sisged-reveal[data-delay="1"] { transition-delay: 0.08s; }
body.sisged-ready .sisged-reveal[data-delay="2"] { transition-delay: 0.16s; }
body.sisged-ready .sisged-reveal[data-delay="3"] { transition-delay: 0.24s; }
body.sisged-ready .sisged-reveal[data-delay="4"] { transition-delay: 0.32s; }
body.sisged-ready .sisged-reveal[data-delay="5"] { transition-delay: 0.40s; }
body.sisged-ready .sisged-reveal[data-delay="6"] { transition-delay: 0.48s; }
body.sisged-ready .sisged-reveal[data-delay="7"] { transition-delay: 0.56s; }

/* ==================== POPUP ==================== */
.sisged-popup {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s var(--sg-ease-smooth), visibility 0.35s;
}

.sisged-popup.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.sisged-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 26, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.sisged-popup__wrap {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sisged-popup__dialog {
	width: 100%;
	background: var(--minedu-blanco);
	border-radius: 20px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
	border: 1px solid var(--minedu-borde);
	overflow: hidden;
	transform: scale(0.9) translateY(20px);
	opacity: 0;
	transition: transform 0.4s var(--sg-ease-spring), opacity 0.35s var(--sg-ease-smooth);
}

.sisged-popup.is-open .sisged-popup__dialog {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.sisged-popup__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--minedu-borde);
	background: var(--minedu-gris-claro);
}

.sisged-popup__eyebrow {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--sg-primary);
	margin: 0 0 0.2rem;
}

.sisged-popup__title {
	font-size: 1.2rem;
	font-weight: 800;
	margin: 0;
	color: var(--minedu-texto);
}

.sisged-popup__close {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 10px;
	background: var(--minedu-blanco);
	color: var(--minedu-gris);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: background 0.2s, color 0.2s, transform 0.2s var(--sg-ease-spring);
}

.sisged-popup__close:hover {
	background: var(--sg-primary);
	color: var(--minedu-blanco);
	transform: rotate(90deg);
}

.sisged-popup__body {
	padding: 1.25rem 1.5rem;
}

.sisged-popup__desc {
	font-size: 0.88rem;
	color: var(--minedu-texto-muted);
	margin: 0 0 1.15rem;
}

.sisged-popup__footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1rem 1.5rem 1.25rem;
	border-top: 1px solid var(--minedu-borde);
	background: #fafafa;
}

.sisged-popup__footer .sisged-btn--primary {
	width: auto;
	margin-top: 0;
}

body.sisged-popup-open {
	overflow: hidden;
}

/* ==================== TOASTR ==================== */
body.sisged-login-page #toastr-container {
	z-index: 11000 !important;
}

body.sisged-login-page #toastr-container > div {
	border-radius: 14px !important;
	font-family: var(--minedu-font) !important;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22) !important;
	opacity: 1 !important;
	min-width: 340px;
	width: auto !important;
	max-width: 420px;
	padding: 16px 16px 16px 54px !important;
	color: #ffffff !important;
	background-color: #1f2937 !important;
	background-image: none !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	animation: sgToastIn 0.4s var(--sg-ease-spring) !important;
}

@keyframes sgToastIn {
	from {
		transform: translateX(40px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

body.sisged-login-page #toastr-container > .toastr-success,
body.sisged-login-page #toastr-container > div.toastr-success {
	background-color: #15803d !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

body.sisged-login-page #toastr-container > .toastr-error,
body.sisged-login-page #toastr-container > div.toastr-error {
	background-color: #b91c1c !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

body.sisged-login-page #toastr-container > .toastr-warning,
body.sisged-login-page #toastr-container > div.toastr-warning {
	background-color: #b45309 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

body.sisged-login-page #toastr-container > .toastr-info,
body.sisged-login-page #toastr-container > div.toastr-info {
	background-color: #1d4ed8 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

body.sisged-login-page #toastr-container .toastr-title {
	font-weight: 700 !important;
	color: #ffffff !important;
}

body.sisged-login-page #toastr-container .toastr-message {
	color: rgba(255, 255, 255, 0.96) !important;
}

body.sisged-login-page #toastr-container .toastr-close-button {
	color: #ffffff !important;
	text-shadow: none !important;
	opacity: 0.9 !important;
	font-weight: 700;
}

body.sisged-login-page #toastr-container .toastr-progress {
	background-color: rgba(255, 255, 255, 0.35) !important;
	opacity: 1 !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
	.sisged-shell {
		grid-template-columns: 1fr;
	}

	.sisged-hero {
		padding: 2rem 1.5rem 4.5rem;
		border-right: none;
		border-bottom: 1px solid var(--minedu-borde);
	}

	.sisged-hero__contact {
		bottom: 1.25rem;
		font-size: 0.84rem;
	}

	.sisged-hero::before {
		width: 100%;
		height: 4px;
	}

	.sisged-hero__inner {
		text-align: center;
		margin: 0 auto;
	}

	.sisged-hero__subtitle {
		max-width: none;
		margin-left: auto;
		margin-right: auto;
	}

	.sisged-hero__features {
		display: none;
	}

	.sisged-bg__stripe {
		width: 100%;
		height: 5px;
	}
}

/* ==================== PREFERS REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
	.sisged-reveal,
	.sisged-popup__dialog,
	.sisged-hero__logo-minedu,
	.sisged-checkmark,
	.sisged-checkmark svg {
		transition: none !important;
		animation: none !important;
	}

	.sisged-reveal {
		opacity: 1;
		transform: none;
	}

	.sisged-hero__features li:hover {
		transform: none;
	}

	.sisged-access__orb,
	.sisged-card__status-dot,
	.sisged-btn--primary::before,
	.sisged-hero__cursor {
		animation: none !important;
	}

	.sisged-hero__features li::after {
		animation: none !important;
		width: 100%;
	}

	.sisged-field__input.is-invalid {
		animation: none !important;
	}

	body.sisged-login-page #toastr-container > div {
		animation: none !important;
	}
}
