@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #FFF0E6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

.login-card {
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(255, 160, 122, 0.25);
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.login-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 10px;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 800;
    color: #4A4A4A;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #5A5A5A;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFF9F7;
    border: 2px solid #FFDAB9;
    border-radius: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper:focus-within {
    border-color: #FFA07A;
    box-shadow: 0 0 0 4px rgba(255, 160, 122, 0.2);
}

.input-wrapper input {
    width: 100%;
    padding: 16px 18px;
    border: none;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    color: #333;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #CCBDB8;
}

.toggle-password {
    background: none;
    border: none;
    padding: 0 16px;
    font-size: 20px;
    cursor: pointer;
    color: #B0A09A;
}

.toggle-password:hover {
    color: #FFA07A;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FEC8CD, #FFA07A);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(255, 160, 122, 0.35);
}

.btn-login:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(255, 160, 122, 0.5);
}

.btn-login:active {
    transform: scale(0.97);
}

.error-message {
    background: #FFE5E5;
    color: #D34B4B;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    border-left: 5px solid #D34B4B;
    text-align: left;
}

.error-message.visible {
    display: block;
}

.register-link {
    margin-top: 24px;
    font-size: 15px;
    color: #777;
}

.register-link a {
    color: #FFA07A;
    font-weight: 700;
    text-decoration: none;
}

.register-link a:hover {
    color: #E07A5A;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    .login-card h1 {
        font-size: 24px;
    }
    .btn-login {
        font-size: 18px;
        padding: 14px;
    }
}


/* Logo común para login y registro */
.login-logo {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
    border-radius: 0;
    object-fit: contain;
    background: transparent !important;
    background-color: transparent !important;
    /*box-shadow: 0 8px 24px rgba(255, 160, 122, 0.2);*/
    animation: spin 12s linear infinite;
}

/* Definición de la animación */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}