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

body.scl-auth-body {
	font-family: var(--scl-font);
	background: linear-gradient(135deg, #0f1f33 0%, var(--scl-primary) 50%, #0f1f33 100%);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.scl-auth-wrapper {
	width: 100%;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.scl-auth-card {
	width: 100%;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.scl-auth-header {
	background: linear-gradient(135deg, var(--scl-primary) 0%, #2a5a8c 100%);
	padding: 2rem;
	text-align: center;
	border-bottom: 3px solid var(--scl-accent);
}

.scl-auth-logo {
	max-width: 80px;
	height: auto;
	margin-bottom: 0.75rem;
	border-radius: 8px;
}

.scl-auth-logo-text {
	font-size: 1.4rem;
	font-weight: 800;
	color: #fff;
	margin-bottom: 0.25rem;
	letter-spacing: -0.02em;
}

.scl-auth-subtitle {
	color: rgba(255,255,255,0.6);
	font-size: 0.8rem;
	margin-top: 4px;
}

.scl-auth-form {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.scl-auth-alert {
	margin: 0 2rem;
	margin-top: 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
}
.scl-auth-alert--error {
	background: #f8d7da;
	color: #721c24;
	border-left: 4px solid #dc3545;
}
.scl-auth-alert--success {
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

.scl-auth-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}
.scl-auth-field label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #2c3e50;
}
.scl-auth-field input {
	padding: 0.75rem 1rem;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
	width: 100%;
}
.scl-auth-field input:focus {
	border-color: var(--scl-primary);
	box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}

.scl-auth-password-wrap {
	position: relative;
}
.scl-auth-password-wrap input {
	padding-right: 3rem;
}
.scl-auth-toggle-pass {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 4px;
	opacity: 0.5;
	transition: opacity 0.15s;
}
.scl-auth-toggle-pass:hover { opacity: 1; }

.scl-auth-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.8rem;
}
.scl-auth-remember {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	color: #666;
	cursor: pointer;
}
.scl-auth-forgot {
	color: var(--scl-primary);
	text-decoration: none;
	font-weight: 600;
}
.scl-auth-forgot:hover { text-decoration: underline; }

.scl-auth-submit {
	background: var(--scl-accent);
	color: var(--scl-primary);
	border: none;
	padding: 0.875rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
	letter-spacing: 0.01em;
}
.scl-auth-submit:hover {
	background: #e09510;
	transform: translateY(-1px);
}
.scl-auth-submit:active { transform: translateY(0); }

.scl-auth-footer-text {
	font-size: 0.78rem;
	color: rgba(255,255,255,0.35);
	text-align: center;
}
.scl-auth-footer-text a {
	color: rgba(255,255,255,0.5);
	text-decoration: none;
}
.scl-auth-footer-text a:hover { color: rgba(255,255,255,0.8); }

.scl-auth-links {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.scl-auth-links a {
    color: #1a3a5c !important; /* forzar sobre fondo oscuro */
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4); /* legible sobre cualquier fondo */
}
.scl-auth-links a:hover { color: #f5a623 !important; text-decoration: underline; }
.scl-auth-links__sep   { color: rgba(255,255,255,0.35); font-size: 0.875rem; }

/* Fila de dos campos (nombre + apellido en registro) */
.scl-auth-field-row {
	display: flex;
	gap: 0.75rem;
}
.scl-auth-field-row .scl-auth-field { flex: 1; min-width: 0; }

/* Hint de validación junto al label */
.scl-auth-hint {
	font-weight: 400;
	font-size: 0.78rem;
	color: #999;
}

@media ( max-width: 400px ) {
	.scl-auth-field-row { flex-direction: column; gap: 0; }
}

/* Selector de tipo de cuenta en registro */
.scl-perfil-selector {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}
.scl-perfil-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.375rem;
	padding: 1rem 0.75rem;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: #2c3e50;
	user-select: none;
}
.scl-perfil-option input[type="radio"] { display: none; }
.scl-perfil-option__icon { font-size: 1.75rem; line-height: 1; }
.scl-perfil-option__desc {
	font-size: 0.7rem;
	font-weight: 400;
	color: #999;
	line-height: 1.3;
}
.scl-perfil-option--selected {
	border-color: var(--scl-primary);
	background: rgba(26,58,92,0.05);
}
.scl-perfil-option:hover { border-color: #aaa; }
