/**
 * Estilos de Login - IEXE Universidad
 * Sistema de Control Escolar
 */

:root {
    /* Colores del sistema */
    --primary-color: #0f2a61;
    --primary-light: #c0d2eb;
    --primary-dark: #041E42;
    --accent-color: #2D44AC;
    --accent-hover: #1e3080;

    /* Grises */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Sombras */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        linear-gradient(135deg, rgba(4, 30, 66, 0.85) 0%, rgba(15, 42, 97, 0.85) 50%, rgba(45, 68, 172, 0.75) 100%),
        url('../img/fondo-iexe.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Patrón de fondo decorativo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(45, 68, 172, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Contenedor principal */
.login-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

/* Tarjeta de login */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header con logo */
.login-header {
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--gray-200);
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-logo img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* Cuerpo del formulario */
.login-body {
    padding: 2.5rem;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-of-type {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

/* Inputs */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--gray-900);
    background: #ffffff;
    border: 1.5px solid var(--gray-300);
    border-radius: 0.75rem;
    transition: all var(--transition-base);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(45, 68, 172, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

/* Input group para contraseña */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    padding-right: 3rem;
}

.input-group-icon {
    position: absolute;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 0.5rem;
}

.input-group-icon:hover {
    color: var(--accent-color);
    background: var(--gray-100);
}

.input-group-icon:active {
    transform: scale(0.95);
}

/* Botón de login */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Footer */
.login-footer {
    padding: 1.5rem 2.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.login-footer-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .login-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .login-logo img {
        width: 150px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }

    .login-footer {
        padding: 1.25rem 1.5rem;
    }
}