:root {
    /* Paleta institucional FUMC */
    --primary-dark: #0A3D6B;    /* Azul oscuro principal */
    --primary-light: #5D9CEC;   /* Azul claro secundario */
    --accent: #F5B041;          /* Amarillo de acento */
    --text-dark: #333333;       /* Gris oscuro para texto */
    --bg-light: #F5F5F5;        /* Fondo gris claro */
    --white: #FFFFFF;
    
    /* Variables funcionales */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-default: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

/* Fondo animado */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    background-size: 200% 200%;
    animation: gradientBG 10s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Burbujas con colores institucionales */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    animation: rise 10s infinite ease-in;
    opacity: 0.15;
}

.bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    animation-duration: 8s;
    background-color: var(--primary-dark);
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-duration: 5s;
    animation-delay: 1s;
    background-color: var(--primary-light);
}

.bubble:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 35%;
    animation-duration: 7s;
    animation-delay: 2s;
    background-color: var(--accent);
}

.bubble:nth-child(4) {
    width: 80px;
    height: 80px;
    left: 50%;
    animation-duration: 11s;
    animation-delay: 0s;
    background-color: var(--primary-dark);
}

.bubble:nth-child(5) {
    width: 35px;
    height: 35px;
    left: 55%;
    animation-duration: 6s;
    animation-delay: 1s;
    background-color: var(--primary-light);
}

.bubble:nth-child(6) {
    width: 45px;
    height: 45px;
    left: 65%;
    animation-duration: 8s;
    animation-delay: 3s;
    background-color: var(--accent);
}

.bubble:nth-child(7) {
    width: 25px;
    height: 25px;
    left: 75%;
    animation-duration: 7s;
    animation-delay: 2s;
    background-color: var(--primary-dark);
}

.bubble:nth-child(8) {
    width: 80px;
    height: 80px;
    left: 80%;
    animation-duration: 6s;
    animation-delay: 1s;
    background-color: var(--primary-light);
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
    100% {
        bottom: 1080px;
        transform: translateX(-200px);
    }
}

.login-container {
    width: 100%;
    max-width: 28rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(10, 61, 107, 0.1);
    transform: translateY(0);
    transition: var(--transition-default);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.login-container:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
    color: var(--white);
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3rem;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--white);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230A3D6B"><path d="M11.47 3.84a.75.75 0 011.06 0l8.69 8.69a.75.75 0 101.06-1.06l-8.689-8.69a2.25 2.25 0 00-3.182 0l-8.69 8.69a.75.75 0 001.061 1.06l8.69-8.69z"/><path d="M12 5.432l8.159 8.159c.03.03.06.058.091.086v6.198c0 1.035-.84 1.875-1.875 1.875H15a.75.75 0 01-.75-.75v-4.5a.75.75 0 00-.75-.75h-3a.75.75 0 00-.75.75V21a.75.75 0 01-.75.75H5.625a1.875 1.875 0 01-1.875-1.875v-6.198a2.29 2.29 0 00.091-.086L12 5.43z"/></svg>');
    background-size: 50%;
    background-position: center;
    background-repeat: no-repeat;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--accent);
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

.login-body {
    padding: 2.5rem 2rem 2rem;
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid rgba(10, 61, 107, 0.2);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    transition: var(--transition-default);
    padding-left: 2.5rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(10, 61, 107, 0.15);
    background-color: var(--white);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.375rem;
    color: var(--primary-dark);
    font-size: 1rem;
    opacity: 0.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-default);
    border: none;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-icon {
    margin-right: 0.5rem;
}

.login-options {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 1.5rem;
font-size: 0.875rem;
flex-direction: row-reverse;
}

.remember-me {
margin-left: auto; /* Empuja todo a la izquierda */
}

.forgot-password {
margin-right: auto; /* Empuja todo a la derecha */
}
.checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(10, 61, 107, 0.3);
    appearance: none;
    margin-right: 0.5rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-default);
}

.checkbox:checked {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    color: white;
    font-size: 0.625rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: var(--primary-dark);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-default);
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

.error-message {
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: none;
}

.has-error .form-control {
    border-color: #dc3545;
}

.has-error .error-message {
    display: block;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.375rem;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .login-container {
        border-radius: 0.75rem;
    }
    
    .login-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .login-body {
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* Micro-interactions */
.form-control:focus ~ .input-icon {
    color: var(--primary-dark);
    opacity: 1;
}

.checkbox:hover {
    border-color: var(--primary-dark);
}