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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 480px;
}

.login-card {
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Imagen de la familia */
.image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.family-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Contenedor del formulario */
.form-container {
    padding: 35px 45px 25px;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    height: 50px;
    width: auto;
}

/* Título */
.title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 30px;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Grupos de input */
.input-group {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 14px 18px;
    gap: 14px;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #f7941d;
}

.input-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon img {
    width: 22px;
    height: 22px;
}

.input-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.input-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.input-field {
    border: none;
    background: transparent;
    font-size: 15px;
    color: #1a1a2e;
    font-family: 'Poppins', sans-serif;
    outline: none;
    width: 100%;
}

.input-field::placeholder {
    color: #9ca3af;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toggle-password:hover svg path,
.toggle-password:hover svg circle,
.toggle-password:hover svg line {
    stroke: #6b7280;
}

/* Link recuperar contraseña */
.forgot-password {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
}

.forgot-password span {
    color: #6b7280;
}

.forgot-password a {
    color: #1a1a2e;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 4px;
}

.forgot-password a:hover {
    color: #f7941d;
}

/* Botón iniciar sesión */
.login-button {
    width: 100%;
    padding: 18px;
    background: #e2e8f0;
    border: none;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    margin-top: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.login-button:hover {
    background: #cbd5e1;
}

.login-button:active {
    transform: translateY(0);
}

.login-button.active {
    background: linear-gradient(135deg, #c5d92f 0%, #a8c424 100%);
    color: #1a1a2e;
    cursor: pointer;
}

.login-button.active:hover {
    background: linear-gradient(135deg, #d4e83e 0%, #b7d333 100%);
}

.login-button.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Spinner de carga */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensaje de error */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.error-message span {
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
}

/* Link registro */
.register-link {
    text-align: center;
    font-size: 14px;
    margin-top: 24px;
}

.register-link span {
    color: #6b7280;
}

.register-link a {
    color: #1a1a2e;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 4px;
}

.register-link a:hover {
    color: #f7941d;
}

/* Footer */
.footer {
    text-align: center;
    padding: 25px;
    padding-top: 35px;
}

.footer span {
    font-size: 13px;
    color: #f7941d;
    font-weight: 500;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .login-container {
        max-width: 440px;
    }

    .form-container {
        padding: 30px 35px 20px;
    }

    .image-container {
        height: 200px;
    }
}

/* Responsive - Móviles */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .login-container {
        max-width: 100%;
    }

    .login-card {
        border-radius: 20px;
    }

    .image-container {
        height: 180px;
        border-radius: 20px 20px 0 0;
    }

    .form-container {
        padding: 25px 20px 15px;
    }

    .logo {
        height: 42px;
    }

    .logo-container {
        margin-bottom: 20px;
    }

    .title {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .login-form {
        gap: 14px;
    }

    .input-wrapper {
        padding: 12px 14px;
        border-radius: 12px;
        gap: 12px;
    }

    .input-icon img {
        width: 20px;
        height: 20px;
    }

    .input-label {
        font-size: 11px;
    }

    .input-field {
        font-size: 14px;
    }

    .forgot-password {
        font-size: 13px;
    }

    .login-button {
        padding: 16px;
        font-size: 16px;
        margin-top: 10px;
    }

    .register-link {
        font-size: 13px;
        margin-top: 20px;
    }

    .footer {
        padding: 20px;
        padding-top: 25px;
    }

    .footer span {
        font-size: 12px;
    }
}

/* Responsive - Móviles pequeños */
@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .form-container {
        padding: 20px 16px 12px;
    }

    .image-container {
        height: 160px;
    }

    .title {
        font-size: 17px;
    }

    .input-wrapper {
        padding: 10px 12px;
    }
}
