{
  "Type": "Window",
  "Id": "naval_organization",
  "Title": "Naval Organization",
  "Icon": "\u2691",
  "Classes": [
    "ps-window-holo"
  ],
  "State": "Maximized",
  "DisplayLocation": "Taskbar",
  "WindowGroup": "static_menu",
  "IsRestorable": false,
  "IsMinimizable": false,
  "Width": "100%",
  "Height": "100%",
  "Background": "rgba(0,0,0,0.85)",
  "BackgroundImage": "UI/Backgrounds/naval_organization.jpg",
  "Padding": "16",
  "Children": [
    {
      "Type": "Grid",
      "Id": "naval_organization_layout",
      "Width": "100%",
      "Height": "100%",
      "ColumnDefinitions": [
        "320px",
        "1fr"
      ],
      "RowDefinitions": [
        "1fr",
        "auto"
      ],
      "Children": [
        {
          "Type": "StackPanel",
          "Id": "naval_organization_left_panel",
          "Grid.Column": 0,
          "Orientation": "Vertical",
          "Width": "100%",
          "Height": "100%",
          "Gap": 8,
          "Padding": "0,0,12,0",
          "Children": [
            {
              "Type": "Select",
              "Id": "sv_military_race_select",
              "Width": "100%",
              "Value": "",
              "Options": [],
              "Command": "core.system_view.select_military_race"
            },
            {
              "Type": "Checkbox",
              "Id": "sv_military_show_civilians",
              "Label": "Show Civilians",
              "IsChecked": true,
              "Command": "core.system_view.toggle_naval_show_civilians"
            },
            {
              "Type": "Tree",
              "Id": "sv_military_tree",
              "Width": "100%",
              "Height": "100%",
              "Nodes": [],
              "EnableVerticalScroll": true,
              "FullRowToggle": false,
              "ServerExpansion": true,
              "ShowSearch": true,
              "SearchPlaceholder": "Search fleets...",
              "HideParentSelection": false,
              "DragDropEnabled": true,
              "AllowReparenting": true,
              "OnNodeMoved": "core.system_view.naval_node_moved",
              "AcceptExternalDropMime": "application/x-ps-naval-ship",
              "DropMatrix": {
                "AdminCommand": ["AdminCommand"],
                "Fleet": ["AdminCommand", "Fleet", "SubFleet", "Squadron", "Ship"],
                "SubFleet": ["Fleet", "SubFleet", "Ship"],
                "Squadron": ["Ship"],
                "Ship": ["Fleet", "SubFleet", "Squadron", "Ship"]
              }
            },
            {
              "Type": "Label",
              "Id": "sv_military_tree_empty",
              "Text": "No naval commands or fleets are defined for the selected race yet.",
              "IsVisible": false,
              "Classes": [
                "ps-text--muted"
              ]
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Id": "naval_organization_right_panel",
          "Grid.Column": 1,
          "Orientation": "Vertical",
          "Width": "100%",
          "Height": "100%",
          "Gap": 8,
          "Children": [
            {
              "Type": "StackPanel",
              "Id": "sv_military_survey_panel",
              "Orientation": "Vertical",
              "Gap": 6,
              "Width": "100%",
              "IsVisible": false,
              "Children": [
                {
                  "Type": "Label",
                  "Id": "sv_military_survey_title",
                  "Text": "",
                  "Classes": [
                    "ps-section-title"
                  ]
                },
                {
                  "Type": "ProgressBar",
                  "Id": "sv_military_survey_progress",
                  "Width": "100%",
                  "Min": 0,
                  "Max": 100,
                  "Value": 0,
                  "ShowLabel": true,
                  "AriaLabel": "Survey progress"
                },
                {
                  "Type": "Label",
                  "Id": "sv_military_survey_status",
                  "Text": "",
                  "Classes": [
                    "ps-text-secondary"
                  ]
                },
                {
                  "Type": "Label",
                  "Id": "sv_military_survey_eta",
                  "Text": "",
                  "Classes": [
                    "ps-text-secondary"
                  ]
                },
                {
                  "Type": "Button",
                  "Id": "sv_military_survey_cancel",
                  "Text": "Cancel Survey",
                  "Command": "protostar4x.core.survey.cancel",
                  "Classes": [
                    "ps-btn--sm"
                  ]
                }
              ]
            },
            {
              "Type": "TabContainer",
              "Id": "sv_military_detail_tabs",
              "Width": "100%",
              "Height": "100%",
              "IsVisible": false,
              "Command": "core.system_view.select_naval_detail_tab",
              "Children": [
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_fleet_tab",
                  "Title": "Fleet",
                  "Children": [
                    {
                      "Type": "Alert",
                      "Id": "sv_military_no_fleet_hint",
                      "HorizontalAlignment": "Center",
                      "VerticalAlignment": "Center",
                      "Severity": "Info",
                      "IsDismissible": false,
                      "Message": "Select a fleet to view details."
                    },
                    {
                      "Type": "StackPanel",
                      "Id": "sv_military_fleet_content",
                      "Orientation": "Vertical",
                      "Width": "100%",
                      "Height": "100%",
                      "Gap": 4,
                      "IsVisible": false,
                      "Children": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Vertical",
                          "Width": "100%",
                          "Gap": 2,
                          "Classes": [
                            "ps-no-shrink"
                          ],
                          "Children": [
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_location",
                              "Text": ""
                            },
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_commander",
                              "Text": ""
                            },
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_speed",
                              "Text": ""
                            },
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_capacity",
                              "Text": ""
                            },
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_default_orders",
                              "Text": "",
                              "Classes": [
                                "ps-text-secondary"
                              ]
                            },
                            {
                              "Type": "Label",
                              "Id": "sv_military_fleet_class_summary",
                              "Text": "",
                              "Classes": [
                                "ps-text-secondary"
                              ]
                            }
                          ]
                        },
                        {
                          "Type": "TabContainer",
                          "Id": "sv_military_fleet_subtabs",
                          "Width": "100%",
                          "Height": "100%",
                          "Flex": "1",
                          "Command": "core.system_view.select_naval_fleet_subtab",
                          "Children": [
                            {
                              "Type": "TabItem",
                              "Title": "Ship List",
                              "Children": [
                                {
                                  "Type": "DataGrid",
                                  "Id": "sv_military_ship_list_grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "EnableVerticalScroll": true,
                                  "UseZebraStriping": true,
                                  "SelectionMode": "Multiple",
                                  "OnSelectionChanged": "core.system_view.select_naval_ship_list_rows",
                                  "EnableRowDrag": true,
                                  "RowDragIdField": "node_id",
                                  "RowDragMime": "application/x-ps-naval-ship",
                                  "Columns": [
                                    {
                                      "Header": "Ship",
                                      "Field": "ship_name",
                                      "Flex": 1
                                    },
                                    {
                                      "Header": "Class",
                                      "Field": "class_name"
                                    },
                                    {
                                      "Header": "Status",
                                      "Field": "status"
                                    },
                                    {
                                      "Header": "Fuel",
                                      "Field": "fuel",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Ammo",
                                      "Field": "ammo",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "MSP",
                                      "Field": "msp",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Shields",
                                      "Field": "shields",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Deploy",
                                      "Field": "deploy",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Maint",
                                      "Field": "maint"
                                    },
                                    {
                                      "Header": "Morale",
                                      "Field": "morale",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Grade",
                                      "Field": "grade",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Training",
                                      "Field": "training",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Thermal",
                                      "Field": "thermal",
                                      "Align": "Right"
                                    },
                                    {
                                      "Header": "Commander",
                                      "Field": "commander"
                                    }
                                  ],
                                  "FooterLeftText": "",
                                  "FooterRightText": "",
                                  "Rows": []
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Id": "sv_military_fleet_movement_orders_tab",
                              "Title": "Movement Orders",
                              "Children": [
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Gap": 8,
                                  "Width": "100%",
                                  "Height": "100%",
                                  "Children": [
                                    {
                                      "Type": "Grid",
                                      "ColumnDefinitions": [
                                        "160px",
                                        "1fr",
                                        "480px"
                                      ],
                                      "Width": "100%",
                                      "Children": [
                                        {
                                          "Type": "StackPanel",
                                          "Grid.Column": 0,
                                          "Orientation": "Vertical",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "View Mode",
                                              "Classes": [
                                                "ps-section-title"
                                              ]
                                            },
                                            {
                                              "Type": "RadioGroup",
                                              "Id": "sv_military_movement_view_mode",
                                              "Items": [
                                                {
                                                  "Label": "System Locations",
                                                  "Value": "SystemLocations"
                                                },
                                                {
                                                  "Label": "Autoroute by System",
                                                  "Value": "Autoroute"
                                                },
                                                {
                                                  "Label": "Order Templates",
                                                  "Value": "OrderTemplates"
                                                }
                                              ],
                                              "SelectedValue": "SystemLocations",
                                              "Command": "core.naval_org.set_destination_mode"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_filter_panel",
                                          "Grid.Column": 1,
                                          "Orientation": "Vertical",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Filters",
                                              "Classes": [
                                                "ps-section-title"
                                              ]
                                            },
                                            {
                                              "Type": "Grid",
                                              "ColumnDefinitions": [
                                                "1fr",
                                                "1fr",
                                                "1fr",
                                                "1fr",
                                                "1fr"
                                              ],
                                              "RowDefinitions": [
                                                "auto",
                                                "auto",
                                                "auto"
                                              ],
                                              "Children": [
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_filter_planets",
                                                  "Label": "Planets",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Planets"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_filter_comets",
                                                  "Label": "Comets",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Comets"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 2,
                                                  "Id": "sv_military_filter_contacts",
                                                  "Label": "Contacts",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Contacts"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 3,
                                                  "Id": "sv_military_filter_lifepods",
                                                  "Label": "Lifepods",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Lifepods"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 4,
                                                  "Id": "sv_military_filter_survey_locations",
                                                  "Label": "Survey Locations",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "SurveyLocations"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_filter_dwarf_planets",
                                                  "Label": "Dwarf Planets",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "DwarfPlanets"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_filter_asteroids",
                                                  "Label": "Asteroids",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Asteroids"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 2,
                                                  "Id": "sv_military_filter_exclude_tp",
                                                  "Label": "Exclude TP",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "ExcludeTP"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 3,
                                                  "Id": "sv_military_filter_wrecks",
                                                  "Label": "Wrecks",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Wrecks"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 4,
                                                  "Id": "sv_military_filter_exclude_surveyed",
                                                  "Label": "Exclude Surveyed",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "ExcludeSurveyed"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_filter_moons",
                                                  "Label": "Moons",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Moons"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_filter_fleets",
                                                  "Label": "Fleets",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Fleets"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 2,
                                                  "Id": "sv_military_filter_civilians",
                                                  "Label": "Civilians",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Civilians"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 3,
                                                  "Id": "sv_military_filter_waypoints",
                                                  "Label": "Waypoints",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "Waypoints"
                                                  }
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 4,
                                                  "Id": "sv_military_filter_order_filtering",
                                                  "Label": "Order Filtering",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.set_destination_filter",
                                                  "CommandPayload": {
                                                    "category": "OrderFiltering"
                                                  }
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_options_panel",
                                          "Grid.Column": 2,
                                          "Orientation": "Vertical",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Options",
                                              "Classes": [
                                                "ps-section-title"
                                              ]
                                            },
                                            {
                                              "Type": "Grid",
                                              "ColumnDefinitions": [
                                                "1fr",
                                                "1fr"
                                              ],
                                              "RowDefinitions": [
                                                "auto",
                                                "auto",
                                                "auto"
                                              ],
                                              "Children": [
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_movement_auto_lp",
                                                  "Label": "Auto-include Lagrange Points",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.set_assume_jump_capable"
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 0,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_movement_check_danger",
                                                  "Label": "Check Danger Rating",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.toggle_check_danger"
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_movement_assume_jump",
                                                  "Label": "Assume Fleet is Jump-Capable",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_assume_jump_capable_fleet"
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 1,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_movement_exclude_alien",
                                                  "Label": "Exclude Alien-Controlled",
                                                  "IsChecked": true,
                                                  "Command": "core.naval_org.toggle_exclude_alien"
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 0,
                                                  "Id": "sv_military_movement_cycle_orders",
                                                  "Label": "Cycle Moves",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.toggle_cycle_orders"
                                                },
                                                {
                                                  "Type": "Checkbox",
                                                  "Grid.Row": 2,
                                                  "Grid.Column": 1,
                                                  "Id": "sv_military_movement_max_speed",
                                                  "Label": "Use Maximum Speed",
                                                  "IsChecked": false,
                                                  "Command": "core.naval_org.set_max_speed"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "Grid",
                                      "ColumnDefinitions": [
                                        "260px",
                                        "300px",
                                        "1fr"
                                      ],
                                      "Flex": "1",
                                      "Width": "100%",
                                      "Children": [
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_movement_destinations",
                                          "Grid.Column": 0,
                                          "Width": "100%",
                                          "Height": "100%",
                                          "SelectionMode": "Single",
                                          "EnableVerticalScroll": true,
                                          "Columns": [
                                            {
                                              "Header": "Destination",
                                              "Field": "name",
                                              "Flex": 1
                                            }
                                          ],
                                          "OnSelectionChanged": "core.system_view.set_naval_movement_location",
                                          "Rows": []
                                        },
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_movement_actions",
                                          "Grid.Column": 1,
                                          "Width": "100%",
                                          "Height": "100%",
                                          "SelectionMode": "Single",
                                          "EnableVerticalScroll": true,
                                          "Columns": [
                                            {
                                              "Header": "Action",
                                              "Field": "name",
                                              "Flex": 1
                                            }
                                          ],
                                          "OnSelectionChanged": "core.system_view.set_naval_movement_action",
                                          "Rows": []
                                        },
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_movement_grid",
                                          "Grid.Column": 2,
                                          "Width": "100%",
                                          "Height": "100%",
                                          "EnableVerticalScroll": true,
                                          "UseZebraStriping": true,
                                          "SelectionMode": "Single",
                                          "OnSelectionChanged": "core.system_view.set_naval_load_item",
                                          "Columns": [
                                            {
                                              "Header": "#",
                                              "Field": "sequence",
                                              "Width": "40px",
                                              "Align": "Right"
                                            },
                                            {
                                              "Header": "Order",
                                              "Field": "description",
                                              "Flex": 1
                                            }
                                          ],
                                          "FooterLeftText": "",
                                          "FooterRightText": "",
                                          "Rows": []
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Id": "sv_military_parameters_row",
                                      "Orientation": "Horizontal",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Children": [
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_min_distance",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Min Distance",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Input",
                                              "Id": "sv_military_movement_min_distance",
                                              "Width": "80px",
                                              "InputType": "number",
                                              "Value": "0",
                                              "Command": "core.naval_org.set_min_distance"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_order_delay",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Order Delay",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Input",
                                              "Id": "sv_military_movement_order_delay",
                                              "Width": "80px",
                                              "InputType": "number",
                                              "Value": "0",
                                              "Command": "core.naval_org.set_order_delay"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_max_items",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Max Items",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Input",
                                              "Id": "sv_military_movement_max_items",
                                              "Width": "60px",
                                              "InputType": "number",
                                              "Value": "0",
                                              "Command": "core.naval_org.set_max_items"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_orb_distance",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Orb Distance",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Input",
                                              "Id": "sv_military_movement_orb_distance",
                                              "Width": "60px",
                                              "InputType": "number",
                                              "Value": "0",
                                              "Command": "core.naval_org.set_orb_distance"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_min_available",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Min Available",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Input",
                                              "Id": "sv_military_movement_min_available",
                                              "Width": "60px",
                                              "InputType": "number",
                                              "Value": "0",
                                              "Command": "core.naval_org.set_min_available"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Id": "sv_military_param_load_sub_units",
                                          "Orientation": "Horizontal",
                                          "Gap": 4,
                                          "Children": [
                                            {
                                              "Type": "Checkbox",
                                              "Id": "sv_military_movement_load_sub_units",
                                              "Label": "Load All Sub-Units",
                                              "IsChecked": false,
                                              "Command": "core.naval_org.toggle_load_sub_units"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Orientation": "Horizontal",
                                      "Gap": 6,
                                      "Width": "100%",
                                      "Children": [
                                        {
                                          "Type": "Button",
                                          "Text": "Add Move",
                                          "Command": "core.system_view.add_naval_movement_order",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Create Colony",
                                          "Command": "core.system_view.create_naval_colony",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Remove Last",
                                          "Command": "core.system_view.remove_naval_movement_last",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Remove All",
                                          "Command": "core.system_view.remove_naval_movement_all",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Repeat Orders",
                                          "Command": "core.system_view.repeat_naval_movement_orders",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Input",
                                          "Id": "sv_military_movement_repeat_input",
                                          "Width": "50px",
                                          "InputType": "number",
                                          "Value": "1",
                                          "Command": "core.system_view.set_naval_repeat_count"
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Create Template",
                                          "Command": "core.system_view.open_naval_template_modal",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Delete Template",
                                          "Command": "core.system_view.delete_movement_template",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Button",
                                          "Text": "Create Fleet WP",
                                          "Command": "core.system_view.create_fleet_waypoint",
                                          "Classes": [
                                            "ps-btn--sm"
                                          ]
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_movement_default_actions",
                                          "Label": "Default Actions",
                                          "IsChecked": true,
                                          "Command": "core.naval_org.toggle_default_actions"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Id": "sv_military_fleet_standing_orders_tab",
                              "Title": "Standing Orders",
                              "Children": [
                                {
                                  "Type": "Grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "Gap": 8,
                                  "ColumnDefinitions": [
                                    "380px",
                                    "1fr"
                                  ],
                                  "RowDefinitions": [
                                    "1fr"
                                  ],
                                  "Children": [
                                    {
                                      "Type": "StackPanel",
                                      "Grid.Column": 0,
                                      "Orientation": "Vertical",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Children": [
                                        {
                                          "Type": "Label",
                                          "Text": "Standing-order catalog",
                                          "Classes": [
                                            "ps-text-secondary"
                                          ]
                                        },
                                        {
                                          "Type": "Tree",
                                          "Id": "sv_military_standing_tree",
                                          "Width": "100%",
                                          "Height": "260px",
                                          "Nodes": [],
                                          "EnableVerticalScroll": true,
                                          "DragDropEnabled": false,
                                          "AllowReorder": false,
                                          "AllowReparenting": false
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 8,
                                          "Children": [
                                            {
                                              "Type": "Button",
                                              "Text": "Add Standing",
                                              "Width": "50%",
                                              "Command": "core.system_view.add_naval_standing_order"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Add Conditional",
                                              "Width": "50%",
                                              "Command": "core.system_view.add_naval_conditional_order"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 8,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Condition",
                                              "Width": "80px",
                                              "VerticalAlignment": "Center",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Select",
                                              "Id": "sv_military_standing_condition_select",
                                              "Width": "100%",
                                              "Value": "",
                                              "Options": [],
                                              "Command": "core.system_view.set_naval_standing_condition"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_standing_create_waypoint",
                                          "Label": "Create fleet waypoint",
                                          "IsChecked": false,
                                          "TooltipText": "Creates a waypoint at the fleet's current position when this conditional order triggers",
                                          "Command": "core.system_view.toggle_naval_standing_create_waypoint"
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_standing_copy_standing",
                                          "Label": "Copy Standing on Detach",
                                          "IsChecked": false,
                                          "TooltipText": "When a ship detaches from this fleet, copy the fleet's standing orders to the new fleet",
                                          "Command": "core.system_view.toggle_naval_copy_standing_on_detach"
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_standing_copy_conditional",
                                          "Label": "Copy Conditional on Detach",
                                          "IsChecked": false,
                                          "TooltipText": "When a ship detaches from this fleet, copy the fleet's conditional orders to the new fleet",
                                          "Command": "core.system_view.toggle_naval_copy_conditional_on_detach"
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_standing_ignore_standing",
                                          "Label": "Ignore Standing Orders",
                                          "IsChecked": false,
                                          "TooltipText": "This fleet will not execute any standing orders assigned to it",
                                          "Command": "core.system_view.toggle_naval_ignore_standing"
                                        },
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_standing_ignore_conditional",
                                          "Label": "Ignore Conditional Orders",
                                          "IsChecked": false,
                                          "TooltipText": "This fleet will not execute any conditional orders assigned to it",
                                          "Command": "core.system_view.toggle_naval_ignore_conditional"
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 8,
                                          "Children": [
                                            {
                                              "Type": "Label",
                                              "Text": "Template",
                                              "Width": "80px",
                                              "VerticalAlignment": "Center",
                                              "Classes": [
                                                "ps-text-secondary"
                                              ]
                                            },
                                            {
                                              "Type": "Select",
                                              "Id": "sv_military_standing_template_select",
                                              "Width": "100%",
                                              "Value": "",
                                              "Options": [],
                                              "Command": "core.system_view.set_naval_standing_template"
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "Input",
                                          "Id": "sv_military_standing_template_name",
                                          "Width": "100%",
                                          "Value": "",
                                          "Placeholder": "New template name",
                                          "Command": "core.system_view.set_naval_standing_template_name"
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 8,
                                          "Children": [
                                            {
                                              "Type": "Button",
                                              "Text": "Save",
                                              "Width": "34%",
                                              "Command": "core.system_view.save_naval_standing_template"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Load",
                                              "Width": "33%",
                                              "Command": "core.system_view.load_naval_standing_template"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Delete",
                                              "Width": "33%",
                                              "Command": "core.system_view.delete_naval_standing_template"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Grid.Column": 1,
                                      "Orientation": "Vertical",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Children": [
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_standing_grid",
                                          "Width": "100%",
                                          "Height": "100%",
                                          "EnableVerticalScroll": true,
                                          "UseZebraStriping": true,
                                          "SelectionMode": "Single",
                                          "AllowReorder": true,
                                          "ShowDragHandle": true,
                                          "OnSelectionChanged": "core.system_view.select_naval_standing_rows",
                                          "OnRowReordered": "core.system_view.reorder_naval_standing_orders",
                                          "Columns": [
                                            {
                                              "Header": "#",
                                              "Field": "sequence",
                                              "Width": "56px",
                                              "Align": "Right"
                                            },
                                            {
                                              "Header": "Type",
                                              "Field": "kind",
                                              "Width": "110px"
                                            },
                                            {
                                              "Header": "Group",
                                              "Field": "group",
                                              "Width": "130px"
                                            },
                                            {
                                              "Header": "Order",
                                              "Field": "order",
                                              "Flex": 1
                                            },
                                            {
                                              "Header": "Survey",
                                              "Field": "validity",
                                              "Width": "96px",
                                              "HeaderTooltip": "Whether the fleet has the required sensors to execute this survey order"
                                            },
                                            {
                                              "Header": "Condition",
                                              "Field": "condition",
                                              "Width": "180px"
                                            },
                                            {
                                              "Header": "WP",
                                              "Field": "waypoint",
                                              "Width": "68px",
                                              "Align": "Center",
                                              "HeaderTooltip": "Whether a fleet waypoint marker is created when this conditional order fires"
                                            }
                                          ],
                                          "FooterLeftText": "",
                                          "FooterRightText": "",
                                          "Rows": []
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 8,
                                          "Children": [
                                            {
                                              "Type": "Button",
                                              "Text": "Move Up",
                                              "Width": "25%",
                                              "Command": "core.system_view.move_naval_standing_order_up"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Move Down",
                                              "Width": "25%",
                                              "Command": "core.system_view.move_naval_standing_order_down"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Delete Order",
                                              "Width": "25%",
                                              "Command": "core.system_view.delete_naval_standing_order"
                                            },
                                            {
                                              "Type": "Button",
                                              "Text": "Delete All",
                                              "Width": "25%",
                                              "Command": "core.system_view.delete_naval_standing_orders"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Id": "sv_military_fleet_formation_orders_tab",
                              "Title": "Formation Orders",
                              "Children": [
                                {
                                  "Type": "Grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "Gap": 8,
                                  "ColumnDefinitions": [
                                    "1fr",
                                    "280px",
                                    "280px"
                                  ],
                                  "RowDefinitions": [
                                    "1fr"
                                  ],
                                  "Children": [
                                    {
                                      "Type": "StackPanel",
                                      "Grid.Column": 1,
                                      "Orientation": "Vertical",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Children": [
                                        {
                                          "Type": "Label",
                                          "Text": "Anchor Fleet",
                                          "Classes": [
                                            "ps-text-secondary"
                                          ]
                                        },
                                        {
                                          "Type": "Tree",
                                          "Id": "sv_formation_anchor_tree",
                                          "Width": "100%",
                                          "Height": "100%",
                                          "Nodes": [],
                                          "EnableVerticalScroll": true,
                                          "DragDropEnabled": false,
                                          "AllowReorder": false,
                                          "AllowReparenting": false
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Grid.Column": 0,
                                      "Orientation": "Vertical",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Children": [
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_formation_settings_grid",
                                          "Width": "100%",
                                          "Height": "auto",
                                          "EnableVerticalScroll": false,
                                          "UseZebraStriping": true,
                                          "SelectionMode": "None",
                                          "Columns": [
                                            {
                                              "Header": "Setting",
                                              "Field": "setting",
                                              "Width": "200px"
                                            },
                                            {
                                              "Header": "Value",
                                              "Field": "value",
                                              "Flex": 1
                                            }
                                          ],
                                          "Rows": []
                                        },
                                        {
                                          "Type": "StackPanel",
                                          "Orientation": "Horizontal",
                                          "Gap": 12,
                                          "Children": [
                                            {
                                              "Type": "Checkbox",
                                              "Id": "sv_formation_filter_contacts",
                                              "Label": "Current Contacts",
                                              "IsChecked": true,
                                              "Command": "core.naval_org.set_formation_filter",
                                              "CommandPayload": {
                                                "filter": "contacts"
                                              }
                                            },
                                            {
                                              "Type": "Checkbox",
                                              "Id": "sv_formation_filter_system",
                                              "Label": "Current System",
                                              "IsChecked": true,
                                              "Command": "core.naval_org.set_formation_filter",
                                              "CommandPayload": {
                                                "filter": "system"
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "Type": "Grid",
                                          "Width": "100%",
                                          "Height": "auto",
                                          "Gap": 4,
                                          "ColumnDefinitions": [
                                            "50%",
                                            "50%"
                                          ],
                                          "RowDefinitions": [
                                            "auto",
                                            "auto",
                                            "auto",
                                            "auto",
                                            "auto"
                                          ],
                                          "Children": [
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 0,
                                              "Grid.Column": 0,
                                              "Text": "Set Anchor Fleet",
                                              "Command": "core.system_view.set_formation_anchor"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 0,
                                              "Grid.Column": 1,
                                              "Text": "Set Specific Threat",
                                              "Command": "core.system_view.set_formation_threat"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 1,
                                              "Grid.Column": 0,
                                              "Text": "Clear Anchor Fleet",
                                              "Command": "core.system_view.clear_formation_anchor"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 1,
                                              "Grid.Column": 1,
                                              "Text": "Clear Specific Threat",
                                              "Command": "core.system_view.clear_formation_threat"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 2,
                                              "Grid.Column": 0,
                                              "Text": "Set Distance to Anchor",
                                              "Command": "core.system_view.open_formation_distance_modal"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 2,
                                              "Grid.Column": 1,
                                              "Text": "Set Bearing Offset",
                                              "Command": "core.system_view.open_formation_bearing_modal"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 3,
                                              "Grid.Column": 0,
                                              "Text": "Toggle Hostile Warship",
                                              "Command": "core.system_view.toggle_formation_guard_warship"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 3,
                                              "Grid.Column": 1,
                                              "Text": "Toggle Hostile Contact",
                                              "Command": "core.system_view.toggle_formation_guard_contact"
                                            },
                                            {
                                              "Type": "Button",
                                              "Grid.Row": 4,
                                              "Grid.Column": 0,
                                              "Text": "Toggle Anchor Destination",
                                              "Command": "core.system_view.toggle_formation_anchor_destination"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Grid.Column": 2,
                                      "Orientation": "Vertical",
                                      "Gap": 8,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Children": [
                                        {
                                          "Type": "Label",
                                          "Text": "Specific Threat",
                                          "Classes": [
                                            "ps-text-secondary"
                                          ]
                                        },
                                        {
                                          "Type": "Tree",
                                          "Id": "sv_formation_threat_tree",
                                          "Width": "100%",
                                          "Height": "100%",
                                          "Nodes": [],
                                          "EnableVerticalScroll": true,
                                          "DragDropEnabled": false,
                                          "AllowReorder": false,
                                          "AllowReparenting": false
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Transported Items",
                              "Children": [
                                {
                                  "Type": "DataGrid",
                                  "Id": "sv_fleet_transported_grid",
                                  "Columns": [
                                    {
                                      "Header": "Type",
                                      "Field": "category",
                                      "Width": "100px"
                                    },
                                    {
                                      "Header": "Item",
                                      "Field": "name"
                                    },
                                    {
                                      "Header": "Quantity",
                                      "Field": "quantity",
                                      "Width": "90px"
                                    }
                                  ],
                                  "EmptyText": "No cargo loaded."
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "History",
                              "Children": [
                                {
                                  "Type": "DataGrid",
                                  "Id": "sv_military_history_grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "EnableVerticalScroll": true,
                                  "UseZebraStriping": true,
                                  "Columns": [
                                    {
                                      "Header": "Time",
                                      "Field": "time",
                                      "Width": "170px"
                                    },
                                    {
                                      "Header": "Event",
                                      "Field": "event",
                                      "Flex": 1
                                    }
                                  ],
                                  "FooterLeftText": "",
                                  "FooterRightText": "",
                                  "Rows": []
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Miscellaneous",
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Miscellaneous fleet info will appear here.",
                                  "Classes": [
                                    "ps-text--muted"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_ship_overview_tab",
                  "Title": "Ship Overview",
                  "IsVisible": true,
                  "Children": [
                    {
                      "Type": "Alert",
                      "Id": "sv_military_no_ship_hint",
                      "HorizontalAlignment": "Center",
                      "VerticalAlignment": "Center",
                      "Severity": "Info",
                      "IsDismissible": false,
                      "Message": "Select a ship to view details."
                    },
                    {
                      "Type": "StackPanel",
                      "Id": "sv_military_ship_overview_content",
                      "Orientation": "Vertical",
                      "Width": "100%",
                      "Height": "100%",
                      "IsVisible": false,
                      "Children": [
                        {
                          "Type": "TabContainer",
                          "Id": "sv_military_ship_overview_tabs",
                          "Width": "100%",
                          "Height": "100%",
                          "Command": "core.system_view.select_naval_ship_overview_tab",
                          "Children": [
                            {
                              "Type": "TabItem",
                              "Title": "Ship Design Display",
                              "Children": [
                                {
                                  "Type": "Grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "RowDefinitions": [
                                    "auto",
                                    "*"
                                  ],
                                  "Children": [
                                    {
                                      "Type": "WrapPanel",
                                      "Grid.Row": 0,
                                      "Orientation": "Horizontal",
                                      "Gap": 6,
                                      "Width": "100%",
                                      "Children": [
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_ship_overview_crew_status_grid",
                                          "Width": "170px",
                                          "HeadersVisible": false,
                                          "EnableVerticalScroll": false,
                                          "Columns": [
                                            {
                                              "Header": "Label",
                                              "Field": "label",
                                              "Width": "100px"
                                            },
                                            {
                                              "Header": "Value",
                                              "Field": "value",
                                              "Width": "60px"
                                            }
                                          ],
                                          "Rows": []
                                        },
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_ship_overview_logistics_grid",
                                          "Width": "260px",
                                          "HeadersVisible": false,
                                          "EnableVerticalScroll": false,
                                          "Columns": [
                                            {
                                              "Header": "Label",
                                              "Field": "label",
                                              "Width": "130px"
                                            },
                                            {
                                              "Header": "Value",
                                              "Field": "value",
                                              "Width": "120px"
                                            }
                                          ],
                                          "Rows": []
                                        },
                                        {
                                          "Type": "DataGrid",
                                          "Id": "sv_military_ship_overview_ordnance_grid",
                                          "Width": "260px",
                                          "HeadersVisible": false,
                                          "EnableVerticalScroll": false,
                                          "Columns": [
                                            {
                                              "Header": "Design",
                                              "Field": "design",
                                              "Width": "180px"
                                            },
                                            {
                                              "Header": "Qty",
                                              "Field": "quantity",
                                              "Width": "70px"
                                            }
                                          ],
                                          "Rows": []
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "ScrollBox",
                                      "Id": "sv_military_ship_overview_spec_text",
                                      "Grid.Row": 1,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "Classes": [
                                        "ps-spec-panel"
                                      ],
                                      "Children": []
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Class Design Display",
                              "Children": [
                                {
                                  "Type": "ScrollBox",
                                  "Id": "sv_military_ship_overview_class_design",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "Classes": [
                                    "ps-spec-panel"
                                  ],
                                  "Children": []
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Ordnance Template",
                              "Children": [
                                {
                                  "Type": "Grid",
                                  "Id": "sv_military_ship_overview_ordnance_panel",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "RowDefinitions": [
                                    "auto",
                                    "auto",
                                    "auto",
                                    "auto",
                                    "*"
                                  ],
                                  "Children": [
                                    {
                                      "Type": "Label",
                                      "Id": "sv_military_ship_overview_ordnance_capacity_text",
                                      "Grid.Row": 0,
                                      "Text": "Magazine usage: 0 / 0 MSP"
                                    },
                                    {
                                      "Type": "ProgressBar",
                                      "Id": "sv_military_ship_overview_ordnance_capacity_bar",
                                      "Grid.Row": 1,
                                      "Width": "100%",
                                      "Min": 0,
                                      "Max": 100,
                                      "Value": 0,
                                      "ShowLabel": false,
                                      "IsCompact": true
                                    },
                                    {
                                      "Type": "Grid",
                                      "Id": "sv_military_ship_overview_ordnance_controls",
                                      "Grid.Row": 2,
                                      "Margin": "0,8,0,8",
                                      "ColumnDefinitions": [
                                        "1.2fr",
                                        "1.6fr",
                                        "120px"
                                      ],
                                      "Children": [
                                        {
                                          "Type": "Select",
                                          "Id": "sv_military_ship_overview_ordnance_colony_select",
                                          "Grid.Column": 0,
                                          "Command": "core.system_view.set_naval_ordnance_colony"
                                        },
                                        {
                                          "Type": "Select",
                                          "Id": "sv_military_ship_overview_ordnance_design_select",
                                          "Grid.Column": 1,
                                          "Command": "core.system_view.set_naval_ordnance_design"
                                        },
                                        {
                                          "Type": "Input",
                                          "Id": "sv_military_ship_overview_ordnance_quantity_input",
                                          "Grid.Column": 2,
                                          "Value": "1",
                                          "Command": "core.system_view.set_naval_ordnance_quantity"
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "Grid",
                                      "Id": "sv_military_ship_overview_ordnance_actions",
                                      "Grid.Row": 3,
                                      "Margin": "0,0,0,8",
                                      "ColumnDefinitions": [
                                        "1fr",
                                        "1fr",
                                        "1fr"
                                      ],
                                      "Children": [
                                        {
                                          "Type": "Button",
                                          "Id": "sv_military_ship_overview_ordnance_load",
                                          "Grid.Column": 0,
                                          "Text": "Load",
                                          "Command": "core.system_view.load_naval_ordnance"
                                        },
                                        {
                                          "Type": "Button",
                                          "Id": "sv_military_ship_overview_ordnance_unload",
                                          "Grid.Column": 1,
                                          "Text": "Unload",
                                          "Command": "core.system_view.unload_naval_ordnance"
                                        },
                                        {
                                          "Type": "Button",
                                          "Id": "sv_military_ship_overview_ordnance_load_default",
                                          "Grid.Column": 2,
                                          "Text": "Load Default",
                                          "Command": "core.system_view.load_naval_default_ordnance"
                                        }
                                      ]
                                    },
                                    {
                                      "Type": "DataGrid",
                                      "Id": "sv_military_ship_overview_ordnance_grid",
                                      "Grid.Row": 4,
                                      "Width": "100%",
                                      "Height": "100%",
                                      "EnableVerticalScroll": true,
                                      "Columns": [
                                        {
                                          "Header": "Design",
                                          "Field": "design",
                                          "Flex": 1
                                        },
                                        {
                                          "Header": "Qty",
                                          "Field": "quantity",
                                          "Width": "90px"
                                        },
                                        {
                                          "Header": "MSP",
                                          "Field": "msp",
                                          "Width": "120px"
                                        }
                                      ],
                                      "Rows": []
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Transported Items",
                              "Children": [
                                {
                                  "Type": "DataGrid",
                                  "Id": "sv_military_ship_overview_cargo_grid",
                                  "Width": "100%",
                                  "Height": "100%",
                                  "HeadersVisible": true,
                                  "EnableVerticalScroll": true,
                                  "Columns": [
                                    {
                                      "Header": "Type",
                                      "Field": "category",
                                      "Width": "100px"
                                    },
                                    {
                                      "Header": "Item",
                                      "Field": "name"
                                    },
                                    {
                                      "Header": "Quantity",
                                      "Field": "quantity",
                                      "Width": "90px"
                                    }
                                  ],
                                  "EmptyText": "No cargo loaded.",
                                  "Rows": []
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Armour Status",
                              "Children": [
                                {
                                  "Type": "ArmourGrid",
                                  "Id": "sv_military_ship_overview_armour_grid",
                                  "Width": "100%",
                                  "Cells": [],
                                  "ColumnCount": 0,
                                  "ArmourRating": 0
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Damage Control",
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Id": "sv_military_ship_overview_damage_placeholder",
                                  "Text": "",
                                  "Classes": [
                                    "ps-text--muted"
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "History",
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Id": "sv_military_ship_overview_history_placeholder",
                                  "Text": "",
                                  "Classes": [
                                    "ps-text--muted"
                                  ]
                                }
                              ]
                            },
                            {
                              "Type": "TabItem",
                              "Title": "Misc",
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Id": "sv_military_ship_overview_misc_placeholder",
                                  "Text": "",
                                  "Classes": [
                                    "ps-text--muted"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_ship_combat_tab",
                  "Title": "Ship Combat",
                  "Children": [
                    {
                      "Type": "Alert",
                      "Id": "sv_military_ship_combat_no_ship_hint",
                      "HorizontalAlignment": "Center",
                      "VerticalAlignment": "Center",
                      "Severity": "Info",
                      "IsDismissible": false,
                      "Message": "Select a ship to view combat details."
                    },
                    {
                      "Type": "Grid",
                      "Id": "sv_military_ship_combat_content",
                      "Width": "100%",
                      "Height": "100%",
                      "IsVisible": false,
                      "RowDefinitions": [
                        "1fr",
                        "auto",
                        "auto"
                      ],
                      "Gap": 6,
                      "Children": [
                        {
                          "Type": "Grid",
                          "Id": "sv_military_ship_combat_row1",
                          "Grid.Row": 0,
                          "Width": "100%",
                          "Height": "100%",
                          "ColumnDefinitions": [
                            "3fr",
                            "2fr",
                            "172px"
                          ],
                          "Gap": 8,
                          "Children": [
                            {
                              "Type": "Grid",
                              "Id": "sv_military_ship_combat_assignment_section",
                              "Grid.Column": 0,
                              "Width": "100%",
                              "Height": "100%",
                              "RowDefinitions": [
                                "auto",
                                "1fr"
                              ],
                              "Gap": 4,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Id": "sv_military_ship_combat_assignment_header",
                                  "Grid.Row": 0,
                                  "Text": "Weapons & Fire Controls",
                                  "Style": "H4"
                                },
                                {
                                  "Type": "Tree",
                                  "Id": "sv_military_ship_combat_assignment_tree",
                                  "Grid.Row": 1,
                                  "Nodes": [],
                                  "EnableVerticalScroll": true,
                                  "DragDropEnabled": true,
                                  "AllowReparenting": true,
                                  "DropGroupId": "ship_combat_fc",
                                  "DropMatrix": {
                                    "BeamWeapon": ["BeamFC", "Unassigned"],
                                    "MissileWeapon": ["MissileFC", "Unassigned"],
                                    "PdMode": ["BeamFC", "MissileFC"],
                                    "PdPriority": ["BeamFC"],
                                    "PdConcentration": ["BeamFC"]
                                  },
                                  "OnNodeMoved": "core.naval_org.ship_combat_drag_target",
                                  "Width": "100%",
                                  "Height": "100%"
                                }
                              ]
                            },
                            {
                              "Type": "Grid",
                              "Id": "sv_military_ship_combat_targets_section",
                              "Grid.Column": 1,
                              "Width": "100%",
                              "Height": "100%",
                              "RowDefinitions": [
                                "auto",
                                "1fr"
                              ],
                              "Gap": 4,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Id": "sv_military_ship_combat_targets_header",
                                  "Grid.Row": 0,
                                  "Text": "Point Defence & Targets",
                                  "Style": "H4"
                                },
                                {
                                  "Type": "Tree",
                                  "Id": "sv_military_ship_combat_targets_tree",
                                  "Grid.Row": 1,
                                  "Nodes": [],
                                  "EnableVerticalScroll": true,
                                  "DragDropEnabled": true,
                                  "AllowReparenting": false,
                                  "DropGroupId": "ship_combat_fc",
                                  "OnNodeMoved": "core.naval_org.ship_combat_drag_target",
                                  "Width": "100%",
                                  "Height": "100%"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Id": "sv_military_ship_combat_controls_column",
                              "Grid.Column": 2,
                              "Orientation": "Vertical",
                              "Width": "100%",
                              "Height": "100%",
                              "EnableVerticalScroll": true,
                              "Gap": 6,
                              "Children": [
                                {
                                  "Type": "StackPanel",
                                  "Id": "sv_military_ship_combat_chk_group",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Checkbox",
                                      "Id": "sv_military_ship_combat_hostile_only",
                                      "Label": "Hostile Only",
                                      "TooltipText": "When on, auto-targeting and the potential-targets list consider hostile contacts only.",
                                      "Command": "core.naval_org.ship_combat_toggle_flag",
                                      "CommandPayload": {
                                        "flag": "hostile_only"
                                      }
                                    },
                                    {
                                      "Type": "Checkbox",
                                      "Id": "sv_military_ship_combat_assign_all",
                                      "Label": "Assign All",
                                      "TooltipText": "When on, assigning a target assigns all of the ship's available weapons to it at once.",
                                      "Command": "core.naval_org.ship_combat_toggle_flag",
                                      "CommandPayload": {
                                        "flag": "assign_all"
                                      }
                                    },
                                    {
                                      "Type": "StackPanel",
                                      "Id": "sv_military_ship_combat_assign_num_row",
                                      "Orientation": "Horizontal",
                                      "Width": "100%",
                                      "Gap": 4,
                                      "Children": [
                                        {
                                          "Type": "Checkbox",
                                          "Id": "sv_military_ship_combat_assign_num_chk",
                                          "Label": "Assign #",
                                          "TooltipText": "When on, assigning a target uses the number of weapons entered beside it, instead of all.",
                                          "Command": "core.naval_org.ship_combat_toggle_flag",
                                          "CommandPayload": {
                                            "flag": "assign_num"
                                          }
                                        },
                                        {
                                          "Type": "Input",
                                          "Id": "sv_military_ship_combat_assign_num_input",
                                          "InputType": "Number",
                                          "Value": "10",
                                          "Width": "60px"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_1"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_open_fire_all",
                                      "Text": "Open Fire All",
                                      "TooltipText": "Arm every fire control on the selected ship that has a target. Click again to cease fire on all.",
                                      "Width": "100%",
                                      "Command": "core.naval_org.ship_combat_open_fire_all"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_open_fire_fc",
                                      "Text": "Open Fire FC",
                                      "TooltipText": "Toggle open fire on the selected fire control. It fires at its assigned target when armed.",
                                      "Width": "100%",
                                      "Command": "core.naval_org.ship_combat_open_fire_fc"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_fire_at_will",
                                      "Text": "Fire at Will",
                                      "TooltipText": "Auto-pick a target for each of the ship's fire controls and open fire.",
                                      "Command": "core.naval_org.ship_combat_fire_at_will",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_fire_at_will_fc",
                                      "Text": "Fire at Will FC",
                                      "TooltipText": "Auto-pick a target for the selected fire control and open fire.",
                                      "Command": "core.naval_org.ship_combat_fire_at_will_fc",
                                      "Width": "100%"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_2"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_assign_fleet",
                                      "Text": "Assign Fleet",
                                      "TooltipText": "Copy this ship's fire-control and target setup to the other ships in its fleet.",
                                      "Command": "core.naval_org.ship_combat_assign_fleet",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_assign_sub_fleet",
                                      "Text": "Assign Sub Fleet",
                                      "TooltipText": "Copy this ship's fire-control and target setup to the other ships in its sub-fleet.",
                                      "Command": "core.naval_org.ship_combat_assign_sub_fleet",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_assign_system",
                                      "Text": "Assign System",
                                      "TooltipText": "Copy this ship's fire-control and target setup to friendly ships in the same system.",
                                      "Command": "core.naval_org.ship_combat_assign_system",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_assign_all",
                                      "Text": "Assign All",
                                      "TooltipText": "Copy this ship's fire-control and target setup to every friendly ship.",
                                      "Command": "core.naval_org.ship_combat_assign_all",
                                      "Width": "100%"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_3"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_open_fire_fleet",
                                      "Text": "Open Fire Fleet",
                                      "TooltipText": "Arm every fire control that has a target, across the selected ship's fleet.",
                                      "Command": "core.naval_org.ship_combat_open_fire_fleet",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_fleet_fire_at_will",
                                      "Text": "Fleet Fire at Will",
                                      "TooltipText": "Auto-pick targets and open fire across every ship in the fleet.",
                                      "Command": "core.naval_org.ship_combat_fleet_fire_at_will",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_fire_fleet_mfc",
                                      "Text": "Fire Fleet MFC",
                                      "TooltipText": "Arm every missile fire control that has a target, across the fleet.",
                                      "Command": "core.naval_org.ship_combat_fire_fleet_mfc",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_fire_fleet_bfc",
                                      "Text": "Fire Fleet BFC",
                                      "TooltipText": "Arm every beam fire control that has a target, across the fleet.",
                                      "Command": "core.naval_org.ship_combat_fire_fleet_bfc",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_cease_fire_fleet",
                                      "Text": "Cease Fire Fleet",
                                      "TooltipText": "Cease fire on every fire control across the selected ship's fleet.",
                                      "Command": "core.naval_org.ship_combat_cease_fire_fleet",
                                      "Width": "100%"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_4"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_clear_target",
                                      "Text": "Clear Target",
                                      "TooltipText": "Remove the target from the selected fire control.",
                                      "Width": "100%",
                                      "Command": "core.naval_org.ship_combat_clear_target"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_clear_all_target",
                                      "Text": "Clear All Target",
                                      "TooltipText": "Remove targets from all of the selected ship's fire controls.",
                                      "Width": "100%",
                                      "Command": "core.naval_org.ship_combat_clear_all_targets"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_5"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_auto_assign_fc",
                                      "Text": "Auto Assign FC",
                                      "TooltipText": "Automatically distribute the ship's weapons across its fire controls.",
                                      "Command": "core.naval_org.ship_combat_auto_assign_fc",
                                      "Width": "100%"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_6"
                                },
                                {
                                  "Type": "StackPanel",
                                  "Orientation": "Vertical",
                                  "Width": "100%",
                                  "Gap": 4,
                                  "Children": [
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_auto_target_mfc",
                                      "Text": "Auto Target MFC",
                                      "TooltipText": "Auto-assign targets to the fleet's missile fire controls (does not open fire).",
                                      "Command": "core.naval_org.ship_combat_auto_target_mfc",
                                      "Width": "100%"
                                    },
                                    {
                                      "Type": "Button",
                                      "Id": "sv_military_ship_combat_btn_auto_target_bfc",
                                      "Text": "Auto Target BFC",
                                      "TooltipText": "Auto-assign targets to the fleet's beam fire controls (does not open fire).",
                                      "Command": "core.naval_org.ship_combat_auto_target_bfc",
                                      "Width": "100%"
                                    }
                                  ]
                                },
                                {
                                  "Type": "Separator",
                                  "Id": "sv_military_ship_combat_sep_7"
                                },
                                {
                                  "Type": "Checkbox",
                                  "Id": "sv_military_ship_combat_range_x2",
                                  "Label": "Range x2",
                                  "TooltipText": "Double the engagement range used by Auto Target MFC/BFC (otherwise standard range).",
                                  "Command": "core.naval_org.ship_combat_toggle_flag",
                                  "CommandPayload": {
                                    "flag": "range_x2"
                                  }
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "Type": "Label",
                          "Id": "sv_military_ship_combat_status",
                          "Grid.Row": 1,
                          "Text": "",
                          "Style": "ship-combat-status"
                        },
                        {
                          "Type": "StackPanel",
                          "Id": "sv_military_ship_combat_action_bar",
                          "Grid.Row": 2,
                          "Orientation": "Horizontal",
                          "Width": "100%",
                          "Gap": 8,
                          "Children": [
                            {
                              "Type": "Button",
                              "Id": "sv_military_ship_combat_btn_sync_fire",
                              "Text": "Sync Fire On",
                              "TooltipText": "Toggle synchronized fire for the selected ship: weapons hold until all are ready, then fire together.",
                              "Command": "core.naval_org.ship_combat_toggle_sync_fire"
                            },
                            {
                              "Type": "Button",
                              "Id": "sv_military_ship_combat_btn_fleet_sync_on",
                              "Text": "Fleet Sync On",
                              "TooltipText": "Enable synchronized fire for every ship in the fleet.",
                              "Command": "core.naval_org.ship_combat_fleet_sync",
                              "CommandPayload": {
                                "arm": true
                              }
                            },
                            {
                              "Type": "Button",
                              "Id": "sv_military_ship_combat_btn_fleet_sync_off",
                              "Text": "Fleet Sync Off",
                              "TooltipText": "Disable synchronized fire for every ship in the fleet.",
                              "Command": "core.naval_org.ship_combat_fleet_sync",
                              "CommandPayload": {
                                "arm": false
                              }
                            },
                            {
                              "Type": "Button",
                              "Id": "sv_military_ship_combat_btn_min_amm_range",
                              "Text": "Min AMM Range",
                              "TooltipText": "Set the minimum range (km) at which anti-missile missiles engage incoming missiles. Below it, they hold fire.",
                              "Command": "core.naval_org.ship_combat_open_min_amm_modal"
                            },
                            {
                              "Type": "Button",
                              "Id": "sv_military_ship_combat_btn_decoy_threshold",
                              "Text": "Decoy Threshold",
                              "TooltipText": "Set the incoming-missile size (MSP) that triggers automatic decoy launches.",
                              "Command": "core.naval_org.ship_combat_open_decoy_modal"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "Type": "Modal",
                      "Id": "sv_military_ship_combat_min_amm_modal",
                      "Title": "Set Minimum AMM Range",
                      "IsVisible": false,
                      "CloseCommand": "core.naval_org.ship_combat_close_modal",
                      "DefaultCommand": "core.naval_org.ship_combat_set_min_amm_range",
                      "Size": "Small",
                      "Children": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Vertical",
                          "Gap": 8,
                          "Width": "100%",
                          "Children": [
                            {
                              "Type": "Label",
                              "Id": "sv_military_ship_combat_min_amm_prompt",
                              "Text": "Enter minimum AMM engagement range in km (0 = none)."
                            },
                            {
                              "Type": "Input",
                              "Id": "sv_military_ship_combat_min_amm_input",
                              "InputType": "number",
                              "AutoFocus": true,
                              "Value": "",
                              "Placeholder": "km",
                              "Command": "core.naval_org.ship_combat_set_min_amm_value"
                            }
                          ]
                        }
                      ],
                      "FooterChildren": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 8,
                          "HorizontalAlignment": "Right",
                          "Children": [
                            {
                              "Type": "Button",
                              "Text": "Cancel",
                              "Command": "core.naval_org.ship_combat_close_modal"
                            },
                            {
                              "Type": "Button",
                              "Text": "Set Range",
                              "Command": "core.naval_org.ship_combat_set_min_amm_range",
                              "Style": "Primary"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "Type": "Modal",
                      "Id": "sv_military_ship_combat_decoy_modal",
                      "Title": "Set Decoy Threshold",
                      "IsVisible": false,
                      "CloseCommand": "core.naval_org.ship_combat_close_modal",
                      "DefaultCommand": "core.naval_org.ship_combat_set_decoy_threshold",
                      "Size": "Small",
                      "Children": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Vertical",
                          "Gap": 8,
                          "Width": "100%",
                          "Children": [
                            {
                              "Type": "Label",
                              "Id": "sv_military_ship_combat_decoy_prompt",
                              "Text": "Decoys launch when inbound missile MSP meets or exceeds this threshold (0 = always)."
                            },
                            {
                              "Type": "Input",
                              "Id": "sv_military_ship_combat_decoy_input",
                              "InputType": "number",
                              "AutoFocus": true,
                              "Value": "",
                              "Placeholder": "MSP",
                              "Command": "core.naval_org.ship_combat_set_decoy_value"
                            }
                          ]
                        }
                      ],
                      "FooterChildren": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 8,
                          "HorizontalAlignment": "Right",
                          "Children": [
                            {
                              "Type": "Button",
                              "Text": "Cancel",
                              "Command": "core.naval_org.ship_combat_close_modal"
                            },
                            {
                              "Type": "Button",
                              "Text": "Set Threshold",
                              "Command": "core.naval_org.ship_combat_set_decoy_threshold",
                              "Style": "Primary"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_oob_tab",
                  "Title": "OOB",
                  "Children": [
                    {
                      "Type": "ScrollBox",
                      "Width": "100%",
                      "Height": "100%",
                      "Children": [
                        {
                          "Type": "Label",
                          "Id": "sv_military_oob_text",
                          "Text": "",
                          "TextWrapping": "Wrap",
                          "Classes": [
                            "ps-typewriter"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_logistics_tab",
                  "Title": "Logistics",
                  "Children": [
                    {
                      "Type": "StackPanel",
                      "Orientation": "Vertical",
                      "Gap": 8,
                      "Width": "100%",
                      "Height": "100%",
                      "Children": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 8,
                          "Children": [
                            {
                              "Type": "Label",
                              "Text": "Sort",
                              "Width": "48px",
                              "Classes": [
                                "ps-text-secondary"
                              ]
                            },
                            {
                              "Type": "Select",
                              "Id": "sv_military_logistics_sort",
                              "Width": "220px",
                              "Value": "",
                              "Options": [],
                              "Command": "core.system_view.set_naval_logistics_sort"
                            }
                          ]
                        },
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 12,
                          "Children": [
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_supply",
                              "Label": "Exclude Supply Ships",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "supply_ship"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_tankers",
                              "Label": "Exclude Tankers",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "tankers"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_fighters",
                              "Label": "Exclude Fighters",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "fighters"
                              }
                            }
                          ]
                        },
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 12,
                          "Children": [
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_facs",
                              "Label": "Exclude FACs",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "facs"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_shipyard",
                              "Label": "Exclude Shipyard Fleets",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "shipyard"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_logistics_filter_non_armed",
                              "Label": "Exclude Non-Armed",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "non_armed"
                              }
                            }
                          ]
                        },
                        {
                          "Type": "DataGrid",
                          "Id": "sv_military_logistics_grid",
                          "Width": "100%",
                          "Height": "100%",
                          "EnableVerticalScroll": true,
                          "UseZebraStriping": true,
                          "Columns": [
                            {
                              "Header": "Ship",
                              "Field": "ship_name",
                              "Flex": 2
                            },
                            {
                              "Header": "Class",
                              "Field": "class_name",
                              "Width": "140px"
                            },
                            {
                              "Header": "Fleet",
                              "Field": "fleet_name",
                              "Width": "140px"
                            },
                            {
                              "Header": "System",
                              "Field": "system_name",
                              "Width": "120px"
                            },
                            {
                              "Header": "Status",
                              "Field": "status_flags",
                              "Width": "72px"
                            },
                            {
                              "Header": "Fuel",
                              "Field": "fuel",
                              "Width": "70px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Ammo",
                              "Field": "ammo",
                              "Width": "70px",
                              "Align": "Right"
                            },
                            {
                              "Header": "MSP",
                              "Field": "msp",
                              "Width": "70px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Deploy",
                              "Field": "deploy",
                              "Width": "78px",
                              "Align": "Right"
                            },
                            {
                              "Header": "TSO",
                              "Field": "tso",
                              "Width": "82px",
                              "Align": "Right"
                            }
                          ],
                          "FooterLeftText": "",
                          "FooterRightText": "",
                          "Rows": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_fuel_tab",
                  "Title": "Fuel",
                  "Children": [
                    {
                      "Type": "StackPanel",
                      "Orientation": "Vertical",
                      "Gap": 8,
                      "Width": "100%",
                      "Height": "100%",
                      "Children": [
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 12,
                          "Children": [
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_supply",
                              "Label": "Exclude Supply Ships",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "supply_ship"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_tankers",
                              "Label": "Exclude Tankers",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "tankers"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_fighters",
                              "Label": "Exclude Fighters",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "fighters"
                              }
                            }
                          ]
                        },
                        {
                          "Type": "StackPanel",
                          "Orientation": "Horizontal",
                          "Gap": 12,
                          "Children": [
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_facs",
                              "Label": "Exclude FACs",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "facs"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_shipyard",
                              "Label": "Exclude Shipyard Fleets",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "shipyard"
                              }
                            },
                            {
                              "Type": "Checkbox",
                              "Id": "sv_military_fuel_filter_non_armed",
                              "Label": "Exclude Non-Armed",
                              "Command": "core.system_view.toggle_naval_report_filter",
                              "CommandPayload": {
                                "filterId": "non_armed"
                              }
                            }
                          ]
                        },
                        {
                          "Type": "DataGrid",
                          "Id": "sv_military_fuel_grid",
                          "Width": "100%",
                          "Height": "100%",
                          "EnableVerticalScroll": true,
                          "UseZebraStriping": true,
                          "Columns": [
                            {
                              "Header": "Ship",
                              "Field": "ship_name",
                              "Flex": 2
                            },
                            {
                              "Header": "Class",
                              "Field": "class_name",
                              "Width": "140px"
                            },
                            {
                              "Header": "Fleet",
                              "Field": "fleet_name",
                              "Width": "140px"
                            },
                            {
                              "Header": "System",
                              "Field": "system_name",
                              "Width": "120px"
                            },
                            {
                              "Header": "Power",
                              "Field": "power",
                              "Width": "90px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Eff",
                              "Field": "efficiency",
                              "Width": "82px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Fuel K",
                              "Field": "fuel_k",
                              "Width": "82px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Fuel %",
                              "Field": "fuel_pct",
                              "Width": "76px",
                              "Align": "Right"
                            },
                            {
                              "Header": "State",
                              "Field": "fuel_state",
                              "Width": "86px"
                            },
                            {
                              "Header": "Cap K",
                              "Field": "capacity_k",
                              "Width": "88px",
                              "Align": "Right"
                            },
                            {
                              "Header": "Range B",
                              "Field": "range_b",
                              "Width": "82px",
                              "Align": "Right"
                            }
                          ],
                          "FooterLeftText": "",
                          "FooterRightText": "",
                          "Rows": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_admin_tab",
                  "Title": "Admin",
                  "Children": [
                    {
                      "Type": "StackPanel",
                      "Orientation": "Vertical",
                      "Gap": 8,
                      "Width": "100%",
                      "Height": "100%",
                      "Children": [
                        {
                          "Type": "DataGrid",
                          "Id": "sv_military_admin_grid",
                          "Width": "100%",
                          "HeadersVisible": false,
                          "EnableVerticalScroll": true,
                          "Columns": [
                            {
                              "Header": "Label",
                              "Field": "label",
                              "Width": "160px"
                            },
                            {
                              "Header": "Value",
                              "Field": "value",
                              "Flex": 1
                            }
                          ],
                          "Rows": []
                        },
                        {
                          "Type": "Label",
                          "Id": "sv_military_admin_hint",
                          "Text": "",
                          "IsVisible": false,
                          "Classes": [
                            "ps-text--muted"
                          ]
                        },
                        {
                          "Type": "StackPanel",
                          "Id": "sv_military_admin_editor",
                          "Orientation": "Vertical",
                          "Gap": 8,
                          "IsVisible": false,
                          "Children": [
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Type",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_type_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_type"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Home Colony",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_home_colony_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_home_colony"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Priority",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Input",
                                  "Id": "sv_military_admin_priority_input",
                                  "Width": "100%",
                                  "Value": "",
                                  "InputType": "number",
                                  "Command": "core.system_view.set_naval_admin_priority"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Auto Assign",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Checkbox",
                                  "Id": "sv_military_admin_auto_assign",
                                  "IsChecked": false,
                                  "Command": "core.system_view.set_naval_admin_auto_assign"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Req. Bonus",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_required_bonus_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_required_bonus"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Sec. Bonus",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_secondary_bonus_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_secondary_bonus"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Ter. Bonus",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_tertiary_bonus_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_tertiary_bonus"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Label",
                                  "Text": "Min Rank",
                                  "Width": "120px",
                                  "Classes": [
                                    "ps-text-secondary"
                                  ]
                                },
                                {
                                  "Type": "Select",
                                  "Id": "sv_military_admin_minimum_rank_select",
                                  "Width": "100%",
                                  "Value": "",
                                  "Options": [],
                                  "Command": "core.system_view.set_naval_admin_minimum_rank"
                                }
                              ]
                            },
                            {
                              "Type": "StackPanel",
                              "Orientation": "Horizontal",
                              "Gap": 8,
                              "Children": [
                                {
                                  "Type": "Button",
                                  "Text": "Apply",
                                  "Width": "34%",
                                  "Command": "core.system_view.apply_naval_admin_update"
                                },
                                {
                                  "Type": "Button",
                                  "Text": "Assign Best",
                                  "Width": "33%",
                                  "Command": "core.system_view.assign_naval_admin_best"
                                },
                                {
                                  "Type": "Button",
                                  "Text": "Assign Vacancies",
                                  "Width": "33%",
                                  "Command": "core.system_view.assign_naval_admin_vacancies"
                                }
                              ]
                            },
                            {
                              "Type": "Button",
                              "Text": "Reassign All",
                              "Command": "core.system_view.reassign_naval_admins"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "Type": "TabItem",
                  "Id": "sv_military_detail_shipping_tab",
                  "Title": "Shipping",
                  "IsVisible": false,
                  "Children": [
                    {
                      "Type": "Grid",
                      "Width": "100%",
                      "Height": "100%",
                      "ColumnDefinitions": [
                        "350px",
                        "1fr"
                      ],
                      "RowDefinitions": [
                        "1fr"
                      ],
                      "Gap": 8,
                      "Children": [
                        {
                          "Type": "DataGrid",
                          "Id": "shipping_summary",
                          "Grid.Column": 0,
                          "Width": "100%",
                          "Height": "100%",
                          "HeadersVisible": false,
                          "EnableVerticalScroll": true,
                          "Columns": [
                            {
                              "Header": "Label",
                              "Field": "Label",
                              "Width": "160px"
                            },
                            {
                              "Header": "Value",
                              "Field": "Value",
                              "Flex": 1
                            }
                          ],
                          "Rows": []
                        },
                        {
                          "Type": "DataGrid",
                          "Id": "shipping_transactions",
                          "Grid.Column": 1,
                          "Width": "100%",
                          "Height": "100%",
                          "EnableVerticalScroll": true,
                          "UseZebraStriping": true,
                          "Columns": [
                            {
                              "Header": "Date",
                              "Field": "Date",
                              "Width": "100px"
                            },
                            {
                              "Header": "Ship",
                              "Field": "Ship",
                              "Flex": 1.5
                            },
                            {
                              "Header": "Cargo",
                              "Field": "CargoType",
                              "Width": "100px"
                            },
                            {
                              "Header": "Origin",
                              "Field": "Origin",
                              "Flex": 1.5
                            },
                            {
                              "Header": "Destination",
                              "Field": "Destination",
                              "Flex": 1.5
                            },
                            {
                              "Header": "Revenue",
                              "Field": "Revenue",
                              "Width": "100px",
                              "Align": "Right"
                            }
                          ],
                          "Rows": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Id": "sv_military_action_row",
          "Grid.Row": 1,
          "Grid.ColumnSpan": 2,
          "Orientation": "Horizontal",
          "HorizontalAlignment": "Left",
          "Gap": 6,
          "Width": "100%",
          "Children": [
            {
              "Type": "Button",
              "Id": "sv_military_create_admin",
              "Text": "Create Admin",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_create_modal",
              "CommandPayload": {
                "createType": "AdminCommand"
              },
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_create_fleet",
              "Text": "Create Fleet",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_create_modal",
              "CommandPayload": {
                "createType": "Fleet"
              },
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_create_subfleet",
              "Text": "Create Sub-Fleet",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_create_modal",
              "CommandPayload": {
                "createType": "SubFleet"
              },
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_create_squadron",
              "Text": "Create Squadron",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_create_modal",
              "CommandPayload": {
                "createType": "Squadron"
              },
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_set_speed",
              "Text": "Set Speed",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_speed_modal",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_transfer_fleet",
              "Text": "Transfer Fleet",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_transfer_modal",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_select_name",
              "Text": "Select Name",
              "IsVisible": false,
              "Command": "core.system_view.open_naval_select_name_modal",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_detach",
              "Text": "Detach",
              "IsVisible": false,
              "Command": "core.system_view.detach_naval_selection",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_rename",
              "Text": "Rename",
              "IsEnabled": false,
              "Command": "core.system_view.open_naval_rename_modal",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_delete",
              "Text": "Delete",
              "IsEnabled": false,
              "Command": "core.system_view.request_naval_delete",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_collapse_all",
              "Text": "Collapse All",
              "IsEnabled": false,
              "Command": "core.system_view.collapse_all_naval_nodes",
              "Classes": [
                "ps-btn--sm"
              ]
            },
            {
              "Type": "Button",
              "Id": "sv_military_active_btn",
              "Text": "Active On",
              "Command": "core.naval_org.toggle_active_sensors",
              "Classes": [
                "ps-btn--sm"
              ],
              "IsVisible": false
            },
            {
              "Type": "Button",
              "Id": "sv_military_shields_btn",
              "Text": "Raise Shields",
              "TooltipText": "Raise/Lower shields for the selected ship or fleet. Raised shields absorb damage and regenerate; lowered shields drop to zero strength.",
              "Command": "core.naval_org.toggle_shields",
              "Classes": [
                "ps-btn--sm"
              ],
              "IsVisible": false
            },
            {
              "Type": "Button",
              "Id": "sv_military_launch_all",
              "Text": "Launch All",
              "Command": "core.naval_org.launch_all",
              "Classes": [
                "ps-btn--sm"
              ],
              "IsVisible": false
            },
            {
              "Type": "Button",
              "Id": "sv_military_land_all",
              "Text": "Land All",
              "Command": "core.naval_org.land_all",
              "Classes": [
                "ps-btn--sm"
              ],
              "IsVisible": false
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_speed_modal",
      "Title": "Set Fleet Speed",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_speed_modal",
      "DefaultCommand": "core.system_view.confirm_naval_speed_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_speed_modal_prompt",
              "Text": "Enter a positive fleet speed in km/s."
            },
            {
              "Type": "Input",
              "Id": "sv_military_speed_input",
              "InputType": "number",
              "AutoFocus": true,
              "Value": "",
              "Placeholder": "Speed",
              "Command": "core.system_view.set_naval_speed_value"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_speed_modal"
            },
            {
              "Type": "Button",
              "Text": "Set Speed",
              "Command": "core.system_view.confirm_naval_speed_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_formation_distance_modal",
      "Title": "Set Distance to Anchor",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_formation_distance_modal",
      "DefaultCommand": "core.system_view.confirm_formation_distance_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Text": "Enter the desired distance from the anchor fleet in km."
            },
            {
              "Type": "Input",
              "Id": "sv_formation_distance_input",
              "InputType": "number",
              "AutoFocus": true,
              "Value": "0",
              "Placeholder": "Distance (km)",
              "Command": "core.system_view.set_formation_distance_value"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_formation_distance_modal"
            },
            {
              "Type": "Button",
              "Text": "Set Distance",
              "Command": "core.system_view.confirm_formation_distance_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_formation_bearing_modal",
      "Title": "Set Bearing Offset",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_formation_bearing_modal",
      "DefaultCommand": "core.system_view.confirm_formation_bearing_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Text": "Enter the bearing offset from the anchor in degrees (0-359)."
            },
            {
              "Type": "Input",
              "Id": "sv_formation_bearing_input",
              "InputType": "number",
              "AutoFocus": true,
              "Value": "0",
              "Placeholder": "Bearing (degrees)",
              "Command": "core.system_view.set_formation_bearing_value"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_formation_bearing_modal"
            },
            {
              "Type": "Button",
              "Text": "Set Bearing",
              "Command": "core.system_view.confirm_formation_bearing_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_transfer_modal",
      "Title": "Transfer Fleet",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_transfer_modal",
      "DefaultCommand": "core.system_view.confirm_naval_transfer_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_transfer_prompt",
              "Text": "Select the player-controlled race that should receive the fleet."
            },
            {
              "Type": "Select",
              "Id": "sv_military_transfer_race_select",
              "Width": "100%",
              "Value": "",
              "Options": [],
              "Command": "core.system_view.set_naval_transfer_race"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_transfer_modal"
            },
            {
              "Type": "Button",
              "Text": "Transfer Fleet",
              "Command": "core.system_view.confirm_naval_transfer_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_ship_transfer_modal",
      "Title": "Transfer Ships",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_ship_transfer_modal",
      "DefaultCommand": "core.system_view.confirm_ship_transfer_modal",
      "Size": "Small",
      "AccentVariant": "accent",
      "DisplayMode": "Glow",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_ship_transfer_prompt",
              "Text": "Select the target fleet."
            },
            {
              "Type": "Select",
              "Id": "sv_military_ship_transfer_fleet_select",
              "Width": "100%",
              "Value": "",
              "Options": [],
              "Command": "core.system_view.set_ship_transfer_target"
            },
            {
              "Type": "Label",
              "Id": "sv_military_ship_transfer_ships",
              "Text": "",
              "Classes": [
                "ps-text-muted"
              ]
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_ship_transfer_modal"
            },
            {
              "Type": "Button",
              "Text": "Transfer",
              "Command": "core.system_view.confirm_ship_transfer_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_land_target_modal",
      "Title": "Land on Carrier",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_land_target_modal",
      "DefaultCommand": "core.system_view.confirm_naval_land_target_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_land_target_prompt",
              "Text": "Select a co-located carrier to receive the craft."
            },
            {
              "Type": "Select",
              "Id": "sv_military_land_target_select",
              "Width": "100%",
              "Value": "",
              "Options": [],
              "Command": "core.system_view.set_naval_land_target"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_land_target_modal"
            },
            {
              "Type": "Button",
              "Text": "Land on Carrier",
              "Command": "core.system_view.confirm_naval_land_target_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_name_modal",
      "Title": "Edit Name",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_name_modal",
      "DefaultCommand": "core.system_view.confirm_naval_name_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_name_modal_prompt",
              "Text": "Enter the name for the new hierarchy node."
            },
            {
              "Type": "Input",
              "Id": "sv_military_name_input",
              "InputType": "text",
              "AutoFocus": true,
              "Value": "",
              "Placeholder": "Name",
              "Command": "core.system_view.set_naval_modal_name"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_name_modal"
            },
            {
              "Type": "Button",
              "Id": "sv_military_name_confirm",
              "Text": "Confirm",
              "Command": "core.system_view.confirm_naval_name_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_select_name_modal",
      "Title": "Select Ship Name",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_select_name_modal",
      "DefaultCommand": "core.system_view.confirm_naval_select_name_modal",
      "Size": "Medium",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_select_name_prompt",
              "Text": "Choose a themed ship name."
            },
            {
              "Type": "Label",
              "Id": "sv_military_select_name_theme",
              "Text": "Theme: unavailable",
              "Classes": [
                "ps-text-secondary"
              ]
            },
            {
              "Type": "Label",
              "Id": "sv_military_select_name_current",
              "Text": "Current: n/a",
              "Classes": [
                "ps-text-secondary"
              ]
            },
            {
              "Type": "Grid",
              "Width": "100%",
              "ColumnDefinitions": [
                "1fr",
                "1fr"
              ],
              "Gap": 8,
              "Children": [
                {
                  "Type": "StackPanel",
                  "Grid.Column": 0,
                  "Orientation": "Vertical",
                  "Gap": 4,
                  "Children": [
                    {
                      "Type": "Label",
                      "Text": "Available Names",
                      "Classes": [
                        "ps-section-title"
                      ]
                    },
                    {
                      "Type": "Select",
                      "Id": "sv_military_select_name_available_select",
                      "Width": "100%",
                      "Value": "",
                      "Options": [],
                      "Command": "core.system_view.set_naval_ship_name_option"
                    }
                  ]
                },
                {
                  "Type": "StackPanel",
                  "Grid.Column": 1,
                  "Orientation": "Vertical",
                  "Gap": 4,
                  "Children": [
                    {
                      "Type": "Label",
                      "Text": "Recently Used",
                      "Classes": [
                        "ps-section-title"
                      ]
                    },
                    {
                      "Type": "Select",
                      "Id": "sv_military_select_name_recent_select",
                      "Width": "100%",
                      "Value": "",
                      "Options": [],
                      "Command": "core.system_view.set_naval_ship_name_option"
                    }
                  ]
                }
              ]
            },
            {
              "Type": "Label",
              "Text": "Recently used names may already belong to another ship in the same race.",
              "Classes": [
                "ps-text--muted"
              ]
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_select_name_modal"
            },
            {
              "Type": "Button",
              "Id": "sv_military_select_name_confirm",
              "Text": "Apply Name",
              "Command": "core.system_view.confirm_naval_select_name_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_delete_modal",
      "Title": "Delete Hierarchy Node",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_delete",
      "DefaultCommand": "core.system_view.confirm_naval_delete",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Id": "sv_military_delete_prompt",
              "Text": "Delete the selected hierarchy node?"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_delete"
            },
            {
              "Type": "Button",
              "Text": "Delete",
              "Command": "core.system_view.confirm_naval_delete",
              "Style": "Danger"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_template_modal",
      "Title": "Save Order Template",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_template_modal",
      "DefaultCommand": "core.system_view.confirm_naval_template_modal",
      "Size": "Small",
      "Children": [
        {
          "Type": "StackPanel",
          "Orientation": "Vertical",
          "Gap": 8,
          "Width": "100%",
          "Children": [
            {
              "Type": "Label",
              "Text": "Enter a name for the order template."
            },
            {
              "Type": "Input",
              "Id": "sv_military_template_name_input",
              "AutoFocus": true,
              "Value": "",
              "Placeholder": "Template name",
              "Command": "core.system_view.set_naval_template_name"
            }
          ]
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_template_modal"
            },
            {
              "Type": "Button",
              "Text": "Save",
              "Command": "core.system_view.confirm_naval_template_modal",
              "Style": "Primary"
            }
          ]
        }
      ]
    },
    {
      "Type": "Modal",
      "Id": "sv_military_template_delete_modal",
      "Title": "Delete Order Template",
      "IsVisible": false,
      "CloseCommand": "core.system_view.cancel_naval_template_delete",
      "DefaultCommand": "core.system_view.confirm_naval_template_delete",
      "Size": "Small",
      "Children": [
        {
          "Type": "Label",
          "Id": "sv_military_template_delete_prompt",
          "Text": "Delete the selected order template?"
        }
      ],
      "FooterChildren": [
        {
          "Type": "StackPanel",
          "Orientation": "Horizontal",
          "Gap": 8,
          "HorizontalAlignment": "Right",
          "Children": [
            {
              "Type": "Button",
              "Text": "Cancel",
              "Command": "core.system_view.cancel_naval_template_delete"
            },
            {
              "Type": "Button",
              "Text": "Delete",
              "Style": "Danger",
              "Command": "core.system_view.confirm_naval_template_delete"
            }
          ]
        }
      ]
    }
  ]
}