<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    tools:context=".screen.login.LoginActivity">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/left_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.10" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/right_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.90" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/right_guideline"
        app:layout_constraintStart_toStartOf="@+id/left_guideline"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:adjustViewBounds="true"
            android:src="@drawable/ic_logo_big" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginTop="8dp"
            android:background="@color/color_black"
            android:orientation="horizontal">

            <View
                android:layout_width="8dp"
                android:layout_height="match_parent"
                android:background="@drawable/bg_box_highlight" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:paddingStart="8dp"
                android:paddingEnd="8dp"
                android:text="@string/login_title"
                android:textColor="@android:color/white"
                android:textStyle="bold" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="8dp"
                android:gravity="center_vertical"
                android:text="@string/label_username"
                android:textColor="@color/color_white"
                android:textStyle="bold" />

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/til_username"
                style="@style/BoxInputLayout"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                app:endIconMode="clear_text"
                app:hintEnabled="false">

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_username"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/color_white"
                    android:hint="@string/hint_username"
                    android:inputType="text"
                    android:maxLength="50"
                    android:padding="0dp" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="8dp"
                android:gravity="center_vertical"
                android:text="@string/label_password"
                android:textColor="@color/color_white"
                android:textStyle="bold" />

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/til_password"
                style="@style/BoxInputLayout"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                app:endIconMode="password_toggle"
                app:endIconTint="@color/color_highlight"
                app:hintEnabled="false">

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_password"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/color_white"
                    android:hint="@string/hint_password"
                    android:inputType="textPassword"
                    android:maxLength="50"
                    android:padding="0dp" />
            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:id="@+id/tv_error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:gravity="center"
                android:textColor="@color/color_red_800" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_login"
                android:layout_width="match_parent"
                android:layout_height="58dp"
                android:layout_gravity="center"
                android:layout_marginTop="8dp"
                android:backgroundTint="@color/color_black"
                android:gravity="center"
                android:text="@string/btn_login"
                android:textColor="@color/color_white"
                app:cornerRadius="0dp" />
        </LinearLayout>
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>