<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/widget_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="10dp"
    android:background="#DD1A1A2E">

    <!-- Title bar -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center_vertical"
        android:paddingBottom="4dp">

        <TextView
            android:id="@+id/widget_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Agent UI"
            android:textColor="#8888FF"
            android:textSize="11sp"
            android:fontFamily="monospace" />

        <TextView
            android:id="@+id/btn_refresh"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="\u21BB"
            android:textColor="#8888FF"
            android:textSize="14sp"
            android:paddingStart="8dp"
            android:paddingEnd="4dp"
            android:background="?android:attr/selectableItemBackground" />
    </LinearLayout>

    <!-- Terminal list (dynamic, scrollable) -->
    <ListView
        android:id="@+id/terminal_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:divider="@null"
        android:dividerHeight="0dp"
        android:scrollbars="none" />

    <!-- Fallback when empty -->
    <TextView
        android:id="@+id/empty_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="No terminals open"
        android:textColor="#666666"
        android:textSize="10sp"
        android:fontFamily="monospace"
        android:gravity="center" />

</LinearLayout>
