<?xml version="1.0" encoding="utf-8"?>
<!-- RUNNING STATE -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:gravity="center_vertical"
    android:paddingStart="120dp"
    android:paddingEnd="120dp"
    android:paddingTop="80dp"
    android:paddingBottom="80dp">

    <!-- Left: status + URL + stop -->
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical"
        android:gravity="start|center_vertical"
        android:paddingEnd="64dp">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:layout_marginBottom="32dp">

            <View
                android:id="@+id/status_dot"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:background="@drawable/bg_status_dot"
                android:layout_marginEnd="16dp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/status_running"
                android:textColor="@color/green_status"
                android:textSize="28sp"
                android:textStyle="bold"
                android:letterSpacing="0.05" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/label_web_ui"
            android:textColor="@color/text_secondary"
            android:textSize="22sp"
            android:layout_marginBottom="8dp" />

        <TextView
            android:id="@+id/url_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/teal_accent"
            android:textSize="30sp"
            android:maxLines="1"
            android:textStyle="bold"
            android:background="@drawable/bg_url_chip"
            android:paddingStart="24dp"
            android:paddingEnd="24dp"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            android:layout_marginBottom="56dp"
            tools:text="http://192.168.1.5:8080" />

        <Button
            android:id="@+id/stop_button_running"
            style="@style/Widget.LedGrab.Button.Secondary"
            android:layout_width="240dp"
            android:layout_height="64dp"
            android:text="@string/btn_stop"
            android:textSize="20sp"
            android:focusable="true"
            android:focusableInTouchMode="true"
            android:nextFocusUp="@id/stop_button_running"
            android:nextFocusDown="@id/stop_button_running" />
    </LinearLayout>

    <!-- Right: QR code + fallback hint -->
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="center">

        <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bg_qr_container"
            android:padding="20dp"
            android:layout_marginBottom="20dp">

            <ImageView
                android:id="@+id/qr_image"
                android:layout_width="280dp"
                android:layout_height="280dp"
                android:contentDescription="@string/qr_description"
                android:scaleType="fitXY" />
        </FrameLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/scan_to_configure"
            android:textColor="@color/text_secondary"
            android:textSize="22sp"
            android:gravity="center" />

        <TextView
            android:layout_width="280dp"
            android:layout_height="wrap_content"
            android:text="@string/scan_fallback_hint"
            android:textColor="@color/text_hint"
            android:textSize="14sp"
            android:gravity="center"
            android:layout_marginTop="6dp" />
    </LinearLayout>
</LinearLayout>
