<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
    android:background="#FFF8E1">

    <!-- Üst Başlık ve Hoş Geldin Alanı -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingHorizontal="20dp"
        android:paddingTop="20dp"
        android:paddingBottom="10dp"
        android:gravity="center_vertical">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tvWelcomeUser"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Merhaba Şef!"
                android:textSize="14sp"
                android:textColor="#8D6E63"
                android:textStyle="bold" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Yemek Kitabı 👨‍🍳"
                android:textSize="22sp"
                android:textStyle="bold"
                android:textColor="#D84315" />
        </LinearLayout>

        <!-- Küçük Çıkış Butonu -->
        <TextView
            android:id="@+id/btnQuickLogout"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:text="🚪"
            android:textSize="20sp"
            android:gravity="center"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:clickable="true"
            android:focusable="true" />
    </LinearLayout>

    <!-- Arama Çubuğu -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingHorizontal="16dp"
        android:paddingBottom="12dp">

        <EditText
            android:id="@+id/etSearch"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Tarif, malzeme veya kategori ara... 🔍"
            android:inputType="text"
            android:background="@drawable/custom_input"
            android:textColor="#3E2723"
            android:textColorHint="#BCAAA4"
            android:textSize="15sp" />
    </LinearLayout>

    <!-- Tarif Listesi -->
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <ListView
            android:id="@+id/listViewRecipes"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:divider="@android:color/transparent"
            android:dividerHeight="0dp"
            android:scrollbars="none" />

        <LinearLayout
            android:id="@+id/llEmptyState"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="center"
            android:layout_gravity="center"
            android:padding="20dp"
            android:visibility="gone">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="🍽️"
                android:textSize="60sp"
                android:layout_marginBottom="10dp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Hiç tarif bulunamadı!"
                android:textSize="18sp"
                android:textColor="#5D4037"
                android:textStyle="bold" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="İlk tarifi eklemek için '+' butonuna basabilirsin."
                android:textSize="14sp"
                android:textColor="#757575"
                android:layout_marginTop="5dp"
                android:gravity="center" />
        </LinearLayout>
    </FrameLayout>

    <!-- Alt Navigasyon Bar -->
    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="70dp"
        app:cardElevation="12dp"
        app:cardCornerRadius="0dp"
        app:cardBackgroundColor="#FFFFFF">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:gravity="center">

            <!-- Tarif Ekle -->
            <LinearLayout
                android:id="@+id/btnNavAdd"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="➕"
                    android:textSize="20sp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Tarif Ekle"
                    android:textSize="11sp"
                    android:textColor="#D84315"
                    android:textStyle="bold"
                    android:layout_marginTop="2dp" />
            </LinearLayout>

            <!-- Şefler / Kullanıcılar -->
            <LinearLayout
                android:id="@+id/btnNavUsers"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="👥"
                    android:textSize="20sp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Şefler"
                    android:textSize="11sp"
                    android:textColor="#5D4037"
                    android:layout_marginTop="2dp" />
            </LinearLayout>

            <!-- Favoriler -->
            <LinearLayout
                android:id="@+id/btnNavFavs"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="❤️"
                    android:textSize="20sp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Favoriler"
                    android:textSize="11sp"
                    android:textColor="#5D4037"
                    android:layout_marginTop="2dp" />
            </LinearLayout>

            <!-- Profilim -->
            <LinearLayout
                android:id="@+id/btnNavProfile"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="👤"
                    android:textSize="20sp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Profilim"
                    android:textSize="11sp"
                    android:textColor="#5D4037"
                    android:layout_marginTop="2dp" />
            </LinearLayout>

        </LinearLayout>
    </androidx.cardview.widget.CardView>
</LinearLayout>