<?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">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/devSettingsToolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:title="A/B testing (dev)"
        app:titleTextColor="@android:color/white" />

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

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

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="8dp"
                android:text="Manual A/B override for local testing. Not a security boundary."
                android:textSize="14sp" />

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/switchAbOverride"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingVertical="8dp"
                android:text="Manual A/B override" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="16dp"
                android:paddingBottom="8dp"
                android:text="Variant"
                android:textStyle="bold" />

            <RadioGroup
                android:id="@+id/radioGroupVariant"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <RadioButton
                    android:id="@+id/radioVariantDefault"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Default (no override)" />

                <RadioButton
                    android:id="@+id/radioVariantA"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Variant A" />

                <RadioButton
                    android:id="@+id/radioVariantB"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Variant B" />
            </RadioGroup>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="24dp"
                android:layout_marginBottom="16dp"
                android:background="@color/brand_divider" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="8dp"
                android:text="Sync"
                android:textStyle="bold" />

            <Button
                android:id="@+id/refreshDataButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Refresh Data" />

            <TextView
                android:id="@+id/refreshStatusText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="8dp"
                android:textSize="13sp"
                android:visibility="gone" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="24dp"
                android:layout_marginBottom="16dp"
                android:background="@color/brand_divider" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="8dp"
                android:text="Account"
                android:textStyle="bold" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/logoutButton"
                style="@style/Widget.Material3.Button.OutlinedButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Log out"
                app:strokeColor="#C62828"
                android:textColor="#C62828" />

        </LinearLayout>
    </ScrollView>
</LinearLayout>
