<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical">

    <LinearLayout
            android:id="@+id/login_status"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:gravity="center_horizontal|center_vertical"
            android:orientation="vertical"
            android:visibility="gone">

        <ProgressBar
                style="?android:attr/progressBarStyleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"/>

        <TextView
                android:id="@+id/login_status_message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="16dp"
                android:fontFamily="sans-serif-light"
                android:text="@string/login_progress_signing_in"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="@color/foreground1"/>
    </LinearLayout>

    <!-- Login form -->

    <ScrollView
            android:id="@+id/login_form"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        <RelativeLayout
                style="@style/LoginFormContainer"
                android:orientation="vertical">

            <EditText
                    android:id="@+id/DNI"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/prompt_email"
                    android:maxLines="1"
                    android:singleLine="true"/>

            <EditText
                    android:id="@+id/password"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/DNI"
                    android:hint="@string/prompt_password"
                    android:imeActionId="@+id/login"
                    android:imeActionLabel="@string/action_sign_in_short"
                    android:imeOptions="actionUnspecified"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    android:singleLine="true"/>

            <EditText
                    android:id="@+id/server"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/password"
                    android:hint="@string/prompt_server"
                    android:inputType="text"
                    android:maxLines="1"
                    android:singleLine="true"/>

            <Button
                    android:id="@+id/sign_in_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_below="@id/server"
                    android:layout_gravity="right"
                    android:layout_marginTop="16dp"
                    android:paddingLeft="32dp"
                    android:paddingRight="32dp"
                    android:text="@string/action_sign_in_register"/>

            <TextView
                    android:id="@+id/why_password"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/sign_in_button"
                    android:gravity="center_horizontal"
                    android:text="@string/why_password"
                    android:textAppearance="?android:attr/textAppearanceMedium"
                    android:textColor="@color/blue"/>

            <TextView
                    android:id="@+id/lost_password"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignLeft="@+id/server"
                    android:layout_alignTop="@+id/sign_in_button"
                    android:layout_toLeftOf="@id/sign_in_button"
                    android:text="@string/lost_password"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="@color/blue"/>
        </RelativeLayout>
    </ScrollView>

</LinearLayout>