<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white_smoke"
    android:overScrollMode="never"
    android:fillViewport="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="100dp">

        <!-- Modern Header -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <View
                android:layout_width="match_parent"
                android:layout_height="180dp"
                android:background="@drawable/bg_header_gradient" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingHorizontal="24dp"
                android:paddingTop="48dp"
                android:paddingBottom="24dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Bem+"
                    android:textColor="@color/white"
                    android:textSize="24sp"
                    android:textStyle="bold" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="4dp"
                    android:text="Os seus alarmes"
                    android:textColor="@color/white"
                    android:alpha="0.9"
                    android:textSize="18sp"
                    android:textStyle="bold"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:text="Gerencie as suas medicações"
                    android:textColor="@color/white"
                    android:alpha="0.7"
                    android:textSize="14sp" />

                <!-- Weather removed from here and moved to Reminders tab -->


            </LinearLayout>
        </FrameLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="-30dp"
            android:paddingHorizontal="24dp"
            android:orientation="vertical">

            <!-- Action Row (Title + Button) -->
            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                app:cardCornerRadius="16dp"
                app:cardElevation="6dp"
                app:cardBackgroundColor="@color/white">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:padding="12dp"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:layout_marginStart="8dp"
                        android:text="Lista de Alarmes"
                        android:textColor="@color/neutral_dark"
                        android:textSize="16sp"
                        android:textStyle="bold" />

                    <Button
                        android:id="@+id/btnAddAlarm"
                        android:layout_width="wrap_content"
                        android:layout_height="40dp"
                        android:background="@drawable/bg_new_button"
                        android:paddingHorizontal="16dp"
                        android:text="+ Novo"
                        android:textAllCaps="false"
                        android:textColor="@android:color/white"
                        android:textStyle="bold" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <!-- List -->
            <LinearLayout
                android:id="@+id/alarmListContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:orientation="vertical"
                android:paddingBottom="8dp" />

        </LinearLayout>

    </LinearLayout>
</androidx.core.widget.NestedScrollView>