<?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"
    android:layout_width="match_parent" android:layout_height="match_parent"
    android:padding="24dp">

    <TextView
        android:id="@+id/tvTitle"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:text="SecureChat"
        android:textSize="32sp"
        android:textStyle="bold"
        android:textColor="@color/brand_primary"
        app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
        android:layout_marginTop="64dp"/>

    <TextView
        android:id="@+id/tvSub"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:text="Private messages. Server-only. Nothing saved on your phone."
        android:textSize="14sp"
        android:textColor="@color/text_secondary"
        app:layout_constraintTop_toBottomOf="@id/tvTitle" app:layout_constraintStart_toStartOf="parent"
        android:layout_marginTop="8dp"/>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/tilPhone"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent" android:layout_height="wrap_content"
        android:hint="Phone (with +country code)"
        app:layout_constraintTop_toBottomOf="@id/tvSub"
        android:layout_marginTop="32dp">
        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/etPhone"
            android:layout_width="match_parent" android:layout_height="wrap_content"
            android:inputType="phone"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/tilName"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent" android:layout_height="wrap_content"
        android:hint="Your name"
        app:layout_constraintTop_toBottomOf="@id/tilPhone"
        android:layout_marginTop="12dp">
        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/etName"
            android:layout_width="match_parent" android:layout_height="wrap_content"
            android:inputType="textPersonName"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.button.MaterialButton
        android:id="@+id/btnRequestOtp"
        android:layout_width="match_parent" android:layout_height="wrap_content"
        android:text="Send OTP"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/tilName"/>

    <LinearLayout
        android:id="@+id/otpBox"
        android:orientation="vertical"
        android:layout_width="match_parent" android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@id/btnRequestOtp"
        android:layout_marginTop="24dp">

        <com.google.android.material.textfield.TextInputLayout
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
            android:layout_width="match_parent" android:layout_height="wrap_content"
            android:hint="6-digit OTP">
            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/etOtp"
                android:layout_width="match_parent" android:layout_height="wrap_content"
                android:inputType="number" android:maxLength="6"/>
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.button.MaterialButton
            android:id="@+id/btnVerify"
            android:layout_width="match_parent" android:layout_height="wrap_content"
            android:text="Verify &amp; Enter"
            android:layout_marginTop="12dp"/>
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
