<?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:id="@+id/main"
    android:background="#F7F7F7"
    tools:context=".MainActivity">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:id="@+id/logoNaMesa"
                android:layout_width="90dp"
                android:layout_height="90dp"
                android:src="@drawable/na_mesa"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.494"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="0.065" />

            <TextView
                android:id="@+id/txtTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:layout_marginBottom="624dp"
                android:text="NaMesa"
                android:textColor="#000"
                android:textSize="26sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.488"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/logoNaMesa" />

            <TextView
                android:id="@+id/txtSub"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:text="Sistema de Reserva de Mesas"
                android:textColor="#777"
                android:textSize="14sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/txtTitle" />

            <androidx.cardview.widget.CardView
                android:id="@+id/cardContainer"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="40dp"
                android:layout_marginEnd="32dp"
                app:cardCornerRadius="16dp"
                app:cardElevation="3dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/txtSub">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:padding="20dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:background="@drawable/bg_tabs"
                        android:orientation="horizontal"
                        android:padding="3dp">

                        <Button
                            android:id="@+id/btnCliente"
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/btn_light"
                            android:text="Cliente"
                            android:textAllCaps="false"
                            android:textColorLink="#231F1F"
                            android:textSize="5pt" />

                        <Button
                            android:id="@+id/btnEstabelecimento"
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/tab_unselected"
                            android:backgroundTint="@color/black"
                            android:text="Estabelecimento"
                            android:textAllCaps="false"
                            android:textSize="5pt" />
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:layout_marginTop="16dp"
                        android:background="@drawable/bg_tabs"
                        android:orientation="horizontal"
                        android:padding="3dp">

                        <Button
                            android:id="@+id/btnEntrar"
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/tab_selected"
                            android:text="Entrar"
                            android:textAllCaps="false"
                            android:textSize="5pt" />

                        <Button
                            android:id="@+id/btnCriarConta"
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/tab_unselected"
                            android:text="Criar Conta"
                            android:textAllCaps="false"
                            android:textSize="5pt" />
                    </LinearLayout>

                    <EditText
                        android:id="@+id/inputName"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="O seu nome"
                        android:inputType="textPersonName"
                        android:padding="12dp"
                        android:visibility="gone" />

                    <EditText
                        android:id="@+id/inputEmail"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="Email"
                        android:inputType="textEmailAddress"
                        android:padding="12dp" />

                    <EditText
                        android:id="@+id/inputOwnerPhone"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="Telefone do proprietário"
                        android:inputType="phone"
                        android:padding="12dp"
                        android:visibility="gone" />

                    <EditText
                        android:id="@+id/inputEstablishmentName"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="Nome do estabelecimento"
                        android:inputType="textCapWords"
                        android:padding="12dp"
                        android:visibility="gone" />

                    <EditText
                        android:id="@+id/inputEstablishmentEmail"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="Email do estabelecimento"
                        android:inputType="textEmailAddress"
                        android:padding="12dp"
                        android:visibility="gone" />

                    <EditText
                        android:id="@+id/inputEstablishmentPhone"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:layout_marginTop="12dp"
                        android:background="@drawable/input_bg"
                        android:hint="Telefone do estabelecimento"
                        android:inputType="phone"
                        android:padding="12dp"
                        android:visibility="gone" />

                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="12dp">

                        <EditText
                            android:id="@+id/inputPassword"
                            android:layout_width="match_parent"
                            android:layout_height="48dp"
                            android:background="@drawable/input_bg"
                            android:hint="Palavra-passe"
                            android:inputType="textPassword"
                            android:paddingStart="12dp"
                            android:paddingEnd="48dp" />

                        <ImageView
                            android:id="@+id/iconPasswordVisibility"
                            android:layout_width="48dp"
                            android:layout_height="48dp"
                            android:layout_alignParentEnd="true"
                            android:layout_centerVertical="true"
                            android:padding="12dp"
                            android:src="@drawable/ic_visibility_off"
                            android:clickable="true"
                            android:focusable="true"
                            android:background="?attr/selectableItemBackgroundBorderless" />
                    </RelativeLayout>
                    
                    <TextView
                        android:id="@+id/txtForgotPassword"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:layout_gravity="end"
                        android:text="Esqueceu-se da palavra-passe?"
                        android:textColor="#1976D2"
                        android:textSize="14sp"
                        android:visibility="visible"
                        android:clickable="true"
                        android:focusable="true"/>

                    <Button
                        android:id="@+id/btnFinalCriarConta"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:layout_marginTop="20dp"
                        android:background="@drawable/btn_primary"
                        android:padding="12dp"
                        android:text="Entrar"
                        android:textAllCaps="false"
                        android:textColor="#FFF" />
                </LinearLayout>

            </androidx.cardview.widget.CardView>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </ScrollView>


</androidx.constraintlayout.widget.ConstraintLayout>